/* =============================================================================
   mmercato storefront — shared styles
   =============================================================================
   System A from DESIGN-SYSTEM.md, verbatim. No new colours, no new fonts, no new
   breakpoints. Merriweather for headings and prices, Inter for everything else,
   both from fonts.bunny.net and never Google Fonts.

   Shared by /products, /collections, /drops, /gift and /partner/join so that a
   storefront change happens in one file rather than six. The per-product pages
   are generated (scripts/generate_storefront.php) and link here too, which is
   the main reason this is a file and not a <style> block.
   ========================================================================== */

:root {
  --navy:         #17324D;
  --navy-dk:      #0e1f30;
  --teal:         #2B7A78;
  --orange:       #F4A261;
  --orange-light: rgba(244,162,97,.12);
  --orange-mid:   rgba(244,162,97,.28);
  --sand:         #F5F1E8;
  --sand-dk:      #EDE9DF;
  --charcoal:     #1F2933;
  --muted:        #5a6a7a;
  --white:        #ffffff;
  --border:       rgba(0,0,0,.09);
  --radius:       18px;
  --good:         #4F8A5B;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
}

/* ------------------------------------------------------------------- nav */
nav {
  position: sticky; top: 0; z-index: 100;
  padding: 14px 28px;
  background: rgba(13,31,48,0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav__logo { text-decoration: none; display: block; }
.nav__logo-name {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: 1.12rem; color: #fff; letter-spacing: -.02em; display: block;
}
.nav__logo-sub {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--orange); display: block;
}
.nav__links { display: flex; gap: 26px; align-items: center; }
.nav__links a {
  font-size: .87rem; font-weight: 500; color: rgba(255,255,255,.82); text-decoration: none;
}
.nav__links a:hover { color: var(--orange); }
.nav__cta {
  background: var(--orange); color: var(--navy-dk); font-weight: 700; font-size: .85rem;
  padding: 10px 20px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.nav__cta:hover { background: #e8914a; color: #fff; }
@media (max-width: 799px) { .nav__links { display: none; } }

/* --------------------------------------------------------------- heading */
.page-head {
  background: var(--navy-dk); color: #fff; padding: 56px 24px 48px; text-align: center;
  position: relative; overflow: hidden;
}
.page-head::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(244,162,97,.13) 0%, transparent 65%);
}
.page-head > * { position: relative; }
.eyebrow {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--orange); margin-bottom: 12px;
}
.page-title {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: clamp(1.7rem, 3.5vw, 2.6rem); letter-spacing: -.02em; line-height: 1.2;
}
.page-sub {
  font-size: 1rem; line-height: 1.76; color: rgba(255,255,255,.78);
  max-width: 620px; margin: 14px auto 0;
}

/* ----------------------------------------------------------------- shell */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 44px 0; }
.section-title {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem); letter-spacing: -.02em; margin-bottom: 6px;
}
.section-sub { font-size: .95rem; color: var(--muted); margin-bottom: 24px; max-width: 640px; }

/* ------------------------------------------------------------ department */
.depts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.dept {
  font-size: .82rem; font-weight: 600; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--white); color: var(--charcoal);
  text-decoration: none; cursor: pointer; transition: all .18s;
}
.dept:hover { border-color: var(--orange); color: var(--navy); }
.dept[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.dept span { opacity: .55; margin-left: 6px; font-weight: 500; }

/* ----------------------------------------------------------------- grid */
.grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--white); display: flex; flex-direction: column;
  text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 10px 28px rgba(23,50,77,.10); transform: translateY(-2px); }
.card__img { width: 100%; aspect-ratio: 1/1; display: block; background: var(--sand); }
.card__body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card__dept {
  font-size: .66rem; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 700; color: var(--teal);
}
.card__title { font-size: .97rem; font-weight: 700; line-height: 1.35; }
.card__blurb { font-size: .84rem; line-height: 1.6; color: var(--muted); flex: 1; }
.card__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 4px; }
.card__price {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: 1.12rem; color: var(--navy);
}
.card__cause { font-size: .74rem; color: var(--good); font-weight: 600; }

