/* ==========================================================================
   Monopoli Seagulls — Shop preordini (frontend pubblico)
   Design system dark sportivo con accenti oro. Mobile-first.
   Contrasti verificati (WCAG AA): oro #D4AF37 su #0a0a0a = 9.4:1,
   su #1a1a1a = 8.3:1; testo muted #b8b8b8 su #1a1a1a = 8.8:1;
   bordi input #737373 su #1a1a1a = 3.7:1 (componenti UI >= 3:1).
   ========================================================================== */

:root {
  --c-black: #0a0a0a;
  --c-surface: #111111;
  --c-card: #1a1a1a;
  --c-gold: #D4AF37;
  --c-gold-light: #E6C65C;
  --c-gold-soft: rgba(212, 175, 55, 0.14);
  --c-gold-line: rgba(212, 175, 55, 0.55);
  --c-white: #ffffff;
  --c-text: #f5f5f5;
  --c-muted: #b8b8b8;
  --c-border: #737373;
  --c-divider: #2c2c2c;
  --c-error: #ff7a7a;
  --c-success: #4ade80;

  --font-display: "Anton", "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-ui: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1200px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t: 220ms;

  /* scala z-index */
  --z-header: 10;
  --z-toast: 50;
  --z-skip: 100;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--c-black);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

html.is-scroll-locked,
html.is-scroll-locked body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-black);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.1; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--c-gold); text-underline-offset: 3px; }
a:hover { color: var(--c-gold-light); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 3px; }
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: var(--z-skip);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-gold);
  color: var(--c-black);
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--c-black); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.placeholder {
  padding: 0 4px;
  border: 1px dashed var(--c-gold);
  border-radius: 4px;
  color: var(--c-gold);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gold);
}

.notice {
  padding: 14px 16px;
  border: 1px solid var(--c-gold);
  border-radius: var(--radius);
  background: var(--c-card);
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-black); }
.btn--primary:hover {
  background: var(--c-gold-light);
  border-color: var(--c-gold-light);
  color: var(--c-black);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.28);
}
.btn--primary:focus-visible { outline-color: var(--c-white); }

.btn--outline { background: transparent; border-color: var(--c-gold); color: var(--c-gold); }
.btn--outline:hover { background: var(--c-gold-soft); border-color: var(--c-gold-light); color: var(--c-gold-light); }

.btn--ghost { background: transparent; border-color: var(--c-border); color: var(--c-text); }
.btn--ghost:hover { border-color: var(--c-gold); color: var(--c-gold); }

.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn--primary:disabled:hover { background: var(--c-gold); border-color: var(--c-gold); }
.btn--outline:disabled:hover,
.btn--ghost:disabled:hover { background: transparent; }

.btn.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--c-text);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}
.icon-btn:hover { border-color: var(--c-gold-line); background: var(--c-gold-soft); color: var(--c-gold); }
.icon-btn--danger:hover { border-color: var(--c-error); background: rgba(255, 122, 122, 0.08); color: var(--c-error); }

.link-btn {
  display: inline-block;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--c-gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--c-gold-light); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(10, 10, 10, 0.94);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .site-header {
    background: rgba(10, 10, 10, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--c-white);
  text-decoration: none;
}
.brand:hover { color: var(--c-white); }
.brand__mark { width: 36px; height: 36px; flex: none; color: var(--c-gold); }
.brand__text {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand__name { color: var(--c-gold); }

.site-nav { display: none; margin-left: auto; }
.site-nav__list { display: flex; gap: 4px; list-style: none; }
.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.site-nav__link:hover { background: var(--c-gold-soft); color: var(--c-gold); }

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--c-gold);
  border-radius: 999px;
  background: transparent;
  color: var(--c-white);
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.cart-button:hover { background: var(--c-gold); color: var(--c-black); }
.cart-button__count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--c-gold);
  color: var(--c-black);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
}
.cart-button:hover .cart-button__count { background: var(--c-black); color: var(--c-gold); }
.cart-button.is-bumped .cart-button__count { animation: bump 420ms var(--ease); }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 72px 80px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, rgba(212, 175, 55, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(212, 175, 55, 0.08), transparent 70%),
    var(--c-black);
}
/* arco del tiro da tre stilizzato */
.hero::after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -260px;
  width: 620px;
  height: 620px;
  border: 2px solid rgba(212, 175, 55, 0.22);
  border-radius: 50%;
  pointer-events: none;
}
.hero__watermark {
  position: absolute;
  right: -2vw;
  bottom: -0.18em;
  font-family: var(--font-display);
  font-size: clamp(6rem, 26vw, 22rem);
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.04);
  -webkit-text-stroke: 1px rgba(212, 175, 55, 0.18);
  pointer-events: none;
  user-select: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__title {
  margin-top: 14px;
  font-family: var(--font-display);
  line-height: 0.92;
  text-transform: uppercase;
  color: var(--c-white);
}
.hero__title-line { display: block; font-size: clamp(3.5rem, 15vw, 9rem); }
.hero__title-line--small { font-size: clamp(1.6rem, 6vw, 3.25rem); letter-spacing: 0.04em; color: var(--c-gold); }
.hero__tagline {
  margin-top: 18px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.hero__tagline::before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 3px;
  margin-right: 14px;
  vertical-align: middle;
  background: var(--c-gold);
}
.hero__lead { max-width: 54ch; margin-top: 16px; color: #d6d6d6; font-size: 1.1rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__actions .btn { flex: 1 1 auto; }

/* ---------- Sezioni ---------- */
.section { padding-block: 64px; }
.section--alt {
  border-block: 1px solid var(--c-divider);
  background: linear-gradient(180deg, #0f0f0f 0%, var(--c-black) 100%);
}
.section__header { max-width: 720px; margin-bottom: 36px; }
.section__title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--c-white);
}
.section__lead { max-width: 62ch; margin-top: 12px; color: var(--c-muted); font-size: 1.05rem; }

