/* =========================================================
   1. FLUID TOKENS & BASE (Global)
   ========================================================= */
:root {
  --ivory: #FFFDF8; --cream: #FAF7F0; --sand: #F0E8DA; --stone: #DDD1C1;
  --clay: #B65F46; --clay-deep: #9A4A33; --olive: #7C8062; --gold: #C9A27A;
  --espresso: #2A211B; --muted: #6F645B; --line: #E6DFD3;
  
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-io: cubic-bezier(.65,0,.35,1);

  --pad-x: clamp(1rem, 4vw, 4rem);
  --section-y: clamp(4rem, 10vw, 8rem);
  --fs-body: clamp(.95rem, .9rem + .25vw, 1.05rem);
  --fs-h2: clamp(2.2rem, 1.4rem + 4vw, 4.5rem);
  --fs-hero: clamp(2.8rem, 1.5rem + 6vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html.no-js [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
body { font-family: var(--sans); color: var(--espresso); background: var(--cream); font-size: var(--fs-body); line-height: 1.6; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.kicker { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; color: var(--clay-deep); }
.section-title { font-family: var(--serif); font-size: var(--fs-h2); line-height: 1.05; font-weight: 400; color: var(--espresso); }
.section-title em { font-style: italic; color: var(--clay); }

/* Liquid Glass Utility */
.glass {
  background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.4));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 15px 50px rgba(42,33,27,.12), inset 0 1px 0 rgba(255,255,255,.9);
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.75rem; padding: 1rem 2.5rem; font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; transition: background 0.3s, color 0.3s; border-radius: 2px; min-height: 44px; }
.btn--dark { background: var(--espresso); color: var(--ivory); border: 1px solid var(--espresso); }
.btn--dark:hover { background: transparent; color: var(--espresso); }
.btn--outline { border: 1px solid var(--espresso); color: var(--espresso); }
.btn--outline:hover { background: var(--espresso); color: var(--ivory); }
.btn--light { background: var(--ivory); color: var(--espresso); border: 1px solid var(--ivory); }
.btn--light:hover { background: transparent; color: var(--ivory); }

/* =========================================================
   2. FLOATING NAVBAR (Shared across all pages)
   ========================================================= */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; pointer-events: none; padding: 1.5rem var(--pad-x); transition: padding .6s var(--ease-out); }
.nav-shell { 
  position: relative; isolation: isolate; pointer-events: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: 1600px; margin-inline: auto; padding: 1.8rem 2.5rem; border-radius: 0;
  color: var(--nav-fg, #fff); transition: max-width .7s var(--ease-out), padding .7s var(--ease-out), border-radius .7s var(--ease-out), color .4s;
}
.nav-shell::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  opacity: 0; transition: opacity .5s;
  background: var(--nav-bg); border: 1px solid var(--nav-border);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 10px 40px rgba(42,33,27,.12), inset 0 1px 0 rgba(255,255,255,.7);
}
.site-header[data-theme="dark"] { --nav-fg: #ffffff; }
.site-header[data-theme="light"] { --nav-fg: var(--espresso); }
.site-header.is-floating { padding-top: 1rem; }
.is-floating .nav-shell { max-width: 1300px; padding: 1rem 2.5rem; border-radius: 999px; }
.is-floating .nav-shell::before { opacity: 1; background: var(--nav-bg); border-color: var(--nav-border); }
.site-header[data-theme="light"].is-floating .nav-shell::before { background: rgba(255, 253, 248, 0.85); border-color: rgba(42, 33, 27, 0.08); box-shadow: 0 15px 40px rgba(42,33,27,.1); }

.brand { font-family: var(--serif); font-size: 2rem; font-weight: 600; letter-spacing: 0.05em; justify-self: start; }
.primary-nav { justify-self: center; }
.primary-nav ul { display: flex; gap: 3rem; list-style: none; font-size: 0.85rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; }
.primary-nav a:hover, .primary-nav a.active { color: var(--gold); }

.nav-actions { justify-self: end; display: flex; gap: 1.5rem; align-items: center; }
.search-wrapper { display: flex; align-items: center; background: rgba(255,255,255,0.2); border-radius: 99px; padding: 0.5rem; transition: all 0.4s var(--ease-out); border: 1px solid transparent; }
.site-header[data-theme="light"] .search-wrapper { background: rgba(42,33,27,0.05); }
.search-wrapper:focus-within { background: #fff; border-color: var(--line); box-shadow: 0 4px 12px rgba(0,0,0,0.05); width: 250px; }
.search-wrapper input { width: 0; opacity: 0; border: none; background: transparent; outline: none; font-family: var(--sans); transition: all 0.4s var(--ease-out); padding: 0 0.5rem; color: var(--espresso); }
.search-wrapper:focus-within input { width: 180px; opacity: 1; }
.search-wrapper svg { width: 18px; height: 18px; flex-shrink: 0; }
.cart-btn { position: relative; display: grid; place-items: center; }
.cart-btn svg { width: 22px; height: 22px; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: var(--gold); color: var(--espresso); font-size: 0.6rem; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; }

/* =========================================================
   3. HERO SECTION (Homepage)
   ========================================================= */
.hero { position: relative; min-height: max(34rem, 100svh); background: var(--espresso); display: flex; align-items: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: url('../images/hero-bg.jpg') center/cover; z-index: 0; animation: heroDrift 20s ease-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,15,10,0.85) 0%, rgba(20,15,10,0.3) 50%, rgba(20,15,10,0) 100%); z-index: 1; }
@keyframes heroDrift { to { transform: scale(1.05) translateY(-2%); } }

.hero-content { position: relative; z-index: 3; width: 50%; padding-left: 8vw; color: #fff; }
.hero-text-slide { display: none; opacity: 0; }
.hero-text-slide.active { display: block; animation: fadeUp 0.8s var(--ease-out) forwards; }
.hero-kicker { color: var(--gold); margin-bottom: 1.5rem; }
.hero-title { font-family: var(--serif); font-size: var(--fs-hero); line-height: 1; margin-bottom: 1.5rem; font-weight: 400; }
.hero-title em { font-style: italic; color: var(--sand); }
.hero-desc { font-size: 1rem; max-width: 340px; color: var(--stone); margin-bottom: 2.5rem; }
.hero-cta { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; border-bottom: 1px solid #fff; padding-bottom: 0.3rem; color: #fff; }

.hero-image-container { position: absolute; right: 5vw; bottom: 0; width: 55vw; max-width: 800px; height: 90%; z-index: 2; display: flex; justify-content: flex-end; align-items: flex-end; pointer-events: none; }
.hero-img-slide { position: absolute; bottom: 0; right: 0; width: 100%; height: 100%; opacity: 0; transform: translateX(30px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); display: flex; justify-content: flex-end; align-items: flex-end; }
.hero-img-slide.active { opacity: 1; transform: translateX(0); }
.hero-img-slide img { height: 100%; width: auto; object-fit: contain; filter: drop-shadow(-20px 20px 40px rgba(0,0,0,0.6)); }

/* =========================================================
   4. SHOP BY CATEGORY SLIDER (Homepage)
   ========================================================= */
.category-section { padding: var(--section-y) 0; background: var(--ivory); border-bottom: 1px solid var(--line); overflow: hidden; }
.category-header { text-align: center; margin-bottom: 3rem; padding: 0 var(--pad-x); }
.category-header h2 { font-family: var(--serif); font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 400; margin-top: 0.5rem; }
.category-header p { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-top: 1rem; }

.cat-slider-wrapper { position: relative; width: 100%; overflow: hidden; padding: 0 var(--pad-x); }
.cat-track { display: flex; gap: 1.5rem; transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); }
.cat-card { flex: 0 0 calc(33.333% - 1rem); aspect-ratio: 3/4; position: relative; overflow: hidden; border-radius: 4px; cursor: pointer; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-out); }
.cat-card:hover img { transform: scale(1.05); }
.cat-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,15,10,0.8) 0%, transparent 50%); display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem; color: #fff; }
.cat-overlay h3 { font-family: var(--serif); font-size: 2rem; margin-bottom: 0.5rem; }
.cat-overlay .count { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--sand); }
.cat-overlay .btn-arrow { position: absolute; right: 2rem; bottom: 2rem; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.4); display: grid; place-items: center; transition: background 0.3s; }
.cat-card:hover .btn-arrow { background: #fff; color: var(--espresso); border-color: #fff; }
.cat-controls { display: flex; justify-content: center; align-items: center; gap: 2rem; margin-top: 3rem; }
.cat-arrows { display: flex; gap: 1rem; }
.cat-arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: all 0.3s; }
.cat-arrows button:hover { background: var(--espresso); color: var(--ivory); border-color: var(--espresso); }
.cat-progress { display: flex; gap: 0.5rem; }
.cat-progress span { width: 30px; height: 2px; background: var(--line); transition: background 0.3s; }
.cat-progress span.active { background: var(--clay); }

