/* Forati Auto - tema del sito pubblico (da proposta grafica /proposte/foratiauto) */
:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --ink: #0f1720;
    --ink-2: #3b4652;
    --muted: #6b7682;
    --line: #e4e8ec;
    --brand: #da251e;
    --brand-dark: #b51c16;
    --brand-soft: #fdeceb;
    --dark: #111820;
    --ok: #127a46;
    --ok-soft: #e6f5ec;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 32, .05), 0 8px 24px rgba(15, 23, 32, .06);
    --shadow-lg: 0 18px 50px rgba(15, 23, 32, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Manrope', system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.ico { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }

/* Pulsanti */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 700;
    cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 14px; font-size: .9rem; }
.btn-lg { padding: 15px 22px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(218, 37, 30, .3); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: #fff; color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-outline-light:hover { background: rgba(255,255,255,.08); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.link { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }

.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--brand); margin-bottom: 10px;
}
.eyebrow.light { color: #ff7a72; }

/* Top bar e header */
.topbar { background: #000; color: #aab4be; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; padding: 8px 20px; }
.topbar a:hover { color: #fff; }
.header {
    position: sticky; top: 0; z-index: 40; background: rgba(12,16,22,.94);
    backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }
.contact-logo { height: 46px; width: auto; display: block; margin: 4px 0 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 10px; font-weight: 600; color: #c9d1d9; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: #fff; }

/* Hero */
.hero { position: relative; color: #fff; padding: 72px 0 0; overflow: hidden; background: var(--dark); }
.hero-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transform: scale(1.04);
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(10,14,20,.72) 0%, rgba(10,14,20,.45) 45%, rgba(10,14,20,.08) 80%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 28px; align-items: end; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 800; margin-bottom: 18px; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero h1 em { font-style: normal; color: #ff4a40; }
.hero p { font-size: 1.1rem; color: #eef1f4; text-shadow: 0 1px 12px rgba(0,0,0,.45); max-width: 520px; margin: 0; }
.hero .eyebrow { color: #ff7a72; }
.search-card {
    background: var(--surface); color: var(--ink); border-radius: 16px; padding: 8px;
    display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 8px; box-shadow: var(--shadow-lg);
    max-width: 880px;
}
.search-card select { padding: 11px 14px; border-radius: 10px; }
.search-card .btn { padding: 11px 22px; border-radius: 10px; white-space: nowrap; }
.field label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
select, input, textarea {
    width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
    border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.trust {
    position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    margin-top: 56px; background: rgba(255,255,255,.12); border-radius: 18px 18px 0 0; overflow: hidden;
}
.trust div { background: rgba(17,24,32,.72); backdrop-filter: blur(6px); padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; }
.trust .ico { grid-row: span 2; width: 26px; height: 26px; color: #ff4a40; margin-top: 2px; }
.trust strong { font-size: .98rem; }
.trust span { font-size: .85rem; color: #aab4be; }

/* Sezioni */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head.center { display: block; text-align: center; max-width: 640px; margin: 0 auto 40px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar select { width: auto; background: var(--surface); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px;
    font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; color: var(--ink-2);
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters-active { display: flex; gap: 8px; flex-wrap: wrap; margin: -10px 0 20px; }
.filters-active .chip { background: var(--brand-soft); border-color: transparent; color: var(--brand-dark); }

/* Card auto */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
    background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    display: flex; flex-direction: column; cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 3 / 2; background: #e9edf1; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: .72rem; font-weight: 800; padding: 5px 9px; border-radius: 8px; background: rgba(255,255,255,.94); color: var(--ink); text-transform: uppercase; letter-spacing: .04em; }
.badge.vat { background: var(--ink); color: #fff; }
.badge.new { background: var(--brand); color: #fff; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.photo-count { position: absolute; right: 12px; bottom: 12px; font-size: .75rem; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; padding: 4px 8px; border-radius: 8px; }
.card-body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { font-size: 1.12rem; font-weight: 800; margin: 0; }
.card-sub { color: var(--muted); font-size: .9rem; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: .88rem; color: var(--ink-2); }
.specs span { display: flex; align-items: center; gap: 7px; }
.specs .ico { width: 16px; height: 16px; color: var(--muted); }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.price { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.price small { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.rate { text-align: right; font-size: .82rem; color: var(--muted); }
.rate strong { color: var(--ink); font-size: .95rem; }

/* Selettore vista */
.view-switch { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.view-btn { border: 0; background: transparent; width: 40px; height: 38px; border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.view-btn .ico { width: 20px; height: 20px; }
.view-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.view-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Vista elenco (stile sito attuale) */
.grid.list-view { grid-template-columns: 1fr; gap: 20px; }
.row-item {
    display: grid; grid-template-columns: 330px 1fr; background: #eeeeee; border-radius: 14px; overflow: hidden;
    cursor: pointer; transition: box-shadow .2s;
}
.row-item:hover { box-shadow: var(--shadow-lg); }
.row-item:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.row-media { position: relative; background: #dfe3e7; aspect-ratio: 3 / 2; align-self: start; }
.row-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.row-body { position: absolute; top: 12px; right: 12px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.row-info { padding: 26px 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.row-title { margin: 0; font-size: 1.22rem; line-height: 1.35; font-weight: 800; text-transform: uppercase; letter-spacing: -.005em; color: var(--ink); }
.row-price { font-size: 1.35rem; font-weight: 800; color: var(--ink); display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.row-price span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.price-plus-vat { font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.row-price .price-plus-vat { margin-left: -6px; }
.row-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 22px; font-size: .9rem; color: var(--ink-2); width: 100%; max-width: 520px; }
.row-specs span { display: flex; align-items: center; gap: 8px; }
.row-specs .ico { width: 17px; height: 17px; color: var(--ink-2); flex: none; }
.row-cta { margin-top: 4px; }
.row-cta .ico { width: 18px; height: 18px; }
@media (max-width: 760px) {
    .row-item { grid-template-columns: 1fr; }
    .row-media { aspect-ratio: 3 / 2; }
    .row-info { padding: 18px; }
    .row-title { font-size: 1.02rem; }
    .row-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.empty { text-align: center; padding: 40px; color: var(--muted); }

/* Servizi */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.services article { background: var(--bg); border-radius: var(--radius); padding: 26px; }
.services .ico { width: 30px; height: 30px; color: var(--brand); margin-bottom: 14px; }
.services p { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* Calcolatore */
.finance { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

/* Contatti */
.contact { background: var(--dark); color: #fff; }
.contact-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.contact p { color: #c4ccd4; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.lead-form { background: var(--surface); color: var(--ink); border-radius: 20px; padding: 26px; display: grid; gap: 12px; }
.form-note { font-size: .85rem; color: var(--ok); background: var(--ok-soft); padding: 10px 12px; border-radius: 10px; margin: 0; }
.footer { background: #0b1016; color: #8b96a1; font-size: .85rem; }
.footer-inner { display: flex; justify-content: space-between; padding: 20px; gap: 12px; flex-wrap: wrap; }
.wa-float {
    position: fixed; right: 22px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%;
    background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37,211,102,.4); z-index: 50;
}
.wa-float .ico { width: 28px; height: 28px; }

/* Dettaglio */
.detail { padding-top: 28px; padding-bottom: 80px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: .9rem; color: var(--muted); }
.breadcrumb button { display: inline-flex; align-items: center; gap: 6px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
.d-gallery { grid-column: 1; grid-row: 1; }
.d-info { grid-column: 1; grid-row: 2; }
.d-aside { grid-column: 2; grid-row: 1 / span 2; }
.gallery-main { position: relative; border-radius: 20px; overflow: hidden; background: #e9edf1; aspect-ratio: 3 / 2; }
.gallery-main 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); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
}
.gallery-nav.prev { left: 14px; } .gallery-nav.prev .ico { transform: rotate(180deg); }
.gallery-nav.next { right: 14px; }
.gallery-index { position: absolute; bottom: 14px; right: 14px; background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 8px; }
.thumbs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-top: 10px; }
.thumbs img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; cursor: pointer; opacity: .6; transition: opacity .15s; border: 2px solid transparent; }
.thumbs img.active, .thumbs img:hover { opacity: 1; }
.thumbs img.active { border-color: var(--brand); }
.panel { background: var(--surface); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.sticky { position: sticky; top: 92px; }
.detail h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 6px; }
.detail-sub { color: var(--muted); margin: 0 0 16px; }
.detail-price { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.vat-note { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 6px 10px; border-radius: 8px; margin: 12px 0 18px; }
.vat-note.plain { color: var(--ink-2); background: var(--bg); }
.key-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.key-specs div { background: var(--bg); border-radius: 12px; padding: 12px; }
.key-specs small { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.key-specs strong { font-size: 1rem; }
.actions { display: grid; gap: 10px; }
.highlights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.highlights span { font-size: .78rem; font-weight: 700; padding: 5px 9px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-dark); }
.block { margin-top: 24px; }
.block h2 { font-size: 1.35rem; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--muted); width: 45%; }
.spec-table td:last-child { font-weight: 700; }
.equipment { columns: 2; column-gap: 24px; padding: 0; margin: 0; list-style: none; }
.equipment li { break-inside: avoid; display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: .93rem; }
.equipment .ico { width: 16px; height: 16px; color: var(--ok); margin-top: 3px; }
.desc p { margin: 0 0 10px; color: var(--ink-2); }

@media (max-width: 980px) {
    .hero-inner, .finance, .contact-inner, .detail-grid { grid-template-columns: 1fr; }
    .trust { grid-template-columns: repeat(2, 1fr); }
    .services { grid-template-columns: repeat(2, 1fr); }
    .sticky { position: static; }
    .d-gallery, .d-info, .d-aside { grid-column: 1; grid-row: auto; }
    .d-aside { margin-top: 20px; order: 1; }
    .d-info { order: 2; }
    .nav { display: none; }
    .nav.open { display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: #0c1016; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .logo img { height: 32px; }
    .search-card { grid-template-columns: 1fr 1fr; }
    .menu-toggle { display: block; margin-left: auto; }
    .header-cta { display: none; }
}
@media (max-width: 600px) {
    .hero::after { background: linear-gradient(180deg, rgba(10,14,20,.7) 0%, rgba(10,14,20,.45) 60%, rgba(10,14,20,.6) 100%); }
    .container { padding: 0 16px; }
    .topbar-right { display: none; }
    .hero { padding-top: 44px; }
    .trust, .services { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }
    .equipment { columns: 1; }
    .thumbs { grid-template-columns: repeat(4, 1fr); }
    .grid { grid-template-columns: 1fr; }
    .search-card { grid-template-columns: 1fr; }
}


/* Vista elenco: colonna laterale come il sito attuale */
.listing { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.listing.no-side { grid-template-columns: 1fr; }
.listing.no-side .sidebar, .listing.no-side .result-bar { display: none; }
.result-bar { display: flex; align-items: center; gap: 10px; background: #eeeeee; border-left: 4px solid #cfd4d9; border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.rb-count { background: var(--brand); color: #fff; padding: 2px 9px; border-radius: 6px; font-size: 1.05rem; }
.sidebar { display: grid; gap: 24px; position: sticky; top: 96px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 12px; }
.side-title { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 800; margin: 0 0 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.side-title .ico { width: 22px; height: 22px; color: var(--brand); flex: none; }
.side-box select { background: #f1f2f4; border-color: transparent; }
.side-box select:disabled { color: var(--muted); }
.btn-block { width: 100%; justify-content: center; }
.price-range { display: grid; gap: 10px; margin: 4px 0 6px; }
.pr-head { display: flex; justify-content: space-between; font-size: .88rem; color: var(--ink-2); }
.pr-head strong { color: var(--ink); }
.pr-slider { position: relative; height: 24px; }
.pr-track { position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; background: #e3e6ea; border-radius: 6px; }
.pr-fill { position: absolute; top: 0; bottom: 0; background: var(--brand); border-radius: 6px; }
.pr-slider input[type=range] { position: absolute; inset: 0; width: 100%; margin: 0; padding: 0; background: none; border: 0; pointer-events: none; -webkit-appearance: none; appearance: none; box-shadow: none; }
.pr-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.pr-slider input[type=range]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer; }
.pr-slider input[type=range]::-moz-range-track { background: none; }
.side-sell { background: #4a4a4a; color: #fff; border-radius: 14px; padding: 34px 26px; text-align: center; }
.side-sell h3 { font-size: 1.8rem; font-weight: 800; margin: 0 0 10px; line-height: 1.1; }
.side-sell p { color: #e6e6e6; margin: 0 0 20px; }
.side-sell .btn .ico { width: 18px; height: 18px; }
.latest { display: grid; gap: 12px; }
.latest-item { display: grid; grid-template-columns: 78px 1fr; gap: 10px; background: #eeeeee; border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--ink); }
.latest-item img { width: 78px; height: 78px; object-fit: cover; }
.latest-item span { padding: 8px 8px 8px 0; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.latest-item strong { font-size: .82rem; line-height: 1.3; text-transform: uppercase; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-item em { font-style: normal; font-size: .82rem; color: var(--ink-2); margin-top: 4px; }
.latest-item:hover strong { color: var(--brand); }
@media (max-width: 1100px) {
    .listing { grid-template-columns: 1fr; }
    .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* ---------- Integrazione nel sito multipagina ---------- */
.nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; padding: 0; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.form-note.error { color: var(--brand-dark); background: var(--brand-soft); }
.lead-form h3 { font-size: 1.3rem; }
.lead-form .btn[disabled] { opacity: .7; cursor: wait; }

/* Intestazione pagine interne */
.page-hero { position: relative; background: var(--dark); color: #fff; padding: 64px 0 56px; overflow: hidden; }
.page-hero-bg { position: absolute; inset: 0; background-position: center; background-size: cover; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.62) 55%, rgba(0,0,0,.35) 100%); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow { color: #ff7a72; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin: 0 0 10px; }
.page-hero p { color: #c4ccd4; max-width: 620px; margin: 0; font-size: 1.05rem; }
.crumbs { display: flex; gap: 8px; font-size: .85rem; color: #8b96a1; margin-top: 18px; flex-wrap: wrap; }
.crumbs a:hover { color: #fff; }

/* Home: link al catalogo completo */
.more-cta { display: flex; justify-content: center; margin-top: 32px; }

/* Sezione testo + immagine */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-media { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: #e9edf1; box-shadow: var(--shadow-lg); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-badge { position: absolute; left: 18px; bottom: 18px; background: var(--brand); color: #fff; border-radius: 14px; padding: 14px 18px; max-width: 240px; box-shadow: var(--shadow-lg); }
.split-badge strong { display: block; font-size: 1.5rem; line-height: 1.1; }
.split-badge span { font-size: .85rem; opacity: .92; }
.split p { color: var(--ink-2); }
.split.reverse .split-media { order: 2; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.kpis div { background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.kpis strong { display: block; font-size: 2rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; line-height: 1.1; }
.kpis span { color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); }
.checklist .ico { width: 18px; height: 18px; color: var(--ok); margin-top: 3px; }

/* Banner invito all'azione */
.cta-band { background: var(--brand); color: #fff; border-radius: 20px; padding: 36px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-band p { margin: 0; color: #ffe1df; max-width: 620px; }
.cta-band .btn-light:hover { background: #f1f2f4; }

/* Contatti */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.contact-cards article { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.contact-cards .ico { width: 28px; height: 28px; color: var(--brand); margin-bottom: 12px; }
.contact-cards p { margin: 0; color: var(--ink-2); }
.contact-cards a:hover { color: var(--brand); }
.contact-page { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: start; }
.map { border-radius: 20px; overflow: hidden; background: #e9edf1; min-height: 420px; box-shadow: var(--shadow); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
.contact-page .lead-form { box-shadow: var(--shadow); }

/* Footer esteso */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 48px 20px 32px; }
.footer-grid h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 14px; }
.footer-grid a, .footer-grid span { display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { margin: 0; max-width: 320px; }
.footer-logo { height: 34px; width: auto; margin-bottom: 14px; }
.footer-inner { border-top: 1px solid rgba(255,255,255,.08); }
.footer-inner a:hover { color: #fff; }

/* Dettaglio: galleria a tutto schermo e note */
.gallery-main img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5,8,12,.94); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.lightbox-close { position: absolute; z-index: 2; top: 16px; right: 20px; background: none; border: 0; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.vat-margin-note { font-size: .78rem; color: var(--muted); margin: -8px 0 16px; }
.desc p { white-space: pre-line; }

@media (max-width: 980px) {
    .split, .contact-page { grid-template-columns: 1fr; gap: 32px; }
    .split.reverse .split-media { order: 0; }
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-cards { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .kpis, .footer-grid { grid-template-columns: 1fr; }
    .page-hero { padding: 44px 0 40px; }
    .cta-band { padding: 28px 22px; }
    .footer-grid { padding: 36px 16px 24px; }
}
.finance .btn { white-space: normal; text-align: center; margin-top: 8px; }
.finance > div { min-width: 0; }
.row-media .row-body { top: auto; bottom: 12px; left: 12px; right: auto; }

/* Elenco auto: categorie e strumenti sulla stessa riga, paginazione */
.listing-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.listing-tools .chips { flex: 1 1 auto; min-width: 0; }
.filters-active { margin: -8px 0 20px; align-items: center; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; color: var(--ink-2); }
.pagination a:hover { border-color: var(--ink); color: var(--ink); }
.pagination span[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .ico { width: 18px; height: 18px; }
@media (max-width: 1100px) and (min-width: 981px) { .nav a { padding: 8px 9px; } }

/* Galleria: miniature su una sola riga scorrevole anche con molte foto */
.thumbs { display: flex; grid-template-columns: none; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
.thumbs img { flex: 0 0 96px; width: 96px; height: 72px; scroll-snap-align: start; }
@media (max-width: 600px) { .thumbs img { flex-basis: 76px; width: 76px; height: 57px; } }
.d-gallery, .d-info, .d-aside { min-width: 0; }
@media (max-width: 980px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }

/* Header su due righe: logo e contatti sopra, menu sotto */
.header-inner { height: 84px; justify-content: space-between; }
.logo img { height: 46px; }
.header-contacts { display: flex; align-items: center; gap: 22px; }
.header-phone { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.05rem; }
.header-phone .ico { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgba(255,255,255,.08); color: #ff4a40; }
.header-phone small { display: block; font-size: .72rem; font-weight: 600; color: #8b96a1; text-transform: uppercase; letter-spacing: .08em; }
.header-phone span { line-height: 1.2; }
.navbar { background: #080b0f; border-top: 1px solid rgba(255,255,255,.06); }
.navbar .nav { display: flex; gap: 2px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.navbar .nav a { padding: 14px 14px 12px; border-radius: 0; border-bottom: 3px solid transparent; font-weight: 700; font-size: .92rem; white-space: nowrap; color: #c9d1d9; }
.navbar .nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.navbar .nav a.active { background: transparent; color: #fff; border-bottom-color: var(--brand); }
@media (max-width: 1100px) and (min-width: 981px) { .navbar .nav a { padding: 14px 10px 12px; font-size: .86rem; } }
@media (max-width: 980px) {
    .header-inner { height: 68px; }
    .logo img { height: 34px; }
    .header-contacts { display: none; }
    .navbar { display: none; }
    .navbar.open { display: block; }
    .navbar .nav.open { position: static; display: flex; flex-direction: column; padding: 8px 16px 14px; background: #080b0f; border: 0; }
    .navbar .nav.open a { border-bottom: 1px solid rgba(255,255,255,.06); padding: 13px 4px; }
    .navbar .nav.open a.active { color: #ff4a40; }
}
.sidebar, .sticky { top: 150px; }
@media (max-width: 980px) { .sidebar, .sticky { top: auto; } }

/* Slider della home */
.hero .hero-bg { opacity: 0; transition: opacity 1s ease, transform 7s ease; }
.hero .hero-bg.active { opacity: 1; transform: scale(1.06); }
.hero-copies { display: grid; }
.hero-copy { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease, visibility .6s; }
.hero-copy.active { opacity: 1; visibility: visible; transform: none; }
.hero-title { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 800; margin: 0 0 18px; line-height: 1.08; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero-title em { font-style: normal; color: #ff4a40; }
.hero-btn { margin-top: 22px; }
.hero-btn .ico { width: 18px; height: 18px; }
.hero-dots { display: flex; gap: 8px; }
.hero-dot { width: 28px; height: 6px; border-radius: 6px; border: 0; padding: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: background .2s, width .2s; }
.hero-dot.active { background: #ff4a40; width: 44px; }
@media (prefers-reduced-motion: reduce) { .hero .hero-bg, .hero-copy { transition: none; } .hero .hero-bg.active { transform: none; } }

/* Pagine di contenuto */
.services-3 { grid-template-columns: repeat(3, 1fr); }
.coverage { columns: 3 260px; column-gap: 20px; }
.coverage-group { break-inside: avoid; background: var(--surface); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.coverage-group h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.coverage .checklist { margin-top: 10px; gap: 6px; font-size: .92rem; }
.note { margin: 12px 0 0; padding: 18px 20px; border-left: 4px solid var(--brand); background: var(--surface); border-radius: 10px; color: var(--ink-2); font-size: .92rem; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul:not(.checklist) { padding-left: 20px; }
.prose ul:not(.checklist) li { margin-bottom: 8px; }
.prose-narrow { max-width: 820px; }
.prose code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: .88em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-form .link, .check .link { font-weight: 700; }
@media (max-width: 980px) { .services-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .services-3, .form-row { grid-template-columns: 1fr; } }

/* Richieste cliente 31/10 */
@media (min-width: 1300px) { .container { max-width: 1300px; } }
@media (min-width: 1600px) { .container { max-width: 1440px; } }
.topbar-left { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.topbar-place { color: #fff; font-weight: 600; }
.detail .detail-title { font-size: 1.25rem; line-height: 1.35; margin-bottom: 14px; }
/* Icona a sinistra, testo in un unico blocco anche con parole in grassetto */
.checklist li { position: relative; display: block; padding-left: 28px; }
.checklist li .ico { position: absolute; left: 0; top: 3px; margin: 0; }
@media (max-width: 760px) { .topbar-inner { padding-top: 6px; padding-bottom: 6px; } .topbar-place { display: block; width: 100%; } }
.contact-page { align-items: stretch; }

.credits { opacity: .55; }
.credits:hover { opacity: 1; }

/* Riquadro finanziamenti (senza calcolo della rata) */
.finance-box { background: var(--surface); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.finance-box h3 { font-size: 1.25rem; margin-bottom: 4px; }
.finance-box .checklist { margin: 12px 0 20px; }
.panel .finance-box { box-shadow: none; padding: 0; }
.footnote { margin: 22px auto 0; max-width: 900px; font-size: .74rem; line-height: 1.5; color: var(--muted); text-align: center; }

/* Elenco: foto nella proporzione delle foto delle auto (3:2), così si vede la vettura intera */
.row-item { align-items: start; }
.row-media, .row-media img { border-radius: 14px 0 0 14px; }
@media (max-width: 760px) { .row-media, .row-media img { border-radius: 14px 14px 0 0; } }
/* Prezzo in scheda: "+iva" o "iva compresa" accanto */
.price-vat-suffix { font-size: .95rem; font-weight: 700; color: var(--ink-2); letter-spacing: 0; white-space: nowrap; }
/* Foto ingrandita con frecce e contatore */
.lightbox-nav { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,.4); }
.lightbox-nav:hover { background: var(--brand); border-color: var(--brand); }
.lightbox-nav .ico { width: 26px; height: 26px; }
.lightbox-nav.prev { left: 16px; } .lightbox-nav.prev .ico { transform: rotate(180deg); }
.lightbox-nav.next { right: 16px; }
.lightbox-index { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: .9rem; background: rgba(0,0,0,.45); padding: 4px 12px; border-radius: 8px; }
@media (max-width: 600px) { .lightbox { padding: 8px; } .lightbox-nav { width: 42px; height: 42px; } .lightbox-nav.prev { left: 6px; } .lightbox-nav.next { right: 6px; } }

/* Video YouTube nella scheda: copertina cliccabile, il lettore si carica al clic */
.video-facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video-facade:hover img, .video-facade:focus-visible img { opacity: 1; }
.video-play { position: absolute; top: 50%; left: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); background: var(--brand); border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.video-play::after { content: ''; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%); border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #fff; }
.video-note { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: .8rem; text-align: left; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; display: block; }
