/* Starfive — vetrina. Stessa impostazione di Villa Rocchetta (vr.css): CSS proprio, mobile-first, nessuna libreria. */

:root {
  --night: #fbf8f3;        /* fondo (chiaro, come il logo originale: nero e bordeaux) */
  --night-2: #f3eee6;
  --night-3: #ffffff;
  --line: rgba(40, 24, 24, 0.14);
  --ivory: #1d1616;        /* testo */
  --ivory-dim: rgba(29, 22, 22, 0.74);
  --ivory-mute: rgba(29, 22, 22, 0.52);
  --gold: #8c1d23;         /* bordeaux del logo: cambiare qui per ricolorare tutto il sito */
  --gold-hi: #a3262d;
  --glow: 140, 29, 35;     /* RGB del bordeaux, per aloni e ombre */
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--night); color: var(--ivory); font-family: var(--sans); font-weight: 300; font-size: 1.0625rem; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
em { font-style: italic; }
::selection { background: var(--gold); color: #fff; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--gold); color: #fff; padding: 0.6rem 1rem; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.wrap { width: 100%; max-width: 82rem; margin-inline: auto; padding-inline: var(--pad); }
.wrap.narrow { max-width: 56rem; }
.section { padding-block: clamp(4.5rem, 11vw, 9rem); position: relative; }
.section--alt { background: var(--night-2); border-block: 1px solid var(--line); }

/* ---------- Tipografia ---------- */
.eyebrow { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.4rem; }
.eyebrow::after { content: ""; height: 1px; width: 3.5rem; background: linear-gradient(90deg, var(--gold), transparent); }
.display { font-family: var(--serif); font-weight: 300; line-height: 1.02; letter-spacing: -0.012em; font-size: clamp(2.5rem, 7.2vw, 5.4rem); text-wrap: balance; }
.display em { color: var(--gold-hi); font-weight: 300; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ivory-dim); max-width: 34rem; margin-top: 1.6rem; }