/* =========================================================
   5. COLLECTION BLOCKS (Homepage)
   ========================================================= */
.collection-section { padding: var(--section-y) var(--pad-x); border-bottom: 1px solid var(--line); background: var(--cream); }
.collection-section:last-of-type { border-bottom: 0; }
.collection-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.collection-title-group { display: flex; flex-direction: column; }
.collection-desc { max-width: 300px; font-size: 0.85rem; color: var(--muted); text-align: right; }

.slider-container { position: relative; height: clamp(300px, 40vw, 450px); background: #e8dfd3; border-radius: 4px; overflow: hidden; margin-bottom: 3rem; }
.slider-track { display: flex; height: 100%; width: 100%; align-items: center; justify-content: center; position: relative; }
.slide-item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: scale(0.4) translateX(100px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), visibility 0.8s; pointer-events: none; }
.slide-item.active { opacity: 1; visibility: visible; transform: scale(1) translateX(0); z-index: 3; pointer-events: auto; }
.slide-item.prev { opacity: 0.3; visibility: visible; transform: scale(0.45) translateX(-60%); z-index: 2; }
.slide-item.next { opacity: 0.3; visibility: visible; transform: scale(0.45) translateX(60%); z-index: 2; }
.slide-item img { 
    height: 120%; /* Increased from 85% or 95% */
    width: auto; 
    object-fit: contain; 
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15)); 
    transition: transform 0.8s var(--ease-out); 
}
.slide-caption { position: absolute; bottom: 1.5rem; left: 1.5rem; z-index: 5; background: rgba(255, 253, 248, 0.95); padding: 1rem 1.5rem; border-radius: 2px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); max-width: 250px; }
.slide-caption strong { display: block; font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; margin-bottom: 0.25rem; }
.slide-caption span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.slider-nav { position: absolute; top: 1.5rem; right: 1.5rem; z-index: 10; display: flex; align-items: center; gap: 0.75rem; }
.slider-nav button { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.7); display: grid; place-items: center; transition: background 0.3s; }
.slider-nav button:hover { background: #fff; }
.slider-counter { font-size: 0.7rem; letter-spacing: 0.1em; font-weight: 600; color: var(--espresso); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.prod-card { text-align: left; display: block; }
.prod-card .img-box { background: var(--sand); aspect-ratio: 1; margin-bottom: 1rem; display: grid; place-items: center; overflow: hidden; }
.prod-card img { width: 80%; height: 80%; object-fit: contain; transition: transform 0.5s var(--ease-out); }
.prod-card:hover img { transform: scale(1.08); }
.prod-card .cat { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--clay); font-weight: 600; margin-bottom: 0.2rem; }
.prod-card h4 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.2rem; }
.prod-card .price { font-size: 0.85rem; color: var(--muted); }

