/* =========================================================
   Autocarina.com — storefront
   Design fedele al riferimento, mobile-first
   ========================================================= */

:root {
  --ink: #1a0f33;
  --violet: #6d28d9;
  --violet2: #5b21b6;
  --lilac: #efe9fc;
  --line: #e1d8f5;
  --bg: #fff;
  --text: #1f1838;
  --mute: #6b6385;
  --card: #fff;
  --danger: #c0262d;
  --ok: #15803d;
  --shadow: 0 18px 50px rgba(26, 15, 51, 0.12);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #150d28;
    --text: #f3effc;
    --mute: #b3a9cf;
    --card: #1f1538;
    --line: #34265a;
    --lilac: #2a1d4c;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(84px + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: Montserrat, system-ui, sans-serif;
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

img,
svg {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
}

a:hover {
  color: var(--violet);
}

:focus-visible {
  outline: 3px solid #a78bfa;
  outline-offset: 3px;
  border-radius: 4px;
}

section,
footer,
#contatti {
  scroll-margin-top: 0;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--violet);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip:focus {
  top: 0;
  color: #fff;
}

/* ── Header ─────────────────────────────────────────────── */

header.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 5vw;
  flex-wrap: wrap;
}

.brand {
  font: italic 800 22px Montserrat, sans-serif;
  color: var(--violet);
  letter-spacing: 0.5px;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand small {
  font: 500 12px Figtree, sans-serif;
  color: var(--mute);
  font-style: normal;
  margin-left: 6px;
}

nav[aria-label="Navigazione principale"] {
  display: flex;
  gap: 22px;
  font-weight: 600;
}

nav[aria-label="Navigazione principale"] a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 0;
}

nav[aria-label="Navigazione principale"] a:hover {
  color: var(--violet);
}

.right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cartbtn {
  background: var(--violet);
  color: #fff;
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 9px 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.2s;
}

.cartbtn:hover {
  background: var(--violet2);
}

.cartbtn:active {
  transform: scale(0.97);
}

.cartbtn .cart-count {
  background: #fff;
  color: var(--violet);
  border-radius: 999px;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  background: var(--ink);
  color: #fff;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 64px 5vw;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 60px);
  font-style: italic;
  font-weight: 800;
  max-width: 15ch;
  text-wrap: balance;
}

.hero p {
  color: #cbbfe8;
  max-width: 46ch;
  margin: 18px 0 26px;
  font-size: 18px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: var(--violet2);
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  min-height: 48px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.cta:hover {
  color: var(--violet2);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.cta.alt {
  background: transparent;
  color: #fff;
  border: 2px solid #8b6be0;
}

.cta.alt:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.hero-trust {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: #cbbfe8;
  font-size: 14px;
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-trust svg {
  color: #a78bfa;
  flex: none;
}

.logowrap {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
}

.logowrap::before {
  content: "";
  position: absolute;
  inset: -12% -8%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.55), rgba(124, 58, 237, 0) 100%);
  pointer-events: none;
}

.logowrap picture {
  display: block;
  width: 100%;
}

.logo {
  position: relative;
  width: 100%;
  max-width: 620px;
  height: auto;
  filter: drop-shadow(0 12px 30px rgba(10, 5, 25, 0.6));
}

/* ── Strip vantaggi ─────────────────────────────────────── */

.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 22px 5vw;
  background: var(--lilac);
}

.strip > div {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.strip svg {
  color: var(--violet);
  flex: none;
}

.strip p {
  min-width: 0;
}

.strip b {
  display: block;
  font-family: Montserrat, sans-serif;
  font-size: 15px;
}

.strip span {
  display: block;
  color: var(--mute);
  font-size: 14px;
}

/* ── Sezioni ────────────────────────────────────────────── */

section {
  padding: 60px 5vw;
}

.head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.head h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  font-style: italic;
  font-weight: 800;
}

.section-sub {
  color: var(--mute);
  margin-top: 8px;
  max-width: 62ch;
}