/* ---------- Pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3.25rem; padding: 0 1.9rem; border-radius: 999px; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; border: 1px solid transparent; position: relative; overflow: hidden; isolation: isolate; transition: color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transform: translateY(101%); transition: transform 0.45s var(--ease); }
.btn:hover::before { transform: none; }
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 2.6rem; padding: 0 1.3rem; font-size: 0.7rem; }
.btn--gold { background: var(--gold); color: #fff; box-shadow: 0 10px 30px -12px rgba(var(--glow), 0.8); }
.btn--gold::before { background: #6f161b; }
.btn--gold:hover { box-shadow: 0 16px 40px -12px rgba(var(--glow), 0.9); }
.btn--ghost { border-color: rgba(29, 22, 22, 0.4); color: var(--ivory); backdrop-filter: blur(6px); background: rgba(255, 255, 255, 0.4); }
.btn--ghost::before { background: var(--ivory); }
.btn--ghost:hover { color: #fff; border-color: var(--ivory); }

/* ---------- Comparsa allo scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Navigazione ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: max(0.9rem, env(safe-area-inset-top)) var(--pad) 0.9rem; transition: background 0.4s, border-color 0.4s, transform 0.5s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(251, 248, 243, 0.9); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-color: var(--line); }
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0.04em; }
.nav__brand img { height: clamp(2.3rem, 7vw, 2.9rem); width: auto; }
.nav__links { display: none; gap: clamp(1.2rem, 2.4vw, 2.4rem); }
.nav__links a { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-dim); position: relative; padding-block: 0.4rem; transition: color 0.3s; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav__links a:hover { color: var(--ivory); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__side { display: flex; align-items: center; gap: 0.6rem; }
.nav__toggle { width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-content: center; gap: 6px; position: relative; z-index: 2; background: rgba(255, 255, 255, 0.6); }
.nav__toggle span { display: block; width: 1.15rem; height: 1.5px; background: var(--ivory); transition: transform 0.4s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.drawer { position: fixed; inset: 0; z-index: 80; background: var(--night); display: flex; flex-direction: column; justify-content: space-between; padding: 6.5rem var(--pad) calc(2rem + env(safe-area-inset-bottom)); clip-path: circle(0 at calc(100% - 2.7rem) 2.4rem); visibility: hidden; transition: clip-path 0.7s var(--ease), visibility 0s 0.7s; }
.drawer::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 40% at 80% 100%, rgba(var(--glow), 0.14), transparent 70%); pointer-events: none; }
.drawer.is-open { clip-path: circle(150% at calc(100% - 2.7rem) 2.4rem); visibility: visible; transition: clip-path 0.8s var(--ease), visibility 0s; }
.drawer__links { display: grid; gap: 0.2rem; }
.drawer__links a { font-family: var(--serif); font-size: clamp(1.9rem, 8.2vw, 3.2rem); font-weight: 300; line-height: 1.3; display: flex; align-items: baseline; gap: 1rem; padding-block: 0.35rem; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(24px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s; }
.drawer.is-open .drawer__links a { opacity: 1; transform: none; }
.drawer.is-open .drawer__links a:nth-child(1) { transition-delay: 0.18s; }
.drawer.is-open .drawer__links a:nth-child(2) { transition-delay: 0.24s; }
.drawer.is-open .drawer__links a:nth-child(3) { transition-delay: 0.30s; }
.drawer__links i { font-family: var(--sans); font-style: normal; font-size: 0.7rem; letter-spacing: 0.2em; color: var(--gold); }
.drawer__foot { position: relative; color: var(--ivory-dim); font-size: 0.95rem; }

/* ---------- Hero (senza foto: cielo stellato in CSS; quando ci sono le foto si mette un <picture> in .hero__bg) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -4; background: radial-gradient(120% 80% at 50% 110%, #efe2d6 0%, #f6efe6 45%, var(--night) 80%); }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__stars { display: none; position: absolute; inset: 0; z-index: -3; opacity: 0.9;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 28% 68%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 41% 14%, #fff, transparent), radial-gradient(1px 1px at 57% 38%, #fff, transparent),
    radial-gradient(2px 2px at 72% 20%, var(--gold-hi), transparent), radial-gradient(1px 1px at 84% 58%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 91% 12%, #fff, transparent), radial-gradient(1px 1px at 8% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 63% 86%, #fff, transparent), radial-gradient(1px 1px at 35% 44%, #fff, transparent);
  animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }
.hero__veil { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, rgba(251, 248, 243, 0.6) 0%, rgba(251, 248, 243, 0) 40%, var(--night) 100%); }
.hero__glow { position: absolute; z-index: -1; left: 50%; bottom: 8%; width: min(90vw, 46rem); aspect-ratio: 2.2; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(var(--glow), 0.2), transparent 70%); animation: glow 7s ease-in-out infinite alternate; pointer-events: none; }
@keyframes glow { from { opacity: 0.45; } to { opacity: 1; } }
.hero__grain { position: absolute; inset: -50%; z-index: -1; opacity: 0.07; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.1s steps(5) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } 100% { transform: translate(3%, 3%); } }

.hero__content { padding: clamp(6.5rem, 17svh, 9.5rem) var(--pad) 1.5rem; text-align: center; display: grid; justify-items: center; }
.hero__eyebrow { margin-bottom: 1.1rem; color: var(--gold-hi); }
.hero__eyebrow::after { display: none; }
.hero__eyebrow span + span::before { content: "✦"; margin-right: 0.9rem; font-size: 0.6rem; vertical-align: 0.1em; color: var(--gold); }
.hero__title { font-family: var(--serif); font-weight: 300; line-height: 0.86; letter-spacing: -0.02em; font-size: clamp(4.4rem, 23vw, 11.5rem); }
.hero__title .line { display: block; overflow: hidden; padding-block: 0.06em 0.12em; margin-block: -0.06em -0.12em; }
.hero__title .line > span { display: block; transform: translateY(105%); animation: rise 1.25s var(--ease) 0.15s forwards; }
.hero__title .line--em > span { font-style: italic; color: var(--gold-hi); animation-delay: 0.32s; padding-inline: 0.06em; }
@keyframes rise { to { transform: none; } }
.hero__lead { margin-top: 1.6rem; max-width: 30rem; color: var(--ivory-dim); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.6; }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 2rem; }
.hero__lead, .hero__cta, .hero__eyebrow, .hero__foot { opacity: 0; animation: fadeUp 1s var(--ease) forwards; }
.hero__eyebrow { animation-delay: 0.1s; } .hero__lead { animation-delay: 0.9s; } .hero__cta { animation-delay: 1.05s; } .hero__foot { animation-delay: 1.3s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero__foot { display: flex; justify-content: center; padding: 1.2rem var(--pad) calc(1.6rem + env(safe-area-inset-bottom)); }
.hero__chip { font-size: 0.8rem; color: var(--ivory-dim); padding: 0.6rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(8px); }
.hero__chip strong { color: var(--gold-hi); font-weight: 500; }

/* ---------- Schede ---------- */
.cards { display: grid; gap: 1rem; margin-top: clamp(2.2rem, 5vw, 4rem); }
.card { background: var(--night-3); border: 1px solid var(--line); border-radius: 0.9rem; padding: 2rem 1.6rem; min-height: 14rem; display: flex; flex-direction: column; justify-content: flex-end; transition: transform 0.5s var(--ease), border-color 0.4s; }
.card:hover { transform: translateY(-6px); border-color: rgba(var(--glow), 0.5); }
.card__n { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--gold); margin-bottom: auto; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; line-height: 1.1; }
.card p { margin-top: 0.5rem; color: var(--ivory-mute); font-size: 0.95rem; }

