/*
Theme Name: Mhalia
Theme URI: https://tshirtatlowprice.com/
Author: Mhalia
Description: A blazing-fast, lightweight WooCommerce theme built for print-on-demand stores (Printify). No page builders, no bloat — just clean semantic HTML, a few KB of hand-written CSS, and vanilla JS. Designed for t-shirts, mugs, hats and personalized gifts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mhalia
Tags: e-commerce, woocommerce, print-on-demand, lightweight, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. Design tokens (CSS variables) — change your whole look from here
   ========================================================================== */
:root {
  --color-bg: #ffffff;
  --color-fg: #111418;
  --color-muted: #6b7280;
  --color-line: #e6e8eb;
  --color-soft: #f5f6f8;
  --color-accent: #ff4d4d;         /* primary brand accent */
  --color-accent-dark: #e23a3a;
  --color-accent-fg: #ffffff;
  --color-sale: #16a34a;
  --color-star: #ffb020;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: var(--font-base);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(17,20,24,.08);
  --shadow-md: 0 6px 20px rgba(17,20,24,.10);

  --container: 1240px;
  --gap: 24px;
  --header-h: 64px;
}

/* ==========================================================================
   2. Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; }

/* ==========================================================================
   3. Layout helpers
   ========================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(36px, 6vw, 64px); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .link-all { font-weight: 600; color: var(--color-accent); white-space: nowrap; }
.text-center { text-align: center; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 14px; z-index: 999; border-radius: 6px; box-shadow: var(--shadow-md); }

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: 2px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: .95rem; line-height: 1; transition: .15s ease;
  background: var(--color-accent); color: var(--color-accent-fg);
}
.btn:hover { background: var(--color-accent-dark); color: #fff; transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--color-fg); border-color: var(--color-fg); }
.btn--outline:hover { background: var(--color-fg); color: #fff; }
.btn--light { background: #fff; color: var(--color-fg); }
.btn--block { display: flex; width: 100%; }

/* ==========================================================================
   5. Announcement bar
   ========================================================================== */
.announce {
  background: var(--color-fg); color: #fff; text-align: center;
  font-size: .85rem; padding: 8px 16px; letter-spacing: .2px;
}
.announce strong { color: var(--color-accent); }

/* ==========================================================================
   6. Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--color-line); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.site-brand { font-size: 1.5rem; font-weight: 900; letter-spacing: -.5px; white-space: nowrap; }
.site-brand span { color: var(--color-accent); }
.site-brand .site-logo-link { display: inline-flex; align-items: center; }
.site-logo { display: block; width: auto; height: auto; }
.site-logo--header { max-height: 44px; max-width: 200px; }
/* Interim: the shared logo is dark, so render it white on the dark footer.
   Remove this filter once a dedicated (light) footer logo is added. */
