/* ==========================================================================
   Ricette Ciociare e non solo – stile del sito
   Colori presi dal logo: marrone, giallo "fettuccina", bianco.
   ========================================================================== */
:root {
  --brown: #5b2f08;
  --brown-700: #4a2606;
  --brown-900: #2a1605;
  --gold: #fdc800;
  --gold-600: #e9b400;
  --cream: #fbf5ea;
  --paper: #fffdf9;
  --ink: #2b1a0c;
  --muted: #6e5a47;
  --line: #ecdfcb;
  --white: #ffffff;
  --dark-bg: #140d08;
  --dark-panel: #1b130d;
  --dark-line: rgba(255, 240, 220, 0.12);
  --dark-text: #f6eee3;
  --dark-muted: #b9a893;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -20px rgba(43, 26, 12, 0.35);
  --shadow-sm: 0 6px 20px -10px rgba(43, 26, 12, 0.35);
  --header-h: 72px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 720px) { :root { --gutter: 32px; --header-h: 80px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.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; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 500;
  background: var(--brown); color: var(--white); padding: 10px 16px; border-radius: 10px; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ----------------------------- Bottoni ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 15px; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s, border-color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-gold { background: var(--gold); color: var(--brown-900); box-shadow: 0 10px 24px -12px rgba(253, 200, 0, .8); }
.btn-gold:hover { background: #ffd633; transform: translateY(-1px); }
.btn-brown { background: var(--brown); color: var(--white); }
.btn-brown:hover { background: var(--brown-700); transform: translateY(-1px); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .55); color: var(--white); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.link-btn { background: none; border: 0; padding: 4px 0; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--brown); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--white); border-color: #dccab0; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ----------------------------- Header ----------------------------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60;
  background: var(--cream);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(251, 245, 234, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 48px; height: 48px; border-radius: 8px; box-shadow: var(--shadow-sm); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand-name { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 19px; color: var(--brown); white-space: nowrap; }
.brand-sub { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 380px) { .brand-name { font-size: 16px; } .brand img { width: 42px; height: 42px; } }
.header-actions { display: flex; align-items: center; gap: 10px; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--brown); color: var(--white); font-size: 11px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--cream);
}

/* Menu a tendina */
.menu { position: relative; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px 0 20px;
  border-radius: 999px; border: 0; background: var(--brown); color: var(--white); font-weight: 700; font-size: 15px;
  transition: background-color .2s;
}
.menu-toggle:hover { background: var(--brown-700); }
.burger { position: relative; width: 18px; height: 14px; }
.burger span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease); }
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }
.menu.is-open .burger span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu.is-open .burger span:nth-child(2) { opacity: 0; }
.menu.is-open .burger span:nth-child(3) { top: 6px; transform: rotate(-45deg); }
@media (max-width: 420px) { .menu-label { display: none; } .menu-toggle { padding: 0 14px; width: 46px; justify-content: center; } }

.menu-panel {
  position: absolute; right: 0; top: calc(100% + 12px); width: 320px; max-width: calc(100vw - 2 * var(--gutter));
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px; transform-origin: top right;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
  transition: opacity .2s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
}
.menu.is-open .menu-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .2s var(--ease), transform .25s var(--ease), visibility 0s; }
.menu-list, .menu-sub { list-style: none; margin: 0; padding: 0; }
.menu-list > li + li { border-top: 1px solid var(--line); }
.menu-list a { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 12px; text-decoration: none; transition: background-color .15s; }
.menu-list a:hover { background: var(--cream); }
.menu-link-title { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 20px; color: var(--brown); line-height: 1.2; }
.menu-link-sub { font-size: 13px; color: var(--muted); }
.menu-list a[aria-current="page"] .menu-link-title::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--gold); vertical-align: middle; }
.menu-sub { margin: -4px 0 8px 14px; padding-left: 12px; border-left: 2px solid var(--gold); }
.menu-sub a { flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.menu-sub a[aria-current="page"] { background: var(--cream); }
.dot-row { display: inline-flex; }
.dot-row i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 1.5px solid var(--paper); box-shadow: 0 0 0 1px rgba(0,0,0,.15); margin-right: -4px; }
.dot-row i:last-child { margin-right: 0; }