.see-more-container { display: flex; justify-content: center; margin-top: 1rem; }
.btn-see-more { display: inline-flex; align-items: center; gap: 0.75rem; padding: 1rem 2.5rem; border: 1px solid var(--espresso); color: var(--espresso); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; transition: background 0.3s, color 0.3s; border-radius: 2px; }
.btn-see-more:hover { background: var(--espresso); color: var(--ivory); }

/* =========================================================
   6. JOURNAL PREVIEW & CUSTOMIZATION (Homepage)
   ========================================================= */
.journal-section { padding: var(--section-y) var(--pad-x); background: var(--ivory); border-bottom: 1px solid var(--line); }
.journal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; max-width: 1200px; margin: 0 auto; }
.journal-image { aspect-ratio: 4/5; background: var(--sand); overflow: hidden; border-radius: 4px; }
.journal-image img { width: 100%; height: 100%; object-fit: cover; }
.journal-content h2 { margin-bottom: 1.5rem; }
.journal-content p { color: var(--muted); margin-bottom: 2rem; }

.custom { background: var(--sand); display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; padding: var(--section-y) var(--pad-x); }
.custom-image { aspect-ratio: 4/5; background: var(--stone); overflow: hidden; border-radius: 4px; }
.custom-image img { width: 100%; height: 100%; object-fit: cover; }
.custom-content h2 { margin-bottom: 1.5rem; }
.custom-content p { color: var(--muted); margin-bottom: 2rem; }

/* =========================================================
   7. NEWSLETTER & FOOTER (Global)
   ========================================================= */
