/* ============================================================
   Mithila Design — site.css
   Global styles, navigation, homepage, footer, utilities
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Custom Properties
---------------------------------------------------------- */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-serif:   'Cinzel', serif;
  --font-accent:  'Italianno', cursive;

  /* Colour palette */
  --ink:          #1A0A00;
  --terra:        #B8522A;
  --terra-light:  #c96a42;
  --terra-dark:   #8a3d22;
  --muted-text:   #6B5744;
  --card-bg:      #FDFAF5;
  --bg:           #F4EFE6;
  --bg-alt:       #EDE5D5;
  --border-subtle: rgba(184, 82, 42, 0.16);
  --border:        rgba(184, 82, 42, 0.26);
  --overlay-dark:  rgba(26,10,0,0.72);

  /* Spacing */
  --nav-h: 64px;
  --max-w: 1300px;
  --gap:   24px;
  --radius: 10px;
}

/* ----------------------------------------------------------
   2. Reset / Base
---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--terra); }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ----------------------------------------------------------
   3. Decorative Background Pattern
---------------------------------------------------------- */
.pat-soft {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(184, 82, 42, 0.06) 0%, transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(184, 82, 42, 0.05) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23b8522a' fill-opacity='0.07'/%3E%3C/g%3E%3C/svg%3E");
}

/* ----------------------------------------------------------
   4. Navigation
---------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--nav-h);
}

.nav-main {
  display: flex; align-items: center; gap: 24px;
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 32px; height: 100%;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.2rem; font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink); white-space: nowrap;
  flex-shrink: 0;
}
.logo img { height: 36px; width: auto; }

/* Center cluster: primary nav between logo and actions */
.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

/* Primary nav list */
.nav-primary {
  display: flex; align-items: center; gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-primary > li {
  position: relative;
}

.nav-primary > li > a {
  display: block; padding: 8px 10px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-primary > li > a:hover,
.nav-primary > li.active > a {
  background: rgba(184, 82, 42, 0.08);
  color: var(--terra);
}

.has-mega > a::after,
.has-dropdown > a::after {
  content: '\25BE';
  display: inline-block;
  margin-left: 3px;
  font-size: 7px;
  opacity: 0.55;
  vertical-align: middle;
  transform: translateY(-1px);
}

/* Mega menu — full viewport width under header; content aligned to .nav-main */
.mega {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  width: 100%;
  transform: none;
  min-width: 0;
  background: var(--card-bg);
  border: solid var(--border-subtle);
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: 0 16px 40px rgba(26, 10, 0, 0.08);
  z-index: 899;
}
/* Invisible hover bridge so pointer can reach panel from nav items */
.mega::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}
.has-mega:hover .mega,
.has-mega:focus-within .mega { display: block; }

.mega-inner {
  display: grid;
  justify-content: center;
  gap: 12px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 22px 32px 26px;
  box-sizing: border-box;
}

/* Centered column clusters (not stretched edge-to-edge) */
.mega-inner--2 {
  grid-template-columns: repeat(2, minmax(200px, 280px));
}

.mega-inner--3 {
  grid-template-columns: repeat(3, minmax(200px, 280px));
}

.mega-all {
  grid-column: 1 / -1;
  display: block; padding: 8px 0 16px;
  font-size: 12px; font-weight: 600;
  color: var(--terra); border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.mega-h {
  display: block;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted-text); margin-bottom: 8px;
}

.mega-inner div { padding: 0 12px 0 0; }

.mega-inner a:not(.mega-all) {
  display: block; padding: 4px 0;
  font-size: 12.5px; color: var(--ink);
  transition: color 0.12s;
}
.mega-inner a:not(.mega-all):hover { color: var(--terra); }

/* Single-column flyout (not full-width mega) */
.nav-dropdown {
  display: none;
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  padding-top: 12px;
  z-index: 898;
  min-width: 260px;
  max-width: min(320px, calc(100vw - 32px));
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 12px;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown-inner {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(26, 10, 0, 0.1);
  padding: 14px 18px 18px;
  text-align: left;
}

.nav-dropdown-all {
  display: block;
  padding: 0 0 12px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--terra);
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.12s;
}

.nav-dropdown-all:hover { color: var(--terra-dark); }

.nav-dropdown-inner .mega-h {
  margin-top: 2px;
  margin-bottom: 8px;
}

.nav-dropdown-inner a:not(.nav-dropdown-all) {
  display: block;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--ink);
  transition: color 0.12s;
}

