/* Inter (SIL Open Font License 1.1), font variabile 400-800 servito dal sito: niente richieste a Google Fonts. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   Italy Service Boat — Design System (Apple-inspired)
   Shared stylesheet. Page-specific rules live in assets/css/pages/<page>.css
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter",
    "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Palette nautica: navy "abisso" per le sezioni scure, blu oceano per l'accento,
     verde mare per bagliori e gradienti, bianco con un velo d'azzurro per le sezioni chiare. */
  --bg: #ffffff;
  --bg-alt: #f2f6f9;      /* schiuma */
  --bg-dark: #06192b;     /* abisso: al posto del nero */
  --bg-dark-2: #0b2a44;   /* navy: footer scuro, card scure */
  --surface: #ffffff;

  --text: #0e1b2a;        /* inchiostro navy */
  --text-2: #5b6b7a;
  --text-3: #66727f;      /* 4.9:1 su bianco (WCAG 1.4.3): didascalie, placeholder e meta leggibili */
  --text-inv: #f1f6fa;
  --text-inv-2: #9fb3c5;

  --accent: #00529b;      /* il blu del logo (timone), 7.9:1 su bianco */
  --accent-hover: #004079;
  --accent-soft: rgba(0, 82, 155, 0.1);
  --accent-glow: rgba(23, 143, 168, 0.5); /* bagliore verde mare sotto le hero scure */
  --sea: #148a9c;         /* verde mare: gradienti, dettagli */
  --sea-light: #6fe3e0;
  --brass: #c08a2e;       /* ottone: solo per piccoli dettagli */
  --success: #1b8f5a;
  --warning: #b25e00;
  --danger: #d8242a;

  --line: rgba(14, 40, 68, 0.1);
  --line-strong: #cfdae3;
  --line-inv: rgba(255, 255, 255, 0.14);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-pill: 980px;

  --shadow-sm: 0 2px 8px rgba(8, 30, 55, 0.07);
  --shadow: 0 8px 30px rgba(8, 30, 55, 0.09);
  --shadow-lg: 0 20px 60px rgba(8, 30, 55, 0.16);

  --nav-h: 48px;
  --container: 980px;
  --container-wide: 1280px;
  --container-narrow: 720px;
  --gutter: 22px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 0.3s;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent; /* niente lampo grigio al tocco: il feedback lo danno gli stati :active */
  scroll-padding-top: calc(var(--nav-h) + 16px); /* ancore e focus non finiscono sotto la barra fissa */
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}


button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

main {
  padding-top: var(--nav-h);
  min-height: 60vh;
}