/* ---------- Catalogo ---------- */
.catalog-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-card);
  color: var(--c-muted);
}
.catalog-status:empty { display: none; }
.catalog-status--error { border-color: var(--c-error); color: var(--c-text); }

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  list-style: none;
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--c-gold-line);
  border-radius: var(--radius-lg);
  background: var(--c-card);
  transition: border-color var(--t), box-shadow var(--t);
}
.product-card:hover,
.product-card:focus-within {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 1px var(--c-gold), 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 32px rgba(212, 175, 55, 0.12);
}

.product-card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-bottom: 1px solid var(--c-gold-line);
  background:
    repeating-linear-gradient(135deg, rgba(212, 175, 55, 0.06) 0 12px, transparent 12px 24px),
    linear-gradient(180deg, #222 0%, #141414 100%);
}
.product-card__media img { width: 100%; height: 100%; object-fit: contain; }
/* immagine mancante: l'<img> resta nell'albero di accessibilità (alt) ma diventa invisibile */
.product-card__media.is-missing img { opacity: 0; }
.product-card__media-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  gap: 6px;
  padding: 16px;
  text-align: center;
}
.product-card__media.is-missing .product-card__media-fallback { display: grid; }
.product-card__media-fallback-name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.05;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.85);
}
.product-card__media-fallback-note {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.badge--soldout {
  position: absolute;
  top: 12px;
  left: 12px;
  border: 1px solid var(--c-white);
  background: var(--c-black);
  color: var(--c-white);
}

.product-card__body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 18px; }
.product-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.product-card__title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-white);
}
.product-card__price { font-family: var(--font-display); font-size: 1.6rem; white-space: nowrap; color: var(--c-gold); }
.product-card__desc { color: var(--c-muted); font-size: 0.95rem; }
.product-card__form { display: flex; flex-direction: column; gap: 14px; margin-top: auto; }
.product-card__form .btn { padding-inline: 12px; font-size: 0.95rem; letter-spacing: 0.05em; }

