/* ═══════════════════════════════════════════════════
   BONAZZI — E-commerce Valpolicella
   Palette: viola profondo / crema / oro · Cormorant Garamond + Work Sans
   ═══════════════════════════════════════════════════ */

:root,
[data-theme='light'] {
  --bg: #f8f4ec;
  --surface: #fffdf8;
  --surface-2: #fffaf1;
  --surface-offset: #f1e9dc;
  --divider: #e4dbcc;
  --border: #d8ccb8;

  --text: #241a1e;
  --text-muted: #6f6168;
  --text-faint: #a79ba1;
  --text-inverse: #f9f4ea;

  --primary: #4a1d40;
  --primary-hover: #3a1533;
  --primary-active: #2c0f27;
  --primary-soft: #efe2ea;
  --on-primary: #f9f4ea;

  --oro: #a97b1e;
  --oro-soft: #f3e7cd;

  --error: #a12c3f;
  --success: #437a22;

  --shadow-sm: 0 1px 2px rgb(36 26 30 / 0.06);
  --shadow-md: 0 4px 14px rgb(36 26 30 / 0.08);
  --shadow-lg: 0 16px 40px rgb(36 26 30 / 0.16);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --content: 1160px;
}

[data-theme='dark'] {
  --bg: #16100f;
  --surface: #1d1517;
  --surface-2: #221919;
  --surface-offset: #271d1f;
  --divider: #2f2427;
  --border: #3d3034;

  --text: #e9dfe2;
  --text-muted: #a5979c;
  --text-faint: #6e6166;
  --text-inverse: #241a1e;

  --primary: #cf9fc2;
  --primary-hover: #ddb8d1;
  --primary-active: #b988ab;
  --primary-soft: #33202c;
  --on-primary: #20101a;

  --oro: #d3a94f;
  --oro-soft: #3a2f1a;

  --error: #d97b8a;
  --success: #8fbf6e;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px rgb(0 0 0 / 0.55);
}

/* ── base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
}

img, svg, video { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }

::selection { background: rgb(74 29 64 / 0.2); }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: var(--radius-sm); }

a, button, input, select, textarea {
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

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

/* l'attributo hidden deve sempre vincere su qualsiasi display dichiarato */
[hidden] { display: none !important; }

.wrap { max-width: var(--content); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ── topbar ─────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--divider);
}
.topbar-inner {
  max-width: var(--content); margin-inline: auto;
  padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; color: var(--oro); flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.05em; line-height: 1;
  display: flex; flex-direction: column;
}
.brand-name small {
  font-family: var(--font-body); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted);
  margin-top: 0.28rem;
}
.nav { display: flex; gap: clamp(0.9rem, 2vw, 1.8rem); }
.nav a {
  text-decoration: none; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--text-muted); padding: 0.4rem 0.2rem; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); border-bottom-color: var(--oro); }
.topbar-actions { display: flex; gap: 0.4rem; }
.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: var(--radius-full);
  color: var(--text); border: 1px solid var(--border);
  background: var(--surface);
}
.icon-btn:hover { border-color: var(--oro); color: var(--oro); }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary);
  font-size: 0.7rem; font-weight: 600; border-radius: var(--radius-full);
}
@media (max-width: 720px) {
  .nav { display: none; }
}