.head-count {
  color: var(--mute);
  font-size: 14px;
  white-space: nowrap;
}

/* ── Ricerca / filtri ───────────────────────────────────── */

.tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tools input,
.tools select,
.f input,
.f select,
.f textarea,
.promo input {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  min-width: 0;
  font-size: 16px;
}

.tools input::placeholder,
.promo input::placeholder {
  color: var(--mute);
}

.searchbox {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}

.searchbox svg {
  position: absolute;
  left: 13px;
  color: var(--mute);
  pointer-events: none;
}

.searchbox input {
  width: 100%;
  padding-left: 40px;
}

#sort {
  min-width: 220px;
  cursor: pointer;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.chip {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 40px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.chip:hover {
  border-color: var(--violet);
  color: var(--violet);
}

.chip[aria-pressed="true"] {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

/* ── Griglia prodotti ───────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--violet) 35%, var(--line));
}

.thumb {
  height: 170px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--lilac), var(--card));
  position: relative;
  border: 0;
  width: 100%;
  padding: 0;
  text-decoration: none;
}

.thumb .bottle {
  width: 84px;
  height: 120px;
  transition: transform 0.25s;
}

.card:hover .thumb .bottle {
  transform: translateY(-4px) rotate(-2deg);
}

.bottle-img,
.bottle-xl-img {
  max-height: 140px;
  max-width: 86%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.thumb.has-img {
  background: #fff;
}

.thumb.has-img .bottle-img {
  max-height: 148px;
}

.tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--violet);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 8px;
  z-index: 1;
}

.tag + .tag-low {
  top: 36px;
  background: #b45309;
}

.vol {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  border-radius: 6px;
  padding: 2px 8px;
  z-index: 1;
}

.card .body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
}

.card h3 a {
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--violet);
}

.card .body p {
  color: var(--mute);
  font-size: 14px;
  flex: 1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.buy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.price {
  font: 700 20px Montserrat, sans-serif;
  white-space: nowrap;
}

.add {
  background: var(--violet);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 42px;
  font-weight: 600;
  transition: background 0.18s, transform 0.18s;
}

.add:hover:not(:disabled) {
  background: var(--violet2);
}

.add:active:not(:disabled) {
  transform: scale(0.97);
}

.add:disabled {
  background: var(--mute);
  opacity: 0.7;
  cursor: not-allowed;
}

.add.added {
  background: var(--ok);
}

.none {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--mute);
  padding: 40px 0;
}

/* ── Why / FAQ ──────────────────────────────────────────── */

.why {
  background: var(--lilac);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.why h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.why p {
  color: var(--mute);
}

.faq {
  max-width: 780px;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 34px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: -3px;
  font-size: 24px;
  font-weight: 400;
  color: var(--violet);
  line-height: 1;
}

details[open] summary::after {
  content: "−";
}

details p {
  color: var(--mute);
  margin: 10px 0 0;
  max-width: 70ch;
}

/* ── Newsletter ─────────────────────────────────────────── */

.nl {
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.nl h2 {
  font-style: italic;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 34px);
}

.nl p {
  color: #cbbfe8;
  margin: 10px auto 20px;
  max-width: 50ch;
}

.nl form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.nl input {
  border-radius: 999px;
  border: 0;
  padding: 13px 20px;
  min-width: 260px;
  max-width: 100%;
  font: inherit;
  font-size: 16px;
  color: #1f1838;
  background: #fff;
}

.nl .cta {
  cursor: pointer;
}

.nl .nl-note {
  font-size: 13px;
  color: #a99cc9;
  margin: 14px auto 0;
}

/* ── Footer ─────────────────────────────────────────────── */

footer {
  background: var(--ink);
  color: #cbbfe8;
  padding: 48px 5vw calc(28px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px 28px;
  border-top: 1px solid #34265a;
}

footer a {
  color: #cbbfe8;
  text-decoration: none;
  padding: 2px 0;
  display: inline-block;
}

footer a:hover {
  color: #fff;
}

.foot-logo {
  font: italic 800 22px Montserrat, sans-serif;
  color: #fff;
  letter-spacing: 0.5px;
}

.foot-logo small {
  font: 500 12px Figtree, sans-serif;
  font-style: normal;
  color: #cbbfe8;
  margin-left: 4px;
}

.foot-brand p {
  margin-top: 8px;
  font-size: 14px;
}

.foot-desc {
  max-width: 34ch;
  color: #a99cc9;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.foot-col b {
  color: #fff;
  font-family: Montserrat, sans-serif;
  margin-bottom: 2px;
}

.paylogos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.paylogos span {
  border: 1px solid #4b3a75;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  color: #e4dcf7;
}

.foot-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid #34265a;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #a99cc9;
}

/* ── Carrello (drawer) ──────────────────────────────────── */

.shade {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 25, 0.5);
  z-index: 15;
  display: none;
  backdrop-filter: blur(2px);
}

.shade.on {
  display: block;
  animation: fade 0.2s ease;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh;
  width: min(420px, 100%);
  background: var(--card);
  color: var(--text);
  z-index: 20;
  transform: translateX(105%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(26, 15, 51, 0.35);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  visibility: hidden;
}

.drawer.open {
  transform: none;
  visibility: visible;
}

.dh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.dh h2 {
  font-size: 20px;
  font-weight: 700;
}

.iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  display: grid;
  place-items: center;
  flex: none;
}

.iconbtn:hover {
  background: var(--lilac);
}

.items {
  flex: 1;
  overflow: auto;
  padding: 8px 20px;
  overscroll-behavior: contain;
}

.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.line-info {
  min-width: 0;
}

.line a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: block;
}

.line small {
  color: var(--mute);
  font-size: 13px;
}

.line-total {
  text-align: right;
  flex: none;
  white-space: nowrap;
}

.line-remove {
  border: 0;
  background: none;
  color: var(--mute);
  font-size: 13px;
  padding: 6px 0;
  min-height: 32px;
  margin-top: 4px;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
}

.line-remove:hover {
  color: var(--danger);
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.qty button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.qty button:hover {
  border-color: var(--violet);
  color: var(--violet);
}

.qty output,
.qty span {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
}

.empty {
  color: var(--mute);
  padding: 40px 8px;
  text-align: center;
}

.empty .cta {
  margin-top: 16px;
  background: var(--violet);
  color: #fff;
}

.ship {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.ship p {
  color: var(--mute);
}

.bar {
  height: 8px;
  background: var(--lilac);
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--violet);
  width: 0;
  border-radius: 99px;
  transition: width 0.3s;
}

.promo {
  display: flex;
  gap: 8px;
  padding: 0 20px 12px;
}

.promo input {
  flex: 1;
  padding: 9px 12px;
  font-size: 15px;
}

.promo .chip {
  min-height: 42px;
}

.sum {
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}

.sum div {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  margin: 4px 0;
  gap: 12px;
}

.sum small {
  color: var(--violet);
  font-weight: 600;
}

.sum .total {
  font: 700 20px Montserrat, sans-serif;
  color: var(--text);
  margin: 10px 0 4px;
}

.sum-note {
  color: var(--mute);
  font-size: 12px;
  margin: 0 0 12px;
}

.sum .cta {
  width: 100%;
  background: var(--violet);
  color: #fff;
  cursor: pointer;
}

.sum .cta:hover {
  background: var(--violet2);
  color: #fff;
}

/* ── Modali ─────────────────────────────────────────────── */

dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: var(--card);
  color: var(--text);
  width: min(560px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(10, 5, 25, 0.6);
  backdrop-filter: blur(3px);
}

.dm {
  padding: 26px;
  position: relative;
  overflow: auto;
  max-height: calc(100dvh - 24px);
}

.x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  display: grid;
  place-items: center;
  z-index: 1;
}

.x:hover {
  background: var(--lilac);
}

.modal-title {
  font-size: 24px;
  font-style: italic;
  margin-bottom: 4px;
  padding-right: 40px;
}

.note {
  color: var(--mute);
  font-size: 13px;
}

.f {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

.f .w {
  grid-column: 1 / -1;
}

.f label {
  display: grid;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
}

.f textarea {
  resize: vertical;
  min-height: 60px;
}

.pay-field {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.pay-field legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.pay {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pay label {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 500;
  display: flex;
  gap: 7px;
  align-items: center;
  cursor: pointer;
}

.pay label:has(input:checked) {
  border-color: var(--violet);
  background: color-mix(in srgb, var(--violet) 8%, transparent);
}

.pay input {
  accent-color: var(--violet);
}

.err {
  color: var(--danger);
  font-size: 14px;
  min-height: 0;
}

.err:empty {
  display: none;
}

.order-recap {
  background: var(--lilac);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
}

.order-recap div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--mute);
  margin: 2px 0;
}

.order-recap .recap-total {
  color: var(--text);
  font-weight: 700;
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding-top: 6px;
}

.submit {
  background: var(--violet) !important;
  color: #fff !important;
  cursor: pointer;
  border: 0;
  width: 100%;
}

.checkout-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--card);
  padding-top: 10px;
  box-shadow: 0 -10px 18px var(--card);
}