.site-logo--footer { max-height: 48px; max-width: 220px; filter: brightness(0) invert(1); }
@media (max-width: 640px) { .site-logo--header { max-height: 38px; max-width: 150px; } }
.header-search { flex: 1; max-width: 560px; }
.header-search form { display: flex; border: 2px solid var(--color-line); border-radius: 999px; overflow: hidden; background: var(--color-soft); }
.header-search input[type="search"] { flex: 1; border: 0; background: transparent; padding: 10px 18px; font-size: .95rem; outline: none; }
.header-search button { border: 0; background: var(--color-accent); color: #fff; padding: 0 18px; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; }
.header-actions a { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; }
.header-icon { position: relative; }
.cart-count {
  position: absolute; top: -8px; right: -10px; background: var(--color-accent); color: #fff;
  font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 4px;
}
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Primary nav */
.primary-nav { border-top: 1px solid var(--color-line); }
.primary-nav .menu { display: flex; align-items: center; gap: 6px; list-style: none; flex-wrap: wrap; margin: 0; padding: 0; }
.primary-nav .menu > li > a { display: block; padding: 12px 16px; font-weight: 600; font-size: .92rem; border-radius: var(--radius-sm); transition: color .15s, background .15s; }
.primary-nav .menu > li > a:hover,
.primary-nav .menu > li.current-menu-item > a { color: var(--color-accent); background: var(--color-soft); }
.primary-nav li { position: relative; }
.primary-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff;
  border: 1px solid var(--color-line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 8px; margin: 0; list-style: none; display: none; flex-direction: column; z-index: 50;
}
.primary-nav li:hover > .sub-menu { display: flex; }
.primary-nav .sub-menu a { padding: 8px 12px; border-radius: 6px; font-size: .9rem; }
.primary-nav .sub-menu a:hover { background: var(--color-soft); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: transparent; border: 0; padding: 6px; color: var(--color-fg); }

/* ==========================================================================
   7. Hero
   ========================================================================== */
.hero { border-bottom: 1px solid var(--color-line); }
.hero-media--full { width: 100%; }
.hero-media--full img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: contain; }
.hero-media--full .hero-media--placeholder { width: 100%; height: clamp(320px, 55vw, 640px); border-radius: 0; aspect-ratio: unset; }
.hero-media--placeholder {
  aspect-ratio: 4/3; border-radius: var(--radius); background:
  repeating-linear-gradient(45deg, var(--color-soft), var(--color-soft) 20px, #eef0f3 20px, #eef0f3 40px);
  display: grid; place-items: center; color: var(--color-muted); font-weight: 600;
}

/* Trust badges strip */
.trust { border-bottom: 1px solid var(--color-line); background: #fff; }
.trust-inner { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; padding-block: 18px; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--color-fg); }
.trust-item .icon { color: var(--color-accent); flex: none; }

/* ==========================================================================
   8. Category cards
   ========================================================================== */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); }
.cat-card { text-align: center; }
.cat-card .thumb {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--color-soft);
  display: grid; place-items: center; transition: .2s; border: 1px solid var(--color-line);
}
.cat-card:hover .thumb { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; }
.cat-card .name { display: block; margin-top: 10px; font-weight: 700; font-size: .9rem; }
.cat-card .count { color: var(--color-muted); font-size: .78rem; }

/* ==========================================================================
   9. Product grid (shared with WooCommerce archives)
   ========================================================================== */
.product-grid,
ul.products {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
}
.product-card,
ul.products li.product {
  position: relative; background: #fff; border: 1px solid var(--color-line);
  border-radius: var(--radius); overflow: hidden; transition: .18s ease; display: flex; flex-direction: column;
}
.product-card:hover,
ul.products li.product:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-card .media,
ul.products li.product a img { position: relative; }
.product-card .media { aspect-ratio: 1; overflow: hidden; background: var(--color-soft); display: block; }
.product-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .media img { transform: scale(1.04); }
.product-card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--color-muted); }
.product-card .title { font-size: .95rem; font-weight: 600; margin: 0; line-height: 1.35; }
.product-card .rating { color: var(--color-star); font-size: .82rem; letter-spacing: 1px; }
.product-card .price,
.woocommerce ul.products li.product .price { font-weight: 800; font-size: 1.05rem; color: var(--color-fg); margin-top: auto; }
.product-card .price del { color: var(--color-muted); font-weight: 500; font-size: .9rem; margin-inline-end: 6px; }
.badge {
  position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--color-accent); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.badge--sale { background: var(--color-sale); }

/* ==========================================================================
   10. Tabs (featured section)
   ========================================================================== */
