/* ==========================================================================
   KEDARMART — STYLESHEET
   Earthy premium. Mobile-first. No framework, no build step.
   --------------------------------------------------------------------------
   Contents
     1. Design tokens
     2. Reset & base
     3. Layout primitives
     4. Typography
     5. Buttons & controls
     6. Header / announcement bar
     7. Hero
     8. Trust strip
     9. Products
    10. Story
    11. Process
    12. Reviews
    13. FAQ
    14. Newsletter
    15. Footer
    16. Motion & accessibility
   ========================================================================== */

/* ---- 1. Design tokens ---------------------------------------------------- */
:root {
  /* Palette — warm cream ground, deep forest green, terracotta accent */
  --cream:        #FAF6EF;
  --cream-deep:   #F2EBDF;
  --sand:         #E7DCC9;
  --forest:       #1F3D2B;
  --forest-soft:  #2E5540;
  --forest-tint:  #E8EFE9;
  --terracotta:   #B75E36;
  --terracotta-d: #9A4C29;
  --gold:         #C79A3E;
  --ink:          #24211C;
  --ink-soft:     #5A5348;
  --ink-faint:    #8B8375;
  --line:         #DED3C0;
  --white:        #FFFFFF;

  /* Semantic */
  --bg:           var(--cream);
  --bg-alt:       var(--cream-deep);
  --text:         var(--ink);
  --text-muted:   var(--ink-soft);
  --accent:       var(--terracotta);
  --border:       var(--line);

  /* Type */
  --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Fluid type scale */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-xl:   clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-2xl:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --fs-3xl:  clamp(1.875rem, 1.5rem + 1.8vw, 2.75rem);
  --fs-4xl:  clamp(2.25rem, 1.6rem + 3vw, 4rem);

  /* Spacing */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.5rem;   --sp-6: 2rem;
  --sp-7: 3rem;     --sp-8: 4rem;     --sp-9: 6rem;
  --section-y: clamp(3.5rem, 2rem + 7vw, 7rem);

  /* Other */
  --radius:    4px;
  --radius-lg: 10px;
  --maxw:      1200px;
  --maxw-text: 62ch;
  --shadow:    0 1px 2px rgba(36,33,28,.04), 0 8px 24px rgba(36,33,28,.06);
  --shadow-lg: 0 2px 4px rgba(36,33,28,.05), 0 18px 48px rgba(36,33,28,.10);
  --ease:      cubic-bezier(.22,.61,.36,1);
}

/* ---- 2. Reset & base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* The hidden attribute must win over any display rule that follows it —
   without this, `display:grid` on .checkout keeps the element visible even
   when JS sets .hidden = true. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600;
  line-height: 1.15; letter-spacing: -0.015em; color: var(--forest); }

p { margin: 0; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- 3. Layout primitives ------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
@media (min-width: 768px) { .wrap { padding-inline: var(--sp-6); } }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--forest { background: var(--forest); color: var(--cream); }
.section--forest h2, .section--forest h3 { color: var(--cream); }

.section-head { max-width: var(--maxw-text); margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: var(--sp-3);
}
.section--forest .eyebrow { color: var(--gold); }

.section-title { font-size: var(--fs-3xl); }

.section-sub {
  margin-top: var(--sp-4);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 54ch;
}
.section-head--center .section-sub { margin-inline: auto; }
.section--forest .section-sub { color: rgba(250,246,239,.75); }

/* Decorative hairline rule with a centre diamond */
.rule {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-3); color: var(--terracotta);
  margin-block: var(--sp-5);
}
.rule::before, .rule::after {
  content: ''; height: 1px; width: 48px; background: currentColor; opacity: .4;
}
.rule span { font-size: 10px; line-height: 1; }

/* ---- 4. Typography ------------------------------------------------------- */
.lede { font-size: var(--fs-lg); color: var(--text-muted); }