/* ---------- Layout ---------- */
.container,
.container-wide,
.container-narrow {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container {
  max-width: calc(var(--container) + var(--gutter) * 2);
}

.container-wide {
  max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.container-narrow {
  max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section-tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.section-flush-top {
  padding-top: 0;
}

.bg-alt {
  background: var(--bg-alt);
}

.bg-dark {
  background: var(--bg-dark);
  color: var(--text-inv);
}

.bg-dark-2 {
  background: var(--bg-dark-2);
  color: var(--text-inv);
}

.bg-dark .text-muted,
.bg-dark-2 .text-muted,
.bg-dark .subhead,
.bg-dark-2 .subhead,
.bg-dark .lead,
.bg-dark-2 .lead {
  color: var(--text-inv-2);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.split.reverse > :first-child {
  order: 2;
}

.stack > * + * {
  margin-top: var(--gap, 16px);
}

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

.cluster-center {
  justify-content: center;
}

.section-head {
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: center;
}

.section-head.left {
  margin-left: 0;
  text-align: left;
}

/* ---------- Typography ---------- */
.display {
  font-size: clamp(44px, 7vw, 80px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.headline {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.012em;
  font-weight: 700;
}

.title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.title-sm {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.subhead {
  font-size: clamp(19px, 2.2vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 400;
  color: var(--text-2);
}

.lead {
  font-size: 21px;
  line-height: 1.38;
  letter-spacing: -0.011em;
  color: var(--text-2);
}

.eyebrow {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin-bottom: 12px;
}

.bg-dark .eyebrow,
.bg-dark-2 .eyebrow,
.hero-dark .eyebrow {
  color: #2997ff;
}

.small {
  font-size: 14px;
  line-height: 1.43;
}

.tiny {
  font-size: 12px;
  line-height: 1.4;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-2);
}

.text-faint {
  color: var(--text-3);
}

.text-accent {
  color: var(--accent);
}

.gradient-text {
  /* oceano → verde mare: sulle sezioni chiare */
  background: linear-gradient(90deg, var(--accent) 0%, var(--sea) 70%, #1aa3b5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-dark .gradient-text,
.bg-dark-2 .gradient-text,
.hero-dark .gradient-text,
.tile-dark .gradient-text {
  background-image: linear-gradient(90deg, #3fb0ff 0%, var(--sea-light) 45%, #3fb0ff 100%);
}

.headline + .subhead,
.display + .subhead,
.hero-h1 + .subhead,
.title + .lead {
  margin-top: 16px;
}

/* H1 delle hero: occhiello (parola chiave) + slogan nello stesso titolo, con l'aspetto di prima */
.hero-h1 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.hero-h1 > .display {
  display: block;
}

.measure {
  max-width: 640px;
}

.measure-center {
  max-width: 640px;
  margin-inline: auto;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t) var(--ease), color var(--t) var(--ease),
    transform var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t);
}


.btn:not(:disabled):active {
  transform: scale(0.96);
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}


.btn-light {
  background: #fff;
  color: var(--text);
}


.btn-ghost {
  background: transparent;
  color: currentColor;
  border-color: currentColor;
}



.btn-dark {
  background: var(--text);
  color: #fff;
}


.btn-sm {
  padding: 8px 16px;
  min-height: 36px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 30px;
  min-height: 56px;
  font-size: 19px;
}

.btn-block {
  width: 100%;
}

.btn-wa {
  background: #1fab55;
}


.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 17px;
  color: var(--accent);
  white-space: nowrap;
}

.link-arrow::after {
  content: "\203A";
  font-size: 1.15em;
  line-height: 1;
  margin-left: 2px;
  transition: transform var(--t) var(--ease);
}


.bg-dark .link-arrow,
.bg-dark-2 .link-arrow,
.tile-dark .link-arrow,
.hero-dark .link-arrow {
  color: #2997ff;
}

.link-arrow-lg {
  font-size: 21px;
}

.link-plain {
  color: inherit;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: inherit;
  transition: background var(--t);
}



/* ---------- Icons ---------- */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-lg {
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
}

.icon-xl {
  width: 64px;
  height: 64px;
  stroke-width: 1.25;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  color: var(--text);
}

/* L'effetto vetro vive su uno pseudo-elemento: backdrop-filter sul contenitore
   renderebbe la nav un containing block per il pannello mobile position: fixed. */
/* Menu sempre bianco su tutte le pagine (anche quelle con la hero scura): il logo originale a colori resta leggibile.
   Quasi opaco: sopra le hero e le sezioni scure non diventa grigio-azzurro. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 12px rgba(6, 25, 43, 0.06);
  transition: background var(--t), border-color var(--t);
}

.nav-inner {
  max-width: calc(1120px + var(--gutter) * 2); /* sette voci + lingua, account e carrello su una riga */
  margin: 0 auto;
  height: 100%;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: inherit;
}

/* Logo originale in orizzontale (timone + scritta), immagine a 3x: nitido anche sugli schermi retina */
.nav-logo-img {
  display: block;
  height: 38px;
  width: auto;
}

/* Versioni chiara/scura del logo: nel menu (sempre bianco) il logo originale a colori; il footer delle pagine con
   tema scuro usa la versione bianca */
.only-dark {
  display: none;
}

body[data-theme="dark"] .footer .only-light {
  display: none;
}

body[data-theme="dark"] .footer .only-dark {
  display: block;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(16px, 2.2vw, 30px);
  list-style: none;
  margin: 0;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: -0.01em;
  color: inherit;
  opacity: 0.8;
  white-space: nowrap;
  transition: opacity var(--t);
}


.nav-links a.is-active {
  opacity: 1;
  font-weight: 600;
}

/* ---------- Sottomenu (Motorista Navale → Yacht, Navi e Rimorchiatori) ---------- */
.nav-links li.has-sub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-sub-toggle {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
}

.nav-sub-toggle .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
  transition: transform var(--t);
}

.nav-sub-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.nav-sub {
  position: absolute;
  top: calc(100% + 16px);
  left: -12px;
  z-index: 1100;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}

/* ponte invisibile fra la voce e la tendina: il mouse ci passa senza che si chiuda */
.nav-sub::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
}

.has-sub.is-open .nav-sub,
.has-sub:focus-within .nav-sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.has-sub.is-open .nav-sub-toggle .icon {
  transform: rotate(180deg);
}

.nav-links .nav-sub a {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  opacity: 0.85;
}

.nav-links .nav-sub a.is-active {
  opacity: 1;
  background: var(--bg-alt);
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .has-sub:hover .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .has-sub:hover .nav-sub-toggle .icon {
    transform: rotate(180deg);
  }

  .nav-links .nav-sub a:hover {
    background: var(--bg-alt);
    opacity: 1;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-cart {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: inherit;
}

.nav-cart .icon {
  width: 20px;
  height: 20px;
}


.account-dot {
  position: absolute;
  top: 9px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

/* ---------- Selettore lingua (bandierine) ---------- */
.lang-menu {
  position: relative;
}

.lang-btn {
  width: auto;
  padding: 0 10px 0 8px;
  gap: 6px;
  grid-auto-flow: column;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.flag {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  flex: none;
}

.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1100;
  min-width: 216px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
  max-height: calc(100vh - 88px);   /* lingue + valute: sui telefoni bassi scorre */
  overflow-y: auto;
}

.lang-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.lang-list button.is-current {
  font-weight: 600;
  background: var(--bg-alt);
}

.lang-list button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .lang-list button:hover {
    background: var(--bg-alt);
  }
}

/* valute (solo visualizzazione: il pagamento resta in euro) */
.lang-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--line-strong);
}

.lang-head {
  padding: 4px 10px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.cur-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}

.lang-list .cur-grid button {
  justify-content: center;
  gap: 4px;
  padding: 7px 4px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cur-sym {
  min-width: 1em;
  color: var(--text-3);
  text-align: center;
}

.cur-note {
  color: var(--text-3);
}

/* telefoni: il menu lingua/valuta diventa un pannello largo quanto lo schermo (ancorato al pulsante sborderebbe) */
@media (max-width: 600px) {
  .lang-list {
    position: fixed;
    top: 52px;
    left: 16px;
    right: 16px;
    min-width: 0;
  }

  .cur-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Menu del profilo (icona utente nell'header) ---------- */
.acc-menu {
  position: relative;
}

.acc-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1100;
  width: 248px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.acc-menu-head {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.acc-menu-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.acc-menu-mail {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

.acc-menu-panel a,
.acc-menu-panel button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.acc-menu-panel .icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--text-2);
}

.acc-menu-panel .acc-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

.acc-menu-panel a:focus-visible,
.acc-menu-panel button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .acc-menu-panel a:hover,
  .acc-menu-panel button:hover {
    background: var(--bg-alt);
  }
}

@media (max-width: 480px) {
  .lang-code {
    display: none;
  }
  .lang-btn {
    padding: 0 8px;
  }
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  transform: scale(1);
  transition: transform 0.25s var(--ease-out);
}

.cart-badge.is-empty {
  display: none;
}

.cart-badge.bump {
  transform: scale(1.35);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: inherit;
}

.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t) var(--ease), top var(--t) var(--ease), opacity var(--t);
}

.nav-toggle span:nth-child(1) {
  top: 16px;
}

.nav-toggle span:nth-child(2) {
  top: 23px;
}

body.nav-open .nav-toggle span:nth-child(1) {
  top: 19.5px;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  top: 19.5px;
  transform: rotate(-45deg);
}

/* Sotto i 1024px il menu diventa a pannello: sette voci (e le etichette più lunghe in inglese e tedesco)
   non stanno su una riga insieme a logo, lingua, account e carrello. */
@media (max-width: 1023px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    flex-direction: column;
    gap: 0;
    padding: 24px var(--gutter) 40px;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--t), transform var(--t), visibility var(--t);
    overflow: auto;
  }

  body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links li {
    border-bottom: 1px solid var(--line);
  }

  .nav-links a {
    display: block;
    padding: 18px 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 1;
  }

  .nav-toggle {
    display: block;
  }

  /* nel pannello il sottomenu è sempre aperto, rientrato sotto la voce */
  .nav-links li.has-sub {
    display: block;
  }

  .nav-sub-toggle {
    display: none;
  }

  .nav-sub,
  .has-sub.is-open .nav-sub,
  .has-sub:focus-within .nav-sub {
    position: static;
    min-width: 0;
    margin: -8px 0 0;
    padding: 0 0 14px 18px;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-sub::before {
    display: none;
  }

  .nav-links .nav-sub li {
    border-bottom: 0;
  }

  .nav-links .nav-sub a {
    padding: 8px 0;
    border-radius: 0;
    font-size: 18px;
    font-weight: 500;
    opacity: 0.75;
  }

  .nav-links .nav-sub a.is-active {
    background: none;
    opacity: 1;
    font-weight: 600;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--nav-h));
  padding: calc(var(--nav-h) + clamp(64px, 10vw, 128px)) 0 clamp(48px, 7vw, 96px);
  text-align: center;
  overflow: hidden;
}

.hero-dark {
  background: var(--bg-dark);
  color: var(--text-inv);
}

.hero-dark .subhead,
.hero-dark .lead {
  color: var(--text-inv-2);
}

.hero-dark::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30%;
  width: 120%;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(55% 60% at 50% 100%, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.hero-light {
  background: var(--bg-alt);
}

/* Onda al piede di ogni hero: raccorda la hero con la sezione successiva (colore in --wave-to) */
.hero {
  --wave-to: var(--bg);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(22px, 3.2vw, 44px);
  background: var(--wave-to);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'><path d='M0 26C180 46 360 6 540 18S900 46 1080 30s240-26 360-6V48H0z'/></svg>") center bottom / 100% 100% no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'><path d='M0 26C180 46 360 6 540 18S900 46 1080 30s240-26 360-6V48H0z'/></svg>") center bottom / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 1;
}

/* l'onda prende da sola il colore della sezione che segue (le pagine alternano hero chiara, sezione blu, ...) */
.hero:has(+ .bg-dark) {
  --wave-to: var(--bg-dark);
}

.hero:has(+ .bg-alt) {
  --wave-to: var(--bg-alt);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero-media {
  position: relative;
  z-index: 1;
  margin: clamp(32px, 6vw, 72px) auto 0;
  max-width: 900px;
  padding-inline: var(--gutter);
}

.hero-media svg,
.hero-media img {
  width: 100%;
  height: auto;
}

.hero-split {
  text-align: left;
}

.hero-split .hero-content {
  max-width: none;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-inline: var(--gutter);
  max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.hero-split .hero-actions {
  justify-content: flex-start;
}

.hero-compact {
  padding-bottom: clamp(40px, 5vw, 64px);
}

/* ---------- Tiles (2-up product grid) ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 12px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 560px;
  padding: clamp(48px, 6vw, 72px) 32px 0;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  text-align: center;
  overflow: hidden;
}

.tile-dark {
  background: var(--bg-dark);
  color: var(--text-inv);
}

.tile-dark .tile-sub {
  color: var(--text-inv-2);
}

.tile-wide {
  grid-column: 1 / -1;
  min-height: 640px;
}

.tile-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 8px;
}

.tile-dark .tile-eyebrow {
  color: var(--text-inv-2);
}

.tile-title {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 700;
}

.tile-sub {
  margin-top: 10px;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.25;
  color: var(--text-2);
  max-width: 520px;
}

.tile-actions {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.tile-actions .link-arrow {
  font-size: clamp(17px, 1.8vw, 21px);
}

.tile-media {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 32px;
}

.tile-media > * {
  width: min(100%, 340px);
}

.tile-wide .tile-media > * {
  width: min(100%, 420px);
}

.tile-media svg,
.tile-media img {
  width: 100%;
  height: auto;
}

/* Slot illustrazioni: <div data-art="turbo" data-tint="orange"></div> */
[data-art] svg {
  width: 100%;
  height: auto;
}

/* ---------- Cards, features, stats ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}


.card-flat {
  box-shadow: none;
  border: 1px solid var(--line);
}


.card-dark {
  background: var(--bg-dark-2);
  color: var(--text-inv);
}

.card-dark .text-muted {
  color: var(--text-inv-2);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px) 32px;
}

.features-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.features-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-center {
  align-items: center;
  text-align: center;
}

.feature-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  display: grid;
  place-items: center;
}

.feature-icon .icon {
  width: 100%;
  height: 100%;
  stroke-width: 1.4;
}

.feature-icon.boxed {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  padding: 12px;
}

.bg-dark .feature-icon,
.bg-dark-2 .feature-icon {
  color: #2997ff;
}

.bg-dark .feature-icon.boxed,
.bg-dark-2 .feature-icon.boxed {
  background: rgba(41, 151, 255, 0.14);
}

.feature h3,
.feature h4 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.feature p {
  color: var(--text-2);
  font-size: 17px;
}

.bg-dark .feature p,
.bg-dark-2 .feature p {
  color: var(--text-inv-2);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-value {
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(90deg, var(--accent), #1aa3b5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-dark .stat-value,
.bg-dark-2 .stat-value {
  background: linear-gradient(90deg, #2997ff, #7ee0ff);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-label {
  margin-top: 10px;
  font-size: 17px;
  color: var(--text-2);
}

.bg-dark .stat-label,
.bg-dark-2 .stat-label {
  color: var(--text-inv-2);
}

/* ---------- Brand marks ---------- */
.brand-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 56px;
}

.brand-mark {
  font-weight: 800;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.03em;
  color: var(--text-3);
  text-transform: uppercase;
  transition: color var(--t);
  white-space: nowrap;
}


.bg-dark .brand-mark,
.bg-dark-2 .brand-mark {
  color: var(--text-inv-2);
}


.brand-mark small {
  font-size: 0.55em;
  font-weight: 600;
  letter-spacing: 0.1em;
  vertical-align: middle;
  margin-left: 4px;
}

/* ---------- Steps / process ---------- */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 24px;
}

.step {
  position: relative;
  padding-top: 56px;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.bg-dark .step::before,
.bg-dark-2 .step::before {
  color: #2997ff;
}

.step h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-2);
}

.bg-dark .step p,
.bg-dark-2 .step p {
  color: var(--text-inv-2);
}

/* ---------- Accordion ---------- */
/* elenco di domande frequenti delle pagine servizio */
.srv-faq {
  max-width: 760px;
  margin-inline: auto;
}

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

.acc:last-of-type {
  border-bottom: 1px solid var(--line);
}

.acc summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
}

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

.acc summary::after {
  content: "+";
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: var(--text-2);
  transition: transform var(--t) var(--ease);
}

.acc[open] summary::after {
  transform: rotate(45deg);
}

.acc-body {
  padding-bottom: 22px;
  color: var(--text-2);
}

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  color: inherit;
}