.newsletter { position: relative; overflow: hidden; padding: clamp(3rem, 6vw, 5rem) var(--pad-x); display: flex; justify-content: center; background: var(--cream); }
.newsletter__blobs { position: absolute; inset: -10%; background: radial-gradient(40% 60% at 15% 30%, #E8CDB8, transparent 70%), radial-gradient(35% 55% at 85% 70%, #D9D6BC, transparent 70%); filter: blur(24px); animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(4%, -3%, 0) scale(1.08); } }
.newsletter__card { position: relative; display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; width: 100%; max-width: 900px; padding: 3rem; border-radius: 24px; }
.nl-form { display: flex; flex-direction: column; gap: 0.5rem; }
.nl-form input { flex: 1; padding: 1rem 1.5rem; border-radius: 99px; border: 1px solid rgba(42,33,27,.15); background: rgba(255,255,255,.6); outline: none; font-size: 16px; }

.site-footer { background: var(--espresso); color: var(--ivory); padding: 5rem var(--pad-x) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 1400px; margin: 0 auto 4rem; }
.footer-brand { font-family: var(--serif); font-size: 1.8rem; margin-bottom: 1rem; }
.footer-col h5 { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; font-size: 0.85rem; color: var(--stone); }
.footer-bottom { max-width: 1400px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; display: flex; flex-direction: column; gap: 1rem; font-size: 0.7rem; color: var(--stone); letter-spacing: 0.1em; text-transform: uppercase; }

/* =========================================================
   8. ABOUT PAGE SPECIFIC
   ========================================================= */
.about-hero { position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center; background: var(--espresso); color: #fff; text-align: center; padding: 8rem var(--pad-x) 4rem; overflow: hidden; }
.about-hero-bg { position: absolute; inset: 0; background: url('../images/hero-model.png') center/cover; opacity: 0.2; filter: blur(8px); z-index: 0; }
.about-hero-content { position: relative; z-index: 2; max-width: 900px; }
.about-hero h1 { font-family: var(--serif); font-size: var(--fs-hero); line-height: 1.1; font-weight: 400; margin-bottom: 2rem; }
.about-hero h1 em { font-style: italic; color: var(--sand); }
.about-hero p { font-size: 1.1rem; color: var(--stone); max-width: 700px; margin: 0 auto; line-height: 1.8; }

.story-section { padding: var(--section-y) var(--pad-x); background: var(--cream); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 8vw, 8rem); align-items: center; max-width: 1400px; margin: 0 auto; }
.story-image { aspect-ratio: 4/5; background: var(--sand); position: relative; }
.story-image img { width: 100%; height: 100%; object-fit: cover; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1)); }
.story-text { max-width: 500px; }
.story-text .kicker { margin-bottom: 1rem; display: block; }
.story-text .section-title { margin-bottom: 2rem; }
.story-text p { color: var(--muted); margin-bottom: 1.5rem; line-height: 1.8; }

.craft-section { padding: var(--section-y) var(--pad-x); background: var(--ivory); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.craft-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 4rem; max-width: 1400px; margin: 0 auto; align-items: center; }
.craft-img-col { aspect-ratio: 3/4; background: var(--sand); }
.craft-img-col img { width: 100%; height: 100%; object-fit: cover; }
.craft-text-col h2 { font-family: var(--serif); font-size: 2.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.craft-text-col p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.8; }
.craft-text-col .magazine-list { font-family: var(--serif); font-style: italic; color: var(--clay); font-size: 1.1rem; line-height: 1.6; }

.recognition-section { position: relative; padding: var(--section-y) var(--pad-x); background: var(--espresso); color: #fff; text-align: center; overflow: hidden; }
.recognition-bg { position: absolute; inset: 0; background: url('../images/product-fascinator.png') center/contain no-repeat; background-size: 60%; opacity: 0.1; z-index: 0; }
.recognition-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.recognition-content h2 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 1.5rem; font-weight: 400; }
.recognition-content p { color: var(--stone); margin-bottom: 2rem; font-size: 1.05rem; line-height: 1.8; }

/* =========================================================
   9. CONTACT PAGE SPECIFIC
   ========================================================= */
.contact-hero { padding: 10rem var(--pad-x) var(--section-y); background: var(--ivory); text-align: center; border-bottom: 1px solid var(--line); }
.contact-hero h1 { font-family: var(--serif); font-size: clamp(3rem, 6vw, 5rem); font-weight: 400; margin-top: 1rem; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 1400px; margin: 0 auto; padding: var(--section-y) var(--pad-x); background: var(--ivory); }
.info-card { text-align: left; }
.info-icon { width: 32px; height: 32px; margin-bottom: 1.5rem; stroke: var(--clay); stroke-width: 1.5; fill: none; }
.info-card h4 { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600; margin-bottom: 0.5rem; }
.info-card p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.info-card a { color: var(--espresso); transition: color 0.3s; }
.info-card a:hover { color: var(--clay); }

.contact-form-section { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream); border-top: 1px solid var(--line); }
.form-image { position: relative; min-height: 500px; background: var(--sand); }
.form-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.form-content { padding: var(--section-y) clamp(2rem, 6vw, 8rem); display: flex; flex-direction: column; justify-content: center; }
.form-content h2 { margin-bottom: 1.5rem; }
.form-content p { color: var(--muted); margin-bottom: 3rem; max-width: 400px; }
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.form-group input, .form-group textarea { width: 100%; padding: 1rem; background: transparent; border: 1px solid var(--stone); font-family: var(--sans); font-size: 1rem; color: var(--espresso); transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--espresso); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.75rem; padding: 1rem 2.5rem; background: var(--espresso); color: var(--ivory); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; transition: background 0.3s, color 0.3s; border-radius: 2px; margin-top: 1rem; }
.btn-submit:hover { background: var(--clay); }

.map-section { width: 100%; height: 500px; background: var(--stone); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-section iframe { width: 100%; height: 100%; border: 0; filter: grayscale(20%) contrast(1.1) sepia(10%); }

/* =========================================================
   CATEGORY PAGE - SUBCATEGORY GRID (FIXED)
   ========================================================= */
.subcat-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 columns */
    gap: 2rem;
    max-width: 1400px; /* Keeps it from getting too wide on huge screens */
    margin: 0 auto; /* Centers the grid */
    padding: var(--section-y) var(--pad-x);
}