/* ---- 5. Buttons & controls ----------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 0.9rem 1.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .12s var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--terracotta); color: var(--white); }
.btn--primary:hover { background: var(--terracotta-d); }

.btn--forest { background: var(--forest); color: var(--cream); }
.btn--forest:hover { background: var(--forest-soft); }

.btn--outline { border-color: var(--forest); color: var(--forest); }
.btn--outline:hover { background: var(--forest); color: var(--cream); }

.btn--ghost-light { border-color: rgba(250,246,239,.4); color: var(--cream); }
.btn--ghost-light:hover { background: var(--cream); color: var(--forest); }

.btn--block { width: 100%; }

/* ---- 6. Header / announcement bar ---------------------------------------- */
.announce {
  background: var(--forest);
  color: var(--cream);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-align: center;
  padding-block: var(--sp-2);
  overflow: hidden;
}
.announce__track { display: grid; }
.announce__item {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.announce__item[data-active='true'] { opacity: 1; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,239,.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.header[data-stuck='true'] { border-bottom-color: var(--border); }

.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  min-height: 68px;
}

.logo { display: flex; align-items: baseline; gap: .55rem; }
.logo__mark { color: var(--terracotta); font-size: 1.1rem; line-height: 1; }
.logo__word {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 600; letter-spacing: .02em;
  color: var(--forest);
}
.logo__parent {
  display: none;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint);
}
@media (min-width: 1024px) { .logo__parent { display: block; } }

.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; gap: var(--sp-6); }
  .nav a {
    font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted);
    position: relative; padding-block: var(--sp-1);
    transition: color .2s var(--ease);
  }
  .nav a::after {
    content: ''; position: absolute; left: 0; bottom: 0;
    width: 100%; height: 1px; background: var(--forest);
    transform: scaleX(0); transform-origin: right;
    transition: transform .3s var(--ease);
  }
  .nav a:hover { color: var(--forest); }
  .nav a:hover::after { transform: scaleX(1); transform-origin: left; }
}

.header__actions { display: flex; align-items: center; gap: var(--sp-2); }

.icon-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  color: var(--forest);
  transition: background-color .2s var(--ease);
  position: relative;
}
.icon-btn:hover { background: var(--forest-tint); }
.icon-btn svg { width: 20px; height: 20px; }

.cart-count {
  position: absolute; top: 4px; right: 4px;
  min-width: 17px; height: 17px; padding-inline: 4px;
  display: grid; place-items: center;
  background: var(--terracotta); color: var(--white);
  font-size: 10px; font-weight: 700; line-height: 1;
  border-radius: 999px;
}

.menu-btn { display: grid; }
@media (min-width: 900px) { .menu-btn { display: none; } }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 60;
  visibility: hidden;
}
.drawer[data-open='true'] { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(31,61,43,.4);
  opacity: 0; transition: opacity .3s var(--ease);
}
.drawer[data-open='true'] .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; inset-block: 0; right: 0;
  width: min(84vw, 340px);
  background: var(--cream);
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-5);
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  box-shadow: var(--shadow-lg);
}
.drawer[data-open='true'] .drawer__panel { transform: translateX(0); }
.drawer__top { display: flex; justify-content: space-between; align-items: center; }
.drawer__nav { display: flex; flex-direction: column; gap: var(--sp-1); }
.drawer__nav a {
  font-family: var(--font-display); font-size: var(--fs-xl);
  color: var(--forest); padding-block: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

/* ---- 7. Hero ------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--cream); }

.hero__inner {
  display: grid; gap: var(--sp-6);
  padding-block: var(--sp-8) var(--sp-7);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
    padding-block: var(--sp-9);
    min-height: min(78vh, 720px);
  }
}

.hero__copy { max-width: 34rem; }

.hero__title {
  font-size: var(--fs-4xl);
  line-height: 1.05;
}
.hero__title em {
  font-style: italic;
  color: var(--terracotta);
}

.hero__text {
  margin-top: var(--sp-5);
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 42ch;
}

/* Side by side even on the narrowest phones — stacking these pushed the
   trust list and hero image too far below the fold. */
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.hero__cta .btn { flex: 1 1 auto; padding-inline: 1.1rem; }
@media (min-width: 480px) { .hero__cta .btn { flex: 0 0 auto; padding-inline: 1.75rem; } }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--ink-faint);
}
.hero__meta li { display: flex; align-items: center; gap: var(--sp-2); }
.hero__meta svg { width: 15px; height: 15px; color: var(--forest-soft); flex: none; }

.hero__media { position: relative; }
.hero__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow-lg);
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }

/* Floating seal badge */
.seal {
  position: absolute;
  /* Kept inside the frame on phones; allowed to overhang from 900px up,
     where the hero grid has gutter space to spare. */
  bottom: 12px; left: 12px;
  width: 116px; height: 116px;
  display: grid; place-items: center; text-align: center;
  background: var(--forest); color: var(--cream);
  border-radius: 50%;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  line-height: 1.5;
  box-shadow: var(--shadow-lg);
  padding: var(--sp-3);
}
@media (min-width: 900px) { .seal { bottom: -26px; left: -26px; width: 134px; height: 134px; } }
.seal strong { display: block; font-family: var(--font-display);
  font-size: 15px; letter-spacing: .02em; text-transform: none; color: var(--gold); }