/* gruppi opzione (taglia / colore) come "pill" radio */
.option-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.option-group__legend {
  margin-bottom: 8px;
  padding: 0;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.option-group__options { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { position: relative; }
.pill__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.pill__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #121212;
  color: var(--c-text);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
.pill__label:hover { border-color: var(--c-gold); color: var(--c-gold); }
.pill__input:checked + .pill__label { border-color: var(--c-gold); background: var(--c-gold); color: var(--c-black); }
.pill__input:focus-visible + .pill__label { outline: 3px solid var(--c-white); outline-offset: 2px; }
.pill__input:disabled + .pill__label {
  border-style: dashed;
  opacity: 0.45;
  text-decoration: line-through;
  cursor: not-allowed;
}
.pill__input:disabled + .pill__label:hover { border-color: var(--c-border); color: var(--c-text); }

.swatch { width: 14px; height: 14px; flex: none; border: 1px solid var(--c-border); border-radius: 50%; }
.swatch--nero { border-color: #9a9a9a; background: #0a0a0a; }
.swatch--bianco { border-color: #ffffff; background: #ffffff; }
.swatch--oro { border-color: var(--c-gold); background: var(--c-gold); }
.pill__input:checked + .pill__label .swatch { border-color: var(--c-black); }

.option-error { color: var(--c-error); font-size: 0.9rem; font-weight: 500; }
.option-error:empty { display: none; }

/* skeleton di caricamento */
.product-card--skeleton .product-card__media,
.skeleton-line {
  background: linear-gradient(90deg, #1c1c1c 0%, #2a2a2a 50%, #1c1c1c 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton-line { height: 14px; border-radius: 4px; }
.skeleton-line--title { width: 60%; height: 22px; }
.skeleton-line--short { width: 40%; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------- Come funziona ---------- */
.steps { display: grid; gap: 16px; list-style: none; }
.step {
  padding: 24px;
  border: 1px solid var(--c-gold-line);
  border-radius: var(--radius-lg);
  background: var(--c-card);
}
.step__num { display: block; font-family: var(--font-display); font-size: 2.75rem; line-height: 1; color: var(--c-gold); }
.step__title {
  margin-top: 12px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-white);
}
.step__text { margin-top: 8px; color: var(--c-muted); }

/* ---------- Checkout ---------- */
.checkout { display: grid; align-items: start; gap: 24px; }

.card {
  padding: 20px;
  border: 1px solid var(--c-gold-line);
  border-radius: var(--radius-lg);
  background: var(--c-card);
}

.checkout-form { display: flex; flex-direction: column; gap: 24px; }
.form-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-section__title {
  padding: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-white);
}
.form-hint { margin-top: 6px; color: var(--c-muted); font-size: 0.9rem; }
.form-grid { display: grid; gap: 16px; margin-top: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { color: var(--c-text); font-weight: 600; font-size: 0.95rem; }
.field__req { color: var(--c-gold); }
.field__optional { color: var(--c-muted); font-weight: 400; }
.field__hint { color: var(--c-muted); font-size: 0.85rem; }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #0f0f0f;
  color: var(--c-white);
  font-size: 1rem; /* >= 16px: niente zoom automatico su iOS */
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field__input::placeholder { color: #8f8f8f; }
.field__input:hover { border-color: #9a9a9a; }
.field__input:focus,
.field__input:focus-visible {
  outline: none;
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.4);
}
.field__input[aria-invalid="true"] { border-color: var(--c-error); }
.field__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(255, 122, 122, 0.35); }
.field__input--code { letter-spacing: 0.08em; text-transform: uppercase; }
.field__error { color: var(--c-error); font-size: 0.9rem; font-weight: 500; }
.field__error:empty { display: none; }

.discount-row { display: flex; gap: 10px; margin-top: 6px; }
.discount-row .field__input { flex: 1; min-width: 0; }
.discount-row .btn { flex: none; }
.discount-feedback { margin-top: 8px; font-size: 0.95rem; }
.discount-feedback:empty { display: none; }
.discount-feedback--ok { color: var(--c-success); }
.discount-feedback--error { color: var(--c-error); }

.check { display: flex; align-items: flex-start; gap: 12px; }
.check__input {
  width: 22px;
  height: 22px;
  flex: none;
  margin: 2px 0 0;
  accent-color: var(--c-gold);
  cursor: pointer;
}
.check__label { color: var(--c-text); font-size: 0.95rem; cursor: pointer; }

.alert { padding: 12px 14px; border: 1px solid; border-radius: var(--radius-sm); font-size: 0.95rem; }
.alert:empty { display: none; }
.alert--error { border-color: var(--c-error); background: rgba(255, 122, 122, 0.08); color: #ffd6d6; }

.form-note { color: var(--c-muted); font-size: 0.9rem; text-align: center; }

.order-summary { display: flex; flex-direction: column; gap: 16px; }
.order-summary__title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-white);
}
.order-summary__empty { color: var(--c-muted); }
.order-summary__note { color: var(--c-muted); font-size: 0.85rem; }

.summary-lines { display: flex; flex-direction: column; gap: 12px; list-style: none; }
.summary-lines:empty { display: none; }
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-divider);
}
.summary-line__name { color: var(--c-white); font-weight: 600; }
.summary-line__meta { color: var(--c-muted); font-size: 0.9rem; }
.summary-line__price { font-weight: 600; white-space: nowrap; }
.summary-lines--compact .summary-line { padding-bottom: 8px; }

.totals { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.totals:empty { display: none; }
.totals__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.totals__row dt,
.totals__row dd { margin: 0; }
.totals__row dt { color: var(--c-muted); }
.totals__row--discount dd { color: var(--c-success); font-weight: 600; }
.totals__row--grand {
  padding-top: 10px;
  border-top: 1px solid var(--c-gold-line);
  color: var(--c-white);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.totals__row--grand dt { color: var(--c-white); }
.totals__row--grand dd,
.totals__row--grand strong {
  color: var(--c-gold);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 40px;
  border-top: 1px solid rgba(212, 175, 55, 0.35);
  background: #070707;
}
.site-footer__inner { display: flex; flex-direction: column; gap: 20px; }
.site-footer__brand { font-family: var(--font-display); font-size: 1.75rem; text-transform: uppercase; color: var(--c-white); }
.site-footer__tagline {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.site-footer__info { display: flex; flex-direction: column; gap: 4px; color: var(--c-muted); font-size: 0.95rem; }
.site-footer__copy { font-size: 0.85rem; }

/* ---------- Dialog: drawer carrello + modale conferma ---------- */
dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-text);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.72); }

.drawer {
  width: min(440px, 100vw);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
}
.drawer__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-left: 1px solid var(--c-gold);
  background: var(--c-card);
}
.drawer[open] .drawer__panel { animation: drawer-in var(--t) var(--ease); }
@keyframes drawer-in {
  from { opacity: 0; transform: translateX(32px); }
  to { opacity: 1; transform: none; }
}
.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 16px 20px;
  border-bottom: 1px solid var(--c-divider);
}
.drawer__title { font-family: var(--font-display); font-size: 1.6rem; text-transform: uppercase; color: var(--c-white); }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; }
.drawer__empty { padding-block: 24px; color: var(--c-muted); text-align: center; }
.drawer__footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--c-divider);
  background: #151515;
}
.drawer__note { color: var(--c-muted); font-size: 0.85rem; }