.subcat-card {
    position: relative;
    aspect-ratio: 4/5; /* Keeps the cards tall */
    overflow: hidden;
    border-radius: 4px;
    display: block;
    background: var(--sand); /* Fallback background */
}

.subcat-card img {
    width: 100% !important; /* Forces image to fill width */
    height: 100% !important; /* Forces image to fill height */
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.subcat-card:hover img {
    transform: scale(1.05);
}

.subcat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42,33,27,0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: #fff;
}

@media (max-width: 900px) {
    .subcat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .subcat-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 2. Hover Action Bar */
.card-image-wrapper:hover img {
    transform: scale(1.05); /* Slight zoom on the image */
}

.card-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    z-index: 5;
}

.card-image-wrapper:hover .card-actions {
    transform: translateY(0);
    opacity: 1;
}

.action-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--espresso);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    border: none;
}

.action-btn-icon:hover {
    background: var(--espresso);
    color: var(--ivory);
    transform: scale(1.1);
}



/* =========================================================
   PRODUCT PAGE
   ========================================================= */
.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 120px; /* Clears navbar */
    padding-bottom: 4rem;
    background: var(--ivory);
    min-height: 100vh;
}

@media (min-width: 900px) {
    .product-layout {
        grid-template-columns: 1.1fr 1fr 260px;
        gap: 3rem;
        padding-left: var(--pad-x);
        padding-right: var(--pad-x);
    }
}

/* Image Column */
.product-image-wrapper {
    background: var(--sand);
    aspect-ratio: 4/5;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keeps the whole bag visible */
    padding: 2rem;
}

/* Details Column */
.product-details-wrapper {
    padding-top: 1rem;
    background: var(--ivory);
}

.product-breadcrumbs {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 2rem;
    margin-top: 1rem;
}
.product-breadcrumbs a { transition: color 0.3s; }
.product-breadcrumbs a:hover { color: var(--clay); }

.product-title {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3.5rem); /* Fluid sizing as per Senior Dev */
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 400;
}

.product-price {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.product-desc {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.product-meta {
    font-size: 0.8rem;
    color: var(--muted);
    border-top: 1px solid var(--line);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Recently Viewed Sidebar */
.product-sidebar {
    padding-top: 1rem;
    border-left: 1px solid var(--line);
    padding-left: 2rem;
}
.product-sidebar h3 {
    font-family: var(--serif);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.5rem;
}

/* Mobile adjustments */
@media (max-width: 899px) {
    .product-sidebar {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 2rem;
        margin-top: 2rem;
    }
}

/* =========================================================
   12. JOURNAL PAGE SPECIFIC
   ========================================================= */
.journal-hero { padding: 12rem var(--pad-x) 4rem; background: var(--ivory); text-align: center; border-bottom: 1px solid var(--line); }
.journal-hero h1 { font-family: var(--serif); font-size: clamp(3rem, 6vw, 5rem); margin-top: 1rem; }
.journal-hero p { color: var(--muted); max-width: 500px; margin: 1rem auto 0; }
.filter-tabs { display: flex; justify-content: center; gap: 2rem; padding: 3rem var(--pad-x) 0; }
.filter-btn { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; padding-bottom: 0.5rem; border-bottom: 1px solid transparent; color: var(--muted); transition: all 0.3s; cursor: pointer; }
.filter-btn:hover, .filter-btn.active { color: var(--espresso); border-color: var(--espresso); }
.journal-grid { padding: var(--section-y) var(--pad-x); max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4rem; }
.article-card { display: flex; flex-direction: column; }
.article-card .img-box { aspect-ratio: 16/9; background: var(--sand); overflow: hidden; margin-bottom: 1.5rem; }
.article-card .img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.article-card:hover .img-box img { transform: scale(1.03); }
.article-meta { display: flex; gap: 1rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--clay); margin-bottom: 1rem; }
.article-card h2 { font-family: var(--serif); font-size: 2rem; line-height: 1.2; margin-bottom: 1rem; font-weight: 400; }
.article-card p { color: var(--muted); margin-bottom: 1.5rem; }
.read-more { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--espresso); padding-bottom: 2px; align-self: flex-start; }

/* =========================================================
   13. ANIMATIONS & UTILITIES
   ========================================================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================
   14. RESPONSIVE OVERRIDES
   ========================================================= */
@media (max-width: 1024px) {
  .primary-nav ul { gap: 1.5rem; font-size: 0.75rem; }
  .brand { font-size: 1.5rem; }
  .cat-card { flex: 0 0 45%; }
}

@media (max-width: 900px) {
  /* Navbar */
  .primary-nav, .search-wrapper { display: none; }
  .nav-shell { grid-template-columns: 1fr auto; padding: 1.2rem 1.5rem; }
  
  /* Homepage */
  .hero { flex-direction: column; justify-content: flex-end; padding-top: 5.5rem; }
  .hero-image-container { position: relative; right: auto; bottom: auto; width: 100%; height: 46svh; opacity: 1; order: -1; }
  .hero-content { width: 100%; padding: 1.5rem var(--pad-x) 4.5rem; margin-top: 0; }
  .cat-card { flex: 0 0 80%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .journal-grid { grid-template-columns: 1fr; gap: 2rem; }
  .custom { grid-template-columns: 1fr; gap: 2rem; }
  
  /* About */
  .story-grid, .craft-grid { grid-template-columns: 1fr; gap: 2rem; }
  .craft-img-col { aspect-ratio: 16/9; }

  /* Contact */
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form-section { grid-template-columns: 1fr; }
  .form-image { min-height: 300px; }

  /* Category */
  .subcat-grid { grid-template-columns: 1fr; }

  /* Product */
  .product-layout { grid-template-columns: 1fr; padding-top: 60px; }
  .product-image-panel { min-height: 50vh; padding: 2rem; }
  .product-info-panel { padding: 3rem var(--pad-x); }

  /* Journal */
  .journal-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 500px) {
  .info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
}

/* Collection Background Texture Overlay */
/* Collection Section Base */
.collection-section {
    position: relative;
    background-color: var(--cream); /* Default fallback */
}

/* Texture Background on the Slider Container */
.slider-container {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    /* The background image will be injected inline via PHP */
}

/* Add a slight dark overlay ONLY on the texture so transparent PNGs pop */
.slider-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15); /* Subtle darkening for contrast */
    z-index: 0;
}