/* ── hero ───────────────────────────────────────── */
.hero { position: relative; min-height: min(88vh, 640px); display: grid; align-items: center; overflow: clip; }
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('img/hero-valpolicella.jpg');
  background-size: cover; background-position: center 62%;
  filter: saturate(1.05);
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgb(16 6 12 / 0.55) 0%, rgb(20 8 14 / 0.35) 40%, rgb(16 6 12 / 0.78) 100%),
    radial-gradient(80% 90% at 18% 40%, rgb(74 29 64 / 0.35), transparent 70%);
}
.hero-inner {
  position: relative; max-width: var(--content); margin-inline: auto;
  padding: clamp(4rem, 10vw, 7rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 4.5rem);
  width: 100%;
}
.hero-kicker {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: #f3e0b6; margin-bottom: 1.2rem;
  border-bottom: 1px solid rgb(243 224 182 / 0.45); padding-bottom: 0.5rem;
}
.hero-title {
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  font-weight: 600; color: #fbf6ec; letter-spacing: 0.01em; max-width: 14ch;
}
.hero-title em { font-style: italic; color: #ecd9a8; }
.hero-sub {
  margin-top: 1.4rem; max-width: 54ch; color: rgb(251 246 236 / 0.85);
  font-size: 1.05rem; font-weight: 300;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.hero-strip {
  display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 3.5vw, 3rem);
  margin-top: clamp(2.2rem, 5vw, 3.6rem);
  padding-top: 1.6rem; border-top: 1px solid rgb(251 246 236 / 0.22);
}
.hero-strip li { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-strip strong { font-family: var(--font-display); font-size: 1.5rem; color: #ecd9a8; font-weight: 700; line-height: 1.1; }
.hero-strip span { font-size: 0.8rem; color: rgb(251 246 236 / 0.72); letter-spacing: 0.02em; }

/* ── buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.8rem 1.5rem; border-radius: var(--radius-full);
  font-size: 0.92rem; font-weight: 500; letter-spacing: 0.03em;
  text-decoration: none; border: 1px solid transparent;
}
.btn svg { transition: transform var(--transition); }
.btn:hover svg { transform: translateX(3px); }
.btn-solid { background: #f9f4ea; color: #3a1533; border-color: #f9f4ea; }
.btn-solid:hover { background: #ecd9a8; border-color: #ecd9a8; }
.btn-ghost { border-color: rgb(251 246 236 / 0.55); color: #fbf6ec; }
.btn-ghost:hover { border-color: #ecd9a8; color: #ecd9a8; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ── sections ───────────────────────────────────── */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--divider); }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-sub { margin-top: 0.8rem; color: var(--text-muted); font-size: 0.92rem; }
.kicker {
  font-size: 0.78rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--oro); font-weight: 600; margin-bottom: 0.7rem;
}

/* ── linee ──────────────────────────────────────── */
.linee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.linea-card {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); overflow: hidden; cursor: pointer; text-align: left;
  display: flex; flex-direction: column;
}
.linea-card:hover { border-color: var(--linea-col); box-shadow: var(--shadow-md); }
.linea-visual {
  aspect-ratio: 5 / 4; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, var(--linea-soft) 0%, color-mix(in srgb, var(--linea-soft) 55%, var(--surface)) 100%);
}
.linea-visual img { height: 118%; object-fit: contain; filter: drop-shadow(0 10px 14px rgb(20 10 15 / 0.18)); transform: translateY(4%); transition: transform 400ms cubic-bezier(0.16,1,0.3,1); }
.linea-card:hover .linea-visual img { transform: translateY(0) scale(1.04); }
.linea-info { padding: 1.1rem 1.2rem 1.3rem; }
.linea-info h3 { font-size: 1.45rem; display: flex; align-items: baseline; gap: 0.6rem; }
.linea-info h3 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--linea-col); flex-shrink: 0; align-self: center; }
.linea-info p { margin-top: 0.5rem; font-size: 0.88rem; color: var(--text-muted); }
.linea-count { margin-top: 0.9rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--linea-col); }

/* ── toolbar catalogo ───────────────────────────── */
.shop-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  padding: 0.45rem 1rem; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.84rem; font-weight: 500; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-col, var(--text-faint)); }
.chip:hover { border-color: var(--oro); color: var(--text); }
.chip[aria-selected='true'] {
  background: var(--primary); border-color: var(--primary); color: var(--on-primary);
}
.toolbar-right { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.search-box {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface); padding: 0.5rem 1rem; color: var(--text-muted);
}
.search-box:focus-within { border-color: var(--oro); }
.search-box input { border: none; background: none; outline: none; width: min(230px, 46vw); font-size: 0.88rem; color: var(--text); }
.sort-box select {
  border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface);
  padding: 0.55rem 1rem; font-size: 0.86rem; color: var(--text-muted);
}
.results-count { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.4rem; }

