@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url(../fonts/inter.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }

/*
 * Mobile first. Punti di rottura:
 *   760px  tablet verticale (iPad mini / iPad 10" in portrait)
 *   1024px tablet orizzontale e portatili piccoli
 *   1280px desktop
 */
:root {
  --paper: #f6f1e9;
  --paper-2: #efe7da;
  --surface: #fffdf9;
  --ink: #2a211b;
  --ink-2: #54473d;
  --muted: #7d6e62;
  --line: #e4d9c9;
  --accent: #b3262d;
  --accent-ink: #fff;
  --gold: #a87f33;
  --gold-soft: rgba(195, 154, 74, .2);
  --shadow-1: 0 1px 2px rgba(60, 40, 20, .06), 0 4px 14px rgba(60, 40, 20, .06);
  --shadow-2: 0 2px 4px rgba(60, 40, 20, .06), 0 18px 40px -12px rgba(60, 40, 20, .22);
  --radius: 16px;
  --gutter: 16px;
  --tap: 44px;
  --header-h: 108px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); scrollbar-color: #cdbfac var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; caret-color: var(--accent); }
::selection { background: rgba(179, 38, 45, .16); color: var(--ink); }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; margin: 0; text-wrap: balance; }
.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.muted { color: var(--muted); }
.lead { color: var(--ink-2); font-size: 1.02rem; max-width: 62ch; margin: .6rem 0 0; text-wrap: pretty; }