.product-media {
  --art-bg: var(--bg-alt);
  aspect-ratio: 1 / 1;
  background: var(--art-bg);
  display: grid;
  place-items: center;
  padding: 10%;
}

.product-media svg,
.product-media img {
  width: 100%;
  height: 100%;
  transition: transform 0.5s var(--ease-out);
}

.product-media img,
.art img,
.drawer-item .thumb img {
  object-fit: contain;
  mix-blend-mode: multiply; /* le foto con fondo bianco si fondono con il grigio chiaro */
}

.art-dark img {
  mix-blend-mode: normal;
}


/* Skeleton durante il caricamento del catalogo remoto */
.product-card.skeleton {
  pointer-events: none;
  box-shadow: none;
  border: 1px solid var(--line);
}

.product-card.skeleton .product-media,
.sk {
  background: linear-gradient(90deg, #f0f0f3 25%, #e4e4e9 50%, #f0f0f3 75%);
  background-size: 200% 100%;
  animation: isb-shimmer 1.4s ease-in-out infinite;
}

.sk {
  display: block;
  height: 12px;
  border-radius: 6px;
}

.sk-brand { width: 40%; }
.sk-name { width: 85%; height: 16px; margin-top: 6px; }
.sk-price { width: 30%; margin-top: 18px; }

@keyframes isb-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.catalog-source {
  font-size: 12px;
  color: var(--text-3);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 22px;
  flex: 1;
}

.product-brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.product-name {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.product-name a {
  color: inherit;
}

.product-desc {
  font-size: 14px;
  color: var(--text-2);
}

.product-price {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.price {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.price-old {
  font-size: 14px;
  color: var(--text-3);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

.price-note {
  font-size: 12px;
  color: var(--text-3);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: var(--shadow-sm);
}

.product-card .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
}

.badge-dark {
  background: var(--text);
  color: #fff;
}

.badge-success {
  background: #e6f6ec;
  color: var(--success);
}

.badge-warn {
  background: #fff3e0;
  color: var(--warning);
}

.badge-danger {
  background: #fde8e8;
  color: var(--danger);
}

.stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--success);
}

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

.stock.low {
  color: var(--warning);
}

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

/* ---------- Category cards (shop e pagine di presentazione) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: inherit;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}


.bg-alt .cat-card {
  background: #fff;
}

.cat-media {
  --art-bg: transparent;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 10% 20% 4%;
}

.cat-media svg,
.cat-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
}

.cat-media img {
  mix-blend-mode: multiply;
}


.cat-info {
  padding: 18px 22px 22px;
}

.cat-info h3 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.cat-info p {
  margin-top: 4px;
  font-size: 15px;
  color: var(--text-2);
}

.cat-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 15px;
  color: var(--accent);
}

/* Variante compatta (sottocategorie): illustrazione piccola a sinistra, testo a destra */
.cat-card-compact {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding-right: 12px;
}

.cat-card-compact .cat-media {
  aspect-ratio: 1 / 1;
  width: 84px;
  flex-shrink: 0;
  padding: 14px;
}

.cat-card-compact .cat-info {
  padding: 14px 12px 14px 4px;
  min-width: 0;
}

.cat-card-compact .cat-info h3 {
  font-size: 16px;
}

.cat-card-compact .cat-count {
  margin-top: 4px;
  font-size: 13px;
}

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .cat-media {
    padding: 8% 16% 2%;
  }

  .cat-info {
    padding: 12px 14px 16px;
  }

  .cat-info h3 {
    font-size: 17px;
  }

  .cat-info p {
    display: none;
  }

  .cat-count {
    margin-top: 8px;
    font-size: 14px;
  }

  .cat-card-compact {
    flex-direction: column;
    align-items: stretch;
    padding-right: 0;
  }

  .cat-card-compact .cat-media {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .cat-card-compact .cat-info {
    padding: 12px 14px 16px;
  }
}

/* ---------- Chips / filters ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  transition: background var(--t), color var(--t), border-color var(--t);
}


.chip.is-active {
  background: var(--text);
  color: #fff;
}

.chip-outline {
  background: transparent;
  border-color: var(--line-strong);
}

/* ---------- Forms ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.field-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.input {
  width: 100%;
  padding: 13px 16px;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 17px;
  transition: border-color var(--t), box-shadow var(--t);
  appearance: none;
  -webkit-appearance: none;
}

textarea.input {
  min-height: 140px;
  resize: vertical;
}

select.input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
}

.input::placeholder {
  color: var(--text-3);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(10, 102, 214, 0.18);
}

.input:disabled {
  background: var(--bg-alt);
  color: var(--text-3);
}

.field-hint {
  font-size: 13px;
  color: var(--text-3);
}

.field-error {
  display: none;
  font-size: 13px;
  color: var(--danger);
}

.field.is-invalid .field-error {
  display: block;
}

.field.is-invalid .input {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(227, 0, 0, 0.12);
}

.checkbox,
.radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-2);
  cursor: pointer;
}

.checkbox input,
.radio input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
}


.radio-card input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.radio-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.radio-card strong {
  display: block;
  font-weight: 600;
  font-size: 17px;
}

.radio-card span {
  display: block;
  font-size: 14px;
  color: var(--text-2);
}

.form-success {
  display: none;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: #e6f6ec;
  color: #0b5c2f;
  text-align: center;
}

.form-success.is-visible {
  display: block;
}

.notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
}

.notice-warn {
  background: #fff3e0;
  color: var(--warning);
}

.notice-success {
  background: #e6f6ec;
  color: var(--success);
}

.notice-danger {
  background: #fde8e8;
  color: var(--danger);
}

/* ---------- Quantity control ---------- */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: #fff;
}

.qty button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--text);
  transition: background var(--t);
}