/* ── griglia prodotti ───────────────────────────── */
.grid-products {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.2rem;
}
.card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); display: flex; flex-direction: column;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--card-col); transform: translateY(-3px); }
.card-visual {
  aspect-ratio: 1 / 1.06; display: grid; place-items: center; cursor: pointer; position: relative;
  background:
    radial-gradient(120% 90% at 50% 12%, color-mix(in srgb, var(--card-col) 16%, var(--surface)) 0%, var(--surface) 78%);
}
.card-visual::after {
  content: ''; position: absolute; inset: auto 12% 8% 12%; height: 14%;
  background: radial-gradient(50% 100% at 50% 100%, rgb(30 15 22 / 0.22), transparent 70%);
}
.card-visual img { height: 86%; object-fit: contain; filter: drop-shadow(0 8px 10px rgb(20 10 15 / 0.16)); position: relative; z-index: 1; transition: transform 380ms cubic-bezier(0.16,1,0.3,1); }
.card:hover .card-visual img { transform: scale(1.05) translateY(-3px); }
.card-badge {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.28rem 0.65rem; border-radius: var(--radius-full);
  background: var(--card-col); color: #fff;
}
.card-info { padding: 0.95rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.card-line {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--card-col); display: flex; align-items: center; gap: 0.4rem;
}
.card-line::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--card-col); }
.card-name { font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; line-height: 1.25; }
.card-name a { text-decoration: none; color: inherit; }
.card-name a:hover { color: var(--primary); }
.card-format { font-size: 0.78rem; color: var(--text-faint); }
.card-foot { margin-top: auto; padding-top: 0.6rem; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.card-price { font-size: 1.12rem; font-weight: 600; color: var(--text); }
.card-price small { font-size: 0.7rem; font-weight: 400; color: var(--text-faint); }
.card-actions { display: flex; align-items: center; gap: 0.4rem; }
.quick-btn {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid var(--border); color: var(--text-muted);
  background: var(--surface);
}
.quick-btn:hover { border-color: var(--primary); color: var(--primary); }
.add-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.9rem; border-radius: var(--radius-full);
  background: var(--primary); color: var(--on-primary);
  font-size: 0.8rem; font-weight: 600; text-decoration: none;
}
.card-visual { text-decoration: none; }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); display: grid; gap: 0.6rem; place-items: center; }
.empty-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--text); }

/* ── cantina ────────────────────────────────────── */
.cantina-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.cantina-grid h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 1.2rem; }
.cantina-text p + p { margin-top: 1rem; color: var(--text-muted); }
.cantina-text strong { color: var(--text); font-weight: 600; }
.cert-row { display: flex; gap: 1rem; margin-top: 1.8rem; align-items: center; flex-wrap: wrap; }
.cert-row img { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.5rem 0.8rem; }
.cantina-photo { position: relative; }
.cantina-photo img { border-radius: var(--radius-lg); border: 1px solid var(--border); width: 100%; object-fit: cover; }
.cantina-photo figcaption {
  position: absolute; left: 1rem; bottom: 1rem;
  background: rgb(20 8 14 / 0.72); color: #f4ead8; backdrop-filter: blur(6px);
  padding: 0.35rem 0.85rem; border-radius: var(--radius-full); font-size: 0.78rem; letter-spacing: 0.08em;
}
@media (max-width: 860px) { .cantina-grid { grid-template-columns: 1fr; } .cantina-photo { max-width: 420px; } }

.timeline-wrap { margin-top: clamp(3rem, 7vw, 5rem); }
.timeline-title { font-size: 1.7rem; margin-bottom: 2rem; }
.timeline {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.6rem 2.2rem; position: relative;
}
.timeline::before { content: none; }
.timeline li { position: relative; padding-left: 1.4rem; border-left: 2px solid var(--primary-soft); }
.tl-year { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--primary); display: block; line-height: 1.2; }
[data-theme='dark'] .tl-year { color: var(--primary); }
.timeline p { font-size: 0.88rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ── contatti ───────────────────────────────────── */
.contatti-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); }
.contatti-grid h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.contatti-grid > div > p { color: var(--text-muted); max-width: 48ch; }
.contact-list { margin-top: 1.6rem; display: grid; gap: 0.9rem; }
.contact-list li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; }
.contact-list svg { color: var(--oro); flex-shrink: 0; }
.contact-list a { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--oro-soft); }
.contact-list a:hover { color: var(--primary); }
.social-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1rem; }
.social-link {
  padding: 0.5rem 1.1rem; border-radius: var(--radius-full); border: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 500; text-decoration: none;
}
.social-link:hover { border-color: var(--oro); color: var(--oro); }
.quote-card { margin-top: 2.2rem; background: var(--surface-offset); border-radius: var(--radius-lg); padding: 1.6rem 1.7rem; border: 1px solid var(--divider); }
.quote-card blockquote { font-family: var(--font-display); font-size: 1.25rem; font-style: italic; line-height: 1.45; }
.quote-card figcaption { margin-top: 0.8rem; font-size: 0.8rem; color: var(--text-muted); }
@media (max-width: 860px) { .contatti-grid { grid-template-columns: 1fr; } }