/* Ensure the PNGs and Caption sit above the texture overlay */
.slider-track {
    position: relative;
    z-index: 1; 
}

.slide-caption, .slider-nav {
    z-index: 5;
}
.collection-section > * {
    position: relative;
    z-index: 1;
}

/* =========================================================
   CART DRAWER (Glassmorphism)
   ========================================================= */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(42, 33, 27, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100dvh;
    background: rgba(255, 253, 248, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: -20px 0 50px rgba(42, 33, 27, 0.1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.active {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--line);
}
.cart-header h2 {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 400;
}
.cart-header button {
    font-size: 1.5rem;
    color: var(--espresso);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.empty-cart-msg {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.cart-item-img {
    width: 70px;
    height: 70px;
    background: var(--sand);
    object-fit: contain;
    border-radius: 2px;
}
.cart-item-details { flex: 1; }
.cart-item-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 500;
}
.cart-item-price {
    font-size: 0.8rem;
    color: var(--muted);
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.cart-item-qty button {
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
}
.cart-item-qty span { font-size: 0.85rem; }
.cart-item-remove {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--clay);
    cursor: pointer;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    display: inline-block;
    border: none;
    background: none;
    padding: 0;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.5);
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--espresso);
}

/* =========================================================
   CHECKOUT PAGE
   ========================================================= */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    min-height: 100vh;
    padding-top: 100px;
    background: var(--ivory);
}

.checkout-form-panel {
    padding: 4rem var(--pad-x);
    max-width: 700px;
    margin-left: auto;
}

.checkout-summary-panel {
    background: var(--cream);
    padding: 4rem var(--pad-x);
    border-left: 1px solid var(--line);
}

.checkout-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--clay-deep);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Reuse form-group styles from contact page */
.checkout-form-panel .form-group {
    margin-bottom: 1.5rem;
}
.checkout-form-panel .form-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.checkout-form-panel .form-group input {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--stone);
    background: #fff;
    font-family: var(--sans);
    font-size: 1rem;
    transition: 0.3s;
}
.checkout-form-panel .form-group input:focus {
    outline: none;
    border-color: var(--espresso);
}

@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        padding-top: 80px;
    }
    .checkout-summary-panel {
        grid-row: 1; /* Show summary on top for mobile */
        border-left: none;
        border-bottom: 1px solid var(--line);
        padding: 2rem var(--pad-x);
    }
    .checkout-form-panel {
        padding: 2rem var(--pad-x);
    }
}

/* =========================================================
   SINGLE POST PAGE (Journal)
   ========================================================= */
.single-post {
    background: var(--ivory);
    min-height: 100vh;
}

.post-hero {
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 4rem var(--pad-x);
}

.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20,15,10,0.9) 0%, rgba(20,15,10,0.2) 100%);
}

.post-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.post-header-content h1 {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #fff;
    line-height: 1.1;
    margin-top: 1rem;
}

.post-body {
    max-width: 800px;
    margin: -4rem auto 0;
    background: #fff;
    padding: 4rem;
    position: relative;
    z-index: 3;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

/* Typography for Quill Content */
.quill-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--espresso);
}

.quill-content h1, .quill-content h2, .quill-content h3 {
    font-family: var(--serif);
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--espresso);
}

.quill-content p {
    margin-bottom: 1.5rem;
}

.quill-content img {
    max-width: 100%;
    border-radius: 4px;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .post-body {
        padding: 2rem;
        margin: -2rem 1rem 0;
    }
}