/* ---- 8. Trust strip ------------------------------------------------------ */
.trust { background: var(--forest); color: var(--cream); }
.trust__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5) var(--sp-4);
  padding-block: var(--sp-6);
}
@media (min-width: 768px) { .trust__grid { grid-template-columns: repeat(4, 1fr); } }
.trust__item {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  text-align: center;
  font-size: var(--fs-sm); letter-spacing: .04em;
}
.trust__item svg { width: 26px; height: 26px; color: var(--gold); }

/* ---- 9. Products --------------------------------------------------------- */
.products__grid {
  display: grid; gap: var(--sp-6);
}
@media (min-width: 820px) { .products__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-7); } }

.card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.card__media { position: relative; aspect-ratio: 1 / 1; background: var(--cream-deep); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }

.card__badge {
  position: absolute; top: var(--sp-4); left: var(--sp-4);
  background: var(--cream); color: var(--forest);
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .4rem .7rem; border-radius: 999px;
}

.card__body { display: flex; flex-direction: column; flex: 1; padding: var(--sp-5); gap: var(--sp-3); }

.card__name { font-size: var(--fs-xl); }
.card__variant { font-size: var(--fs-sm); color: var(--ink-faint); letter-spacing: .03em; }
.card__blurb { font-size: var(--fs-sm); color: var(--text-muted); }

.card__list { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-1); }
.card__list li { display: flex; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }
.card__list svg { width: 15px; height: 15px; color: var(--forest-soft); flex: none; margin-top: .28em; }

.card__foot {
  margin-top: auto; padding-top: var(--sp-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  border-top: 1px solid var(--border);
}
.price { display: flex; align-items: baseline; gap: var(--sp-2); }
.price__now { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--forest); }
.price__was { font-size: var(--fs-sm); color: var(--ink-faint); text-decoration: line-through; }

/* ---- 10. Story ----------------------------------------------------------- */
.story__grid { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 900px) { .story__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }

.story__media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow);
}
@media (min-width: 900px) { .story__media { aspect-ratio: 4 / 5; } }
.story__media img { width: 100%; height: 100%; object-fit: cover; }

.story__body p + p { margin-top: var(--sp-4); }
.story__body p { color: var(--text-muted); font-size: var(--fs-lg); }

/* ---- 11. Process --------------------------------------------------------- */
.process__grid { display: grid; gap: var(--sp-6); }
@media (min-width: 640px) { .process__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .process__grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); } }

.step { position: relative; padding-top: var(--sp-5); border-top: 1px solid rgba(250,246,239,.22); }
.step__num {
  font-family: var(--font-display); font-size: var(--fs-2xl);
  color: var(--gold); line-height: 1; margin-bottom: var(--sp-3);
}
.step__title { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.step__body { font-size: var(--fs-sm); color: rgba(250,246,239,.72); }

/* ---- 12. Reviews --------------------------------------------------------- */
.reviews__grid { display: grid; gap: var(--sp-5); }
@media (min-width: 768px) { .reviews__grid { grid-template-columns: repeat(3, 1fr); } }

.review {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.stars { display: flex; gap: 2px; color: var(--gold); }
.stars svg { width: 15px; height: 15px; }
.review__body { font-size: var(--fs-sm); color: var(--text-muted); flex: 1; }
.review__who { font-size: var(--fs-sm); font-weight: 600; color: var(--forest); }
.review__where { font-size: var(--fs-xs); color: var(--ink-faint); }

/* ---- 13. FAQ ------------------------------------------------------------- */
.faq { max-width: 46rem; margin-inline: auto; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-4); text-align: left;
  padding-block: var(--sp-5);
  font-family: var(--font-display); font-size: var(--fs-lg); color: var(--forest);
}
.faq__icon { flex: none; width: 20px; height: 20px; margin-top: .18em;
  color: var(--terracotta); transition: transform .3s var(--ease); }
.faq__item[data-open='true'] .faq__icon { transform: rotate(45deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq__item[data-open='true'] .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding-bottom: var(--sp-5); color: var(--text-muted); font-size: var(--fs-base); }

/* ---- 14. Newsletter ------------------------------------------------------ */
.news { background: var(--sand); }
.news__inner { display: grid; gap: var(--sp-5); align-items: center; text-align: center; }
@media (min-width: 900px) {
  .news__inner { grid-template-columns: 1.1fr .9fr; text-align: left; gap: var(--sp-8); }
}
.news__form { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.news__input {
  flex: 1 1 220px; min-width: 0;
  padding: 0.9rem 1.1rem;
  font: inherit; font-size: var(--fs-sm);
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.news__input::placeholder { color: var(--ink-faint); }
.news__input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(31,61,43,.1); }
.news__note { margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--ink-faint); }

/* ---- 15. Footer ---------------------------------------------------------- */
.footer { background: var(--forest); color: rgba(250,246,239,.8); }
.footer__grid {
  display: grid; gap: var(--sp-6);
  padding-block: var(--sp-8) var(--sp-6);
}
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-7); } }