/* ── footer ─────────────────────────────────────── */
.footer { background: #1d0f18; color: #d9c8cd; margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 0.8fr 0.8fr 1.3fr;
  gap: 2.4rem; padding-block: 3.4rem 2.4rem;
}
.footer-logo { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: #f2e5c4; }
.footer-brand p { margin-top: 0.7rem; font-size: 0.85rem; color: #b3a0a7; }
.footer h4 {
  font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: #f2e5c4; margin-bottom: 1rem; font-weight: 600;
}
.footer nav { display: grid; gap: 0.45rem; align-content: start; }
.footer nav a { text-decoration: none; font-size: 0.88rem; color: #b3a0a7; width: fit-content; }
.footer nav a:hover { color: #f2e5c4; }
.footer-note { font-size: 0.8rem; color: #9d8a91; line-height: 1.55; }
.footer-note a { color: #d9bd88; }
.footer-bottom { border-top: 1px solid rgb(217 200 205 / 0.16); padding-block: 1.2rem; }
.footer-bottom p { font-size: 0.78rem; color: #9d8a91; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── pagina prodotto (SEO) ──────────────────────── */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.8rem;
}
.crumbs a { color: var(--text-muted); text-decoration: none; border-bottom: 1px solid var(--border); }
.crumbs a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.crumbs [aria-current='page'] { color: var(--text); font-weight: 500; }
.pd-section { padding-top: clamp(2rem, 5vw, 3.5rem); }
.pd-title { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-top: 0.5rem; }
.pd-grid { align-items: start; }
.pd-visual { position: sticky; top: 5.5rem; }
.pd-hint { margin-top: 0.9rem; font-size: 0.75rem; color: var(--text-faint); }
.pd-permalink { font-size: 0.8rem; color: var(--primary); text-decoration: none; border-bottom: 1px solid transparent; }
.pd-permalink:hover { border-bottom-color: var(--primary); }
.related-section { background: var(--surface); border-top: 1px solid var(--divider); }
.related-title { font-size: clamp(1.5rem, 3vw, 2rem); }
.related-grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
@media (max-width: 700px) {
  .pd-visual { position: static; }
}

/* ── drawer carrello ────────────────────────────── */
.drawer-backdrop, .modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgb(18 8 13 / 0.55); backdrop-filter: blur(3px);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(430px, 100vw);
  background: var(--surface); border-left: 1px solid var(--divider);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--divider);
}
.drawer-head h3 { font-size: 1.5rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.drawer-foot { border-top: 1px solid var(--divider); padding: 1.2rem 1.4rem 1.4rem; display: grid; gap: 0.8rem; }

.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 0.9rem; align-items: center; }
.cart-item-img {
  width: 64px; height: 78px; border-radius: var(--radius-sm);
  display: grid; place-items: center; background: color-mix(in srgb, var(--item-col) 14%, var(--surface));
  border: 1px solid var(--divider); overflow: hidden;
}
.cart-item-img img { height: 88%; object-fit: contain; }
.cart-item-name { font-family: var(--font-display); font-size: 0.98rem; font-weight: 600; line-height: 1.25; }
.cart-item-price { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }
.qty-row { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.45rem; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 0.9rem; color: var(--text-muted); line-height: 1;
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-val { font-size: 0.88rem; font-weight: 600; min-width: 1.4ch; text-align: center; }
.line-total { font-size: 0.88rem; font-weight: 600; }
.cart-remove { font-size: 0.72rem; color: var(--text-faint); text-decoration: underline; margin-left: 0.6rem; }
.cart-remove:hover { color: var(--error); }

.cart-empty { text-align: center; margin: auto; padding: 2.5rem 1rem; color: var(--text-muted); display: grid; gap: 1rem; place-items: center; }
.cart-empty-icon { opacity: 0.35; }
.tot-row { display: flex; justify-content: space-between; font-size: 0.92rem; color: var(--text-muted); }
.tot-row.grand { font-size: 1.05rem; font-weight: 700; color: var(--text); padding-top: 0.6rem; border-top: 1px dashed var(--border); }
.tot-hint { font-size: 0.75rem; color: var(--text-faint); }

/* ── modal prodotto / checkout ──────────────────── */
.modal-backdrop { display: grid; place-items: center; padding: 1.2rem; overflow-y: auto; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--divider);
  width: min(880px, 100%); max-height: calc(100dvh - 2.4rem); overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: pop 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.modal-checkout { width: min(680px, 100%); }

.pm-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; }
.pm-visual {
  display: grid; place-items: center; padding: 2.2rem 1.6rem;
  background:
    radial-gradient(130% 100% at 50% 0%, color-mix(in srgb, var(--card-col) 20%, var(--surface)) 0%, var(--surface-offset) 85%);
  border-right: 1px solid var(--divider);
}
.pm-visual img { height: clamp(240px, 34vh, 360px); object-fit: contain; filter: drop-shadow(0 14px 18px rgb(20 10 15 / 0.2)); }
.pm-body { padding: clamp(1.4rem, 3vw, 2.2rem); }
.pm-close {
  position: absolute; top: 0.8rem; right: 0.8rem;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--border);
  color: var(--text-muted);
}
.pm-close:hover { color: var(--text); border-color: var(--text-muted); }
.modal { position: relative; }
.pm-line { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--card-col); display: flex; align-items: center; gap: 0.45rem; }
.pm-line::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--card-col); }
.pm-title { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: 0.5rem; }
.pm-badges { display: flex; gap: 0.5rem; margin-top: 0.7rem; flex-wrap: wrap; }
.pm-badge { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.24rem 0.7rem; border-radius: var(--radius-full); background: var(--card-col); color: #fff; }
.pm-badge.soft { background: var(--surface-offset); color: var(--text-muted); border: 1px solid var(--divider); }
.pm-price-row { display: flex; align-items: baseline; gap: 0.8rem; margin-top: 1rem; }
.pm-price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.pm-price small { font-family: var(--font-body); font-size: 0.75rem; font-weight: 400; color: var(--text-faint); }
.pm-desc { margin-top: 1.1rem; display: grid; gap: 0.7rem; }
.pm-desc p { font-size: 0.9rem; color: var(--text-muted); }
.pm-specs { margin-top: 1.2rem; border: 1px solid var(--divider); border-radius: var(--radius-md); overflow: hidden; }
.pm-specs dl { display: grid; }
.pm-specs > div { display: grid; grid-template-columns: 128px 1fr; font-size: 0.84rem; }
.pm-specs > div + div { border-top: 1px solid var(--divider); }
.pm-specs dt { padding: 0.55rem 0.85rem; background: var(--surface-offset); font-weight: 600; color: var(--text); }
.pm-specs dd { padding: 0.55rem 0.85rem; color: var(--text-muted); }
.pm-actions { display: flex; gap: 0.7rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }
.pm-qty { display: inline-flex; align-items: center; gap: 0.7rem; border: 1px solid var(--border); border-radius: var(--radius-full); padding: 0.45rem 0.8rem; }
.pm-qty .qty-btn { width: 30px; height: 30px; }
@media (max-width: 700px) {
  .pm-grid { grid-template-columns: 1fr; }
  .pm-visual { border-right: none; border-bottom: 1px solid var(--divider); padding: 1.6rem; }
  .pm-visual img { height: 210px; }
}

/* checkout */
.co-body { padding: clamp(1.4rem, 3vw, 2.2rem); }
.co-title { font-size: 1.9rem; }
.co-sub { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.4rem; }
.co-demo {
  margin-top: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-md);
  background: var(--oro-soft); border: 1px solid color-mix(in srgb, var(--oro) 40%, transparent);
  font-size: 0.8rem; color: var(--text);
}
.co-section { margin-top: 1.6rem; }
.co-section h4 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.form-field { display: grid; gap: 0.3rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.form-field input, .form-field textarea, .form-field select {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 0.65rem 0.8rem; font-size: 0.9rem;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--oro); outline: none; }
.co-summary { border: 1px solid var(--divider); border-radius: var(--radius-md); padding: 1rem 1.1rem; margin-top: 1.6rem; }
.co-summary .tot-row { padding-block: 0.2rem; }
.co-pay-row { display: flex; gap: 0.6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.co-confirm {
  margin-top: 1.4rem; width: 100%; justify-content: center; padding: 0.95rem 1.5rem; font-size: 1rem;
}
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.order-ok { text-align: center; padding: clamp(1.8rem, 4vw, 3rem); display: grid; gap: 0.8rem; place-items: center; }
.order-ok-icon {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--success) 18%, var(--surface)); color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 45%, transparent);
}
.order-ok h3 { font-size: 1.8rem; }
.order-ok p { color: var(--text-muted); font-size: 0.92rem; max-width: 42ch; }
.order-num { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--primary); letter-spacing: 0.06em; }

/* ── toast ──────────────────────────────────────── */
.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translate(-50%, 140%);
  z-index: 120; background: #241a1e; color: #f4ead8;
  padding: 0.75rem 1.4rem; border-radius: var(--radius-full);
  font-size: 0.88rem; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.6rem;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  max-width: min(92vw, 480px);
}
.toast.show { transform: translate(-50%, 0); }
.toast strong { color: #ecd9a8; font-weight: 600; }
