/* =========================================================
   M.G.Car - Frontoffice
   Palette ispirata al logo: rosso corsa, argento, nero
   ========================================================= */
:root {
  --red: #c41a1c;
  --red-600: #a91517;
  --red-700: #8c1012;
  --red-50: #fdf0f0;
  --ink: #0d0d0f;
  --ink-2: #16161a;
  --ink-3: #222227;
  --silver: #c8c8cc;
  --silver-2: #e6e6e9;
  --bg: #f4f4f6;
  --card: #ffffff;
  --text: #1b1b1f;
  --muted: #6c6c75;
  --line: #e4e4e8;
  --green: #16a34a;
  --amber: #d97706;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 16, 20, .05), 0 8px 24px rgba(16, 16, 20, .06);
  --shadow-lg: 0 20px 50px rgba(16, 16, 20, .16);
  --container: 1240px;
  --head-h: 76px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Saira', 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: .95rem; cursor: pointer; transition: .2s ease; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .04em; font-family: var(--display);
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(196, 26, 28, .3); }
.btn-primary:hover { background: var(--red-600); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-outline { border-color: currentColor; background: transparent; }
.btn-outline:hover { background: rgba(255, 255, 255, .08); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--silver-2); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1fb457; }
.btn-block { width: 100%; }
.btn-sm { padding: .55em 1em; font-size: .82rem; }
.btn-lg { padding: 1.05em 1.9em; font-size: 1rem; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after {
  content: ''; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header ---------- */
.announcement { background: var(--red); color: #fff; text-align: center; font-size: .88rem; padding: .5em 1em; font-weight: 600; }
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(13, 13, 15, .92);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06); color: #fff;
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: var(--head-h); }
.brand img { height: 38px; width: auto; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  padding: .5em .95em; border-radius: 999px; font-weight: 600; font-size: .95rem; color: rgba(255, 255, 255, .78);
  transition: .2s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav a.active { color: #fff; background: rgba(196, 26, 28, .9); }
.head-actions { display: flex; align-items: center; gap: 10px; }
.head-phone { display: flex; align-items: center; gap: .5em; font-weight: 700; font-family: var(--display); font-size: 1.05rem; }
.head-phone svg { width: 20px; height: 20px; color: var(--red); }
.burger { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; margin-left: auto; }
.burger svg { width: 28px; height: 28px; }

@media (max-width: 980px) {
  .nav {
    position: fixed; inset: var(--head-h) 0 auto 0; background: var(--ink); flex-direction: column;
    padding: 16px 20px 24px; gap: 4px; transform: translateY(-120%); transition: transform .3s ease; z-index: -1;
    box-shadow: var(--shadow-lg);
  }
  .nav.open { transform: none; }
  .nav a { padding: .9em 1em; font-size: 1.05rem; }
  .burger { display: block; }
  .head-actions .head-phone span { display: none; }
  .head-actions { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden; background: var(--ink);
  padding: clamp(60px, 10vw, 130px) 0 clamp(120px, 12vw, 170px);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(1000px 500px at 85% 20%, rgba(196, 26, 28, .55), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(196, 26, 28, .25), transparent 60%),
    linear-gradient(135deg, #0d0d0f 0%, #1a0b0c 100%);
}
.hero::after {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(255, 255, 255, .025) 60px 61px);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: saturate(.9); }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 13, 15, .95) 0%, rgba(13, 13, 15, .55) 60%, rgba(13, 13, 15, .25) 100%); }
.hero .container { position: relative; z-index: 2; }
.hero-mark { position: absolute; right: -4%; bottom: 8%; width: min(62vw, 820px); opacity: .07; z-index: 1; pointer-events: none; }
.kicker {
  display: inline-flex; align-items: center; gap: .6em; text-transform: uppercase; letter-spacing: .18em;
  font-size: .78rem; font-weight: 700; color: var(--silver);
}
.kicker::before { content: ''; width: 34px; height: 3px; background: var(--red); border-radius: 3px; }
.hero h1 { max-width: 15ch; margin: .35em 0 .35em; font-style: italic; }
.hero h1 em { color: var(--red); font-style: italic; }
.hero p.lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: rgba(255, 255, 255, .78); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Ricerca hero ---------- */
.search-panel {
  position: relative; z-index: 5; margin-top: -90px; background: #fff; border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 10px;
}
.search-tabs { display: flex; gap: 6px; padding: 6px 6px 0; }
.search-tab {
  border: 0; background: transparent; padding: .7em 1.2em; border-radius: 12px 12px 0 0; font-weight: 700;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; color: var(--muted);
  border-bottom: 3px solid transparent;
}
.search-tab.active { color: var(--red); border-bottom-color: var(--red); }
.search-form { display: grid; gap: 12px; padding: 16px; align-items: end; }
.search-form.sale { grid-template-columns: repeat(4, 1fr) auto; }
.search-form.rent { grid-template-columns: 1.3fr 1fr 1.3fr 1fr auto; }
@media (max-width: 900px) {
  .search-form.sale, .search-form.rent { grid-template-columns: 1fr 1fr; }
  .search-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .search-form.sale, .search-form.rent { grid-template-columns: 1fr; } }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field > label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius-sm);
  padding: .78em .9em; font-size: .98rem; transition: border-color .2s, box-shadow .2s; min-height: 48px;
}
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(196, 26, 28, .12);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; gap: .7em; align-items: flex-start; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.check a { color: var(--red); text-decoration: underline; }
.form-msg { border-radius: var(--radius-sm); padding: .9em 1.1em; font-size: .95rem; margin-top: 12px; }
.form-msg.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.form-msg.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.form-msg ul { margin: 0; padding-left: 1.1em; }
.hp { position: absolute; left: -5000px; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-dark { background: var(--ink); color: #fff; }
.section-white { background: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 { margin: .2em 0 0; }
.section-head p { margin: .4em 0 0; color: var(--muted); max-width: 60ch; }
.section-dark .section-head p { color: rgba(255, 255, 255, .65); }
.link-arrow { font-weight: 700; color: var(--red); display: inline-flex; align-items: center; gap: .4em; font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.link-arrow:hover { gap: .7em; }
.link-arrow svg { width: 18px; height: 18px; transition: .2s; }

.page-head { background: var(--ink); color: #fff; padding: 54px 0 44px; position: relative; overflow: hidden; }
.page-head::before { content: ''; position: absolute; inset: 0; background: radial-gradient(700px 300px at 90% 0%, rgba(196, 26, 28, .5), transparent 70%); }
.page-head .container { position: relative; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 3rem); margin: .3em 0 .2em; font-style: italic; }
.page-head p { color: rgba(255, 255, 255, .7); margin: 0; }
.crumbs { font-size: .85rem; color: rgba(255, 255, 255, .55); display: flex; gap: .5em; flex-wrap: wrap; }
.crumbs a:hover { color: #fff; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 30px; }
.stat { background: #fff; padding: 22px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 2rem; font-weight: 800; color: var(--red); line-height: 1.1; font-style: italic; }
.stat span { font-size: .85rem; color: var(--muted); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }

/* ---------- Card veicolo ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.vcard {
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; position: relative;
}
.vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.vcard-media { position: relative; aspect-ratio: 4 / 3; background: #1b1b1f; overflow: hidden; }
.vcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.vcard:hover .vcard-media img { transform: scale(1.05); }
.vcard-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; gap: .35em; padding: .3em .7em; border-radius: 999px; font-size: .72rem;
  font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: rgba(13, 13, 15, .8); color: #fff;
  backdrop-filter: blur(6px);
}
.badge-red { background: var(--red); }
.badge-amber { background: var(--amber); }
.badge-green { background: var(--green); }
.badge-silver { background: var(--silver-2); color: var(--ink); }
.vcard-photos { position: absolute; bottom: 10px; right: 10px; z-index: 2; }
.vcard-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.vcard-title { font-family: var(--display); font-size: 1.25rem; font-weight: 800; margin: 0; line-height: 1.2; }
.vcard-version { color: var(--muted); font-size: .9rem; margin: 2px 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.spec { display: inline-flex; align-items: center; gap: .4em; font-size: .8rem; background: var(--bg); padding: .35em .7em; border-radius: 8px; color: #44444c; font-weight: 600; }
.spec svg { width: 15px; height: 15px; color: var(--red); }
.vcard-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.price { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--ink); line-height: 1; font-style: italic; }
.price small { font-size: .55em; font-weight: 600; color: var(--muted); font-style: normal; }
.price-old { text-decoration: line-through; color: var(--muted); font-size: .9rem; font-weight: 600; }
.price-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.vcard .stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.vcard.is-sold .vcard-media img { filter: grayscale(1); opacity: .7; }
.vcard .quote { background: var(--red-50); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: .9rem; }
.vcard .quote.off { background: #f3f3f5; color: var(--muted); }
.vcard .quote b { color: var(--red); font-size: 1.1rem; font-family: var(--display); }

.empty {
  background: #fff; border-radius: var(--radius); padding: 50px 24px; text-align: center; color: var(--muted);
  border: 2px dashed var(--line);
}
.empty svg { width: 54px; height: 54px; color: var(--silver); margin: 0 auto 12px; }
.empty h3 { color: var(--text); }

/* ---------- Layout elenco con filtri ---------- */
.list-layout { display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start; }
.filters { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 14px; }
.filters h3 { font-size: 1.1rem; margin: 0; display: flex; justify-content: space-between; align-items: center; }
.filters h3 a { font-size: .8rem; color: var(--red); font-family: var(--font); font-weight: 600; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .count { font-weight: 700; }
.toolbar select { min-height: 42px; border-radius: 10px; border: 1.5px solid var(--line); padding: 0 .8em; background: #fff; }
.filters-toggle { display: none; }
@media (max-width: 960px) {
  .list-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: grid; }
  .filters-toggle { display: inline-flex; }
}
.grid-loading { opacity: .45; pointer-events: none; transition: opacity .2s; }

/* ---------- Dettaglio veicolo ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; padding: 30px 0 60px; }
@media (max-width: 1020px) { .detail { grid-template-columns: 1fr; } }
.gallery { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-main { position: relative; aspect-ratio: 16 / 10.5; background: #111; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow); z-index: 2;
}
.gallery-nav svg { width: 22px; height: 22px; }
.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }
.gallery-count { position: absolute; bottom: 14px; right: 14px; z-index: 2; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scrollbar-width: thin; }
.thumbs button { flex: 0 0 96px; aspect-ratio: 4 / 3; border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; cursor: pointer; opacity: .65; background: #111; }
.thumbs button.active { border-color: var(--red); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-top: 24px; }
.panel h2 { font-size: 1.45rem; margin-bottom: 18px; }
.panel h2::after { content: ''; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--red); margin-top: 10px; }
.spec-table { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 30px; }
.spec-table div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec-table dt { color: var(--muted); }
.spec-table dd { margin: 0; font-weight: 700; text-align: right; }
@media (max-width: 600px) { .spec-table { grid-template-columns: 1fr; } }
.key-specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 24px; }
.key-spec { background: #fff; border-radius: 12px; padding: 16px; box-shadow: var(--shadow); text-align: center; }
.key-spec svg { width: 26px; height: 26px; color: var(--red); margin: 0 auto 6px; }
.key-spec b { display: block; font-family: var(--display); font-size: 1.05rem; }
.key-spec span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
@media (max-width: 600px) { .key-specs { grid-template-columns: 1fr 1fr; } }
.features { columns: 2; column-gap: 30px; padding: 0; margin: 0; list-style: none; }
.features li { break-inside: avoid; padding: 7px 0 7px 28px; position: relative; font-size: .95rem; }
.features li::before {
  content: ''; position: absolute; left: 0; top: 11px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 10px no-repeat;
}
@media (max-width: 600px) { .features { columns: 1; } }
.prose { font-size: 1rem; color: #33333a; }
.video { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; }
.video iframe { width: 100%; height: 100%; border: 0; }

.aside { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 16px; }
.buy-box { background: var(--ink); color: #fff; border-radius: 18px; padding: 26px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.buy-box::before { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(196, 26, 28, .55), transparent 70%); }
.buy-box > * { position: relative; }
.buy-box h1 { font-size: 1.7rem; margin: .2em 0 .1em; font-style: italic; }
.buy-box .version { color: rgba(255, 255, 255, .65); font-size: .95rem; margin-bottom: 18px; }
.buy-box .price { color: #fff; font-size: 2.4rem; }
.buy-box .price-old { color: rgba(255, 255, 255, .5); }
.buy-box .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 20px; }
.buy-box .tag { font-size: .78rem; background: rgba(255, 255, 255, .1); padding: .3em .7em; border-radius: 999px; }
.buy-box .actions { display: grid; gap: 10px; }
.buy-box .note { font-size: .8rem; color: rgba(255, 255, 255, .55); margin-top: 12px; }
.contact-box { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow); display: grid; gap: 10px; font-size: .92rem; }
.contact-box .row { display: flex; gap: 10px; align-items: flex-start; }
.contact-box svg { width: 20px; height: 20px; color: var(--red); flex: none; margin-top: 2px; }
.status-ribbon { padding: .8em 1em; border-radius: 12px; font-weight: 700; text-align: center; margin-bottom: 14px; }
.status-ribbon.reserved { background: rgba(217, 119, 6, .18); color: #fbbf24; }
.status-ribbon.sold { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Appuntamenti / selettore slot ---------- */
.day-picker { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.day-btn {
  flex: 0 0 74px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 6px; text-align: center;
  cursor: pointer; transition: .15s; line-height: 1.2;
}
.day-btn small { display: block; font-size: .7rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.day-btn b { display: block; font-family: var(--display); font-size: 1.45rem; }
.day-btn.active { border-color: var(--red); background: var(--red); color: #fff; }
.day-btn.active small { color: rgba(255, 255, 255, .8); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 14px; }
.slot-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: .6em 0; cursor: pointer; font-weight: 700; }
.slot-btn:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.slot-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot-btn:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.kind-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.kind-switch label { cursor: pointer; }
.kind-switch input { position: absolute; opacity: 0; }
.kind-switch span { display: inline-block; padding: .55em 1em; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: .9rem; background: #fff; }
.kind-switch input:checked + span { background: var(--red); color: #fff; border-color: var(--red); }
.kind-switch input:focus-visible + span { outline: 3px solid rgba(196, 26, 28, .3); }

/* ---------- Prenotazione noleggio ---------- */
.booking { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.booking-head { background: var(--ink); color: #fff; padding: 22px 24px; }
.booking-head .price { color: #fff; font-size: 2.1rem; }
.booking-body { padding: 22px 24px 24px; display: grid; gap: 16px; }
.booking .dt { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.booking h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; font-family: var(--font); }
.summary { background: var(--bg); border-radius: 12px; padding: 14px 16px; font-size: .92rem; }
.summary .line { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 1.1rem; }
.summary .total span:last-child { color: var(--red); font-family: var(--display); font-size: 1.35rem; }
.summary .due { background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 12px; margin-top: 10px; display: flex; justify-content: space-between; font-weight: 700; }
.extras-list { display: grid; gap: 8px; }
.extra-item { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: .92rem; }
.extra-item:has(input:checked) { border-color: var(--red); background: var(--red-50); }
.extra-item input { width: 18px; height: 18px; accent-color: var(--red); }
.extra-item .p { margin-left: auto; font-weight: 700; white-space: nowrap; }
.steps { display: flex; gap: 6px; margin-bottom: 4px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps span.on { background: var(--red); }
.cal { user-select: none; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 700; text-transform: capitalize; }
.cal-head button { border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-size: .82rem; }
.cal-grid .dow { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; padding: 4px 0; }
.cal-grid .d { padding: 7px 0; border-radius: 8px; background: #f0fdf4; color: #166534; font-weight: 600; }
.cal-grid .d.busy { background: #fee2e2; color: #b91c1c; text-decoration: line-through; }
.cal-grid .d.past, .cal-grid .d.closed { background: transparent; color: #c4c4c8; }
.cal-grid .d.sel { background: var(--red); color: #fff; }
.cal-legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); margin-top: 8px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.cond-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cond { background: var(--bg); border-radius: 12px; padding: 14px; }
.cond b { display: block; font-family: var(--display); font-size: 1.15rem; }
.cond span { font-size: .8rem; color: var(--muted); }
@media (max-width: 600px) { .cond-list { grid-template-columns: 1fr; } }

/* ---------- Ricerca noleggio ---------- */
.rent-search { background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1.2fr .9fr 1.2fr .9fr auto; gap: 12px; align-items: end; margin-top: -40px; position: relative; z-index: 5; }
@media (max-width: 900px) { .rent-search { grid-template-columns: 1fr 1fr; } .rent-search .btn { grid-column: 1 / -1; } }
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0 18px; }
.cat-pills a { padding: .5em 1.1em; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 600; font-size: .9rem; }
.cat-pills a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Servizi / about ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service { background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .06); border-radius: var(--radius); padding: 26px; transition: .25s; }
.service:hover { border-color: rgba(196, 26, 28, .6); transform: translateY(-3px); }
.service .ico { width: 52px; height: 52px; border-radius: 14px; background: rgba(196, 26, 28, .15); color: var(--red); display: grid; place-items: center; margin-bottom: 16px; }
.service .ico svg { width: 26px; height: 26px; }
.service h3 { font-size: 1.15rem; }
.service p { color: rgba(255, 255, 255, .6); font-size: .93rem; margin: 0; }
@media (max-width: 980px) { .services { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 30px; } }
.about-visual { aspect-ratio: 5 / 4; border-radius: 22px; background: linear-gradient(135deg, var(--red) 0%, var(--red-700) 100%); display: grid; place-items: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.about-visual::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 40px, rgba(255, 255, 255, .05) 40px 41px); }
.about-visual img { width: 72%; position: relative; z-index: 1; filter: drop-shadow(0 10px 25px rgba(0, 0, 0, .3)); }
.checklist { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist svg { width: 22px; height: 22px; color: var(--red); flex: none; }

/* ---------- Contatti / mappa ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .info-cards { grid-template-columns: 1fr; } }
.info-card { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; gap: 14px; }
.info-card .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--red-50); color: var(--red); display: grid; place-items: center; flex: none; }
.info-card .ico svg { width: 22px; height: 22px; }
.info-card h4 { margin: 0 0 4px; font-size: 1rem; }
.info-card p, .info-card a { margin: 0; font-size: .93rem; color: var(--muted); }
.info-card a:hover { color: var(--red); }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 360px; background: #ddd; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.hours-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.hours-table td { padding: 8px 0; border-bottom: 1px solid rgba(127, 127, 127, .18); }
.hours-table td:last-child { text-align: right; font-weight: 600; }
.hours-table tr.today td { color: var(--red); font-weight: 800; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--red) 0%, var(--red-700) 100%); color: #fff; border-radius: 22px; padding: clamp(28px, 5vw, 54px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 50px, rgba(255, 255, 255, .05) 50px 51px); pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin: 0 0 .3em; font-style: italic; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta-band .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .7); padding: 64px 0 24px; font-size: .93rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 36px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a:hover { color: #fff; }
.site-footer .logo { height: 42px; width: auto; margin-bottom: 16px; }
.footer-contact { display: grid; gap: 10px; }
.footer-contact div { display: flex; gap: 10px; }
.footer-contact svg { width: 18px; height: 18px; color: var(--red); flex: none; margin-top: 3px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: grid; place-items: center; transition: .2s; }
.socials a:hover { background: var(--red); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 44px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: rgba(255, 255, 255, .45); }
.footer-bottom nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- WhatsApp float & toast ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 25px rgba(37, 211, 102, .45); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: #fff; z-index: 100;
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 12px; align-items: center;
  transition: transform .35s ease; font-size: .93rem; max-width: calc(100% - 32px);
}
.toast { transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform .35s ease, visibility .35s; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22, 163, 74, .25); flex: none; }
.toast button { background: var(--red); border: 0; color: #fff; border-radius: 8px; padding: .4em .8em; font-weight: 700; cursor: pointer; }
.live-flash { animation: liveflash 1.2s ease; }
@keyframes liveflash { 0% { box-shadow: 0 0 0 0 rgba(196, 26, 28, .5); } 100% { box-shadow: 0 0 0 18px rgba(196, 26, 28, 0); } }

/* ---------- Modal & lightbox ---------- */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(8, 8, 10, .7); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(4px); }
.modal-card { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 26px; position: relative; box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 12px; right: 12px; border: 0; background: var(--bg); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1.3rem; line-height: 1; }
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, .94); display: grid; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; }
.lightbox .gallery-nav { background: rgba(255, 255, 255, .15); color: #fff; }
.lightbox .lb-close { position: absolute; top: 16px; right: 16px; background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lightbox .lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .7); font-size: .9rem; }

/* ---------- Esito pagamento ---------- */
.result { max-width: 680px; margin: 50px auto; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.result-head { padding: 36px; text-align: center; color: #fff; }
.result-head.paid, .result-head.request { background: linear-gradient(135deg, #15803d, #166534); }
.result-head.processing { background: linear-gradient(135deg, #b45309, #92400e); }
.result-head.cancelled { background: linear-gradient(135deg, #3f3f46, #18181b); }
.result-head svg { width: 64px; height: 64px; margin: 0 auto 12px; }
.result-head h1 { font-size: 1.9rem; margin: 0; }
.result-body { padding: 28px 32px 32px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }

.legal { max-width: 860px; }
.legal h2 { font-size: 1.4rem; margin-top: 1.6em; }

/* Correzioni responsive: le colonne non devono mai superare la larghezza dello schermo */
body { overflow-x: clip; }
.detail > *, .contact-grid > *, .split > *, .list-layout > *, .footer-grid > * { min-width: 0; }
@media (max-width: 1020px) { .detail { grid-template-columns: minmax(0, 1fr); } .aside { position: static; } }
.form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.booking .dt { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
input, select, textarea { min-width: 0; max-width: 100%; }
.kicker { color: var(--muted); }
.hero .kicker, .section-dark .kicker, .page-head .kicker, .buy-box .kicker, .booking-head .kicker, .cta-band .kicker { color: var(--silver); }
.badge svg { width: 13px; height: 13px; }
.photo-credit { margin: 0; padding: 6px 12px 0; font-size: .72rem; color: var(--muted); text-align: right; }
.field-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; font-family: var(--font); }
p svg, .note svg, small svg { width: 1.1em; height: 1.1em; vertical-align: -.2em; display: inline-block; }
.contact-box a { color: var(--red); font-weight: 600; }
.form-msg a { text-decoration: underline; font-weight: 700; }
details summary::marker { color: var(--red); }

/* ---------- Animazioni ingresso ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