.qty button:disabled {
  color: var(--text-3);
  cursor: not-allowed;
  background: transparent;
}

.qty input {
  width: 44px;
  height: 40px;
  border: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 6px;
}

/* ---------- Tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  vertical-align: top;
}

.table th {
  color: var(--text-2);
  font-weight: 500;
  width: 38%;
}

.table td {
  color: var(--text);
}

.table-right td:last-child,
.table-right th:last-child {
  text-align: right;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-2);
}

.summary-row.total {
  padding-top: 16px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 13px;
  color: var(--text-3);
}

.breadcrumb a {
  color: var(--text-2);
}

.breadcrumb li + li::before {
  content: "\203A";
  margin-right: 8px;
  color: var(--text-3);
}

/* ---------- Media / art helpers ---------- */
.art {
  --art-bg: var(--bg-alt);
  display: grid;
  place-items: center;
  background: var(--art-bg);
  border-radius: var(--radius-lg);
  padding: 8%;
}

.art svg {
  width: 100%;
  height: auto;
}

.art-dark {
  --art-bg: var(--bg-dark-2);
}

.frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
}

.glow {
  position: relative;
}

.glow::before {
  content: "";
  position: absolute;
  inset: 10% 10% 0;
  background: radial-gradient(50% 50% at 50% 60%, var(--accent-glow), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.glow > * {
  position: relative;
  z-index: 1;
}

/* ---------- Divider ---------- */
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.bg-dark .divider,
.bg-dark-2 .divider {
  border-color: var(--line-inv);
}

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 100%);
  background: #fff;
  color: var(--text);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-out);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
}

