/* ============================================================
   Madd Hatchery — design system  ("sleek, still country girl")
   Modern-farmhouse + a little boho. Amber jam, cream linen,
   sage green, with tie-dye accent pops from Trish's world.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Nunito+Sans:wght@400;500;600;700;800&family=Caveat:wght@600;700&display=swap');

:root {
  /* Core palette */
  --amber:      #e0922f;   /* jam/honey */
  --amber-dk:   #b9701b;
  --amber-lt:   #f4c77e;
  --terra:      #c8603f;   /* terracotta */
  --sage:       #7c9367;   /* farm green */
  --sage-dk:    #586b48;
  /* ── Mad Hatter logo accents (2026) ── */
  --teal:       #119aa0;   /* logo blue-green */
  --teal-dk:    #0b6c72;
  --teal-lt:    #8fd6d6;
  --plum:       #7a3f9d;   /* logo purple */
  --plum-dk:    #58297a;
  --plum-lt:    #c9a8e0;
  --peacock:    #3f9e4d;   /* peacock-feather green */
  --pink:       #e36a9a;   /* tie-dye pink accent */

  /* Neutrals */
  --cream:      #fbf6ec;   /* page background */
  --cream-2:    #f3ead8;   /* warm panel */
  --linen:      #fffdf8;   /* cards */
  --ink:        #2c2622;   /* text */
  --ink-soft:   #6b6157;   /* muted text */
  --line:       #e9ddc8;   /* hairlines */

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  --font-script: 'Caveat', cursive;

  /* Shape */
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 10px rgba(74,54,30,.07);
  --shadow: 0 12px 34px rgba(74,54,30,.12);
  --shadow-lg: 0 24px 60px rgba(74,54,30,.18);
  --maxw: 1180px;
  --gut: clamp(1rem, 4vw, 2.5rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dk); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--plum); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.center { text-align: center; }
.eyebrow {
  font-family: var(--font-body); font-weight: 800; text-transform: uppercase;
  letter-spacing: .16em; font-size: .78rem; color: var(--teal-dk);
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .8rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--teal); border-radius: 2px; }
.script { font-family: var(--font-script); color: var(--plum); font-size: 1.5em; line-height: .9; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--teal); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 800; font-size: .95rem;
  padding: .8rem 1.5rem; border-radius: var(--radius-pill);
  background: var(--bg); color: var(--fg); border: 2px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  box-shadow: var(--shadow-sm); white-space: nowrap; text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: #fff; }
.btn:active { transform: translateY(0); }
.btn--terra { --bg: var(--terra); }
.btn--sage  { --bg: var(--sage); }
.btn--amber { --bg: var(--amber); }
.btn--plum  { --bg: var(--plum); }
.btn--ink   { --bg: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- header / nav (injected by site.js) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 1rem; min-height: 70px; }
.brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; }
.brand img { height: 46px; width: auto; object-fit: contain; }
.brand b { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -.01em; }
.brand span { display: block; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--plum); font-weight: 800; }
.nav { display: flex; align-items: center; gap: .2rem; }
.nav a, .nav__btn {
  font-weight: 700; font-size: .95rem; color: var(--ink); background: none; border: 0;
  padding: .55rem .8rem; border-radius: var(--radius-pill); cursor: pointer; font-family: var(--font-body);
  display: inline-flex; align-items: center; gap: .25rem;
}
.nav a:hover, .nav__btn:hover, .nav a[aria-current="page"] { background: color-mix(in srgb, var(--teal-lt) 38%, var(--cream-2)); color: var(--teal-dk); }
.nav__group { position: relative; }
.nav__menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px;
  background: var(--linen); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .4rem; display: none; flex-direction: column;
}
.nav__group.open .nav__menu { display: flex; }
.nav__menu a { border-radius: 10px; padding: .55rem .7rem; }
.nav__cart {
  position: relative; background: var(--plum); color: #fff; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.1rem;
}
.nav__cart .count {
  position: absolute; top: -4px; right: -4px; background: var(--terra); color: #fff;
  font-size: .7rem; font-weight: 800; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; display: grid; place-items: center; border: 2px solid var(--cream);
}
.nav__toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; padding: .3rem .5rem; color: var(--ink); }

