/* =========================================================
   Marzica Motor – sito pubblico (mobile first)
   ========================================================= */
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --white: #ffffff;
  --paper: #f7f6f2;
  --ink: #0b0b0b;
  --ink-2: #171717;
  --ink-3: #2a2a2a;
  --muted: #5a5a5a;
  --muted-light: #b9b6ae;
  --line: #e5e2da;
  --line-dark: #2c2c2c;
  --gold: #c9a24a;
  --gold-hover: #b48d36;
  --gold-text: #86671c;   /* oro leggibile su bianco (contrasto AA) */
  --gold-soft: #f4ecd9;
  --ok: #1d7a46;
  --warn: #9a5b00;
  --err: #b42318;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --display: "Unbounded", "Helvetica Neue", Arial, sans-serif;
  --body: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1220px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font: 400 16px/1.6 var(--body); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--gold-text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; }
[hidden], html.js [data-hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.pre { white-space: pre-line; }
.mt { margin-top: 2.5rem; }

/* Segnaposto per dati aziendali mancanti */
.ph { display: inline; background: repeating-linear-gradient(135deg, #fff5d6 0 8px, #fdecb8 8px 16px); color: #6b4e00; border: 1px dashed #c99a1e; border-radius: 6px; padding: 1px 6px; font-size: .9em; font-weight: 600; white-space: normal; }

/* ---------- Tipografia ---------- */
.h1, .h2, .h3, .hero-title, .car-h1 { font-family: var(--display); font-stretch: 108%; letter-spacing: -.015em; line-height: 1.08; margin: 0 0 .5em; font-weight: 650; }
.h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
.h3 { font-size: 1.3rem; }
.eyebrow { font: 600 .75rem/1 var(--display); font-stretch: 120%; text-transform: uppercase; letter-spacing: .18em; color: var(--gold); margin: 0 0 1rem; }
.eyebrow-dark { color: var(--gold-text); }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0; }
.prose p { margin: 0 0 1em; }
.prose-lg { font-size: 1.1rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* ---------- Pulsanti ---------- */
.btn { --bh: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: var(--bh); padding: 0 1.25em; border-radius: 999px; border: 1.5px solid transparent; font: 650 .95rem/1 var(--body); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { --bh: 38px; font-size: .875rem; padding: 0 1em; }
.btn-lg { --bh: 54px; font-size: 1rem; padding: 0 1.6em; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-hover); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-3); color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-ghost-light { border-color: rgba(255,255,255,.5); color: var(--white); }
.btn-ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); color: var(--white); }
.btn-text { background: none; color: var(--ink); text-decoration: underline; padding: 0 .5em; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.link-arrow { display: inline-flex; gap: .4em; font-weight: 650; text-decoration: none; border-bottom: 1.5px solid var(--gold); padding-bottom: 2px; }
.link-light { color: var(--white); }
.link-light:hover { color: var(--gold); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { text-decoration: none; margin-right: auto; display: flex; align-items: center; }
.brand img { height: 40px; width: auto; }
.wordmark { font: 700 1.15rem/1 var(--display); font-stretch: 125%; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.wordmark span { color: var(--gold-text); }
.wordmark-light { color: var(--white); font-size: 1.3rem; }
.wordmark-light span { color: var(--gold); }
.nav-desktop { display: none; }
.header-cta span { display: none; }
.nav-mobile summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 10px; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; } .burger::after { top: 7px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { transform: translateY(7px) rotate(45deg); }
.nav-mobile[open] .burger::after { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile nav { position: absolute; left: 0; right: 0; top: 64px; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; display: grid; box-shadow: 0 20px 30px rgba(0,0,0,.08); }
.nav-mobile nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.nav-mobile nav a[aria-current="page"] { color: var(--gold-text); }
.nav-tel { color: var(--gold-text); }
@media (min-width: 960px) {
  .nav-mobile { display: none; }
  .nav-desktop { display: flex; gap: 28px; margin-right: 12px; }
  .nav-desktop a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
  .nav-desktop a[aria-current="page"], .nav-desktop a:hover { border-color: var(--gold); color: var(--ink); }
  .header-cta span { display: inline; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.75) 100%); }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-lines path { fill: none; stroke: var(--gold); stroke-width: 1.2; opacity: .55; stroke-dasharray: 2200; stroke-dashoffset: 2200; animation: draw 2.4s cubic-bezier(.6,.1,.2,1) forwards; }
.hero-lines path:nth-child(2) { opacity: .3; animation-delay: .2s; }
.hero-lines path:nth-child(3) { opacity: .15; animation-delay: .4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-in { padding-top: 72px; padding-bottom: 88px; }
.hero-title { font-size: clamp(2.3rem, 9vw, 4.6rem); max-width: 14ch; font-weight: 700; margin-bottom: .35em; }
.hero-sub { font-size: 1.1rem; color: #d8d5cd; max-width: 52ch; margin: 0 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { flex: 1 1 200px; }
@media (min-width: 720px) { .hero-in { padding-top: 120px; padding-bottom: 140px; } .hero-actions .btn { flex: none; } }

/* ---------- Sezioni ---------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section-tight { padding-top: 8px; padding-bottom: 56px; }
.section-soft { background: var(--paper); }
.section-dark { background: var(--ink); color: var(--white); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head .h2 { margin: 0; }
@media (min-width: 720px) { .section { padding: 88px 0; } }

.tiles { display: grid; gap: 12px; margin-top: -96px; position: relative; z-index: 2; }
.tile { display: grid; gap: 6px; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.tile:hover { transform: translateY(-3px); border-color: var(--gold); color: var(--ink); }
.tile-ico { width: 28px; height: 28px; color: var(--gold-text); margin-bottom: 4px; }
.tile-title { font: 650 1.2rem/1.2 var(--display); font-stretch: 108%; }
.tile-desc { color: var(--muted); font-size: .95rem; }
.tile-more { margin-top: 6px; font-weight: 700; font-size: .9rem; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: -120px; } .tile { padding: 28px; } }

.split { display: grid; gap: 40px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; } }
.prose-light { color: #d8d5cd; }
.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.services li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line-dark); }
.services .ico { width: 26px; height: 26px; color: var(--gold); margin-top: 2px; }
.services h3 { margin: 0 0 4px; font: 650 1.05rem/1.3 var(--display); font-stretch: 105%; }
.services p { margin: 0; color: var(--muted-light); font-size: .95rem; }
.services-light li { border-color: var(--line); }
.services-light .ico { color: var(--gold-text); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- Schede vettura ---------- */
.car-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .car-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .car-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.car-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s, transform .25s; }
.car-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.car-card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.car-card-link:hover { color: inherit; }
.car-media { position: relative; aspect-ratio: 3 / 2; background: #ecebe6; overflow: hidden; }
.car-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.car-card:hover .car-media img { transform: scale(1.03); }
.is-sold .car-media img { filter: grayscale(.8); opacity: .8; }
.no-photo { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; color: #8d8a82; background: linear-gradient(135deg, #f1f0eb, #e4e2db); font-size: .9rem; font-weight: 600; }
.no-photo .ico { width: 44px; height: 44px; }
.no-photo-lg { aspect-ratio: 3 / 2; border-radius: var(--radius); }
.badges { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.badges.static { position: static; margin-bottom: 14px; }
.badge { font: 700 .7rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: 999px; background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.badge-nuova, .badge-km0 { background: var(--ink); color: var(--white); border-color: var(--ink); }
.badge-rent { background: var(--gold); border-color: var(--gold); }
.badge-demo { background: #fff5d6; border-color: #c99a1e; color: #6b4e00; }
.avail { position: absolute; bottom: 12px; right: 12px; font: 700 .75rem/1 var(--body); padding: 7px 10px; border-radius: 6px; background: var(--white); }
.avail-venduta { background: var(--ink); color: var(--white); }
.avail-riservata { background: var(--gold); }
.car-body { padding: 18px 18px 20px; }
.car-title { margin: 0; font: 650 1.2rem/1.2 var(--display); font-stretch: 106%; }
.car-version { margin: 4px 0 0; color: var(--muted); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-specs { margin: 10px 0 0; font-size: .875rem; color: var(--muted); }
.car-price { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; }
.price { font: 700 1.25rem/1 var(--display); font-stretch: 104%; }
.price-rent { font-size: .875rem; font-weight: 600; color: var(--gold-text); }

/* ---------- Catalogo ---------- */
.page-hero { padding: 40px 0 24px; }
.page-hero-dark { background: var(--ink); color: var(--white); padding: 64px 0 48px; }
.catalog { display: grid; gap: 20px; padding-bottom: 64px; align-items: start; }
.filters { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.filters-toggle { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; }
.filters-toggle::-webkit-details-marker { display: none; }
.filters-toggle .count { background: var(--gold); border-radius: 999px; padding: 2px 8px; font-size: .8rem; }
.filters-form { padding: 4px 16px 18px; display: grid; gap: 4px; }
.filters-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.range-in { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.active-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.active-chips a { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 999px; background: var(--gold-soft); text-decoration: none; font-size: .875rem; font-weight: 600; }
.sort-form { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.sort-form select { width: auto; min-height: 40px; }
@media (min-width: 1000px) {
  .catalog { grid-template-columns: 290px 1fr; gap: 36px; }
  .filters { position: sticky; top: 84px; }
  .filters-toggle { pointer-events: none; }
  .filters:not([open]) > .filters-form { display: grid; }
}
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.pagination a, .pagination span { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.pagination [aria-current] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pagination .dots { border: 0; }
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--paper); }
.empty .ico { width: 48px; height: 48px; color: var(--gold-text); margin: 0 auto 12px; }
.empty h2 { font: 650 1.3rem/1.25 var(--display); margin: 0 0 8px; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 20px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Moduli ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .card { padding: 32px; } }
.form { display: grid; gap: 2px; }
.field { display: grid; gap: 6px; margin: 0 0 12px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 650; font-size: .92rem; padding: 0; }
.req { color: var(--err); }
.opt { color: var(--muted); font-weight: 500; font-size: .85em; }
input[type=text], input[type=tel], input[type=email], input[type=search], input[type=number], input[type=password], input[type=month], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: 500 1rem/1.4 var(--body); color: var(--ink); background: var(--white);
  border: 1.5px solid #d5d2c9; border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230b0b0b' stroke-width='1.8' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
select:disabled { background-color: #f3f2ee; color: var(--muted); }
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(201,162,74,.35); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err); }
.err { color: var(--err); font-size: .85rem; font-weight: 600; margin: 0; min-height: 0; }
.err:empty { display: none; }
.help, .hint { color: var(--muted); font-size: .85rem; margin: 0; }
.grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid #d5d2c9; border-radius: 999px; font-weight: 600; font-size: .92rem; transition: all .15s; }
.chip input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.field-check { grid-template-columns: 24px 1fr; align-items: start; column-gap: 10px; }
.field-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.field-check label { font-weight: 500; }
.field-check .err { grid-column: 2; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-row { display: grid; gap: 10px; margin-top: 8px; }
.submit-row .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.2; padding-top: 10px; padding-bottom: 10px; }
@media (min-width: 640px) { .submit-row .btn { width: auto; justify-self: start; } }
.form-status:empty { display: none; }
.form-status { border-radius: var(--radius-sm); padding: 14px 16px; font-weight: 600; margin: 4px 0 8px; }
.form-status.is-error { background: #fdecea; color: var(--err); }
.form-status.is-ok { background: #e9f6ee; color: var(--ok); }
.form-status.is-ok a.btn { margin-top: 10px; }
.form-status p { margin: 0 0 6px; }
.form-wrap { display: grid; gap: 28px; }
@media (min-width: 960px) { .form-wrap { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } .form-intro { position: sticky; top: 100px; } }
.notice { border-radius: var(--radius-sm); padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 24px; }
.notice-warn { background: #fff5d6; border-color: #e6c46a; color: #5a4100; }

/* ---------- Contatti ---------- */
.contact-strip { display: grid; gap: 24px; }
.contact-actions { display: grid; gap: 10px; }
@media (min-width: 900px) { .contact-strip { grid-template-columns: 1fr auto; align-items: center; } .contact-actions { grid-auto-flow: column; } }
.contact-page { display: grid; gap: 32px; padding-bottom: 72px; }
@media (min-width: 900px) { .contact-page { grid-template-columns: 5fr 7fr; gap: 64px; } }
.info-list { margin: 0; display: grid; gap: 0; }
.info-list > div { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.info-list dt { font: 600 .75rem/1 var(--display); font-stretch: 115%; text-transform: uppercase; letter-spacing: .14em; color: var(--gold-text); }
.info-list dd { margin: 0; font-weight: 600; font-size: 1.05rem; }

/* ---------- Scheda vettura ---------- */
.preview-bar { background: var(--gold); padding: 12px var(--gutter); text-align: center; font-weight: 600; }
.preview-bar a { margin-left: 10px; }
.car-page { padding-bottom: 72px; }
.crumbs { font-size: .875rem; color: var(--muted); padding: 18px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { text-decoration: none; }
.car-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.car-layout > *, .car-gallery-col, .car-summary, .car-details > * { min-width: 0; }
.thumbs { max-width: 100%; }
@media (min-width: 1000px) { .car-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 40px; align-items: start; } .car-summary { position: sticky; top: 88px; } }
.gallery { position: relative; border-radius: var(--radius); overflow: hidden; background: #111; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 3 / 2; }
.gallery-open { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery-open img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; display: none; box-shadow: var(--shadow); }
.gallery-nav.prev { left: 12px; } .gallery-nav.next { right: 12px; }
@media (hover: hover) { .gallery-nav { display: grid; place-items: center; } }
.gallery-count { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.65); color: var(--white); font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: thin; }
.thumb { flex: 0 0 auto; width: 84px; aspect-ratio: 3/2; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: #eee; opacity: .7; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--gold); opacity: 1; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.95); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.9); }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox .gallery-nav { display: grid; place-items: center; }
.lb-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--white); font-size: 30px; line-height: 1; cursor: pointer; z-index: 2; }
.car-h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: .2em; }
.car-version-lg { color: var(--muted); font-size: 1.05rem; margin: 0 0 12px; }
.avail-line { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 18px; }
.avail-line .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.avail-line-riservata .dot { background: var(--gold); }
.avail-line-venduta .dot, .avail-line-non_disponibile .dot { background: var(--muted); }
.price-box { display: grid; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.price-box > div { display: grid; gap: 4px; }
.price-box .label { font: 600 .75rem/1 var(--display); font-stretch: 115%; text-transform: uppercase; letter-spacing: .14em; color: var(--gold-text); }
.price-lg { font: 700 2rem/1.05 var(--display); font-stretch: 104%; }
.price-md { font-size: 1.35rem; }
.cta-stack { display: grid; gap: 10px; margin-bottom: 12px; }
.cta-stack .btn { white-space: normal; text-align: center; }
.car-details { display: grid; gap: 40px; margin-top: 48px; }
@media (min-width: 1000px) { .car-details { max-width: calc(100% * 7 / 11); } }
.specs { margin: 0; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 600px) { .specs { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; text-align: right; }
.equip { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px 24px; }
@media (min-width: 600px) { .equip { grid-template-columns: 1fr 1fr; } }
.equip li { padding-left: 22px; position: relative; }
.equip li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 6px; border-left: 2px solid var(--gold-text); border-bottom: 2px solid var(--gold-text); transform: rotate(-45deg); }
.car-request { margin-top: 56px; max-width: 760px; scroll-margin-top: 90px; }

/* ---------- Esito ---------- */
.result-card { text-align: center; display: grid; gap: 10px; justify-items: center; }
.ico-xl { width: 56px; height: 56px; color: var(--ok); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e8e5de; padding: 56px 0 24px; margin-top: 0; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.f-title { font: 600 .75rem/1 var(--display); font-stretch: 115%; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); margin: 0 0 14px; }
.f-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.muted-light { color: var(--muted-light); }
.socials { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; font-weight: 600; }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: .82rem; color: var(--muted-light); display: grid; gap: 6px; }
.footer-legal p { margin: 0; }
.footer-credit a { color: #e9cf8c; font-weight: 600; text-decoration: none; }
.footer-credit a:hover, .footer-credit a:focus-visible { text-decoration: underline; }
.site-footer .ph { color: #6b4e00; }
.wa-float { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 30; }
.wa-float .ico { width: 28px; height: 28px; }
.page-car .wa-float { display: none; }
@media (min-width: 960px) { .wa-float { display: none; } }

/* Comparsa discreta dei contenuti */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   TEMA SCURO del sito pubblico: nero come sfondo principale,
   bianco per testi e fasce di stacco, oro per i dettagli.
   (La dashboard, body.admin, resta chiara.)
   ========================================================= */
body:not(.admin) {
  --white: #0b0b0b;        /* sfondo */
  --ink: #f5f3ee;          /* testo */
  --ink-2: #e9e6df;
  --ink-3: #d8d5cd;
  --paper: #121212;
  --surface: #141414;
  --muted: #a9a69f;
  --muted-light: #55524b;
  --line: #2a2a2a;
  --line-dark: #e2dfd7;
  --gold-text: #d4b062;
  --gold-soft: #2a2416;
  --ok: #3fbf72;
  --err: #ff8a7a;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.45);
  color-scheme: dark;
}
body:not(.admin) .site-header { background: rgba(11,11,11,.9); }
/* testo scuro su fondo oro */
body:not(.admin) .btn-gold, body:not(.admin) .btn-gold:hover, .badge-rent, .avail-riservata, .wa-float,
.filters-toggle .count, .preview-bar, .preview-bar a { color: #0b0b0b; }
/* superfici */
body:not(.admin) .card, .car-card, .tile, body:not(.admin) .filters { background: var(--surface); }
.car-media, .thumb { background: #1a1a1a; }
.no-photo { background: linear-gradient(135deg, #1c1c1c, #111); color: #7a776f; }
/* hero sempre nero */
.hero { background: #0b0b0b; color: #fff; }
/* fasce di stacco: bianche */
.section-dark, .page-hero-dark { background: #ffffff; color: #0b0b0b; }
.section-dark .eyebrow, .page-hero-dark .eyebrow { color: #86671c; }
.section-dark .services .ico { color: #86671c; }
.section-dark .services p { color: #55524b; }
.prose-light { color: #3a3a3a; }
.link-light { color: #0b0b0b; }
.link-light:hover { color: #86671c; }
/* moduli */
body:not(.admin) input[type=text], body:not(.admin) input[type=tel], body:not(.admin) input[type=email], body:not(.admin) input[type=search],
body:not(.admin) input:not([type]), body:not(.admin) select, body:not(.admin) textarea { background-color: #121212; border-color: #3a3a3a; }
body:not(.admin) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23f5f3ee' stroke-width='1.8' fill='none'/%3E%3C/svg%3E"); }
body:not(.admin) select:disabled { background-color: #1a1a1a; }
body:not(.admin) .chip span { border-color: #3a3a3a; }
body:not(.admin) input:focus, body:not(.admin) select:focus, body:not(.admin) textarea:focus { border-color: var(--gold); }
/* galleria */
.gallery-nav { color: #0b0b0b; }
.lb-close { background: #fff; color: #0b0b0b; }
/* footer */
.site-footer { background: #121212; color: #e8e5de; border-top: 1px solid #2a2a2a; }
.site-footer .wordmark-light { color: #fff; }
.footer-legal { border-color: #2a2a2a; color: #a9a69f; }
.muted-light { color: #a9a69f; }
body:not(.admin) .btn-ghost-light, body:not(.admin) .btn-ghost-light:hover { color: #fff; }
.gallery-count { color: #fff; }
body:not(.admin) .btn-ghost-light:hover { border-color: #fff; }

/* =========================================================
   STRUTTURA A SEZIONI: Vendita · Usato · Noleggio
   ========================================================= */
/* Menu: le tre sezioni in evidenza */
.nav-sections { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; margin-right: 14px; }
.nav-desktop .nav-sec { padding: 8px 18px; border-radius: 999px; border: 0; font-weight: 700; letter-spacing: .01em; }
.nav-desktop .nav-sec:hover { background: #1c1c1c; color: #fff; }
.nav-desktop .nav-sec[aria-current="page"] { background: var(--gold); color: #0b0b0b; }
.nav-desktop { align-items: center; }
.nav-m-sections { display: grid; gap: 8px; padding: 8px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.nav-mobile nav a.nav-m-sec { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #121212; }
.nav-m-sec .num { grid-row: 1 / 3; align-self: center; font: 700 .85rem/1 var(--display); color: var(--gold); }
.nav-m-sec .t { font: 700 1.15rem/1.1 var(--display); font-stretch: 112%; }
.nav-m-sec .s { font-size: .82rem; color: var(--muted); font-weight: 500; }
.nav-mobile nav a.nav-m-sec[aria-current="page"] { border-color: var(--gold); }

/* Apertura più compatta: le sezioni si vedono subito */
.hero-compact .hero-in { padding-top: 56px; padding-bottom: 48px; }
@media (min-width: 720px) { .hero-compact .hero-in { padding-top: 88px; padding-bottom: 72px; } }
.hero-compact .hero-title { font-size: clamp(2.1rem, 7vw, 4rem); max-width: 16ch; }
.hero-scroll { display: inline-flex; gap: 8px; align-items: center; color: var(--gold); font-weight: 700; text-decoration: none; border-bottom: 1.5px solid var(--gold); padding-bottom: 3px; }
.hero-scroll:hover { color: #fff; }

/* Le tre "porte" */
.doors { display: grid; grid-template-columns: 1fr; border-top: 1px solid #222; border-bottom: 1px solid #222; scroll-margin-top: 64px; }
@media (min-width: 900px) { .doors { grid-template-columns: repeat(3, 1fr); } }
.door { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; padding: 28px 22px 26px; background: #101010; color: #fff; text-decoration: none; border-bottom: 1px solid #222; transition: background .3s; }
@media (min-width: 900px) { .door { min-height: 560px; padding: 40px 36px 36px; border-bottom: 0; border-right: 1px solid #222; } .door:last-child { border-right: 0; } }
.door:hover { color: #fff; background: #151515; }
.door::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1); z-index: 2; }
.door:hover::before, .door:focus-visible::before { transform: scaleX(1); }
.door-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.door.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.9) 100%); }
.door:hover .door-bg { transform: scale(1.05); }
.door-watermark { position: absolute; right: -30px; top: 20px; width: 240px; height: 240px; z-index: -1; fill: none; stroke: #2c2c2c; stroke-width: .5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s, transform .6s; }
@media (min-width: 900px) { .door-watermark { width: 340px; height: 340px; right: -60px; top: 30px; } }
.door:hover .door-watermark { stroke: rgba(201,162,74,.45); transform: rotate(-6deg); }
.door-num { position: absolute; top: 22px; left: 22px; font: 700 .9rem/1 var(--display); font-stretch: 120%; letter-spacing: .12em; color: var(--gold); }
@media (min-width: 900px) { .door-num { top: 36px; left: 36px; } }
.door-body { display: grid; gap: 10px; }
.door-sub { font: 600 .75rem/1 var(--display); font-stretch: 120%; text-transform: uppercase; letter-spacing: .18em; color: var(--gold); }
.door-title { font: 750 clamp(2.4rem, 9vw, 3.6rem)/1 var(--display); font-stretch: 118%; text-transform: uppercase; letter-spacing: -.01em; }
.door-intro { color: #cfcbc2; max-width: 34ch; font-size: .98rem; }
.door-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); }
.door-count { font-size: .88rem; font-weight: 600; color: #bdb9b0; }
.door-cta { display: inline-flex; align-items: center; gap: 10px; background: var(--gold); color: #0b0b0b; font-weight: 750; padding: 11px 18px; border-radius: 999px; }
.door-arrow { transition: transform .3s; }
.door:hover .door-arrow { transform: translateX(4px); }

.section-links { display: flex; flex-wrap: wrap; gap: 18px; }

/* Intestazione di ogni sezione */
.sec-hero { position: relative; isolation: isolate; background: #101010; border-bottom: 1px solid #222; overflow: hidden; }
.sec-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.sec-hero.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.35) 100%); }
.sec-hero-in { padding-top: 8px; padding-bottom: 36px; }
@media (min-width: 720px) { .sec-hero-in { padding-bottom: 56px; } }
.crumbs-light, .crumbs-light a { color: #a9a69f; }
.sec-title { font: 750 clamp(2.8rem, 11vw, 5.2rem)/.95 var(--display); font-stretch: 120%; text-transform: uppercase; margin: 0 0 14px; color: #fff; }
.sec-intro { color: #cfcbc2; max-width: 52ch; font-size: 1.05rem; margin: 0 0 10px; }
.sec-count { margin: 0; color: #a9a69f; }
.sec-count strong { color: var(--gold); font-size: 1.1rem; }
.sec-tabs { border-top: 1px solid #222; background: rgba(11,11,11,.85); }
.sec-tabs-in { display: grid; grid-template-columns: repeat(3, 1fr); }
.sec-tabs a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 6px; text-decoration: none; font-weight: 700; color: #a9a69f; border-bottom: 3px solid transparent; text-align: center; }
.sec-tabs a:hover { color: #fff; }
.sec-tabs a[aria-current="page"] { color: #fff; border-color: var(--gold); }
.sec-tabs .num { color: var(--gold); font: 700 .75rem/1 var(--display); display: none; }
.sec-tabs .n { font-size: .75rem; background: #1f1f1f; color: #cfcbc2; padding: 3px 8px; border-radius: 999px; }
@media (min-width: 600px) { .sec-tabs .num { display: inline; } .sec-tabs a { font-size: 1.05rem; } }
.page-catalog .catalog { padding-top: 28px; }
.field { align-content: start; }

/* Testi legali */
.page-legal .prose h2 { font-size: 1.15rem; margin: 2em 0 .5em; padding-top: 1em; border-top: 1px solid rgba(201,162,74,.35); }
.page-legal .prose h2:first-of-type { margin-top: 1.4em; }
.page-legal .prose ul { padding-left: 1.2em; }
.page-legal .prose li { margin: .35em 0; }