.nav-dropdown-inner a:not(.nav-dropdown-all):hover { color: var(--terra); }

@media (max-width: 992px) {
  .mega-inner--3 {
    grid-template-columns: repeat(2, minmax(180px, 280px));
  }
}

/* Nav actions */
.nav-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-cart {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: var(--terra);
  color: #fff;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(184, 82, 42, 0.25);
}
.nav-cart:hover {
  background: var(--terra-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(138, 61, 34, 0.3);
}

.nav-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--ink);
  border-radius: 8px;
  line-height: 0;
  transition: background 0.15s, color 0.15s;
}
.nav-search:hover {
  background: rgba(184, 82, 42, 0.08);
  color: var(--terra);
}
.nav-search svg { width: 20px; height: 20px; }

/* Burger (mobile) */
.nav-burger {
  display: none; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
  width: 36px; height: 36px; background: none; border: none;
  border-radius: 6px; padding: 6px;
  transition: background 0.15s;
}
.nav-burger:hover { background: rgba(184, 82, 42, 0.08); }
.nav-burger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ----------------------------------------------------------
   5. Page Offset (below fixed header)
---------------------------------------------------------- */
.page-offset { 
      padding-top: 30px;
  }

/* ----------------------------------------------------------
   6. Breadcrumb Bar
---------------------------------------------------------- */
.breadcrumb-bar {
  background: rgba(237,229,213,0.6); border-bottom: 1px solid var(--border-subtle);
}
.breadcrumb-bar-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 12px 32px;
}
.breadcrumb, .woocommerce-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 11.5px; color: var(--muted-text);
}
.breadcrumb a, .woocommerce-breadcrumb a { color: var(--muted-text); }
.breadcrumb a:hover, .woocommerce-breadcrumb a:hover { color: var(--terra); }
.breadcrumb .sep { color: var(--terra); font-size: 10px; }
.woocommerce-breadcrumb .sep { color: var(--terra); }

/* ----------------------------------------------------------
   6b. Unified page hero (breadcrumbs + title; used across templates)
---------------------------------------------------------- */
.page-hero {
  background: rgba(237, 229, 213, 0.55);
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero__inner.section-wrap {
  padding-top: 28px;
  padding-bottom: 32px;
}
.page-hero__breadcrumb {
  margin-bottom: 10px;
}
.page-hero__title {
  margin-top: 0;
  margin-bottom: 10px;
}
.page-hero__desc {
  margin-top: 0;
}

/* ----------------------------------------------------------
   7. Collection Hero (legacy / extra padding when used without .page-hero)
---------------------------------------------------------- */
.coll-hero {
  max-width: var(--max-w); margin: 0 auto;
  padding: 40px 32px 28px;
}
.coll-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600; color: var(--ink);
  margin-top: 12px; margin-bottom: 10px;
  line-height: 1.15;
}
.coll-title em { font-style: italic; font-weight: 300; color: var(--terra); }
.coll-desc { font-size: 14px; color: var(--muted-text); max-width: 640px; line-height: 1.7; }

/* ----------------------------------------------------------
   8. Shop / category layout — sidebar filters + list-style product rows
---------------------------------------------------------- */
.shop-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px 72px;
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  padding-top: 50px;
}
.shop-layout--no-filters {
  grid-template-columns: minmax(0, 1fr);
}

.filter-panel {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.filter-panel h3 {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a57c5d;
  margin-bottom: 16px;
  line-height: 1.4;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group--tree {
  gap: 14px;
}

.filter-tree-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-subtree {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 14px;
}

.filter-chip {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  background: transparent;
  font-family: var(--font-body);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.filter-chip:hover {
  background: rgba(184, 82, 42, 0.06);
  color: var(--ink);
}

.filter-chip.active {
  background: rgba(184, 82, 42, 0.11);
  border-color: rgba(184, 82, 42, 0.45);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 250, 245, 0.8);
}

.filter-chip--main {
  font-weight: 600;
}

.filter-chip--sub {
  font-size: 12.5px;
}

.filter-chip--level-2,
.filter-chip--level-3,
.filter-chip--level-4,
.filter-chip--level-5 {
  padding-left: 20px;
}

/* Product grid — multi-column cards (image top, details below) */
.prod-grid-shop {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  min-width: 0;
  align-items: stretch;
}

.prod-grid-shop .prod-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--card-bg);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.prod-grid-shop .prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(26, 10, 0, 0.1);
  border-color: rgba(184, 82, 42, 0.2);
}