/* ----------------------------- Hero ----------------------------- */
.hero { position: relative; background: var(--brown); color: var(--white); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 85% 30%, rgba(253, 200, 0, .16), transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(0, 0, 0, .25), transparent 70%);
}
.hero-inner { position: relative; display: grid; gap: 36px; align-items: center; padding-top: 48px; padding-bottom: 88px; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 56px; padding-top: 72px; padding-bottom: 120px; } }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.eyebrow-dark { color: var(--brown); opacity: .8; }
.hero-title { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: clamp(42px, 8.5vw, 84px); line-height: .98; letter-spacing: -.01em; }
.hero-title span { display: block; margin-top: 10px; font-size: .48em; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.hero-text { max-width: 34em; margin: 22px 0 30px; font-size: 18px; color: rgba(255, 255, 255, .86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 480px) { .hero-actions .btn { flex: 1 1 100%; } }
.hero-logo { justify-self: center; width: min(100%, 420px); padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.hero-logo img { width: 100%; transform: rotate(-3deg); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .6); border-radius: 6px; transition: transform .5s var(--ease); }
.hero-logo:hover img { transform: rotate(-1.5deg) scale(1.015); }
.hero-logo:focus-visible { outline-offset: 10px; }
@media (max-width: 899px) { .hero-logo { width: min(78%, 340px); order: -1; } }
.hero-pasta { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 46px; fill: var(--cream); }

/* ----------------------------- Intro animata ----------------------------- */
html.intro-lock body { overflow: hidden; }
html.intro-playing .hero-logo img { visibility: hidden; }
/* durante l'intro il resto del sito aspetta dietro le quinte */
html.intro-playing .site-header,
html.intro-playing .hero-copy > *,
html.intro-playing .hero-pasta,
html.intro-playing .view > :not(.hero),
html.intro-playing .site-footer { opacity: 0; }
.intro { position: fixed; inset: 0; z-index: 400; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.intro-bg { position: absolute; inset: 0; background: radial-gradient(80% 70% at 50% 48%, var(--brown) 0%, var(--brown) 46%, #3b1d04 100%); }
.intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.intro-stage { position: absolute; transform-origin: 50% 50%; will-change: transform; }
.intro-art { position: absolute; }
.intro-line { position: absolute; left: 0; width: 100%; overflow: hidden; }
.intro-slider { position: absolute; inset: 0; overflow: hidden; opacity: 0; }
.intro-line img { position: absolute; left: 0; max-width: none; }
.intro-pasta {
  position: absolute; inset: 0; opacity: 0; background: #fecb00;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.intro-stamp { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; border-radius: 6px; }
.intro-skip {
  position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(30, 14, 2, .35); color: rgba(255, 255, 255, .85); font-size: 14px; font-weight: 700; opacity: 0;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background-color .2s, color .2s;
}
.intro-skip:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
/* poi, a logo arrivato, entrano menu, testi e il resto della pagina */
@keyframes intro-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes intro-drop { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }
html.intro-reveal .site-header { animation: intro-drop .7s var(--ease) .3s both; }
html.intro-reveal .hero-copy > * { animation: intro-rise .9s var(--ease) .45s both; }
html.intro-reveal .hero-copy > :nth-child(2) { animation-delay: .55s; }
html.intro-reveal .hero-copy > :nth-child(3) { animation-delay: .65s; }
html.intro-reveal .hero-copy > :nth-child(4) { animation-delay: .75s; }
html.intro-reveal .hero-pasta { animation: intro-fade .8s ease .6s both; }
html.intro-reveal .view > :not(.hero),
html.intro-reveal .site-footer { animation: intro-rise 1s var(--ease) .85s both; }

/* ----------------------------- Sezioni ----------------------------- */
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 96px 0; } }
.section-soft { background: var(--paper); border-top: 1px solid var(--line); }
.section-title { margin: 0 0 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 5vw, 48px); line-height: 1.05; color: var(--brown); }
.section-title em { font-style: italic; }
.lead { margin: 0 0 24px; font-size: 18px; color: var(--muted); }

.feature { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .feature { grid-template-columns: .9fr 1.1fr; gap: 72px; } }
.feature-photo { margin: 0; position: relative; }
.feature-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 900px) { .feature-photo { max-width: 460px; margin-inline: auto; } }
.feature-photo figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }
.features { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 2px; }
.features li { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.features strong { font-weight: 800; color: var(--brown); }
.features span { color: var(--muted); }
@media (max-width: 480px) { .features li { grid-template-columns: 1fr; gap: 2px; } }
.swatch-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatch-names { margin-left: 4px; }
.price-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--brown); }