.footer__brand .logo__word { color: var(--cream); }
.footer__about { margin-top: var(--sp-4); font-size: var(--fs-sm); max-width: 34ch; }

.footer__title {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  margin-bottom: var(--sp-4);
}
.footer__list { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer__list a { font-size: var(--fs-sm); transition: color .2s var(--ease); }
.footer__list a:hover { color: var(--cream); }

.footer__bar {
  border-top: 1px solid rgba(250,246,239,.14);
  padding-block: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
  font-size: var(--fs-xs); color: rgba(250,246,239,.6);
}
@media (min-width: 768px) { .footer__bar { flex-direction: row; justify-content: space-between; align-items: center; } }

/* Placeholder tile shown when a product/story image file is absent.
   It is absolutely positioned, so every container that can host one MUST
   establish a positioning context — this rule guarantees that even if a new
   container is added later and its own `position` is forgotten. */
:has(> .ph) { position: relative; }

.ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); text-align: center; padding: var(--sp-5);
  background:
    repeating-linear-gradient(45deg,
      var(--cream-deep) 0 12px, var(--sand) 12px 24px);
  color: var(--forest-soft);
}
.ph svg { width: 34px; height: 34px; opacity: .55; }
.ph span { font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; opacity: .8; }

/* ---- 16. Motion & accessibility ------------------------------------------ */
.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 100;
  background: var(--forest); color: var(--cream);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius);
  font-size: var(--fs-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

.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;
}

/* Scroll-reveal — opt-in, and fully disabled under reduced-motion */
.reveal { opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal[data-shown='true'] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   PHASE 2 — SHOP COMPONENTS
   Cart drawer, product detail page, checkout. Appended to keep the Phase 1
   homepage styles above untouched.
   ========================================================================== */

/* ---- Toast --------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  transform: translate(-50%, 12px);
  background: var(--forest); color: var(--cream);
  padding: .8rem 1.4rem; border-radius: 999px;
  font-size: var(--fs-sm); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast[data-show='true'] { opacity: 1; transform: translate(-50%, 0); }

/* ---- Cart drawer --------------------------------------------------------- */
.cart-drawer { position: fixed; inset: 0; z-index: 70; visibility: hidden; }
.cart-drawer[data-open='true'] { visibility: visible; }

.cart-drawer__scrim {
  position: absolute; inset: 0; background: rgba(31,61,43,.42);
  opacity: 0; transition: opacity .3s var(--ease);
}
.cart-drawer[data-open='true'] .cart-drawer__scrim { opacity: 1; }

.cart-drawer__panel {
  position: absolute; inset-block: 0; right: 0;
  width: min(92vw, 420px);
  background: var(--cream);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  box-shadow: var(--shadow-lg);
}
.cart-drawer[data-open='true'] .cart-drawer__panel { transform: translateX(0); }

.cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5); border-bottom: 1px solid var(--border); flex: none;
}
.cart-drawer__title { font-size: var(--fs-xl); }

.cart-drawer__body { flex: 1; overflow-y: auto; padding: var(--sp-4) var(--sp-5); }
.cart-drawer__foot { flex: none; padding: var(--sp-5); border-top: 1px solid var(--border); background: var(--cream-deep); }

.cart-empty { text-align: center; padding: var(--sp-8) 0; color: var(--text-muted); }
.cart-empty p { margin-bottom: var(--sp-5); }

.cart-line { display: grid; grid-template-columns: 68px 1fr auto; gap: var(--sp-4);
  padding-block: var(--sp-4); border-bottom: 1px solid var(--border); }