.prod-grid-shop .prod-card .pi {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e8dfd0;
  position: relative;
}

.prod-grid-shop .prod-card .pi img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s;
}

.prod-grid-shop .prod-card:hover .pi img {
  transform: scale(1.05);
}

.prod-grid-shop .prod-card .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--terra);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.prod-grid-shop .prod-card .pb {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 16px 18px;
}

.prod-grid-shop .prod-card .pcraft {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b6b52;
  margin-bottom: 6px;
  line-height: 1.35;
}

.prod-grid-shop .prod-card .pname {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.35vw, 1.1rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 8px;
}

.prod-grid-shop .prod-card .ptag {
  font-size: 12px;
  color: var(--muted-text);
  line-height: 1.5;
  margin-bottom: 10px;
  flex-grow: 1;
}

.prod-grid-shop .prod-card .pprice {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: auto;
}

.prod-grid-shop-empty {
  grid-column: 1 / -1;
  padding: 20px 0;
  font-size: 14px;
  color: var(--muted-text);
}

/* Fallback if .prod-card used outside shop grid */
.prod-card {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--card-bg);
  transition: transform 0.22s, box-shadow 0.22s;
  display: block;
}

.prod-card .pi {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #e8dfd0;
  position: relative;
}

.prod-card .pi img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s;
}

.prod-card .pb {
  padding: 14px 16px 16px;
}

.prod-card .pcraft {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 4px;
}

.prod-card .pname {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 4px;
}

.prod-card .ptag {
  font-size: 11.5px;
  color: var(--muted-text);
  margin-bottom: 8px;
}

.prod-card .pprice {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--terra-dark);
}

/* ----------------------------------------------------------
   9. Homepage — Hero (copy left, image right; soft blend into bg)
---------------------------------------------------------- */
.hero-home {
  position: relative;
  overflow: hidden;
  height: calc(100vh - var(--nav-h));
  min-height: 500px;
  max-height: 860px;
  background: var(--bg);
}

.hero-slides {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 40%) 1fr;
  align-items: stretch;
  background: var(--bg);
}

.slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5vh max(28px, 5vw) 6rem max(28px, 5vw);
  max-width: 520px;
  color: var(--ink);
}

.slide-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.hero-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: clamp(12px, 4vw, 48px);
  pointer-events: none;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6.5vw, 4.6rem);
  font-weight: 600;
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
  color: rgba(26, 10, 0, 0.065);
}

.slide-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

/* Left edge of photo fades into cream column / background */
.slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% center;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 5%,
    rgba(0, 0, 0, 0.88) 15%,
    #000 24%,
    #000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 5%,
    rgba(0, 0, 0, 0.88) 15%,
    #000 24%,
    #000 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.slide-sub {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin-bottom: 14px;
}

.slide-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.12;
  margin-bottom: 16px;
  color: var(--ink);
}

.slide-title em,
.slide-title-accent {
  font-family: var(--font-accent);
  font-style: normal;
  font-weight: 400;
  color: var(--terra);
}

.slide-title-line {
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  line-height: 1.2;
}

.slide-title-line .slide-title-plain {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: normal;
}

.slide-title-line .slide-title-accent {
  font-size: 1.45em;
  margin: 0 0.02em;
  vertical-align: baseline;
  position: relative;
  top: 0.04em;
}

.slide-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted-text);
  margin-bottom: 28px;
  max-width: 420px;
}