.swatch {
  display: inline-block; width: 30px; height: 30px; border-radius: 50%;
  background: var(--c); border: 3px solid var(--paper); box-shadow: 0 0 0 1px rgba(43, 26, 12, .22);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.swatch:hover { transform: scale(1.12); box-shadow: 0 0 0 2px var(--brown); }
.swatch-sm { width: 24px; height: 24px; border-width: 2px; }

.soon-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .soon-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.soon-card {
  display: flex; flex-direction: column; gap: 4px; padding: 28px; border-radius: var(--radius);
  background: var(--cream); border: 1px dashed #d9c4a3; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.soon-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--brown); }
.soon-kicker { font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.soon-title { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 28px; color: var(--brown); }
.soon-text { color: var(--muted); }

/* ----------------------------- Pagine ----------------------------- */
.page-head { padding: 56px 0 32px; }
@media (min-width: 900px) { .page-head { padding: 80px 0 40px; } }
.page-title { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: clamp(40px, 7vw, 68px); line-height: 1; color: var(--brown); }
.page-intro { max-width: 40em; margin: 16px 0 0; font-size: 18px; color: var(--muted); }

.coming { padding-bottom: 96px; }
.coming-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 48px 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.coming-card img { width: 96px; height: 96px; border-radius: 10px; margin-bottom: 14px; transform: rotate(-4deg); box-shadow: var(--shadow-sm); }
.coming-card h2 { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: clamp(30px, 5vw, 44px); color: var(--brown); }
.coming-card p { margin: 0 0 18px; color: var(--muted); }

.product-grid { display: grid; gap: 24px; padding-bottom: 96px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.product-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-media { position: relative; display: block; overflow: hidden; background: #eee; }
.product-media img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: center 45%; transition: transform .5s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.04); }
.badge { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(20, 13, 8, .82); color: var(--white); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.product-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; }
.product-name { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 24px; line-height: 1.15; color: var(--brown); }
.product-name a { text-decoration: none; }
.product-short { margin: 0; color: var(--muted); font-size: 15px; }
.product-swatches { display: flex; gap: 8px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.product-foot .price { font-size: 26px; }
.product-desc { display: none; margin: 0; color: var(--muted); }
/* un solo prodotto: scheda orizzontale più grande */
@media (min-width: 820px) {
  .product-card:only-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-column: 1 / -1; }
  .product-card:only-child .product-media img { height: 100%; aspect-ratio: auto; min-height: 420px; }
  .product-card:only-child .product-body { padding: 40px; gap: 16px; justify-content: center; }
  .product-card:only-child .product-name { font-size: 36px; }
  .product-card:only-child .product-desc { display: block; }
  .product-card:only-child .swatch { width: 36px; height: 36px; }
  .product-card:only-child .product-foot { margin-top: 12px; }
}

/* ----------------------------- Footer ----------------------------- */
.site-footer { background: var(--brown-900); color: rgba(255, 255, 255, .8); padding: 40px 0 calc(32px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 820px) { .footer-inner { grid-template-columns: auto 1fr auto; } }
.footer-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 18px; line-height: 1.15; color: var(--white); }
.footer-brand img { width: 56px; height: 56px; border-radius: 8px; }
.footer-brand em { color: var(--gold); font-weight: 600; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
@media (min-width: 820px) { .footer-nav { justify-content: center; } }
.footer-nav a { text-decoration: none; font-weight: 600; }
.footer-nav a:hover { color: var(--gold); }
.footer-copy { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .55); }

/* ==========================================================================
   Configuratore 3D (stile "studio" scuro)
   ========================================================================== */
.configurator {
  position: fixed; inset: 0; z-index: 100;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); display: grid; grid-template-rows: minmax(380px, 64vh) auto; grid-template-rows: minmax(380px, 64svh) auto;
  background: var(--dark-bg); color: var(--dark-text); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transition: opacity .25s var(--ease);
}
.configurator.is-open { opacity: 1; }
@media (min-width: 960px) {
  .configurator { grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: 100%; overflow: hidden; }
}
.cfg-stage {
  position: relative; min-height: 0; overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 42%, #3a2a1e 0%, #22170f 45%, #120b07 100%);
}
.cfg-stage::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 6, 3, .55), transparent);
}
.cfg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; outline: none; z-index: 1; }
.cfg-canvas.is-dragging { cursor: grabbing; }
.cfg-canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--gold); border-radius: 0; }
.cfg-tag {
  position: absolute; left: 20px; top: 18px; z-index: 2;
  font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--dark-muted);
}
.cfg-mannequin {
  position: absolute; left: 20px; top: 46px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  max-width: 170px;
}
.cfg-mannequin-label { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--dark-text); text-wrap: balance; }
.cfg-mannequin-btn {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  border: 1.5px solid var(--dark-line); background: rgba(20, 13, 8, .6); color: var(--dark-text);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.cfg-mannequin-btn:hover { border-color: rgba(255, 255, 255, .35); transform: translateY(-1px); }
.cfg-mannequin-btn svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cfg-mannequin-btn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--brown-900); }
.cfg-mannequin-btn::after {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; border: 2px solid var(--gold);
  opacity: 0; pointer-events: none;
}
.cfg-mannequin-btn[aria-pressed="false"]::after { animation: mannequin-hint 2.4s ease-out 1.2s 3; }
@keyframes mannequin-hint { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.35); } }
@media (max-width: 640px) {
  .cfg-mannequin { left: 14px; top: 42px; max-width: 118px; gap: 6px; }
  .cfg-mannequin-label { font-size: 12px; }
  .cfg-mannequin-btn { width: 48px; height: 48px; border-radius: 14px; }
  .cfg-mannequin-btn svg { width: 28px; height: 28px; }
}
.cfg-close {
  position: absolute; right: 14px; top: 12px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--dark-line); background: rgba(20, 13, 8, .6); color: var(--dark-text);
  transition: background-color .2s, border-color .2s;
}
.cfg-close:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); }
.cfg-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cfg-views {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(20, 13, 8, .72); border: 1px solid var(--dark-line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cfg-views button {
  min-width: 76px; height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent;
  color: var(--dark-muted); font-size: 14px; font-weight: 700; transition: background-color .2s, color .2s;
}
.cfg-views button:hover { color: var(--dark-text); }
.cfg-views button[aria-pressed="true"] { background: var(--dark-text); color: var(--brown-900); }
.cfg-hint {
  position: absolute; left: 20px; bottom: 26px; z-index: 2; margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--dark-muted); pointer-events: none;
}
.cfg-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .cfg-hint { display: none; } }
.cfg-loading {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--dark-muted); font-weight: 600;
}
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cfg-fallback { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 20px 80px; text-align: center; color: var(--dark-muted); }
.cfg-fallback img { max-height: 70%; width: auto; border-radius: var(--radius-sm); }