.tabs-nav { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.tabs-nav button {
  border: 2px solid var(--color-line); background: #fff; border-radius: 999px;
  padding: 8px 18px; font-weight: 700; font-size: .9rem; color: var(--color-muted); transition: .15s;
}
.tabs-nav button[aria-selected="true"] { background: var(--color-fg); color: #fff; border-color: var(--color-fg); }
.tab-panel[hidden] { display: none; }

/* ==========================================================================
   11. Promo banners
   ========================================================================== */
.promo-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--gap); }
.promo {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 220px;
  display: flex; align-items: center; padding: 32px; color: #fff;
  background: linear-gradient(120deg, #1f2937, #111418);
}
.promo:nth-child(2) { background: linear-gradient(120deg, var(--color-accent), var(--color-accent-dark)); }
.promo h3 { font-size: 1.6rem; }
.promo p { opacity: .9; max-width: 30ch; }

/* ==========================================================================
   12. Newsletter
   ========================================================================== */
.newsletter { background: var(--color-fg); color: #fff; }
.newsletter-inner { text-align: center; max-width: 560px; margin-inline: auto; }
.newsletter h2 { color: #fff; }
.newsletter p { color: #cbd0d6; }
.newsletter form { display: flex; gap: 10px; margin-top: 18px; }
.newsletter input { flex: 1; border: 0; border-radius: 999px; padding: 12px 18px; font-size: 1rem; }

/* ==========================================================================
   13. Footer
   ========================================================================== */
.site-footer { background: #0d0f12; color: #b6bcc4; font-size: .9rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--gap); padding-block: 48px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a:hover { color: #fff; }
.footer-brand .site-brand { color: #fff; font-size: 1.4rem; }
.footer-brand p { margin-top: 12px; max-width: 34ch; }
.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; background: #1a1d22; display: grid; place-items: center; }
.socials a:hover { background: var(--color-accent); color: #fff; }
.payment-icons { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.payment-icons span { background: #fff; color: #111; font-size: .7rem; font-weight: 700; padding: 4px 8px; border-radius: 4px; }
.footer-bottom { border-top: 1px solid #1a1d22; padding-block: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; }

/* ==========================================================================
   14. Generic pages / posts
   ========================================================================== */
.page-content { max-width: 760px; margin-inline: auto; }
.page-content img { border-radius: var(--radius); }
.entry-title { margin-bottom: 24px; }

/* ==========================================================================
   15. WooCommerce fine-tuning
   ========================================================================== */
.woocommerce .woocommerce-result-count { color: var(--color-muted); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 0 14px !important; font-size: .95rem !important; font-weight: 600 !important; }
.woocommerce ul.products li.product .price { padding: 0 14px 14px !important; }
.woocommerce ul.products li.product a img { margin: 0 !important; border-radius: 0 !important; }
.woocommerce ul.products li.product .button,
.woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit, .woocommerce input.button {
  background: var(--color-accent) !important; color: #fff !important; border-radius: 999px !important;
  font-weight: 700 !important; padding: 10px 20px !important; margin: 0 14px 14px !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover { background: var(--color-accent-dark) !important; }
.woocommerce span.onsale {
  background: var(--color-sale) !important; border-radius: 999px !important; min-height: auto !important;
  min-width: auto !important; line-height: 1 !important; padding: 6px 12px !important; top: 10px; left: 10px; margin: 0;
}
.woocommerce .star-rating span::before, .woocommerce p.stars a { color: var(--color-star); }
.woocommerce-store-notice, p.demo_store { background: var(--color-fg) !important; }
.single-product div.product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.single-product div.product .woocommerce-product-gallery { margin: 0 !important; width: 100% !important; }
.single-product div.product .summary { margin: 0 !important; width: 100% !important; }
.single-product .woocommerce-tabs, .single-product .related, .single-product .up-sells { grid-column: 1 / -1; }
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  border-top-color: var(--color-accent) !important; border-radius: var(--radius-sm);
}
.woocommerce #reviews .comment-form-rating .stars a { color: var(--color-star); }

/* ==========================================================================
   16. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid, ul.products { grid-template-columns: repeat(3, 1fr) !important; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .trust-inner { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid, ul.products { grid-template-columns: repeat(2, 1fr) !important; }
  .promo-grid { grid-template-columns: 1fr; }
  .single-product div.product { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }

  .nav-toggle { display: inline-flex; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-inner { flex-wrap: wrap; padding-block: 10px; }
  .primary-nav .menu { display: none; flex-direction: column; }
  .primary-nav.is-open .menu { display: flex; }
  .primary-nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; border-left: 2px solid var(--color-line); border-radius: 0; margin-left: 12px; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
}


/* Hero image full width */
.hero-media img {
	  object-fit: cover;
	  object-position: center top;
	  width: 100%;
}

}