.drawer.is-open {
  transform: none;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-header .drawer-title {
  font-size: 21px;
  font-weight: 600;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain; /* a fine lista non scorre la pagina dietro */
  padding: 8px 24px;
}

.drawer-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--text-2);
}

.drawer-empty .icon {
  width: 48px;
  height: 48px;
  color: var(--text-3);
  margin: 0 auto 12px;
}

.drawer-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-item .thumb {
  --art-bg: var(--bg-alt);
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--art-bg);
  padding: 8px;
}

.drawer-item .thumb svg {
  width: 100%;
  height: 100%;
}

.drawer-item .name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.drawer-item .meta {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}

.drawer-item .line-price {
  font-size: 15px;
  font-weight: 600;
  text-align: right;
}

.drawer-item .remove {
  display: block;
  margin-top: 6px;
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 13px;
  padding: 0;
}

.drawer-footer {
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-footer .summary-row {
  padding: 0;
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
}

.drawer-footer .hint {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 12px 20px;
  border-radius: var(--radius-pill);
  background: rgba(11, 42, 68, 0.94);
  color: #fff;
  font-size: 15px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity var(--t), transform 0.4s var(--ease-out);
  pointer-events: none;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast a,
.toast button {
  color: #2997ff;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  font-size: 15px;
}

/* ---------- Cookie banner ---------- */
.cookie {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1150;
  width: min(400px, calc(100% - 40px));
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  transform: translateY(0);
  transition: transform 0.4s var(--ease-out), opacity var(--t);
}

.cookie.is-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.cookie p {
  color: var(--text-2);
}

/* titolo del banner come paragrafo: non entra nella struttura dei titoli della pagina */
.cookie .cookie-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: inherit;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.cookie-actions .btn {
  flex: 1;
}

/* ---------- WhatsApp FAB ---------- */
.wa-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  border-radius: var(--radius-pill);
  background: rgba(11, 42, 68, 0.94);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform var(--t) var(--ease), background var(--t);
}


.wa-fab .icon {
  width: 20px;
  height: 20px;
  color: #25d366;
  stroke-width: 0;
  fill: currentColor;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  padding: 40px 0 28px;
}

body[data-theme="dark"] .footer {
  background: var(--bg-dark-2);
  color: var(--text-inv-2);
}

.footer-note {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-3);
}