.cart-line:last-child { border-bottom: 0; }

.cart-line__media { position: relative; width: 68px; aspect-ratio: 1;
  border-radius: var(--radius); overflow: hidden; background: var(--cream-deep); }
.cart-line__media img { width: 100%; height: 100%; object-fit: cover; }

.cart-line__name { font-family: var(--font-display); font-size: var(--fs-base); color: var(--forest); }
.cart-line__variant { font-size: var(--fs-xs); color: var(--ink-faint); margin-bottom: var(--sp-3); }

.cart-line__right { text-align: right; display: flex; flex-direction: column;
  justify-content: space-between; align-items: flex-end; }
.cart-line__price { font-family: var(--font-display); color: var(--forest); }
.cart-line__remove { font-size: var(--fs-xs); color: var(--ink-faint);
  text-decoration: underline; text-underline-offset: 2px; }
.cart-line__remove:hover { color: var(--terracotta); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: var(--white); }
.qty__btn { width: 30px; height: 30px; display: grid; place-items: center;
  font-size: 15px; color: var(--forest); transition: background-color .2s var(--ease); }
.qty__btn:hover { background: var(--forest-tint); }
.qty__num { min-width: 30px; text-align: center; font-size: var(--fs-sm); }

.cart-totals { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.cart-totals__row { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-muted); }
.cart-totals__row--total { padding-top: var(--sp-3); border-top: 1px solid var(--border);
  font-family: var(--font-display); font-size: var(--fs-lg); color: var(--forest); }

.cart-nudge { font-size: var(--fs-xs); color: var(--terracotta); margin-bottom: var(--sp-3); text-align: center; }
.cart-continue { display: block; width: 100%; margin-top: var(--sp-3);
  font-size: var(--fs-sm); color: var(--text-muted); text-decoration: underline;
  text-underline-offset: 2px; }

/* ---- Breadcrumb ---------------------------------------------------------- */
.crumb { display: flex; gap: var(--sp-2); font-size: var(--fs-xs);
  color: var(--ink-faint); padding-block: var(--sp-5); }
.crumb a:hover { color: var(--forest); }

/* ---- Product detail page ------------------------------------------------- */
.pdp { display: grid; gap: var(--sp-6); padding-bottom: var(--section-y); }
@media (min-width: 900px) { .pdp { grid-template-columns: 1fr 1fr; gap: var(--sp-8); align-items: start; } }

.pdp__media { position: relative; aspect-ratio: 1; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--cream-deep); box-shadow: var(--shadow); }
.pdp__media img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .pdp__media { position: sticky; top: 92px; } }