.cta-hero {
  display: inline-block;
  align-self: flex-start;
  padding: 14px 28px;
  background: var(--terra);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(184, 82, 42, 0.28);
}
.cta-hero:hover {
  background: var(--terra-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(138, 61, 34, 0.32);
}

/* Hero pagination — horizontal bars, bottom-left */
.hero-dots {
  position: absolute;
  bottom: 28px;
  left: max(28px, 5vw);
  right: auto;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.dot {
  width: 32px;
  height: 2px;
  border-radius: 2px;
  background: rgba(26, 10, 0, 0.12);
  cursor: pointer;
  transition: background 0.2s, height 0.2s, width 0.2s;
  padding: 0;
  border: none;
}
.dot.active {
  background: var(--terra);
  height: 4px;
  width: 40px;
}

/* Hero arrows — white circles, bottom-right */
.hero-arrows {
  position: absolute;
  bottom: 24px;
  right: max(28px, 5vw);
  left: auto;
  top: auto;
  transform: none;
  z-index: 3;
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 14px rgba(26, 10, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
  user-select: none;
}
.arrow:hover {
  background: var(--card-bg);
  box-shadow: 0 4px 20px rgba(26, 10, 0, 0.12);
  transform: scale(1.04);
}

@media (min-width: 900px) {
  .slide-bg img { object-position: 78% center; }
}

@media (max-width: 880px) {
  .hero-slide {
    grid-template-columns: minmax(220px, 44%) 1fr;
  }
}

/* ----------------------------------------------------------
   10. Trust Strip
---------------------------------------------------------- */
.trust-strip { background: var(--card-bg); border-bottom: 1px solid var(--border-subtle); }
.trust-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; justify-content: center;
  gap: 40px; flex-wrap: wrap;
}
.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-label { font-size: 12px; font-weight: 500; color: var(--muted-text); white-space: nowrap; }
.trust-item svg { width: 16px; height: 16px; color: var(--terra); flex-shrink: 0; }

/* ----------------------------------------------------------
   11. Section Utilities
---------------------------------------------------------- */
.section-pad { padding: 64px 0; }
.sec-art-bg  { background: rgba(255,255,255,0.4); }

.section-wrap {
  max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
}

.sec-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px; gap: 16px;
}
.eyebrow {
  display: block; font-size: 10px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #a57c5d; margin-bottom: 6px;
}
.sec-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600; color: var(--ink); line-height: 1.2;
}
.sec-title em { font-style: italic; font-weight: 300; color: var(--terra); }
.sec-title .slide-title-accent {
  font-family: var(--font-accent);
  font-style: normal;
  font-weight: 400;
  color: var(--terra);
  font-size: 1.12em;
}

.view-link {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: #a57c5d;
  border-bottom: 1px solid #a57c5d; padding-bottom: 2px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.view-link:hover { color: var(--terra); border-bottom-color: var(--terra); }

/* ----------------------------------------------------------
   12. Product Grid (homepage 4-col)
---------------------------------------------------------- */
.product-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.product-grid-4 > * { min-width: 0; }

.product-card-h {
  text-decoration: none; color: inherit;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-subtle); background: var(--card-bg);
  transition: transform 0.22s, box-shadow 0.22s;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}
.product-card-h:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(26,10,0,0.1); }
.product-card-h .pi {
  aspect-ratio: 3/4; overflow: hidden; background: #E4D9C3; position: relative;
  flex-shrink: 0;
}
.product-card-h .pi img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s;
  display: block;
}
.product-card-h:hover .pi img { transform: scale(1.05); }
.product-card-h .badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--terra); color: #fff;
  font-size: 9px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
}
.product-card-h .badge-sale {
  background: var(--ink);
}
.product-card-h .pcraft {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: #8b6b52;
  padding: 14px 14px 0; line-height: 1.35;
}
.product-card-h .pname {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: var(--ink); padding: 6px 14px 4px; line-height: 1.25;
}
.product-card-h .pdet {
  font-size: 12px; color: var(--muted-text); padding: 0 14px;
  line-height: 1.45; flex-grow: 1;
}
.product-card-h .pprice {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: var(--ink); padding: 10px 14px 16px; margin-top: auto;
}