/* ---------- Pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap); padding: 10px 1.3rem; line-height: 1.25; text-align: center; border-radius: 999px; border: 1px solid transparent; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s; touch-action: manipulation; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -6px rgba(179, 38, 45, .55); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn:active { transform: scale(.98); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top); background: rgba(246, 241, 233, .9); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; min-height: var(--tap); text-decoration: none; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(145deg, #c3333a, #8f1c22); color: #fff; font: 600 .92rem var(--serif); letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 14px -6px rgba(143, 28, 34, .7); transform: perspective(300px) rotateX(8deg) rotateY(-10deg); }
.brand-mark.big { width: 64px; height: 64px; font-size: 1.35rem; border-radius: 18px; margin-bottom: 1.2rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font: 600 1rem var(--serif); }
.brand-text small { display: none; color: var(--muted); font-size: .78rem; }

.search { position: relative; order: 3; flex: 1 1 100%; display: flex; align-items: center; }
.search svg { position: absolute; left: 16px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search input { width: 100%; height: 46px; padding: 0 16px 0 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-size: 16px; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: #8f8174; }
.search input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }

.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); padding: 6px; max-height: min(70vh, 520px); overflow: auto; overscroll-behavior: contain; }
.suggest a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 8px; border-radius: 10px; text-decoration: none; }
.suggest a.is-active { background: var(--paper); }
.suggest img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--paper-2); }
.suggest span { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.suggest strong { font-weight: 500; font-size: .93rem; }
.suggest small { color: var(--muted); font-size: .78rem; }
.suggest .all { justify-content: center; color: var(--accent); font-weight: 600; font-size: .9rem; }
.suggest .none { padding: 12px; color: var(--muted); font-size: .9rem; }

.menu-btn { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; min-height: var(--tap); padding: 0 18px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 600 .9rem var(--sans); color: var(--ink); cursor: pointer; touch-action: manipulation; transition: background .25s, color .25s, border-color .25s, box-shadow .25s; }
.burger { position: relative; display: grid; gap: 4px; width: 18px; }
.burger i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .35s var(--ease), opacity .2s; }
.menu-btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 8px 20px -10px rgba(42, 33, 27, .6); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Pannello categorie: si apre sotto l'header, sopra la pagina */
.cat-nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; visibility: hidden; opacity: 0; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(42, 33, 27, .35), 0 0 0 100vmax rgba(42, 33, 27, 0); transform: translateY(-8px); transform-origin: top; clip-path: inset(0 -100vmax -100vmax -100vmax); transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s .35s, box-shadow .35s; perspective: 1400px; }
.cat-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s, box-shadow .35s; box-shadow: 0 30px 60px -30px rgba(42, 33, 27, .35), 0 0 0 100vmax rgba(42, 33, 27, .28); }
.cat-nav-inner { padding: 14px 0 20px; }
.cat-nav-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px 12px; }
.cat-nav-head strong { font: 500 1.15rem var(--serif); }
.cat-nav-head a { font-size: .86rem; color: var(--muted); text-decoration: none; }
.cat-nav-grid { display: grid; gap: 6px; }
.cat-link { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 10px 6px 6px; border-radius: 14px; border: 1px solid transparent; text-decoration: none; color: var(--ink); transition: background .2s, border-color .2s, transform .45s var(--ease), box-shadow .3s; }
.cat-link img { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; object-fit: cover; background: #f3eee6; }
.cat-link span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cat-link b { font-weight: 500; font-size: .96rem; }
.cat-link small { color: var(--muted); font-size: .8rem; }
.cat-nav.is-open .cat-link { animation: menu-in .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 25ms); }
@keyframes menu-in { from { opacity: 0; transform: translateY(10px) rotateX(-18deg); } }
.cat-link[aria-current] { background: var(--ink); color: #fff; }
.cat-link[aria-current] small { color: rgba(255, 255, 255, .65); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 80% 0%, #fbf6ee 0%, transparent 60%), linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); border-bottom: 1px solid var(--line); }
.hero-row { display: grid; gap: 8px; align-items: center; padding: 32px 0 36px; }
.hero h1 { font-size: clamp(1.9rem, 6.4vw, 3.1rem); max-width: 15ch; }
.search-hero { order: 0; margin: 22px 0 0; max-width: 580px; }
.search-hero input { height: 56px; padding-right: 108px; font-size: 16px; box-shadow: var(--shadow-1); }
.search-hero .btn { position: absolute; right: 5px; min-height: 46px; padding: 0 1.1rem; }
.hero-stats { margin: 16px 0 0; color: var(--muted); font-size: .92rem; }
.hero-stats strong { color: var(--ink); font-weight: 600; }
.hero-stats span { margin: 0 .4rem; }

.hero-stack { position: relative; width: 100%; max-width: 420px; height: 250px; margin: 8px auto 0; perspective: 1400px; transform-style: preserve-3d; }
.stack-card { position: absolute; width: 46%; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--surface); border: 4px solid var(--surface); box-shadow: var(--shadow-2); transform-style: preserve-3d; transition: transform .6s var(--ease); animation: float 9s ease-in-out infinite; }
.stack-card img { width: 100%; height: 100%; object-fit: cover; }
.stack-card.s1 { left: 3%; top: 10%; --r: rotateY(18deg) rotateZ(-6deg) translateZ(-60px); transform: var(--r); animation-delay: -3s; }
.stack-card.s2 { left: 27%; top: 0; z-index: 2; --r: rotateY(-8deg) rotateZ(2deg) translateZ(40px); transform: var(--r); }
.stack-card.s3 { left: 51%; top: 12%; --r: rotateY(-22deg) rotateZ(7deg) translateZ(-30px); transform: var(--r); animation-delay: -6s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- Sezioni e griglie ---------- */
.section { padding: 40px 0 8px; }
.section-title { font-size: 1.4rem; margin-bottom: 16px; }
.page-head { padding: 24px 0 18px; }
.page-head h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); }
.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); margin: 0 0 8px -8px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 8px; border-radius: 8px; text-decoration: none; }
.crumbs > span:last-child:not(:only-child) { padding: 0 8px; color: var(--ink-2); }
.grid { display: grid; gap: 12px; perspective: 1600px; }
.grid.categories, .grid.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.products { padding-bottom: 40px; }