@media (max-width: 880px) {
  .nav__toggle { display: inline-block; order: 3; }
  .nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 1rem var(--gut) 1.5rem;
    gap: .15rem; display: none; box-shadow: var(--shadow);
  }
  .site-header.menu-open .nav { display: flex; }
  .nav__group { position: static; }
  .nav__menu { position: static; box-shadow: none; border: 0; padding: 0 0 .4rem 1rem; background: transparent; }
  .nav__group.open .nav__menu { display: flex; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero__art { position: relative; }
.hero__art img.trish { width: min(78%, 360px); margin-inline: auto; filter: drop-shadow(0 18px 30px rgba(74,54,30,.22)); }
@media (prefers-reduced-motion: no-preference) { .hero__art img.trish { animation: float 6s ease-in-out infinite; } }
.hero__blob {
  position: absolute; inset: 8% 6%; z-index: -1; border-radius: 46% 54% 58% 42% / 50% 44% 56% 50%;
  background: radial-gradient(circle at 30% 30%, var(--teal-lt), var(--teal) 45%, var(--plum) 95%);
  opacity: .28; filter: blur(8px);
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero h1 .accent { color: var(--terra); }
.hero__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 1.6rem; }
.chip { background: var(--linen); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: .35rem .9rem; font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* decorative wavy divider */
.divider { display: block; width: 100%; height: 34px; color: var(--cream-2); }

/* ---------- product grid / cards ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.card {
  background: var(--linen); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 4/3; background: var(--cream-2); overflow: hidden; position: relative; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__tag {
  position: absolute; top: .7rem; left: .7rem; background: var(--linen); color: var(--ink);
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: .3rem .6rem; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm);
}
.card__tag--ship { color: var(--teal); } .card__tag--pickup { color: var(--sage-dk); }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__body h3 { margin: 0; font-size: 1.2rem; }
.card__desc { color: var(--ink-soft); font-size: .92rem; margin: 0; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .4rem; }
.price { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--amber-dk); }
.stock { font-size: .78rem; font-weight: 700; color: var(--sage-dk); }
.stock--out { color: var(--terra); }

/* category tiles */
.tile { position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 220px; display: flex; align-items: flex-end; box-shadow: var(--shadow-sm); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__label { position: relative; z-index: 1; width: 100%; padding: 1.2rem; color: #fff; background: linear-gradient(to top, rgba(40,28,18,.78), transparent); font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.tile:hover img { transform: scale(1.05); }
.tile img { transition: transform .4s ease; }

/* ---------- generic panels & sections ---------- */
.panel { background: var(--linen); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 3vw, 2.4rem); box-shadow: var(--shadow-sm); }
.bg-cream2 { background: var(--cream-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }

/* trish note */
.trish-note { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center; }
.trish-note img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: var(--cream-2); border: 3px solid var(--amber-lt); }
.trish-note .bubble { background: var(--cream-2); border-radius: var(--radius); padding: 1rem 1.2rem; position: relative; }
.trish-note .bubble p { margin: 0; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 700; font-size: .9rem; }
.input, .field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: .7rem .9rem;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--linen); color: var(--ink);
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: none; }

/* ---------- cart drawer ---------- */
.drawer-scrim { position: fixed; inset: 0; background: rgba(40,28,18,.45); opacity: 0; visibility: hidden; transition: opacity .2s ease; z-index: 90; }
.drawer-scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 92vw); z-index: 95;
  background: var(--cream); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.drawer__head h3 { margin: 0; }
.drawer__close { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }
.drawer__items { flex: 1; overflow-y: auto; padding: 1rem 1.3rem; }
.drawer__foot { border-top: 1px solid var(--line); padding: 1.2rem 1.3rem; background: var(--linen); }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--cream-2); }
.cart-line .nm { font-weight: 700; font-size: .92rem; }
.cart-line .mt { color: var(--ink-soft); font-size: .82rem; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.qty button { background: var(--linen); border: 0; width: 28px; height: 28px; cursor: pointer; font-size: 1rem; color: var(--ink); }
.qty span { min-width: 26px; text-align: center; font-weight: 700; font-size: .9rem; }
.cart-empty { text-align: center; color: var(--ink-soft); padding: 2.5rem 1rem; }
.row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.row .total { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--amber-dk); }
.note { font-size: .82rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { background: linear-gradient(160deg, var(--teal-dk), var(--plum-dk)); color: #f3ecf6; margin-top: 2rem; }
.site-footer a { color: #f3ecf6; opacity: .88; }
.site-footer a:hover { opacity: 1; color: var(--amber-lt); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: 3rem 1.5rem; }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.site-footer .brand b { color: #fff; }
.site-footer .brand span { color: var(--amber-lt); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; font-size: .85rem; opacity: .8; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--ink); color: #fff; padding: .8rem 1.3rem; border-radius: var(--radius-pill); box-shadow: var(--shadow); z-index: 120; font-weight: 700; transition: transform .25s ease; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__art { order: -1; }
  .hero__cta, .hero__chips { justify-content: center; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .split, .site-footer__grid { grid-template-columns: 1fr; }
  .trish-note { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 540px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { flex: 1; }
}

/* page hero band */
.page-band { background: linear-gradient(180deg, color-mix(in srgb, var(--teal-lt) 30%, var(--cream-2)), var(--cream)); border-bottom: 1px solid var(--line); padding-block: clamp(2.2rem, 5vw, 3.4rem); text-align: center; }
.page-band p { margin: 0 auto; max-width: 56ch; color: var(--ink-soft); }
[hidden] { display: none !important; }