.checkout-actions .err {
  margin: 0 0 6px;
}

.submit:hover {
  background: var(--violet2) !important;
}

.submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.center {
  text-align: center;
}

.ok {
  text-align: center;
  padding: 16px 0;
}

.ok .big {
  font-size: 52px;
  line-height: 1;
}

.ok h2 {
  font-style: italic;
  margin: 12px 0 8px;
}

.ok p {
  color: var(--mute);
  margin: 4px 0;
}

.ok .order-number {
  display: inline-block;
  font: 700 18px Montserrat, sans-serif;
  color: var(--violet);
  background: var(--lilac);
  border-radius: 8px;
  padding: 6px 14px;
  margin: 10px 0;
}

.ok .cta {
  background: var(--violet);
  color: #fff;
  margin-top: 16px;
  cursor: pointer;
}

/* ── Toast ──────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
  max-width: calc(100% - 32px);
  text-align: center;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(10, 5, 25, 0.35);
}

.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── Pagina prodotto ────────────────────────────────────── */

.breadcrumb {
  padding: 20px 5vw 0;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--mute);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--mute);
}

.breadcrumb a {
  color: var(--mute);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--violet);
}

.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 28px 5vw 30px;
  max-width: 1280px;
  margin: 0 auto;
}

.product-details {
  padding: 8px 5vw 10px;
  max-width: 1280px;
  margin: 0 auto;
}