/* ----------------------------------------------------------
   13. Paint Gallery (uniform grid — avoids orphan cell / broken mosaic)
---------------------------------------------------------- */
.paint-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  width: 100%;
}
.paint-gallery-wrap {
  position: relative;
}
.paint-gallery--carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.paint-gallery--carousel::-webkit-scrollbar { display: none; }
.paint-gallery--carousel .cell {
  flex: 0 0 calc((100% - 42px) / 4);
  scroll-snap-align: start;
}
.paint-gallery-item {
  border: none;
  padding: 0;
  cursor: zoom-in;
}
.paint-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.paint-gallery-nav:hover {
  background: #fff;
  border-color: rgba(26, 10, 0, 0.2);
}
.paint-gallery-nav--prev { left: -14px; }
.paint-gallery-nav--next { right: -14px; }
.paint-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(26, 10, 0, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.paint-lightbox[hidden] {
  display: none;
}
.paint-lightbox-image {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.paint-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  background: rgba(26, 10, 0, 0.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.paint-lightbox-nav--prev { left: 24px; }
.paint-lightbox-nav--next { right: 24px; }
.paint-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 36px;
  line-height: 1;
}
.paint-gallery .cell {
  border-radius: var(--radius);
  overflow: hidden;
  background: #e4d9c3;
  min-height: 0;
  aspect-ratio: 4 / 5;
}
.paint-gallery .cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s;
}
.paint-gallery .cell:hover img { transform: scale(1.04); }

/* ----------------------------------------------------------
   14. Perfect Piece slider (full width of .section-wrap)
---------------------------------------------------------- */
.perfect-slider-row {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.perfect-viewport { overflow: hidden; width: 100%; min-width: 0; }
.perfect-track { display: flex; gap: 20px; will-change: transform; transition: transform 0.45s cubic-bezier(0.4,0,0.2,1); }

.perfect-card {
  flex-shrink: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-subtle); background: var(--card-bg);
  text-decoration: none; color: inherit;
  transition: transform 0.22s;
}
.perfect-card:hover { transform: translateY(-3px); }
.perfect-card .ph { aspect-ratio: 3/4; overflow: hidden; background: #E4D9C3; }
.perfect-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s; }
.perfect-card:hover .ph img { transform: scale(1.05); }
.perfect-card .pb { padding: 12px 14px 14px; }
.perfect-card .pcat {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--terra); margin-bottom: 4px;
}
.perfect-card .pname {
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--ink);
}

/* ----------------------------------------------------------
   15. Process Grid
---------------------------------------------------------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-step {
  padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--border-subtle); background: var(--card-bg);
}
.process-step .num {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 300;
  color: rgba(184, 82, 42, 0.25); line-height: 1; margin-bottom: 12px;
}
.process-step h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin-bottom: 10px; }
.process-step p { font-size: 12.5px; color: var(--muted-text); line-height: 1.65; }

/* ----------------------------------------------------------
   16. CTA Reach
---------------------------------------------------------- */
.cta-reach {
  background: var(--ink); color: #fff; text-align: center;
  padding: 72px 32px;
}
.cta-reach-inner { max-width: 560px; margin: 0 auto; }
.cta-reach h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600; margin-bottom: 12px;
}
.cta-reach h2 em { font-style: italic; font-weight: 300; color: rgba(255,255,255,0.7); }
.cta-reach p { font-size: 13.5px; opacity: 0.75; line-height: 1.7; margin-bottom: 24px; }
.cta-reach .mail {
  display: inline-block;
  font-size: 14px; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  color: #fff; padding-bottom: 2px;
  transition: border-color 0.15s, opacity 0.15s;
}
.cta-reach .mail:hover { border-color: #fff; opacity: 0.85; }

/* ----------------------------------------------------------
   17. Footer
---------------------------------------------------------- */
.site-footer {
  background: var(--bg);
  color: var(--muted-text);
  padding: 0;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 56px 32px 32px; }

.footer-top {
  display: grid; grid-template-columns: 1.6fr 1fr 0.8fr 0.8fr;
  gap: 40px; padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}
.footer-logo {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600;
  color: var(--ink); display: block; margin-bottom: 12px;
}
.footer-about { font-size: 12.5px; line-height: 1.75; color: var(--muted-text); }

.footer-col h4 {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-text);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  font-size: 12.5px; color: var(--ink);
  opacity: 0.85;
  transition: color 0.15s, opacity 0.15s;
}
.footer-col a:hover { color: var(--terra); opacity: 1; }

.footer-bot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 11.5px; color: var(--muted-text);
}
.footer-bot div { display: flex; gap: 16px; }
.footer-bot a { color: var(--ink); opacity: 0.65; }
.footer-bot a:hover { color: var(--terra); opacity: 1; }