/* ---------- Card 3D ---------- */
.card { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); transform-style: preserve-3d; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform .5s var(--ease), box-shadow .4s; animation: rise .7s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 12) * 45ms); touch-action: manipulation; }
.card.is-tilting { transition: transform .12s linear, box-shadow .4s; }
.card:active { transform: perspective(900px) scale(.985); }
@keyframes rise { from { opacity: 0; transform: perspective(900px) translateY(26px) rotateX(10deg); } }
.card-media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #f3eee6; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.01); transition: transform .8s var(--ease); }
.card-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; transform: translateZ(24px); }
.card-title { font: 500 .98rem/1.28 var(--serif); }
.card-meta { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.card-meta b { font-weight: 600; color: var(--ink-2); }
.glare { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .45), transparent 45%); opacity: 0; transition: opacity .35s; mix-blend-mode: soft-light; }
.cat-card .card-media { aspect-ratio: 1; }
.cat-card .card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(42, 33, 27, .18)); }

/* ---------- Filtri ---------- */
.chips { display: flex; gap: 8px; margin: 0 calc(-1 * var(--gutter)) 18px; padding: 2px var(--gutter) 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: .88rem; color: var(--ink-2); white-space: nowrap; scroll-snap-align: start; transition: background .2s, color .2s, border-color .2s; touch-action: manipulation; }
.chip small { color: var(--muted); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active small { color: rgba(255, 255, 255, .65); }

/* ---------- Scheda prodotto ---------- */
.product { padding-top: 16px; }
.product-grid { display: grid; gap: 24px; align-items: start; }
.gallery { min-width: 0; }
.gallery-stage { position: relative; border-radius: 20px; overflow: hidden; background: #f3eee6; border: 1px solid var(--line); box-shadow: var(--shadow-2); aspect-ratio: 4 / 5; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); }
.gallery-stage.is-tilting { transition: transform .12s linear; }
.gallery-main { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: opacity .25s; }
.gallery-thumbs { display: flex; gap: 10px; margin: 12px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.thumb { flex-shrink: 0; width: 72px; height: 72px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--paper-2); cursor: pointer; scroll-snap-align: start; transition: border-color .2s, transform .2s; touch-action: manipulation; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--accent); }
.product-info h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); }
.product-brand { margin: .45rem 0 0; font-size: .95rem; font-weight: 600; color: var(--gold); }
.product-info .lead { margin-top: .35rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .86rem; }
.pill-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.prose { margin-top: 18px; color: var(--ink-2); max-width: 68ch; }
.features { margin: 22px 0 0; padding: 4px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.features div { display: grid; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.features div:last-child { border-bottom: 0; }
.features dt { color: var(--muted); font-size: .86rem; }
.features dd { margin: 0; font-size: .96rem; font-variant-numeric: tabular-nums; }
.product-actions { display: grid; gap: 10px; margin-top: 24px; }
.note { margin-top: 18px; font-size: .86rem; color: var(--muted); max-width: 60ch; }

/* ---------- Varie ---------- */
.empty { padding: 40px 0 72px; color: var(--ink-2); max-width: 60ch; }
.site-footer { margin-top: 48px; padding: 32px 0 max(36px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper-2); font-size: .92rem; color: var(--ink-2); }
.footer-row { display: grid; gap: 20px; }
.footer-row p { margin: .2rem 0 0; }
.footer-row strong { font-family: var(--serif); font-weight: 600; color: var(--ink); }
.footer-contacts { display: flex; flex-direction: column; align-items: flex-start; }
.footer-contacts a, .footer-links a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.footer-links a { color: var(--muted); }

/* ---------- Galleria: invito a ingrandire ---------- */
.zoom-hint { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 12px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px; background: rgba(255, 253, 249, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--ink); font: 600 .82rem var(--sans); cursor: zoom-in; box-shadow: 0 6px 18px -8px rgba(42, 33, 27, .45); transform: translateZ(30px); transition: background .2s, transform .3s var(--ease); touch-action: manipulation; }
.zoom-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- Visualizzatore foto (modale) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 130; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(246, 241, 233, .94); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); opacity: 0; transition: opacity .3s var(--ease); overscroll-behavior: contain; }
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lb-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.lb-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.lb-title small { color: var(--gold); font-weight: 600; font-size: .78rem; }
.lb-title strong { font: 500 1.05rem var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.lb-tools { display: flex; gap: 8px; flex-shrink: 0; }
.lb-btn { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-1); transition: background .2s, color .2s, transform .25s var(--ease), opacity .2s, border-color .2s; touch-action: manipulation; }
.lb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn:active { transform: scale(.94); }
.lb-btn:disabled { opacity: 0; pointer-events: none; }
.lb-zoom[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.lb-zoom[aria-pressed="true"] .plus { display: none; }

.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 4px 12px; perspective: 1600px; }
.lb-frame { position: relative; height: 100%; max-width: 100%; aspect-ratio: var(--ar, 4 / 5); border-radius: 18px; overflow: hidden; background: #f3eee6; box-shadow: 0 2px 6px rgba(60, 40, 20, .08), 0 40px 80px -30px rgba(60, 40, 20, .45); touch-action: none; cursor: zoom-in; transform-origin: center; }
.lb-frame.is-zoomed { cursor: grab; }
.lb-frame.is-dragging { cursor: grabbing; }
.lb-img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(var(--zoom, 1)); transition: transform .45s var(--ease), opacity .25s; will-change: transform; }
.lb-frame.is-dragging .lb-img, .lb-frame.is-panning .lb-img { transition: opacity .25s; }
.lb-img.is-loading { opacity: .35; }
.lb-nav { position: absolute; top: 50%; z-index: 2; margin-top: -23px; }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-thumbs { display: flex; justify-content: center; gap: 8px; padding: 12px 14px max(16px, env(safe-area-inset-bottom)); overflow-x: auto; scrollbar-width: none; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-thumbs:empty { display: none; }
.lb-thumbs button { flex-shrink: 0; width: 58px; height: 58px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #f3eee6; opacity: .55; cursor: pointer; transition: opacity .2s, border-color .2s, transform .25s var(--ease); touch-action: manipulation; }
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button[aria-current] { opacity: 1; border-color: var(--accent); }
.lb-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(42, 33, 27, .78); color: #fff; font-size: .78rem; pointer-events: none; opacity: 0; transition: opacity .4s; }
.lb-hint.is-visible { opacity: 1; }
html.lb-lock, html.lb-lock body { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Pagina di accesso ---------- */
.gate { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; perspective: 1400px; }
.gate-scene { position: absolute; inset: 0; transform-style: preserve-3d; }
.gate-layer { position: absolute; border-radius: 40px; border: 1px solid var(--line); background: linear-gradient(145deg, var(--surface), var(--paper-2)); box-shadow: var(--shadow-2); animation: float 12s ease-in-out infinite; opacity: .6; }
.gate-layer.l1 { width: 420px; height: 300px; left: -160px; top: 6%; transform: rotateY(32deg) rotateZ(-10deg) translateZ(-200px); }
.gate-layer.l2 { width: 360px; height: 360px; right: -180px; bottom: 4%; transform: rotateY(-28deg) rotateZ(12deg) translateZ(-160px); animation-delay: -4s; }
.gate-layer.l3 { width: 140px; height: 140px; right: 8%; top: 6%; background: linear-gradient(145deg, #c3333a, #8f1c22); border: 0; opacity: .9; transform: rotateX(40deg) rotateZ(20deg) translateZ(-260px); animation-delay: -8s; }
.gate-card { position: relative; z-index: 1; width: min(420px, 100%); padding: 34px 26px 28px; background: rgba(255, 253, 249, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-2); animation: rise .8s var(--ease) backwards; }
.gate-card h1 { font-size: 1.9rem; }
.gate-sub { margin: .3rem 0 0; color: var(--gold); font-weight: 600; font-size: .95rem; }
.gate-card .muted { margin: 14px 0 22px; font-size: .95rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: .88rem; color: var(--ink-2); }
.field input { height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 16px; outline: none; }
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); margin-bottom: 12px; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-error { margin: -2px 0 14px; color: var(--accent); font-size: .92rem; }
.gate-card .btn { width: 100%; min-height: 50px; }

/* ---------- Solo con mouse: inclinazione, riflesso, hover ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(179, 38, 45, .6); }
  .btn-ghost:hover { background: var(--surface); }
  .card:hover { box-shadow: var(--shadow-2); }
  .card:hover .card-media img { transform: scale(1.06); }
  .card:hover .glare, .gallery-stage:hover .glare { opacity: 1; }
  .menu-btn:hover { border-color: var(--gold); }
  .menu-btn[aria-expanded="true"]:hover { border-color: var(--ink); }
  .cat-link:hover { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-1); transform: translateY(-2px); }
  .cat-link[aria-current]:hover { background: var(--ink); }
  .cat-nav-head a:hover { color: var(--ink); text-decoration: underline; }
  .chip:hover { border-color: var(--gold); }
  .thumb:hover { transform: translateY(-2px); }
  .zoom-hint:hover { background: var(--surface); transform: translateZ(30px) scale(1.04); }
  .lb-btn:hover { border-color: var(--gold); }
  .lb-zoom[aria-pressed="true"]:hover { border-color: var(--ink); }
  .lb-thumbs button:hover { opacity: 1; transform: translateY(-2px); }
  .suggest a:hover { background: var(--paper); }
  .crumbs a:hover { color: var(--ink); text-decoration: underline; }
  .footer-contacts a:hover, .footer-links a:hover { text-decoration: underline; }
}

/* ---------- Tablet verticale ---------- */
@media (min-width: 760px) {
  :root { --gutter: 28px; --radius: 18px; }
  .header-row { flex-wrap: nowrap; gap: 20px; padding: 12px 0; }
  .brand-text small { display: block; }
  .menu-btn { order: 1; margin-left: 4px; }
  .search { order: 2; flex: 1 1 auto; max-width: 440px; margin-left: auto; }
  .cat-nav-inner { padding: 22px 0 28px; }
  .cat-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
  .cat-link { min-height: 72px; }
  .cat-link img { width: 58px; height: 58px; }
  .search-hero { max-width: 560px; margin-left: 0; }

  .hero-row { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; padding: 48px 0 52px; }
  .hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); }
  .hero-stack { height: 320px; margin: 0; max-width: none; }
  .stack-card { width: 50%; border-width: 5px; border-radius: 20px; }
  .stack-card.s2 { left: 25%; }
  .stack-card.s3 { left: 50%; }

  .section { padding-top: 52px; }
  .section-title { font-size: 1.6rem; margin-bottom: 20px; }
  .page-head { padding: 32px 0 22px; }
  .grid { gap: 18px; }
  .grid.categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.products { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 56px; }
  .card-body { padding: 14px 16px 16px; }
  .card-title { font-size: 1.04rem; }
  .cat-card .card-title { font-size: 1.12rem; }
  .card-meta { font-size: .84rem; }
  .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }

  /* due colonne anche sul tablet in verticale: foto a sinistra, testo a destra */
  .product { padding-top: 24px; }
  .product-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
  .gallery { position: sticky; top: calc(var(--header-h) + 16px); }
  .gallery-stage { max-height: calc(100vh - var(--header-h) - 130px); width: 100%; }
  .gallery-thumbs { margin-inline: 0; padding-inline: 2px; }
  .features { padding: 4px 20px; }
  .features div { grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; }
  .product-actions { display: flex; flex-wrap: wrap; }

  .footer-row { grid-template-columns: 1.4fr 1fr auto; gap: 28px 48px; }
  .lb-bar { padding: 18px 24px; }
  .lb-title strong { font-size: 1.25rem; }
  .lb-stage { padding: 4px 88px; }
  .lb-prev { left: 22px; }
  .lb-next { right: 22px; }
  .lb-btn { width: 50px; height: 50px; }
  .lb-thumbs button { width: 66px; height: 66px; }
  .gate-card { padding: 40px 34px 34px; }
  .gate-layer { opacity: 1; }
  .gate-layer.l1 { left: -80px; top: 8%; }
  .gate-layer.l2 { right: -90px; bottom: 6%; }
  .gate-layer.l3 { width: 180px; height: 180px; right: 18%; top: 10%; }
}

/* ---------- Tablet orizzontale ---------- */
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  .search { max-width: 500px; }
  .cat-nav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-hero { max-width: 580px; }
  .hero-row { gap: 40px; padding: 60px 0 68px; }
  .hero-stack { height: 400px; }
  .grid { gap: 20px; }
  .grid.categories { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; }
  .gallery-thumbs .thumb { width: 76px; height: 76px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1280px) {
  .hero-row { padding: 72px 0 80px; }
  .hero-stack { height: 440px; }
  .grid { gap: 24px; }
  .grid.products { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cat-nav-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
}

/* ---------- Telefono e tablet in orizzontale con poca altezza ---------- */
@media (orientation: landscape) and (max-height: 560px) {
  .gallery { position: static; }
  .gallery-stage { max-height: 80vh; }
  .hero-row { padding: 28px 0 32px; }
}

/* ===================== Preordine ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .86rem; }

/* Pulsante nell'header */
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px 0 14px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font: 600 .9rem var(--sans); box-shadow: 0 6px 18px -8px rgba(179, 38, 45, .6); touch-action: manipulation; }
.cart-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.cart-btn b { display: none; font-weight: 600; }
.cart-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 .74rem/22px var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--paper); font-variant-numeric: tabular-nums; }
.cart-badge[hidden] { display: none; }
.cart-btn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.12) rotate(-4deg); } 60% { transform: scale(.96); } }
.menu-btn { margin-left: auto; }
.menu-btn + .cart-btn { margin-left: 0; }