.product-details h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-style: italic;
  margin-bottom: 10px;
}

.product-details .accordion {
  max-width: 860px;
  border-top: 1px solid var(--line);
}

.product-gallery {
  min-width: 0;
}

.product-visual {
  position: relative;
  background: linear-gradient(160deg, var(--lilac), var(--card));
  border: 1px solid var(--line);
  border-radius: 20px;
  min-height: 380px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-visual.has-img {
  background: #fff;
}

.product-visual.has-img::before {
  display: none;
}

.product-visual::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.18), transparent);
}

.bottle-xl {
  position: relative;
  width: 190px;
  height: 280px;
  filter: drop-shadow(0 20px 30px rgba(26, 15, 51, 0.2));
}

.bottle-xl-img {
  position: relative;
  max-height: 340px;
  max-width: 92%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.product-thumbs button {
  width: 68px;
  height: 68px;
  padding: 4px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.product-thumbs button:hover {
  border-color: var(--violet);
}

.product-thumbs button.active {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--violet) 18%, transparent);
}

.product-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-visual.has-img .product-badge {
  z-index: 1;
}

.product-description {
  white-space: pre-line;
}

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--violet);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 4px 10px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  color: var(--violet);
  margin-bottom: 8px;
}

.product-info h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-style: italic;
  margin-bottom: 10px;
}