.pdp__title { font-size: var(--fs-3xl); margin-bottom: var(--sp-2); }
.pdp__variant { color: var(--ink-faint); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.pdp__price { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.pdp__price .price__now { font-size: var(--fs-2xl); }
.pdp__tax { font-size: var(--fs-xs); color: var(--ink-faint); }
.pdp__blurb { color: var(--text-muted); font-size: var(--fs-lg); margin-bottom: var(--sp-5); }

.pdp__buy { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center;
  padding-block: var(--sp-5); border-block: 1px solid var(--border); margin-bottom: var(--sp-5); }
.pdp__qty { display: flex; align-items: center; gap: var(--sp-3); }
.pdp__qty label { font-size: var(--fs-sm); color: var(--text-muted); }
.pdp__qty input { width: 64px; padding: .6rem; text-align: center; font: inherit;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.pdp__buy .btn { flex: 1 1 200px; }

.pdp__list { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.pdp__list li { display: flex; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--text-muted); }
.pdp__list svg { width: 16px; height: 16px; color: var(--forest-soft); flex: none; margin-top: .25em; }

/* ---- Checkout ------------------------------------------------------------ */
.checkout { display: grid; gap: var(--sp-6); padding-bottom: var(--section-y); }
@media (min-width: 900px) { .checkout { grid-template-columns: 1.15fr .85fr; gap: var(--sp-8); align-items: start; } }

.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-size: var(--fs-sm); font-weight: 500;
  color: var(--forest); margin-bottom: var(--sp-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; font-size: var(--fs-base);
  color: var(--ink); background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(31,61,43,.1);
}
.field[data-invalid='true'] input,
.field[data-invalid='true'] select,
.field[data-invalid='true'] textarea { border-color: var(--terracotta); }
.field__error { font-size: var(--fs-xs); color: var(--terracotta); margin-top: var(--sp-2); min-height: 1em; }

.field-row { display: grid; gap: var(--sp-4); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.summary { background: var(--cream-deep); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-5); }
@media (min-width: 900px) { .summary { position: sticky; top: 92px; } }
.summary__title { font-size: var(--fs-xl); margin-bottom: var(--sp-4); }
.summary__line { display: grid; grid-template-columns: 48px 1fr auto; gap: var(--sp-3);
  padding-block: var(--sp-3); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.summary__media { position: relative; width: 48px; aspect-ratio: 1; border-radius: var(--radius);
  overflow: hidden; background: var(--sand); }
.summary__media img { width: 100%; height: 100%; object-fit: cover; }
.summary__name { color: var(--forest); }
.summary__qty { font-size: var(--fs-xs); color: var(--ink-faint); }

.pay-note { margin-top: var(--sp-4); font-size: var(--fs-xs); color: var(--ink-faint); text-align: center; }
.pay-error { margin-top: var(--sp-4); padding: var(--sp-4); border-radius: var(--radius);
  background: #FBEAE3; border: 1px solid var(--terracotta); color: var(--terracotta-d);
  font-size: var(--fs-sm); }

.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---- Order confirmation --------------------------------------------------- */
.confirm { max-width: 34rem; margin-inline: auto; text-align: center;
  padding-block: var(--section-y); }
.confirm__mark { width: 76px; height: 76px; margin: 0 auto var(--sp-5);
  border-radius: 50%; background: var(--forest-tint); color: var(--forest);
  display: grid; place-items: center; }
.confirm__mark svg { width: 34px; height: 34px; }
.confirm__receipt { display: inline-block; margin-top: var(--sp-4); padding: .6rem 1.2rem;
  background: var(--cream-deep); border: 1px dashed var(--border); border-radius: var(--radius);
  font-family: var(--font-display); font-size: var(--fs-lg); color: var(--forest); }

/* ==========================================================================
   LEGAL / POLICY PAGES
   ========================================================================== */

.legal { padding-bottom: var(--section-y); }

.legal__doc { max-width: 46rem; }

.legal__title { font-size: var(--fs-3xl); margin-bottom: var(--sp-4); }

.legal__intro { font-size: var(--fs-lg); color: var(--text-muted); margin-bottom: var(--sp-3); }

.legal__updated { font-size: var(--fs-sm); color: var(--ink-faint); }

.legal__doc h2 {
  font-size: var(--fs-xl);
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-3);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}
.legal__doc h2:first-of-type { border-top: 0; padding-top: 0; }

.legal__doc h3 {
  font-size: var(--fs-lg);
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
}

.legal__doc p { margin-bottom: var(--sp-4); color: var(--text-muted); }

.legal__doc ul, .legal__doc ol {
  margin: 0 0 var(--sp-4);
  padding-left: var(--sp-5);
  color: var(--text-muted);
}
.legal__doc ul li { list-style: disc; margin-bottom: var(--sp-2); }
.legal__doc ol li { list-style: decimal; margin-bottom: var(--sp-2); }

.legal__doc strong { color: var(--forest); font-weight: 600; }

.legal__doc a { color: var(--terracotta); text-decoration: underline;
  text-underline-offset: 2px; }
.legal__doc a:hover { color: var(--terracotta-d); }

/* Definition-style detail rows (address, registration numbers, contacts) */
.legal__facts {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.legal__facts dl { margin: 0; display: grid; gap: var(--sp-3); }
@media (min-width: 560px) {
  .legal__facts dl { grid-template-columns: max-content 1fr; gap: var(--sp-3) var(--sp-5); }
}
.legal__facts dt { font-size: var(--fs-sm); font-weight: 600; color: var(--forest); }
.legal__facts dd { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }

/* Unfilled placeholder marker — deliberately loud, so an incomplete policy
   page is obvious at a glance rather than shipping silently. */
.todo-mark {
  display: inline-block;
  background: #FBEAE3;
  color: var(--terracotta-d);
  border: 1px dashed var(--terracotta);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: .9em;
  font-weight: 600;
}

/* Contact page cards */
.contact-grid { display: grid; gap: var(--sp-5); margin-bottom: var(--sp-6); }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.contact-card h3 { margin-top: 0; margin-bottom: var(--sp-3); font-size: var(--fs-lg); }
.contact-card p { margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.contact-card a { color: var(--terracotta); }