/* Schede con aggiunta rapida */
.card-wrap { position: relative; display: flex; animation: rise .7s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 12) * 45ms); }
.card-wrap .card { flex: 1; animation: none; }
.quick-add { position: absolute; top: 10px; right: 10px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255, 255, 255, .8); border-radius: 50%; background: rgba(255, 253, 249, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--accent); cursor: pointer; box-shadow: 0 6px 16px -8px rgba(42, 33, 27, .5); transition: transform .3s var(--ease), background .2s, color .2s; touch-action: manipulation; }
.quick-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.quick-add.in-cart { background: var(--accent); color: #fff; border-color: var(--accent); }
.quick-add.is-busy { transform: scale(.9); opacity: .7; }
.qa-qty { position: absolute; bottom: -6px; left: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 .7rem/20px var(--sans); box-shadow: 0 0 0 2px var(--surface); }
.qa-qty[hidden] { display: none; }

/* Quantità */
.qty { display: inline-flex; align-items: center; height: 48px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); overflow: hidden; flex-shrink: 0; }
.qty-btn { display: grid; place-items: center; width: 44px; height: 100%; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; touch-action: manipulation; }
.qty-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.qty-btn:active { background: var(--paper-2); }
.qty input { width: 52px; height: 100%; border: 0; background: none; text-align: center; font: 600 1.05rem var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; outline: none; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Scheda prodotto: aggiungi */
.add-form { margin-top: 24px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); }
.add-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-add { flex: 1; min-height: 48px; min-width: 200px; }
.add-note { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-size: .86rem; color: var(--ink-2); }
.add-note small { color: var(--muted); }
.add-note input { height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 16px; outline: none; }
.add-note input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.add-status { margin: 10px 0 0; min-height: 1.4em; font-size: .9rem; color: var(--ink-2); }
.add-status a { color: var(--accent); font-weight: 600; }