/* ----------------------------------------------------------
   19. Reveal on Scroll (.rv → .on)
---------------------------------------------------------- */
.rv {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.rv.on { opacity: 1; transform: translateY(0); }

/* Stagger delays */
.d1 { transition-delay: 0.05s; }
.d2 { transition-delay: 0.12s; }
.d3 { transition-delay: 0.19s; }
.d4 { transition-delay: 0.26s; }

/* ----------------------------------------------------------
   20. Buttons
---------------------------------------------------------- */
.btn-dk {
  display: inline-block; padding: 13px 28px;
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 600;
  border-radius: 24px; border: none;
  cursor: pointer; text-align: center;
  transition: background 0.18s, transform 0.18s;
}
.btn-dk:hover { background: var(--terra-dark); transform: translateY(-1px); }

.btn-outline-sm {
  display: inline-block; padding: 10px 22px;
  border: 1.5px solid var(--ink); color: var(--ink);
  font-size: 12.5px; font-weight: 600; border-radius: 20px;
  transition: background 0.15s, color 0.15s;
}
.btn-outline-sm:hover { background: var(--ink); color: #fff; }

/* ----------------------------------------------------------
   21. WooCommerce — Generic Notices
---------------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  background: var(--card-bg);
  border-left: 4px solid var(--terra);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px; margin-bottom: 20px;
  font-size: 13px; color: var(--ink);
  list-style: none;
}
.woocommerce-error { border-left-color: #c0392b; }

/* ----------------------------------------------------------
   22. Shop Hub (shop.html equivalent)
---------------------------------------------------------- */
.hub-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; max-width: var(--max-w); margin: 0 auto;
  padding: 0 32px 72px;
}
.hub-card {
  position: relative; aspect-ratio: 4/5; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-subtle); text-decoration: none; color: #fff;
  display: block; transition: transform 0.25s, box-shadow 0.25s;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(26,10,0,0.12); }
.hub-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.hub-card:hover img { transform: scale(1.04); }
.hub-cap {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,10,0,0.75) 0%, transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px;
}
.hub-cap span { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.85; margin-bottom: 6px; }
.hub-cap h2 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }

/* ----------------------------------------------------------
   23. Checkout — hide main site-header, show checkout-nav
---------------------------------------------------------- */
.mithila-checkout-page .site-header { display: none !important; }
.mithila-checkout-page .page-offset { padding-top: 0; }
.mithila-checkout-page .pat-soft { display: none; }

/* ----------------------------------------------------------
   24. WooCommerce Pagination (aligned with shop grid — not centered)
---------------------------------------------------------- */
.woocommerce-pagination {
  width: 100%;
}
.woocommerce-pagination ul {
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 24px 0;
}
.woocommerce-pagination ul li {
  margin: 0;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border-subtle);
  border-left-width: 0;
  border-radius: 0;
  color: var(--ink);
  background: var(--card-bg);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.woocommerce-pagination ul li:first-child a,
.woocommerce-pagination ul li:first-child span {
  border-left-width: 1.5px;
  border-radius: 8px 0 0 8px;
}
.woocommerce-pagination ul li:last-child a,
.woocommerce-pagination ul li:last-child span {
  border-radius: 0 8px 8px 0;
}
.woocommerce-pagination ul li:only-child a,
.woocommerce-pagination ul li:only-child span {
  border-radius: 8px;
}
.woocommerce-pagination ul li a:hover {
  background: rgba(184, 82, 42, 0.1);
  border-color: var(--terra);
  color: var(--terra);
  position: relative;
  z-index: 1;
}
.woocommerce-pagination ul li span.current {
  background: rgba(237, 229, 213, 0.85);
  color: var(--ink);
  border-color: var(--border-subtle);
  position: relative;
  z-index: 1;
}