.product-short {
  color: var(--mute);
  font-size: 18px;
  margin-bottom: 18px;
}

.product-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-price {
  font: 700 32px Montserrat, sans-serif;
}

.product-vol {
  color: var(--mute);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
}

.stock {
  font-size: 13px;
  font-weight: 600;
  color: var(--ok);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stock::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.stock-low {
  color: #b45309;
}

.stock-out {
  color: var(--danger);
}

.product-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}

.qty-lg {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}

.qty-lg button {
  width: 38px;
  height: 38px;
}

.qty-lg output {
  min-width: 28px;
  font-size: 16px;
}

.add-main {
  background: var(--violet);
  color: #fff;
  flex: 1;
  min-width: 220px;
  border: 0;
  cursor: pointer;
}

.add-main:hover {
  background: var(--violet2);
  color: #fff;
}

.add-main:disabled {
  background: var(--mute);
  cursor: not-allowed;
}

.product-trust {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: var(--mute);
}

.product-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-trust svg {
  color: var(--violet);
  width: 20px;
  height: 20px;
  flex: none;
}

.accordion {
  border-top: 1px solid var(--line);
}

.accordion summary {
  font-size: 15px;
}

.accordion p {
  font-size: 15px;
  line-height: 1.65;
}

.related {
  padding-top: 0;
}

/* ── Pagine legali / errore ─────────────────────────────── */

.legal {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 5vw 70px;
}

.legal h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-style: italic;
  margin: 26px 0 22px;
}

.legal-body h2 {
  font-size: 20px;
  margin: 28px 0 8px;
}

.legal-body p,
.legal-body li {
  color: var(--mute);
  line-height: 1.7;
}

.legal-body ul {
  padding-left: 20px;
}

.legal-body a {
  color: var(--violet);
}

.error-page {
  text-align: center;
  padding: 90px 5vw;
}

.error-code {
  font: italic 800 80px Montserrat, sans-serif;
  color: var(--lilac);
  -webkit-text-stroke: 2px var(--violet);
  line-height: 1;
}

.error-page h1 {
  font-size: clamp(26px, 4vw, 38px);
  font-style: italic;
  margin: 10px 0;
}

.error-page p {
  color: var(--mute);
  margin-bottom: 22px;
}