.cfg-panel {
  position: relative; display: flex; flex-direction: column; gap: 22px; padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  background: var(--dark-panel); border-left: 1px solid var(--dark-line);
}
@media (min-width: 960px) { .cfg-panel { padding: 40px 32px 32px; overflow-y: auto; } }
.cfg-title:focus { outline: none; }
.cfg-title { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 30px; line-height: 1.1; color: var(--white); }
.cfg-desc { margin: -10px 0 0; color: var(--dark-muted); font-size: 15px; }
.opt { margin: 0; padding: 0; border: 0; min-width: 0; }
.opt legend { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 0; font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--dark-muted); }
.opt-value { letter-spacing: .02em; text-transform: none; font-size: 14px; font-weight: 700; color: var(--dark-text); }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-pill { position: relative; display: block; cursor: pointer; }
.opt-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-body {
  display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--dark-line); background: rgba(255, 255, 255, .03); transition: border-color .15s, background-color .15s;
}
.opt-pill:hover .opt-body { border-color: rgba(255, 255, 255, .3); }
.opt-pill input:checked + .opt-body { border-color: var(--gold); background: rgba(253, 200, 0, .08); }
.opt-pill input:focus-visible + .opt-body { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt-dot { width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35), 0 0 0 1px rgba(0, 0, 0, .4); }
.opt-name { font-weight: 700; font-size: 15px; }
.opt-body:has(.opt-meta) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
.opt-meta { font-size: 12px; color: var(--dark-muted); }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--dark-line); border-radius: 999px; overflow: hidden; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; line-height: 1; transition: background-color .15s; }
.qty button:hover { background: rgba(255, 255, 255, .08); }
.qty output { min-width: 36px; text-align: center; font-weight: 800; }