/* Avviso */
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 120; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--ink); color: #fff; font-size: .92rem; box-shadow: 0 20px 40px -16px rgba(42, 33, 27, .6); transform: translate(-50%, 140%); opacity: 0; transition: transform .45s var(--ease), opacity .3s; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: #9fd3a9; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.toast b { font-weight: 600; }
.toast a { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; text-decoration: none; }

/* Passaggi */
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; counter-reset: step; font-size: .84rem; }
.steps li { counter-increment: step; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--paper-2); color: var(--muted); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); font-weight: 700; font-size: .74rem; }
.steps li[aria-current] { background: var(--ink); color: #fff; }
.steps li[aria-current]::before { background: var(--accent); }
.steps li.done::before { content: "✓"; background: #dfeee2; color: #2f7a4b; }
.steps a { color: inherit; text-decoration: none; }

.notice { margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; background: #e9f4ec; border: 1px solid #bfdcc8; color: #1f5534; }
.notice-error { background: #fbeeee; border-color: #ecc4c6; color: #8f1c22; }
.link-btn { display: inline-block; padding: 8px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .88rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* Pagina preordine */
.cart-layout, .checkout-layout { display: grid; gap: 20px; padding-bottom: 56px; align-items: start; }
.cart-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img qty qty"; gap: 8px 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); animation: rise .6s var(--ease) backwards; animation-delay: calc(min(var(--i, 0), 10) * 40ms); transition: opacity .25s, transform .25s; }
.cart-item.is-leaving { opacity: 0; transform: translateX(24px); }
.cart-thumb { grid-area: img; align-self: start; }
.cart-thumb img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #f3eee6; }
.cart-info { grid-area: info; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-name { font: 500 1.02rem/1.3 var(--serif); text-decoration: none; }
.cart-note input { width: 100%; height: 40px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 16px; outline: none; }
.cart-note input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.cart-item .qty { grid-area: qty; justify-self: start; height: 44px; }
.cart-remove { grid-area: rm; align-self: start; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.cart-remove svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cart-summary { display: grid; gap: 10px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-2); }
.cart-summary h2 { font-size: 1.25rem; }
.cart-summary p { margin: 0; }
.cart-summary .btn { width: 100%; }
.cart-empty { display: grid; gap: 16px; justify-items: start; }

/* Conferma */
.form-grid { display: grid; gap: 0 16px; }
.checkout-page .field { margin-bottom: 14px; }
.checkout-page .field > span { font-weight: 500; }
.checkout-page .field small { font-weight: 400; color: var(--muted); }
.checkout-page .field em { color: var(--accent); font-style: normal; }
.checkout-page .field textarea { padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 16px; resize: vertical; outline: none; }
.checkout-page .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.field.has-error input, .check.has-error { border-color: var(--accent); }
.field-error { color: var(--accent); font-size: .84rem; }
.checkout-page .check { align-items: flex-start; margin: 4px 0 6px; line-height: 1.45; }
.checkout-page .check input { margin-top: 2px; flex-shrink: 0; }
.customer-pick { position: relative; margin-bottom: 18px; padding: 16px; border: 1px dashed var(--gold); border-radius: 16px; background: #fdf8ee; }
.customer-pick .field { margin: 0; }
.customer-pick input { width: 100%; }
.pick-results { position: absolute; left: 16px; right: 16px; top: calc(100% - 8px); z-index: 20; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); }
.pick-results button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.pick-results button:hover, .pick-results button:focus-visible { background: var(--paper); }
.pick-results small { color: var(--muted); font-size: .8rem; }
.pick-results p { margin: 8px 10px; color: var(--muted); font-size: .9rem; }
.mini-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.mini-list li { display: flex; align-items: center; gap: 10px; }
.mini-list img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #f3eee6; flex-shrink: 0; }
.mini-list span { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.mini-list b { font-weight: 500; font-size: .92rem; }
.mini-list small { color: var(--muted); font-size: .78rem; }
.mini-list em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Preordine inviato */
.done-page { padding: 40px 0 64px; perspective: 1400px; }
.done-card { max-width: 620px; margin: 0 auto; padding: 32px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-2); animation: rise .8s var(--ease) backwards; }
.done-card h1 { font-size: 2rem; margin-top: 16px; }
.done-card .mini-list { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.done-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(145deg, #3c9a5f, #2f7a4b); box-shadow: 0 12px 24px -12px rgba(47, 122, 75, .7); transform: perspective(300px) rotateX(10deg) rotateY(-12deg); }
.done-mark svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (hover: hover) and (pointer: fine) {
  .cart-btn:hover { background: #9b1f25; }
  .quick-add:hover { transform: scale(1.08); }
  .cart-remove:hover { background: var(--paper-2); color: var(--accent); }
  .link-btn:hover { color: var(--ink); }
  .qty-btn:hover { background: var(--paper-2); }
}
@media (min-width: 760px) {
  .cart-btn b { display: inline; }
  .menu-btn { margin-left: 4px; }
  .cart-btn { order: 3; }
  .cart-item { grid-template-columns: 88px minmax(0, 1fr) auto auto; grid-template-areas: "img info qty rm"; padding: 14px 16px; }
  .cart-thumb img { width: 88px; height: 88px; }
  .cart-item .qty { justify-self: end; }
  .cart-remove { align-self: center; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .f-company, .f-notes { grid-column: 1 / -1; }
  .done-card { padding: 44px 40px; }
}
@media (min-width: 1024px) {
  .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
  .cart-summary { position: sticky; top: calc(var(--header-h) + 20px); }
}
.pick-results[hidden] { display: none; }
/* Telefoni stretti: Categorie e Preordine solo con l'icona, così l'header sta su una riga */
@media (max-width: 479px) {
  .brand-text strong { font-size: .95rem; }
  .menu-btn { padding: 0; width: var(--tap); justify-content: center; }
  .menu-btn b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cart-btn { padding: 0; width: var(--tap); justify-content: center; }
  .header-row { gap: 10px 8px; }
}

/* Preordine: filtri e gruppi per categoria */
.cart-main { min-width: 0; }
.cart-filters { margin-bottom: 14px; }
.cart-filters .chip { font: inherit; font-size: .88rem; cursor: pointer; }
.cart-filters[hidden] { display: none; }
.cart-group { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 4px 2px; border-bottom: 1px solid var(--line); }
.cart-group:first-child { padding-top: 0; }
.cart-group span { font: 500 1.05rem var(--serif); }
.cart-group small { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.cart-list [hidden] { display: none; }

/* Scheda marca (siti produttivi) */
.brand-story { margin: 40px 0 8px; padding-top: 28px; border-top: 1px solid var(--line); }
.brand-story-kicker { margin: 0 0 4px; color: var(--accent); font: 600 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.brand-story h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.brand-sites { display: grid; gap: 16px; margin-top: 18px; perspective: 1600px; }
.brand-site { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), box-shadow .4s; animation: rise .7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 90ms); }
.brand-site:hover { box-shadow: var(--shadow-2); transform: perspective(1000px) rotateX(2deg) translateY(-3px); }
.brand-site figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.brand-site img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.brand-site:hover img { transform: scale(1.04); }
.brand-site-body { padding: 14px 16px 18px; }
.brand-site h3 { font-size: 1.15rem; margin-bottom: 6px; }
.brand-site p { margin: 0; color: var(--ink-2); font-size: .95rem; text-wrap: pretty; }
.brand-site strong { color: var(--ink); font-weight: 600; }
@media (min-width: 760px) { .brand-sites { grid-template-columns: 1fr 1fr; gap: 20px; } }

/* Etichetta compatibilità (es. capsule Dolce Gusto) */
.compat-badge { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 .68rem/1.2 var(--sans); letter-spacing: .02em; box-shadow: 0 4px 10px -4px rgba(143, 28, 34, .6); transform: translateZ(30px); }
.pill-accent { background: var(--accent); }
@media (min-width: 760px) { .compat-badge { left: 10px; top: 10px; font-size: .74rem; } }
.features dd a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; }
.chips-type { margin-bottom: 8px; }
.chips-type .chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Scelta della variante (misura, colore…) nella scheda prodotto */
.variant-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; }
.variant-pick legend { width: 100%; margin-bottom: 8px; padding: 0; font-weight: 600; font-size: .92rem; color: var(--ink); }
.variant-opt { position: relative; }
.variant-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.variant-opt span { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease); }
.variant-opt input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-1); }
.variant-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