.cart-lines { display: flex; flex-direction: column; list-style: none; }
.cart-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--c-divider);
}
.cart-line:first-child { padding-top: 0; }
.cart-line__thumb {
  position: relative;
  width: 72px;
  height: 90px;
  overflow: hidden;
  border: 1px solid var(--c-gold-line);
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0 8px, transparent 8px 16px),
    #202020;
}
.cart-line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__thumb.is-missing img { opacity: 0; }
.cart-line__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-line__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cart-line__name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-white);
}
.cart-line__meta { color: var(--c-muted); font-size: 0.9rem; }
.cart-line__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.cart-line__total { color: var(--c-gold); font-weight: 700; white-space: nowrap; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.qty__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--c-text);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.qty__btn:hover:not(:disabled) { background: var(--c-gold-soft); color: var(--c-gold); }
.qty__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.qty__btn .icon { width: 18px; height: 18px; }
.qty__value { min-width: 32px; font-weight: 700; text-align: center; }

.modal { width: min(520px, calc(100vw - 32px)); margin: auto; }
.modal__panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 28px 24px;
  border: 1px solid var(--c-gold);
  border-radius: var(--radius-lg);
  background: var(--c-card);
}
.modal[open] .modal__panel { animation: modal-in var(--t) var(--ease); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.modal__icon {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: var(--c-gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.modal__title { font-family: var(--font-display); font-size: 2.25rem; text-transform: uppercase; color: var(--c-white); }
.modal__text { color: var(--c-text); }
.modal__hint { color: var(--c-muted); font-size: 0.9rem; }

.order-number {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px dashed var(--c-gold);
  border-radius: var(--radius);
  background: var(--c-gold-soft);
}
.order-number__label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gold);
}
.order-number__value {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 6vw, 2.25rem);
  letter-spacing: 0.04em;
  word-break: break-all;
  color: var(--c-white);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: var(--z-toast);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 18px;
  border: 1px solid var(--c-gold);
  border-radius: var(--radius);
  background: #141414;
  color: var(--c-white);
  font-weight: 500;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
}
.toast:empty { display: none; }
.toast.is-visible { animation: toast-in var(--t) var(--ease); }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Breakpoint ---------- */
@media (max-width: 419px) {
  /* su schermi molto stretti resta solo l'icona (il testo rimane per gli screen reader) */
  .cart-button__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 28px; }
  .hero__actions .btn { flex: 0 0 auto; }
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
  .site-nav { display: block; }
  .cart-button { margin-left: 8px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .site-footer__inner { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .site-footer__info { text-align: right; }
}

@media (min-width: 960px) {
  .checkout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; }
  .order-summary { position: sticky; top: calc(var(--header-h) + 20px); }
}

@media (min-width: 1024px) {
  .hero { padding-block: 120px 128px; }
  .section { padding-block: 96px; }
}

@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Preferenze utente ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* lo spinner resta (feedback essenziale) ma lento */
  .btn.is-loading::before {
    animation-duration: 1.6s !important;
    animation-iteration-count: infinite !important;
  }
  .product-card--skeleton .product-card__media,
  .skeleton-line { animation: none; }
}

@media (forced-colors: active) {
  .btn,
  .pill__label,
  .cart-button,
  .card,
  .product-card { border: 1px solid CanvasText; }
  .field__input:focus { outline: 2px solid Highlight; }
  .pill__input:checked + .pill__label { outline: 2px solid Highlight; }
}