/* ----------------------------------------------------------
   25. WooCommerce variable product form
---------------------------------------------------------- */
.wc-variation-wrap table.variations { border: none; width: 100%; }
.wc-variation-wrap .variations td,
.wc-variation-wrap .variations th { padding: 6px 0; font-size: 12.5px; }
.wc-variation-wrap select {
  padding: 9px 12px; font-family: var(--font-body); font-size: 13px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--ink);
}
.wc-variation-wrap .single_variation_wrap .woocommerce-variation-price .price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--ink); }
.wc-variation-wrap .single_add_to_cart_button { background: var(--ink); color: #fff; padding: 12px 28px; border-radius: 24px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.18s; }
.wc-variation-wrap .single_add_to_cart_button:hover { background: var(--terra-dark); }

/* ----------------------------------------------------------
   26. Story page (reused across page-story template)
---------------------------------------------------------- */
.story-lead { font-size: 14px; color: var(--muted-text); line-height: 1.8; }

/* ----------------------------------------------------------
   27. Responsive
---------------------------------------------------------- */
@media (max-width: 1100px) {
  .product-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .prod-grid-shop  { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .process-grid    { grid-template-columns: repeat(2, 1fr); }
  .footer-top      { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .filter-panel {
    position: static;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .filter-group {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .filter-group--tree {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .filter-subtree {
    margin-left: 0;
  }
  .filter-panel h3 {
    width: 100%;
    margin-bottom: 10px;
  }
  .hub-grid        { grid-template-columns: 1fr 1fr; }
  .paint-gallery   { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .paint-gallery--carousel .cell { flex-basis: calc((100% - 12px) / 2); }
  .paint-gallery-nav { display: none; }
  .paint-lightbox-nav { display: none; }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }
.page-hero__inner.section-wrap {
    padding-top: 50px;
    padding-bottom: 32px;
}
.nav-main {
    padding: 0 10px;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 56px 20px 32px;
}
  .nav-burger { display: flex; order: 3; }
  .nav-center { display: contents; }
  .logo { order: 1; }
  .nav-actions { order: 2; margin-left: auto; }

  .nav-primary {
    display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
    bottom: 0; background: var(--card-bg); overflow-y: auto;
    flex-direction: column; padding: 20px;
    border-top: 1px solid var(--border-subtle);
    gap: 0;
    order: 4;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  .nav-primary > li {
    width: 100%;
  }
  .nav-primary.open { display: flex; }
  .nav-primary > li > a {
    padding: 14px 16px;
    font-size: 14px;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-subtle);
  }

  .has-mega > a::after,
  .has-dropdown > a::after { display: none; }

  .mega {
    display: none !important; /* Handled by accordion on mobile */
  }
  .has-mega.open .mega {
    display: block !important; position: static;
    width: 100%;
    transform: none; min-width: 0; box-shadow: none;
    border: none; border-radius: 0;
    background: rgba(237,229,213,0.4);
    padding: 10px 0 12px;
  }
  .has-mega.open .mega::before { display: none; }
  .mega-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    grid-template-columns: 1fr !important;
    justify-content: stretch;
    gap: 8px;
    padding: 10px 16px;
  }
  .mega-inner div { padding: 0; }
  .mega-all { grid-column: 1; }
  .mega-inner .mega-h { margin: 8px 0 6px; }
  .mega-inner a:not(.mega-all) { padding: 6px 0; }

  .nav-dropdown {
    display: none !important;
    position: static;
    transform: none;
    left: auto;
    max-width: none;
    min-width: 0;
    padding-top: 0;
  }
  .nav-dropdown::before { display: none; }
  .has-dropdown.open .nav-dropdown {
    display: block !important;
  }
  .has-dropdown.open .nav-dropdown-inner {
    width: 100%;
    max-width: none;
    background: rgba(237,229,213,0.4);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 10px 16px 14px;
  }
  .has-dropdown.open .nav-dropdown-inner .mega-h { margin: 8px 0 6px; }
  .has-dropdown.open .nav-dropdown-inner a:not(.nav-dropdown-all) { padding: 6px 0; }

  .hero-slide {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 36vh) auto;
  }
  .slide-visual {
    order: -1;
    min-height: 36vh;
  }
  .slide-content {
    padding: 24px 24px 96px;
    max-width: 100%;
  }
  .slide-bg img {
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.25) 12%,
      #000 28%,
      #000 100%
    );
    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.25) 12%,
      #000 28%,
      #000 100%
    );
    object-position: center 30%;
  }
  .hero-watermark {
    justify-content: center;
    padding-right: 0;
    font-size: clamp(1.2rem, 8vw, 2rem);
  }
  .hero-arrows { right: 16px; bottom: 20px; }
  .hero-dots   { left: 24px; bottom: 22px; }

  .trust-inner   { gap: 20px; }
  .process-grid  { grid-template-columns: 1fr; }
  .section-wrap  { padding: 0 20px; }
  .coll-hero     { padding: 32px 20px 20px; }
  .shop-layout   { padding: 20px 20px 60px; }
}

@media (max-width: 520px) {
  .product-grid-4  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prod-grid-shop  { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .hub-grid        { grid-template-columns: 1fr; }
  .paint-gallery   { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .paint-gallery--carousel .cell { flex-basis: 84%; }
  .footer-top      { grid-template-columns: 1fr; }
  .mega-inner      { grid-template-columns: 1fr; }
}
