/* Reunion shop styles. Palette below; /tokens.css is loaded but these win. */
:root { --navy: #1A2B4C; --gold: #F5A623; --gold-dark: #DC8F10; --paper: #FAF8F5; --ink: #2B2B2B;
  --serif: "Zilla Slab", Rockwell, Georgia, serif;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  --safe-b: env(safe-area-inset-bottom, 0px); --tab-h: 0px; --bar-h: 0px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--navy); line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 26px; } h2 { font-size: 20px; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 960px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
main.wrap { padding-top: 24px; padding-bottom: 64px; }
.strip { background: var(--gold); color: var(--navy); text-align: center; font-size: 13px; font-weight: 700; padding: 8px 12px; }
.top { background: var(--navy); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { color: #fff; font-family: var(--serif); font-weight: 700; text-decoration: none; font-size: 20px; line-height: 1.2; padding: 6px 0; min-height: 44px; display: inline-flex; align-items: center; }
.cartlink { flex-shrink: 0; white-space: nowrap; color: #fff; text-decoration: none; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 4px; }
.badge { background: var(--gold); color: var(--ink); border-radius: 999px; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; padding: 0 6px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.hero { text-align: center; padding: 16px 0 28px; }
.hero h1 { font-size: 30px; max-width: 18em; margin: 0 auto 12px; }
.hero p { font-size: 16px; max-width: 34em; margin: 0 auto; }
@media (min-width: 640px) { .hero { padding: 32px 0 40px; } .hero h1 { font-size: 42px; } }
.card { background: #fff; border: 2px solid var(--navy); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
@media (hover: hover) { .card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(26, 43, 76, .18); } }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover, .card:focus-within { transform: none; } }
.pill { align-self: flex-start; background: var(--navy); color: var(--gold); border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 12px; }
.card h2 { margin: 0; }
.card .desc { margin: 0; font-size: 14px; flex: 1; }
.card img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; background: var(--paper); }
.card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.price { font-weight: 700; font-size: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: #eef1f8; }
.btn.primary { background: var(--gold); border-color: var(--navy); color: var(--ink); }
.btn.primary:hover { background: var(--gold-dark); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.muted { color: #4e5f78; font-size: 14px; }
.panel { background: #fff; border: 2px solid var(--navy); border-radius: 16px; padding: 20px; }
.pdp { display: grid; gap: 24px; }
@media (min-width: 720px) { .pdp { grid-template-columns: 1fr 1fr; align-items: start; } }
.pdp img { width: 100%; border-radius: 16px; border: 2px solid var(--navy); background: #fff; display: block; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 16px 0; }
.sizes legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.sizes label { position: relative; }
.sizes input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sizes span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 0 12px; border: 2px solid var(--navy); border-radius: 12px; background: #fff; font-weight: 700; }
.sizes input:checked + span { background: var(--navy); color: #fff; }
.sizes input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--navy); background: #fff; font-size: 20px; font-weight: 700; color: var(--navy); cursor: pointer; }
.stepper output { min-width: 36px; text-align: center; font-weight: 700; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.line { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid #e3dccb; }
.line img { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--navy); }
.line .meta { display: flex; flex-direction: column; gap: 8px; }
.linkbtn { background: none; border: 0; color: var(--navy); text-decoration: underline; font: inherit; min-height: 44px; padding: 0 8px; cursor: pointer; }
.total { font-size: 20px; font-weight: 700; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input { width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid var(--navy); border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.field input[aria-invalid="true"] { border-color: #c94a3a; }
.field input { scroll-margin: 96px 0 160px; }
#addr h2 { font-size: 18px; margin: 8px 0 12px; }
.err { color: #b3382a; font-size: 14px; margin-top: 4px; min-height: 0; }
.formerr { background: #fdecea; border: 2px solid #c94a3a; border-radius: 12px; padding: 12px; margin-bottom: 16px; color: #7a2118; }
.checkout { display: grid; gap: 24px; }
@media (min-width: 720px) { .checkout { grid-template-columns: 3fr 2fr; align-items: start; } }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 22px; font-weight: 700; background: #fcd988; padding: 4px 12px; border-radius: 8px; display: inline-block; letter-spacing: .04em; }
.rzp { margin: 20px 0; min-height: 72px; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--paper); border: 2px solid var(--navy); border-radius: 16px; }
[hidden] { display: none !important; }

/* ---- App feel -------------------------------------------------------------
   Touch behaviour everywhere; layout changes below 720px (same breakpoint the
   pdp and checkout grids already use). Desktop keeps the header cart link and
   renders action bars in the page flow. */
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-x: none; }
a, button, label, input, summary { touch-action: manipulation; }
.btn, .stepper button, .sizes span, .tabbar a, .card { -webkit-user-select: none; user-select: none; }
.btn, .stepper button, .sizes span { transition: transform .12s ease, background-color .12s ease; }
.btn:active, .stepper button:active { transform: scale(.96); }
.sizes label:active span { transform: scale(.94); }
.card:active { transform: scale(.985); }

.actionbar { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.actionbar .btn { flex: 1; }
.actionbar .ab-price { display: none; font-weight: 700; font-size: 18px; white-space: nowrap; }

.tabbar { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--bar-h) + var(--safe-b) + 12px); transform: translate(-50%, 8px);
  max-width: min(92vw, 420px); background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(26, 43, 76, .35); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 50; }
.toast:empty { display: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: var(--gold); margin-left: 12px; display: inline-block; padding: 8px 0; }
@media (prefers-reduced-motion: reduce) {
  .btn, .stepper button, .sizes span, .toast { transition: none; }
  .btn:active, .stepper button:active, .sizes label:active span, .card:active { transform: none; }
}

@media (max-width: 719px) {
  :root { --tab-h: 56px; }
  body.has-actionbar { --bar-h: 72px; }
  body { padding-bottom: calc(var(--tab-h) + var(--bar-h) + var(--safe-b)); }
  main.wrap { padding-top: 16px; padding-bottom: 24px; }
  .strip { font-size: 12px; padding: 6px var(--gl); }
  .bar { min-height: 48px; }
  .brand { font-size: 17px; }
  .cartlink { display: none; }
  .hero { padding: 8px 0 20px; }
  .hero h1 { font-size: 28px; }
  .card img { aspect-ratio: 4 / 3; object-fit: contain; }

  .tabbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; box-shadow: 0 -2px 0 var(--navy); padding: 0 var(--gr) var(--safe-b) var(--gl); }
  .tabbar a { position: relative; min-height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: #4e5f78; text-decoration: none; font-size: 12px; font-weight: 700; transition: transform .12s ease; }
  .tabbar a.active { color: var(--navy); box-shadow: inset 0 3px 0 var(--gold); }
  .tabbar a:active { transform: scale(.94); }
  .tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 20px; height: 20px; font-size: 11px; padding: 0 5px; }

  .actionbar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 30; margin: 0;
    min-height: var(--bar-h); padding: 10px var(--gr) 10px var(--gl); background: #fff; box-shadow: 0 -2px 0 var(--navy); }
  .actionbar .ab-price { display: block; min-width: 64px; }
  .actionbar .btn { font-size: 15px; padding: 0 12px; }

  main.pdp-page { padding-top: 0; }
  .pdp { gap: 16px; }
  .pdp img { width: calc(100% + var(--gl) + var(--gr)); margin: 0 calc(-1 * var(--gr)) 0 calc(-1 * var(--gl)); border-radius: 0; border-width: 0 0 2px;
    max-height: 40svh; object-fit: contain; background: var(--paper); }
  .sizes { margin: 12px 0 0; }

  .panel { padding: 16px; }
  .line { grid-template-columns: 72px 1fr; }
  .line img { width: 72px; height: 72px; }
}

/* Cross-document view transitions: a short fade/slide. Browsers without support, and
   people who ask for reduced motion, just navigate normally. The chrome keeps its own
   name so the header and tab bar stay put instead of fading with the page. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .strip { view-transition-name: shop-strip; }
  .top { view-transition-name: shop-top; }
  .tabbar { view-transition-name: shop-tabbar; }
  ::view-transition-old(root) { animation: 120ms ease-out both shop-vt-out; }
  ::view-transition-new(root) { animation: 200ms ease-out both shop-vt-in; }
  @keyframes shop-vt-out { to { opacity: 0; } }
  @keyframes shop-vt-in { from { opacity: 0; transform: translateY(8px); } }
}