/* ---------- Piè di pagina ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 2.2rem calc(2.2rem + env(safe-area-inset-bottom)); }
.foot__in { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 2rem; }
.foot__brand { font-family: var(--serif); font-size: 1.4rem; }
.foot__small { font-size: 0.8rem; color: var(--ivory-mute); }

@media (min-width: 761px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
  .cards { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__title .line > span, .hero__lead, .hero__cta, .hero__eyebrow, .hero__foot { opacity: 1; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ================= Negozio ================= */
.nav__cart { position: relative; width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.6); transition: border-color 0.3s; }
.nav__cart:hover { border-color: var(--gold); }
.nav__cart svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: var(--ivory); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav__cart b { position: absolute; top: -0.3rem; right: -0.3rem; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem; border-radius: 999px; background: var(--gold); color: #fff; font-size: 0.72rem; font-weight: 600; display: grid; place-items: center; line-height: 1; }
.nav__book { display: none; }

.shop { padding-block: clamp(6rem, 14vw, 8rem) clamp(4rem, 9vw, 7rem); min-height: 100svh; }
.shop__head { margin-bottom: 1.8rem; }
.shop .display { font-size: clamp(2.2rem, 6vw, 4rem); }
.display--sm { font-size: clamp(1.8rem, 4vw, 2.6rem) !important; margin: 3.5rem 0 1.4rem; }
.shop__bar { display: flex; gap: 0.8rem; }
.search { flex: 1; display: flex; align-items: center; gap: 0.7rem; height: 3.1rem; padding: 0 1.2rem; border: 1px solid var(--line); border-radius: 999px; background: var(--night-3); transition: border-color 0.3s; }
.search:focus-within { border-color: var(--gold); }
.search svg { width: 1.2rem; height: 1.2rem; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ivory); font: inherit; font-size: 16px; }
.search input::placeholder { color: var(--ivory-mute); }
.chips { display: flex; gap: 0.5rem; margin-top: 1rem; overflow-x: auto; padding-bottom: 0.4rem; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 2.5rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem; color: var(--ivory-dim); display: inline-flex; align-items: center; gap: 0.5rem; transition: all 0.25s; }
.chip b { font-weight: 400; font-size: 0.72rem; color: var(--ivory-mute); }
.chip:hover { border-color: var(--gold); color: var(--ivory); }
.chip.is-on { background: var(--gold); border-color: var(--gold); color: #fff; }
.chip.is-on b { color: rgba(255, 255, 255, 0.7); }
.shop__count { margin: 1.4rem 0 1rem; font-size: 0.82rem; color: var(--ivory-mute); }
.shop__empty { padding: 3rem 0; color: var(--ivory-dim); text-align: center; }

.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(0.7rem, 2vw, 1.4rem); }
.pcard { background: var(--night-3); border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.5s var(--ease), border-color 0.3s; }
.pcard:hover { transform: translateY(-4px); border-color: rgba(var(--glow), 0.45); }
.pcard[hidden] { display: none; }
.pcard__img { position: relative; display: block; aspect-ratio: 1; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.pcard__img img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.8s var(--ease); }
.pcard:hover .pcard__img img { transform: scale(1.05); }
.pcard__noimg { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-size: 1.4rem; color: rgba(29, 22, 22, 0.25); background: #f3eee6; }
.pcard__tag { position: absolute; left: 0.6rem; top: 0.6rem; font-style: normal; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; background: #1d1616; color: #fff; padding: 0.25rem 0.6rem; border-radius: 999px; }
.pcard__body { padding: 0.9rem 0.9rem 1rem; display: flex; flex-direction: column; flex: 1; gap: 0.25rem; }
.pcard__prod { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.pcard h3 { font-family: var(--sans); font-weight: 400; font-size: 0.95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__foot { margin-top: auto; padding-top: 0.7rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.price { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; color: var(--gold-hi); line-height: 1; }
.price small { font-family: var(--sans); font-size: 0.72rem; font-weight: 300; color: var(--ivory-mute); margin-left: 0.2rem; }
.price--lg { font-size: 2.4rem; }
.pcard__add { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--gold); color: #fff; font-size: 1.5rem; line-height: 1; display: grid; place-items: center; transition: transform 0.25s var(--ease), background 0.25s; }
.pcard__add:hover { background: #6f161b; }
.pcard__add:active { transform: scale(0.9); }

.crumbs { font-size: 0.8rem; color: var(--ivory-mute); margin-bottom: 1.6rem; }
.crumbs a:hover { color: var(--gold-hi); }
.crumbs i { font-style: normal; margin-inline: 0.3rem; }
.pdp__grid { display: grid; gap: 2rem; }
.pdp__img { background: #fff; border: 1px solid var(--line); border-radius: 1rem; aspect-ratio: 1; overflow: hidden; display: grid; place-items: center; }
.pdp__img img { width: 100%; height: 100%; object-fit: contain; }
.pdp__title { margin: 0.4rem 0 1rem; }
.pdp__buy { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.pdp__stock { margin-top: 0.9rem; font-size: 0.85rem; color: var(--gold-hi); }
.pdp__stock--out { color: var(--ivory-mute); }
.pdp__desc { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); color: var(--ivory-dim); font-size: 0.98rem; line-height: 1.75; }
.pdp__meta { margin-top: 1.6rem; font-size: 0.75rem; color: var(--ivory-mute); }
.qty { display: inline-flex; align-items: center; height: 3.25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--night-3); }
.qty button { width: 3rem; height: 100%; font-size: 1.3rem; border-radius: 999px; }
.qty button:hover:not(:disabled) { color: var(--gold-hi); }
.qty button:disabled { opacity: 0.3; cursor: default; }
.qty input, .qty span { width: 3rem; text-align: center; background: transparent; border: 0; color: var(--ivory); font: inherit; font-size: 16px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm { height: 2.6rem; margin-top: 0.6rem; }
.qty--sm button { width: 2.6rem; }

.lines { border-top: 1px solid var(--line); }
.line-item { display: grid; grid-template-columns: 4.8rem 1fr auto; gap: 1rem; padding-block: 1.2rem; border-bottom: 1px solid var(--line); align-items: start; }
.line-item__img { width: 4.8rem; aspect-ratio: 1; background: #fff; border-radius: 0.5rem; overflow: hidden; }
.line-item__img img { width: 100%; height: 100%; object-fit: contain; }
.line-item__name { font-size: 0.98rem; line-height: 1.35; }
.line-item__unit { font-size: 0.8rem; color: var(--ivory-mute); margin-top: 0.2rem; }
.line-item__side { text-align: right; display: grid; gap: 0.6rem; justify-items: end; }
.link-x { font-size: 0.75rem; color: var(--ivory-mute); text-decoration: underline; padding: 0.5rem 0; }
.link-x:hover { color: var(--gold-hi); }
.total { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-block: 1.6rem; }
.total small { display: block; font-size: 0.78rem; color: var(--ivory-mute); }
.cart__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.is-soon { opacity: 0.5; cursor: not-allowed; }

.toast { color: #fff !important; background: #1d1616 !important; position: fixed; left: 50%; bottom: max(1.2rem, env(safe-area-inset-bottom)); transform: translate(-50%, 140%); z-index: 120; background: var(--ivory); color: var(--night); padding: 0.85rem 1.4rem; border-radius: 999px; font-size: 0.9rem; font-weight: 400; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25); transition: transform 0.45s var(--ease); white-space: nowrap; }
.toast.is-on { transform: translate(-50%, 0); }

@media (min-width: 761px) {
  .nav__book { display: inline-flex; }
  .pgrid { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
  .pcard__img img { padding: 0.7rem; }
  .pcard h3 { font-size: 0.9rem; }
  .price { font-size: 1.3rem; }
  .pcard__add { width: 2.4rem; height: 2.4rem; font-size: 1.3rem; }
  .pdp__grid { grid-template-columns: minmax(0, 26rem) 1fr; gap: 3.5rem; align-items: start; }
  .pdp__img { position: sticky; top: 6rem; }
}
@media (min-width: 1100px) { .pgrid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1500px) { .pgrid { grid-template-columns: repeat(6, 1fr); } .shop .wrap { max-width: 96rem; } }

.foot__logo { height: 2.6rem; width: auto; }

/* ================= Mobile ================= */
@media (max-width: 760px) {
  /* intestazione: barra compatta e sempre leggibile */
  .nav { padding: max(0.5rem, env(safe-area-inset-top)) 1rem 0.5rem; background: rgba(251, 248, 243, 0.96); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); gap: 0.6rem; }
  .nav__brand { min-width: 0; flex: 0 1 auto; }
  .nav__brand img { height: 2.8rem; width: auto; max-width: 100%; }
  .nav__side { gap: 0.5rem; flex: none; }
  .nav__cart, .nav__toggle { width: 2.75rem; height: 2.75rem; background: #fff; }
  .nav__cart b { top: -0.25rem; right: -0.25rem; }
  .shop { padding-top: 4.6rem; }
  .shop__head { margin-bottom: 0.9rem; }
  .shop__head .eyebrow { display: none; }
  .shop .display { font-size: 1.9rem; }
  .shop__count { margin: 1rem 0 0.7rem; }
  /* categorie a scorrimento da bordo a bordo */
  .chips { margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad); scroll-snap-type: x proximity; }
  .chips::after { content: ""; flex: none; width: 0.1px; }
  .chip { scroll-snap-align: start; min-height: 2.75rem; }
  .pgrid { gap: 0.6rem; }
  .pcard { border-radius: 0.7rem; }
  .pcard__img img { padding: 0.35rem; }
  .pcard__body { padding: 0.7rem 0.7rem 0.8rem; }
  .pcard h3 { font-size: 0.86rem; -webkit-line-clamp: 3; min-height: 3.5em; }
  .pcard__prod { font-size: 0.6rem; letter-spacing: 0.12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .price { font-size: 1.25rem; }
  .price small { display: none; }
  .price--lg small { display: inline; }
  .pcard__add { width: 2.75rem; height: 2.75rem; }
  /* scheda prodotto */
  .pdp__title { font-size: 1.9rem !important; }
  .price--lg { font-size: 2rem; }
  .pdp__buy .btn { flex: 1; }
  .qty button { width: 3.2rem; }
  /* carrello */
  .line-item { grid-template-columns: 4rem 1fr auto; gap: 0.8rem; }
  .line-item__img { width: 4rem; }
  .cart__cta .btn { width: 100%; }
}

/* ================= Ordine ================= */
.co { display: grid; gap: 2rem; }
.co__form { display: grid; gap: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fld { display: grid; gap: 0.4rem; }
.fld > span { font-size: 0.78rem; letter-spacing: 0.08em; color: var(--ivory-dim); }
.fld small { color: var(--ivory-mute); letter-spacing: 0; }
.fld input, .fld textarea { width: 100%; min-height: 3.1rem; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 0.7rem; background: var(--night-3); color: var(--ivory); font: inherit; font-size: 16px; transition: border-color 0.25s; }
.fld textarea { resize: vertical; }
.fld input:focus, .fld textarea:focus { outline: 0; border-color: var(--gold); }
.fld.has-err input { border-color: #c0392b; }
.err { font-style: normal; font-size: 0.8rem; color: #c0392b; }
.row2 { display: grid; gap: 1rem; }
.row3 { display: grid; grid-template-columns: 6.5rem 1fr 4.5rem; gap: 0.8rem; }
.chk { display: flex; gap: 0.8rem; align-items: flex-start; font-size: 0.88rem; color: var(--ivory-dim); padding-block: 0.4rem; }
.chk input { width: 1.4rem; height: 1.4rem; margin-top: 0.1rem; flex: none; accent-color: var(--gold); }
.co__submit { width: 100%; margin-top: 0.4rem; }
.co__hint { font-size: 0.82rem; color: var(--ivory-mute); text-align: center; }
.co__sum { background: var(--night-3); border: 1px solid var(--line); border-radius: 0.9rem; padding: 1.4rem; align-self: start; }
.co__sum h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin-bottom: 0.8rem; }
.co__sum li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.55rem; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.co__sum li b { font-weight: 400; white-space: nowrap; }
.co__tot { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding-block: 1rem; }
.co__tot small { display: block; font-size: 0.75rem; color: var(--ivory-mute); }
.co__tot b { font-family: var(--serif); font-size: 1.9rem; font-weight: 500; color: var(--gold-hi); }
@media (min-width: 761px) {
  .row2 { grid-template-columns: 1fr 1fr; }
  .co { grid-template-columns: 1fr 24rem; gap: 3rem; }
  .co__sum { position: sticky; top: 6rem; }
  .co__submit { width: auto; justify-self: start; }
  .co__hint { text-align: left; }
}
@media (max-width: 760px) { .co__sum { order: -1; } }

/* ================= Barra carrello fissa in basso ================= */
.cartbar { position: fixed; z-index: 85; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem var(--pad) max(0.75rem, env(safe-area-inset-bottom)); background: var(--gold); color: #fff; box-shadow: 0 -10px 30px -10px rgba(var(--glow), 0.55); animation: barUp 0.5s var(--ease); }
@keyframes barUp { from { transform: translateY(100%); } to { transform: none; } }
.cartbar__info { display: flex; align-items: center; gap: 0.8rem; min-height: 2.75rem; font-size: 0.98rem; min-width: 0; }
.cartbar__info svg { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cartbar__info i { font-style: normal; opacity: 0.7; }
.cartbar__info strong { font-weight: 500; white-space: nowrap; }
.cartbar__go { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.9rem; padding: 0 1.5rem; border-radius: 999px; background: #fff; color: var(--gold); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.cartbar__go:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.cartbar__go:active { transform: scale(0.97); }
.cartbar__go i { font-style: normal; }
.cartbar:not([hidden]) ~ .toast { bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + 4.4rem); }
body:has(.cartbar:not([hidden])) .foot { padding-bottom: 6rem; }
@media (max-width: 420px) {
  .cartbar { gap: 0.6rem; }
  .cartbar__go { padding: 0 1.05rem; font-size: 0.7rem; letter-spacing: 0.1em; }
  .cartbar__info { font-size: 0.9rem; gap: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) { .cartbar { animation: none; } }