body[data-theme="dark"] .footer-note {
  border-bottom-color: var(--line-inv);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-strong);
}

body[data-theme="dark"] .footer-cols {
  border-bottom-color: var(--line-inv);
}

.footer h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

body[data-theme="dark"] .footer h5 {
  color: var(--text-inv);
}

.footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer a {
  color: #424245;
}

/* funzione di recesso: in evidenza, come chiede la legge */
.footer a.footer-withdraw {
  color: var(--accent);
  font-weight: 600;
}

.footer a.footer-btn,
body[data-theme="dark"] .footer a.footer-btn {
  color: #fff;
  margin-bottom: 6px;
}

body[data-theme="dark"] .footer a {
  color: var(--text-inv-2);
}


.footer address {
  font-style: normal;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
}

.footer-legal ul {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* ---------- Reveal animations ----------
   Gli elementi partono nascosti solo se JavaScript è attivo (classe "js" messa da i18n.js nel <head>):
   senza JS, o se uno script non parte, il contenuto resta visibile. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.js [data-reveal="fade"] {
  transform: none;
}

.js [data-reveal="scale"] {
  transform: scale(0.96);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Prima schermata (hero): entra con un'animazione CSS che parte subito, senza aspettare gli script
   (main.js gira dopo DOMContentLoaded, che attende anche i moduli 3D): il titolo è l'elemento LCP. */
.js .hero [data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
  animation: isb-reveal-up 0.8s var(--ease-out) both;
  animation-delay: var(--delay, 0s);
}
.js .hero [data-reveal="fade"] { animation-name: isb-reveal-fade; }
.js .hero [data-reveal="scale"] { animation-name: isb-reveal-scale; }
@keyframes isb-reveal-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes isb-reveal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes isb-reveal-scale { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* ---------- Illustrazioni 3D (scene3d.js): il canvas copre l'SVG di riserva ---------- */
.scene3d {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  touch-action: pan-y;
}
/* L'SVG di riserva resta nascosto: compare solo se il 3D non può partire (is-fallback) */
.scene3d > [data-art] {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
.scene3d.is-fallback > [data-art] { opacity: 1; }
.scene3d > [data-art] svg { width: 100%; height: 100%; }
.scene3d > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  background: transparent;
  transition: opacity 0.9s var(--ease);
}
.scene3d > [data-art] svg { filter: none; }
.scene3d.is-3d > canvas { opacity: 1; }
.scene3d.is-3d > [data-art] { opacity: 0; pointer-events: none; }
.tile-media .scene3d { max-width: 380px; }
.hero-media .scene3d { max-width: 520px; }
/* Nessun riquadro dietro una scena 3D: l'oggetto vive nello spazio della pagina, non dentro una cornice */
.art:has(> .scene3d) { background: transparent; padding: 0; border-radius: 0; }
.scene3d[data-3d="engine"] { max-width: 620px; aspect-ratio: 4 / 3; }
/* Chiave inglese con flangia: composizione larga, riquadro 16:10 */
.scene3d[data-3d="wrench"] { max-width: 640px; aspect-ratio: 16 / 10; }
.srv-hero-art:has(> .scene3d[data-3d="wrench"]) { max-width: 640px; }
/* Furgone officina mobile (hero di pronto intervento) e mappa del Mediterraneo: riquadri larghi */
.scene3d[data-3d="van"] { max-width: 700px; aspect-ratio: 16 / 10; }
.hero-media:has(> .scene3d[data-3d="van"]) { max-width: 700px; }
.scene3d[data-3d="map"] { max-width: 560px; aspect-ratio: 4 / 3; }
/* Figura in piedi (motorista): riquadro verticale, la persona occupa l'altezza */
.scene3d[data-3d="worker"], .scene3d[data-3d="figure"] { max-width: 460px; aspect-ratio: 5 / 6; }
/* Nelle tessere la scena sta tutta dentro, con aria sotto: niente oggetti tagliati dal bordo arrotondato */
.tile .scene3d { width: min(90%, 420px); aspect-ratio: 4 / 3; margin: 16px auto 32px; }
.srv-hero-art .scene3d, .hero-media .scene3d { width: 100%; }
.glow:has(> .scene3d)::before { display: none; }

/* ---------- Controlli: comportamento nativo al tocco ---------- */
button,
.btn,
.chip,
.nav-toggle,
.nav-cart,
.btn-icon,
.qty button {
  touch-action: manipulation; /* nessuna attesa del doppio tap: il click parte subito */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none; /* niente selezione del testo o menu al tocco prolungato sui controlli */
}

/* ---------- Titoli e paragrafi: a capo bilanciato, niente parola orfana ---------- */
h1, h2, h3, .display, .headline, .tile-title { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* ---------- Link "Vai al contenuto" (primo elemento raggiungibile da tastiera) ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus {
  transform: none;
  text-decoration: none;
}

/* ---------- Contrasto elevato (forced-colors): le ombre spariscono, resta un bordo ---------- */
.card,
.product-card,
.cat-card,
.drawer,
.toast {
  border: 1px solid transparent;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal],
  .js [data-reveal],
  .js .hero [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Utilities ---------- */
.hidden {
  display: none !important;
}

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mt-6 { margin-top: 64px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.mb-6 { margin-bottom: 64px; }

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 16px;
}

.w-full {
  width: 100%;
}

.list-check {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-check li {
  position: relative;
  padding-left: 32px;
  color: var(--text-2);
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300529b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 12px no-repeat;
}

.bg-dark .list-check li,
.bg-dark-2 .list-check li {
  color: var(--text-inv-2);
}

.list-check li strong {
  color: var(--text);
}

.bg-dark .list-check li strong,
.bg-dark-2 .list-check li strong {
  color: var(--text-inv);
}

.list-plain {
  list-style: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1068px) {
  .grid-4,
  .features-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 834px) {
  .grid-2,
  .grid-3,
  .features,
  .features-2,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split.reverse > :first-child {
    order: 0;
  }

  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile,
  .tile-wide {
    min-height: 480px;
  }

  .hero-split .hero-content {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero-split .hero-actions {
    justify-content: center;
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .table th {
    width: 45%;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 16px;
  }

  .grid-4,
  .features-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-info {
    padding: 14px 14px 16px;
  }

  .product-name {
    font-size: 15px;
  }

  .product-price .btn {
    display: none;
  }

  .cookie {
    left: 12px;
    bottom: 84px;
    width: calc(100% - 24px);
  }

  .wa-fab span {
    display: none;
  }

  .wa-fab {
    padding: 12px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    bottom: 84px;
  }

  .toast {
    white-space: normal;
    width: calc(100% - 32px);
    justify-content: space-between;
  }
}

/* ---------- Stati hover solo per puntatori che possono passare sopra (mouse/trackpad): sul touch non restano 'appiccicati' dopo il tap ---------- */
@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration: underline;
  }
  .btn:hover {
    background: var(--accent-hover);
    text-decoration: none;
  }
  .btn-secondary:hover {
    background: var(--accent-soft);
  }
  .btn-light:hover {
    background: #e8e8ed;
  }
  .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .bg-alt .btn-ghost:hover,
  .hero-light .btn-ghost:hover {
    background: rgba(0, 0, 0, 0.06);
  }
  .btn-dark:hover {
    background: #3a3a3c;
  }
  .btn-wa:hover {
    background: #178f46;
  }
  .link-arrow:hover::after {
    transform: translateX(3px);
  }
  .btn-icon:hover {
    background: rgba(0, 0, 0, 0.06);
  }
  .bg-dark .btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .nav-logo:hover {
    text-decoration: none;
  }
  .nav-links a:hover {
    opacity: 1;
    text-decoration: none;
  }
  .nav-account:hover {
    text-decoration: none;
    opacity: 0.8;
  }
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
  }
  .card-flat:hover {
    transform: none;
    box-shadow: none;
  }
  .brand-mark:hover {
    color: var(--text);
  }
  .bg-dark .brand-mark:hover,
  .bg-dark-2 .brand-mark:hover {
    color: #fff;
  }
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    text-decoration: none;
  }
  .product-card:hover .product-media svg,
  .product-card:hover .product-media img {
    transform: scale(1.04);
  }
  .cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    text-decoration: none;
  }
  .cat-card:hover .cat-media svg,
  .cat-card:hover .cat-media img {
    transform: scale(1.05);
  }
  .chip:hover {
    background: #e8e8ed;
    text-decoration: none;
  }
  .radio-card:hover {
    border-color: #8a9bab;
  }
  .qty button:hover {
    background: var(--bg-alt);
  }
  .wa-fab:hover {
    transform: translateY(-2px);
    background: var(--bg-dark);
    text-decoration: none;
  }
  .footer a:hover {
    text-decoration: underline;
  }
}