.cfg-buy { margin-top: auto; display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--dark-line); }
.cfg-total { display: flex; align-items: baseline; justify-content: space-between; }
.cfg-total span { font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--dark-muted); }
.cfg-total strong { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--white); }
.cfg-buy .btn-gold { min-height: 54px; font-size: 16px; }

/* ==========================================================================
   Carrello
   ========================================================================== */
.drawer-backdrop { position: fixed; inset: 0; z-index: 190; background: rgba(20, 12, 6, .5); opacity: 0; transition: opacity .25s; }
.drawer-backdrop.is-open { opacity: 1; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 200; width: min(420px, 100vw);
  padding-top: env(safe-area-inset-top, 0px); padding-right: env(safe-area-inset-right, 0px);
  display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
  box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .4);
  transform: translateX(100%); transition: transform .3s var(--ease);
}
.cart-drawer.is-open { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart-head h2 { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 26px; color: var(--brown); }
.cart-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-thumb { display: grid; place-items: center; width: 64px; height: 72px; border-radius: 12px; background: var(--cream); border: 1px solid var(--line); }
.cart-thumb svg { width: 40px; height: 48px; }
.cart-name { margin: 0; font-weight: 800; line-height: 1.3; }
.cart-meta { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.cart-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-price { font-weight: 800; white-space: nowrap; }
.qty-sm { border-color: var(--line); }
.qty-sm button { width: 34px; height: 34px; font-size: 17px; }
.qty-sm button:hover { background: var(--cream); }
.qty-sm output { min-width: 26px; font-size: 14px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 56px 0; text-align: center; color: var(--muted); }
.cart-foot { padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 12px; background: var(--cream); }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; }
.cart-total span { font-weight: 700; color: var(--muted); }
.cart-total strong { font-family: var(--font-display); font-size: 28px; color: var(--brown); }
.cart-note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ----------------------------- Toast ----------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 300; max-width: calc(100vw - 32px);
  padding: 12px 20px; border-radius: 14px; background: var(--brown-900); color: var(--white); font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 16px);
  transition: opacity .25s, transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Contatti, chi siamo, modulo ordine */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 720px; margin: 0 auto; }
.contact-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 12px; background: #fff; border: 1px solid rgba(91,47,8,.15); border-radius: 16px; color: var(--brown); text-decoration: none; transition: transform .2s, box-shadow .2s; min-width: 0; }
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.contact-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--brown); display: grid; place-items: center; }
.contact-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-kicker { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-value { font-family: var(--font-display); font-weight: 700; font-size: 19px; overflow-wrap: anywhere; }
.about-card { text-align: left; }
.about-card h2, .about-card img { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.about-card p { margin: 0 0 14px; line-height: 1.6; }
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.order-form { display: grid; gap: 10px; margin-top: 4px; }
.order-form[hidden] { display: none; }
.order-title { font-weight: 800; color: var(--brown); margin: 0; }
.order-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.order-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); min-width: 0; }
.order-form input, .order-form textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid rgba(91,47,8,.25); border-radius: 10px; background: #fff; color: #222; width: 100%; box-sizing: border-box; }
.order-form button[disabled] { opacity: .6; }
.cart-foot { max-height: 78vh; overflow-y: auto; }
.view[data-view="chi-siamo"], .view[data-view="contatti"] { scroll-margin-top: 72px; }
.view[data-view="catalogo"], .view[data-view="note-legali"] { scroll-margin-top: 72px; }
.legal-card { text-align: left; }
.legal-card details { border-bottom: 1px solid rgba(91,47,8,.15); padding: 12px 0; }
.legal-card summary { cursor: pointer; font-weight: 800; color: var(--brown); font-size: 18px; }
.legal-card p { line-height: 1.6; margin: 10px 0; font-size: 15px; }
.legal-card a { color: var(--brown); text-decoration: underline; }

/* Pagamento */
.pay-modal{position:fixed;inset:0;z-index:200;background:rgba(30,18,8,.55);display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;padding:24px 12px}
.pay-modal[hidden]{display:none}
.pay-sheet{background:#fff;border-radius:18px;width:100%;max-width:560px;padding:16px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.pay-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.pay-test{background:#fff1dc;color:#7a4a10;border-radius:10px;padding:8px 10px;font-size:13px;margin:0 0 10px}