.error-page .cta {
  background: var(--violet);
  color: #fff;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 980px) {
  .product {
    gap: 32px;
  }
  .product-visual {
    min-height: 320px;
  }
  .bottle-xl {
    width: 150px;
    height: 230px;
  }
  footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: calc(118px + env(safe-area-inset-top, 0px));
  }
  section,
  footer,
  #contatti {
    scroll-margin-top: 0;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 5vw 46px;
    gap: 30px;
  }
  .hero h1 {
    max-width: 20ch;
  }
  .hero p {
    font-size: 17px;
  }
  nav[aria-label="Navigazione principale"] {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 18px;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  nav[aria-label="Navigazione principale"]::-webkit-scrollbar {
    display: none;
  }
  .brand small {
    display: none;
  }
  section {
    padding: 46px 5vw;
  }
  .product {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 18px;
  }
  .product-visual {
    min-height: 300px;
  }
  .bottle-xl {
    width: 140px;
    height: 215px;
  }
  .bottle-xl-img {
    max-height: 280px;
  }
  .product-buy .add-main {
    min-width: 0;
  }
  .head {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  header.top {
    padding: 10px 4vw;
    gap: 10px;
  }
  nav[aria-label="Navigazione principale"] {
    gap: 16px;
    font-size: 15px;
  }
  .brand {
    font-size: 20px;
  }
  .cartbtn {
    padding: 9px 12px;
  }
  .cartbtn .cart-txt {
    display: none;
  }
  .cartbtn .cart-count {
    min-width: 22px;
    height: 22px;
  }
  .hero {
    padding: 34px 5vw 40px;
  }
  .hero h1 {
    font-size: clamp(32px, 9vw, 44px);
  }
  .hero-cta .cta {
    flex: 1;
    min-width: 150px;
    padding: 13px 18px;
  }
  .hero-trust {
    gap: 8px 16px;
    font-size: 13px;
  }
  .strip {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 5vw;
  }
  .strip > div {
    gap: 10px;
  }
  .strip svg {
    width: 22px;
    height: 22px;
  }
  .tools {
    gap: 8px;
  }
  .searchbox {
    min-width: 100%;
  }
  #sort {
    width: 100%;
    min-width: 0;
  }
  .chips {
    flex-wrap: wrap;
    padding-bottom: 0;
    margin-bottom: 18px;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chip {
    flex: none;
    padding: 8px 13px;
    min-height: 38px;
    font-size: 13.5px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .card {
    border-radius: 13px;
  }
  .thumb {
    height: 132px;
  }
  .thumb .bottle {
    width: 62px;
    height: 88px;
  }
  .bottle-img {
    max-height: 100px;
    max-width: 88%;
  }
  .thumb.has-img .bottle-img {
    max-height: 108px;
  }
  .product-thumbs button {
    width: 56px;
    height: 56px;
  }
  .tag,
  .vol {
    font-size: 10.5px;
    padding: 2px 6px;
    top: 7px;
  }
  .tag {
    left: 7px;
  }
  .vol {
    right: 7px;
  }
  .tag + .tag-low {
    top: 30px;
  }
  .card .body {
    padding: 10px 11px 12px;
    gap: 4px;
  }
  .card h3 {
    font-size: 13.5px;
    line-height: 1.3;
  }
  .card .body p {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  .price {
    font-size: 16px;
  }
  .add {
    padding: 8px 10px;
    min-height: 38px;
    font-size: 12.5px;
    border-radius: 8px;
  }
  .buy {
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
  }
  section {
    padding: 42px 4.5vw;
  }
  .head h2 {
    font-size: 27px;
  }
  .section-sub {
    font-size: 14.5px;
  }
  .head-count {
    font-size: 13px;
  }
  .why .row {
    gap: 22px;
  }
  .nl form {
    flex-direction: column;
    align-items: stretch;
  }
  .nl input {
    min-width: 0;
    width: 100%;
  }
  .nl .cta {
    width: 100%;
  }
  footer {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 38px;
  }
  .foot-bottom {
    flex-direction: column;
  }
  .drawer {
    width: 100%;
    border-radius: 0;
  }
  dialog {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: auto;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
    position: fixed;
    inset: auto 0 0 0;
  }
  dialog[open] {
    animation: sheet 0.25s ease;
  }
  .dm {
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    max-height: 90dvh;
  }
  .modal-title {
    font-size: 22px;
  }
  .f {
    grid-template-columns: 1fr;
  }
  .product {
    padding: 18px 4.5vw 46px;
  }
  .product-visual {
    min-height: 260px;
    border-radius: 16px;
  }
  .bottle-xl {
    width: 120px;
    height: 180px;
  }
  .bottle-xl-img {
    max-height: 235px;
    max-width: 90%;
  }
  .product-meta {
    gap: 8px 12px;
  }
  .product-price {
    font-size: 28px;
  }
  .add-main {
    width: 100%;
    flex: 1 0 100%;
  }
  .line-remove {
    min-height: 40px;
  }
  .foot-col a {
    padding: 5px 0;
  }
  .legal {
    padding: 0 4.5vw 50px;
  }
  .breadcrumb {
    padding: 16px 4.5vw 0;
  }
  .toast {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: max-content;
    max-width: calc(100% - 24px);
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 18px;
  }
  .hide-xs {
    display: none !important;
  }
  .grid {
    gap: 10px;
  }
  .thumb {
    height: 118px;
  }
  .thumb .bottle {
    width: 55px;
    height: 78px;
  }
  .card .body {
    padding: 9px 9px 10px;
  }
  .card h3 {
    font-size: 12.5px;
  }
  .price {
    font-size: 15px;
  }
  .add {
    font-size: 12px;
    padding: 7px 8px;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheet {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

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