/* ---------------------------------------------------------- product page */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 40px 0; }
@media (max-width: 799px) { .product { grid-template-columns: 1fr; gap: 26px; } }
.product__img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.product__title {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: clamp(1.5rem, 2.8vw, 2rem); letter-spacing: -.02em; line-height: 1.2; margin-bottom: 10px;
}
.product__price {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: 1.9rem; color: var(--navy); margin: 16px 0 4px;
}
.product__blurb { font-size: .97rem; line-height: 1.76; color: var(--charcoal); }
.variants { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.variant {
  font-size: .82rem; font-weight: 600; padding: 8px 14px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--white); cursor: pointer;
}
.variant[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------------------------------------------------------------- panels */
.panel {
  border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px;
  background: var(--sand); margin: 18px 0;
}
.panel--note { background: var(--orange-light); border-color: var(--orange-mid); }
.panel__title { font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.panel p { font-size: .88rem; line-height: 1.7; color: var(--muted); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem;
  padding: 14px 28px; border-radius: 4px; text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .2s, border-color .2s; font-family: inherit;
}
.btn--orange { background: var(--orange); color: var(--navy-dk); }
.btn--orange:hover { background: #e8914a; color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-dk); }
.btn--outline { background: transparent; color: var(--navy); border: 2px solid var(--border); }
.btn--outline:hover { border-color: var(--orange); color: var(--navy-dk); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--sand-dk); color: var(--muted); cursor: not-allowed; box-shadow: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* ----------------------------------------------------------------- cards
   The Deepstash card. Peter's structure: story on top, product in the middle,
   voucher at the bottom. The video slot is rendered as an explicit empty state
   rather than hidden, because pretending it is not part of the design would
   make it easy to forget it was ever specified. */
.dcard {
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--white); display: flex; flex-direction: column;
}
.dcard__head { padding: 20px 22px 0; }
.dcard__eyebrow {
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--teal); margin-bottom: 8px;
}
.dcard__headline {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: 1.06rem; line-height: 1.35; margin-bottom: 10px;
}
.dcard__story { font-size: .88rem; line-height: 1.72; color: var(--muted); padding: 0 22px 16px; }
.dcard__media {
  margin: 0 22px 16px; border-radius: 10px; border: 1px dashed var(--border);
  background: var(--sand); aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: .78rem; color: var(--muted); padding: 12px;
}
.dcard__product {
  display: flex; gap: 14px; align-items: center;
  padding: 16px 22px; border-top: 1px solid var(--border); background: var(--sand);
  text-decoration: none; color: inherit;
}
.dcard__thumb { width: 66px; height: 66px; border-radius: 8px; flex: none; }
.dcard__pname { font-weight: 700; font-size: .92rem; line-height: 1.3; }
.dcard__pprice { font-family: 'Merriweather', Georgia, serif; font-weight: 900; color: var(--navy); }
.dcard__offer {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.dcard__code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-weight: 700;
  font-size: .82rem; background: var(--orange-light); border: 1px solid var(--orange-mid);
  padding: 6px 11px; border-radius: 4px; color: var(--navy-dk);
}
.dcard__give { font-size: .78rem; color: var(--good); font-weight: 600; padding: 0 22px 18px; }

/* ----------------------------------------------------------------- misc */
.muted { color: var(--muted); }
.empty { padding: 48px 0; text-align: center; color: var(--muted); font-size: .95rem; }
.loading { padding: 48px 0; text-align: center; color: var(--muted); font-size: .9rem; }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  background: var(--orange-light); color: var(--navy-dk); border: 1px solid var(--orange-mid);
}
.crumbs { font-size: .82rem; color: var(--muted); padding: 18px 0 0; }
.crumbs a { color: var(--teal); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

footer {
  background: var(--navy-dk); color: rgba(255,255,255,.7); margin-top: 40px;
  padding: 36px 24px; font-size: .85rem;
}
footer a { color: rgba(255,255,255,.82); text-decoration: none; }
footer a:hover { color: var(--orange); }
.foot-row { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