/* =========================================================
   NAVBAR DROPDOWNS & MOBILE MENU
   ========================================================= */
.mobile-menu-btn { display: none; color: var(--nav-fg); }

/* =========================================================
   MEGA MENU DROPDOWNS
   ========================================================= */
.has-mega { position: static; } /* Allows the menu to span the full width of the header */

.mega-menu {
    position: absolute;
    top: 100%;
    left: 5%;
    width: 90%;
    max-width: 1200px;
    padding: 3rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s var(--ease-out);
    color: var(--espresso);
    z-index: 100;
    border-radius: 0 0 8px 8px;
}
.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--clay);
    margin-bottom: 1rem;
    font-weight: 600;
}
.mega-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.mega-col ul a {
    font-family: var(--sans);
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--espresso);
}
.mega-col ul a:hover { color: var(--clay); }

/* Custom Search Suggestions */
.search-wrapper { position: relative; }
.search-suggestions {
    position: absolute;
    top: 120%;
    right: 0;
    width: 300px;
    padding: 1rem;
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}
.search-suggestions.active { display: flex; }
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--espresso);
}
.suggestion-item:hover { background: rgba(0,0,0,0.05); }
.suggestion-item img { width: 40px; height: 40px; object-fit: contain; }
.suggestion-item span { font-family: var(--serif); font-size: 1rem; }

/* =========================================================
   MOBILE MENU OVERLAY
   ========================================================= */
@media (max-width: 900px) {
    .mobile-menu-btn { display: block; cursor: pointer; z-index: 101; position: relative;}
    
    .primary-nav { 
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: var(--espresso); flex-direction: column; padding: 8rem 2rem 2rem; 
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); z-index: 100;
        display: flex;
    }
    .primary-nav.active { right: 0; }
    .primary-nav ul { flex-direction: column; gap: 2rem; font-size: 1.5rem; }
    
    .dropdown-mega { 
        position: static; opacity: 1; visibility: visible; display: none; 
        box-shadow: none; background: transparent; color: var(--sand); padding: 1rem 0 0 1rem;
    }
    .has-dropdown.active .dropdown-mega { display: flex; }
    .dropdown-mega a { color: var(--sand); font-size: 1rem; }
}

@media (max-width: 900px) {
    /* Mobile Toggle Button */
    .mobile-menu-btn { display: block; cursor: pointer; z-index: 101; position: relative; }
    
    /* Fix the Category Slider for touch swiping */
    .cat-slider-wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .cat-slider-wrapper::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .cat-track {
        display: flex;
        gap: 1rem;
        padding-bottom: 1rem;
        /* Remove transform so scrolling works */
        transform: none !important; 
    }
    .cat-card {
        flex: 0 0 85%; /* Shows 85% of the card, peeking the next one */
        scroll-snap-align: center;
    }

    /* The Slide-out Menu */
    .primary-nav { 
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: var(--espresso); flex-direction: column; padding: 8rem 2rem 2rem; 
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); z-index: 100;
        display: flex;
    }
    .primary-nav.active { right: 0; }
    
    /* Menu Links */
    .primary-nav ul { flex-direction: column; gap: 1.5rem; font-size: 1.4rem; width: 100%; }
    .primary-nav ul li { width: 100%; }
    .primary-nav ul a { color: #fff; display: block; width: 100%; }
    
    /* Mega Menu inside Mobile */
    .mega-menu {
        position: static;
        opacity: 1; visibility: visible; display: none; 
        box-shadow: none; background: transparent; color: var(--sand); 
        padding: 1rem 0 0 1rem; 
        grid-template-columns: 1fr; /* Stack columns on mobile */
        gap: 1.5rem;
        width: 100%;
    }
    
    /* Show mega menu when the parent li has .active class (handled by JS) */
    .has-mega.active .mega-menu { display: grid; }
    
    /* Mobile Mega Menu Colors */
    .mega-col h4 { color: var(--gold); }
    .mega-col ul a { color: var(--sand); font-size: 1rem; }
}

/* =========================================================
   MOBILE MENU CLOSE BUTTON
   ========================================================= */
.mobile-close-btn {
    display: none; /* Hidden by default on desktop */
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 900px) {
    /* Only show on mobile */
    .mobile-close-btn {
        display: block;
        position: absolute;
        top: 2rem;
        right: 2rem;
        z-index: 105;
    }
}

/* Currency Dropdown Refinements */
.currency-dropdown select {
    transition: opacity 0.3s ease;
}
.currency-dropdown select:hover {
    opacity: 0.7;
}
.currency-dropdown select option {
    background: var(--ivory);
    color: var(--espresso);
    padding: 0.5rem;
}

/* =========================================================
   COLLECTION PAGE GRID (ISOLATED & BULLETPROOF)
   ========================================================= */
.collection-page-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* 3 columns on desktop */
    gap: 2rem !important;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem var(--pad-x) var(--section-y) var(--pad-x);
}

.collection-page-grid .prod-card {
    width: 100% !important;
    max-width: 100% !important;
}

.collection-page-grid .card-image-wrapper {
    aspect-ratio: 4/5 !important; /* Taller aspect ratio for collection products */
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--sand);
    margin-bottom: 1rem;
}

.collection-page-grid .card-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Forces image to fill the box */
}

/* Mobile responsiveness */
@media (max-width: 900px) {
    .collection-page-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 600px) {
    .collection-page-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   SHOP & COLLECTION PAGES (Shared Grids)
   ========================================================= */
.shop-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.shop-collection-grid,
.collection-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.shop-card {
    display: block;
    position: relative;
    aspect-ratio: 4/5;
    background: var(--sand);
    border-radius: 4px;
    overflow: hidden;
}

.shop-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.shop-card:hover img {
    transform: scale(1.05);
}

.shop-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

/* =========================================================
   MOBILE FIXES (Max Width 768px)
   ========================================================= */
@media (max-width: 768px) {
    /* 1. Footer Gap Fix */
    body {
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
    }
    
    /* Ensure the main content area grows to push the footer down */
    main, .product-layout, .checkout-layout {
        flex: 1;
    }
    
    .site-footer {
        padding-bottom: 2rem;
        margin-top: auto; /* Pushes footer to bottom */
    }

    /* 2. Shop & Collection Grids (Single Column) */
    .shop-category-grid,
    .shop-collection-grid,
    .collection-list-grid {
        grid-template-columns: 1fr !important; /* Forces 1 column */
        gap: 1.5rem;
    }

    .shop-card {
        aspect-ratio: 1 / 1; /* Makes them square and large on mobile */
    }

    /* 3. Product Page Spacing */
    .product-layout {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    .product-details-wrapper {
        padding-top: 2rem !important;
    }

    /* 4. Category Page Product Grid (For subcategories) */
    .category-page-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 900px) {
    /* 1. Hide search and currency from the top bar on mobile */
    .search-wrapper, 
    .currency-dropdown {
        display: none !important;
    }

    /* 2. Make the navbar layout cleaner (Brand, Account, Bag, Hamburger) */
    .nav-actions {
        gap: 1rem;
    }

    /* 3. Add these utility links inside the mobile drawer */
    .mobile-utility-links {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    
    .mobile-utility-links a {
        color: var(--stone);
        font-size: 1rem;
        text-decoration: none;
    }
    
    .mobile-utility-links select {
        background: transparent;
        color: var(--stone);
        border: 1px solid var(--stone);
        padding: 0.5rem;
        border-radius: 4px;
        font-size: 1rem;
        width: 100%;
    }
}

/* =========================================================
   NAVBAR STRUCTURAL FIXES (FINAL)
   ========================================================= */
.primary-nav ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

/* Hide mobile utilities on desktop */
@media (min-width: 901px) {
    .mobile-utility-links {
        display: none !important;
    }
}

/* Mobile styling */
@media (max-width: 900px) {
    .primary-nav {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 6rem;
    }

    .primary-nav ul {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }

    /* Hide the desktop mega-menu dropdowns */
    .mega-menu {
        display: none !important; 
    }

    .primary-nav a {
        font-size: 1.5rem;
        color: #fff;
        display: block;
        width: 100%;
    }

    .mobile-utility-links {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
}

/* =========================================================
   CATEGORY PAGE GRID (Bulletproof Fix)
   ========================================================= */
.category-page-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Forces 3 columns */
    gap: 2rem !important;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem var(--pad-x);
}

.category-page-grid .card-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1 !important; /* Keeps images perfectly square */
    background: var(--sand);
    margin-bottom: 1rem;
}

.category-page-grid .card-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Fills the square without squishing */
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .category-page-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on tablets */
        gap: 1rem !important;
    }
}

@media (max-width: 600px) {
    .category-page-grid {
        grid-template-columns: 1fr !important; /* 1 column on phones */
    }
}

/* Force thumbnail images to fill their circular containers */

.thumbnail-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* =========================================================
   PRODUCT PAGE - MOBILE GALLERY FIX
   ========================================================= */
@media (max-width: 900px) {
    /* Give the wrapper a definite height so children can resolve percentages */
    .product-image-wrapper {
        aspect-ratio: 1 / 1 !important;
        position: relative !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    /* The gallery container must fill the wrapper */
    .gallery-container {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .gallery-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        padding: 1rem !important;
    }
}

/* =========================================================
   PRODUCT GALLERY THUMBNAILS
   ========================================================= */
.gallery-thumbs {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 99px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 20;               /* above the gallery images */
    max-width: calc(100% - 2rem);
    overflow-x: auto;          /* scrolls if there are many thumbnails */
}

.thumbnail-container {
    flex: 0 0 44px;            /* stops thumbnails shrinking to 0 */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    display: block;            /* replaces the grid centering */
}

.thumbnail-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}