/* ==========================================================================
   Sito MA.RI.DI.ST. - foglio di stile unico
   Struttura: 1) token  2) base  3) componenti  4) pagine  5) admin  6) responsive
   ========================================================================== */

/* 1) TOKEN ---------------------------------------------------------------- */
:root {
    --ink:        #0e1626;
    --ink-soft:   #17233a;
    --ink-line:   #2a3852;

    --brand:      #1b56d3;
    --brand-dark: #1543aa;
    --brand-soft: #eaf0fd;

    --accent:     #f0a323;
    --wa:         #1eb955;
    --wa-dark:    #159a45;

    --ok:         #157f3d;
    --ok-soft:    #e6f5ec;
    --warn:       #b26205;
    --warn-soft:  #fdf2e2;
    --danger:     #c62828;
    --danger-soft:#fdeaea;

    --bg:         #ffffff;
    --bg-soft:    #f5f7fa;
    --bg-softer:  #fafbfd;
    --line:       #e3e8ef;
    --text:       #1a2333;
    --muted:      #5f6b80;

    --radius:     12px;
    --radius-sm:  8px;
    --shadow-sm:  0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .07);
    --shadow-md:  0 4px 12px rgba(16, 24, 40, .08);
    --shadow-lg:  0 12px 32px rgba(16, 24, 40, .12);

    --container:  1200px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 2) BASE ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* L'attributo hidden deve vincere su qualsiasi display dei componenti
   (senza questa riga il banner cookie non si chiude) */
[hidden] { display: none !important; }

ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .875em;
    background: var(--bg-soft);
    padding: .1em .35em;
    border-radius: 4px;
}

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
}

/* L'intestazione è fissa: gli ancoraggi (#richiesta, #foto…) devono
   fermarsi sotto, non sparire dietro la barra */
[id] { scroll-margin-top: 90px; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 32px);
}

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

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 200;
    background: var(--ink); color: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 0; }

.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; }

.u-muted { color: var(--muted); }
.ta-right { text-align: right; }
.text-warn { color: var(--warn); font-weight: 600; }

.prose > * + * { margin-top: 1em; }
.prose--doc { max-width: 760px; }
.prose--doc h2 { margin-top: 2rem; font-size: 1.2rem; }
.prose--doc ul { padding-left: 1.1rem; }
.prose--doc li + li { margin-top: .4em; }

/* 3) COMPONENTI ---------------------------------------------------------- */

/* Bottoni */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .7rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit; font-weight: 600; line-height: 1.2;
    text-align: center; text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }

.btn--outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.btn--ghost { background: var(--bg-soft); color: var(--text); }
.btn--ghost:hover { background: #eceff4; }

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

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f1f4f9; }

.btn--outline-light { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn--outline-light:hover { background: rgba(255,255,255,.12); }

.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: #f3c6c6; }
.btn--danger:hover { background: var(--danger); color: #fff; }

.btn--lg { padding: .9rem 1.5rem; font-size: 1.02rem; }
.btn--sm { padding: .45rem .8rem; font-size: .875rem; }
.btn--xs { padding: .25rem .5rem; font-size: .8rem; }
.btn--block { display: flex; width: 100%; }
.btn--block + .btn--block { margin-top: .5rem; }

.link-btn {
    background: none; border: 0; padding: 0;
    font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline;
}
.link-arrow { font-weight: 600; white-space: nowrap; }
.link-arrow::after { content: " →"; }

.inline-form { display: inline; }

/* Badge e pill */
.badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .75rem; font-weight: 700; letter-spacing: .02em;
    text-transform: uppercase;
    background: var(--bg-soft); color: var(--muted);
}
.badge--ok     { background: var(--ok-soft);   color: var(--ok); }
.badge--warn   { background: var(--warn-soft); color: var(--warn); }
.badge--muted  { background: #eceff4;          color: var(--muted); }
.badge--accent { background: #fdf1dc;          color: #96620a; }

.pill {
    display: inline-block; min-width: 1.4em;
    padding: 0 .4em; margin-left: .25rem;
    border-radius: 999px;
    background: var(--brand-soft); color: var(--brand-dark);
    font-size: .78rem; font-weight: 700; text-align: center;
}
.pill--alert { background: #fde8e8; color: var(--danger); }

/* Alert / flash */
.flash-stack { margin-top: 1rem; display: grid; gap: .5rem; }

.alert {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .8rem 1rem;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
}
.alert--success { background: var(--ok-soft);     border-color: #bfe3cd; border-left-color: var(--ok); }
.alert--error   { background: var(--danger-soft); border-color: #f3c6c6; border-left-color: var(--danger); }
.alert--info    { background: var(--brand-soft);  border-color: #c9d9f8; border-left-color: var(--brand); }
.alert__close {
    margin-left: auto; background: none; border: 0;
    font-size: 1.25rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6;
}
.alert__close:hover { opacity: 1; }

/* Card */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1rem, 3vw, 1.75rem);
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 1.25rem; }
.card--flush { padding: 0; overflow: hidden; }
.card--warn { border-color: #f0d9b3; background: #fffcf6; }
.card__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.card__head .card__title { margin-bottom: 0; }
.card__title { font-size: 1.15rem; margin-bottom: .75rem; }
.card__subtitle { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 1.5rem 0 .5rem; }
.card__divider { height: 1px; background: var(--line); margin: 1.25rem 0; }

/* Form */
.field { margin-bottom: 1rem; }
.field > label,
.field > legend {
    display: block; margin-bottom: .35rem;
    font-size: .9rem; font-weight: 600;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="number"],
.field input[type="search"],
.field input[type="date"],
.field select,
.field textarea,
.filters input, .filters select,
.toolbar input, .toolbar select {
    width: 100%;
    padding: .65rem .75rem;
    font: inherit; color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(27, 86, 211, .12);
    outline: none;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 49%, var(--muted) 50%), linear-gradient(-45deg, transparent 49%, var(--muted) 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.2rem; }
.field__hint  { margin: .35rem 0 0; font-size: .82rem; color: var(--muted); }
.field__error { margin: .35rem 0 0; font-size: .82rem; color: var(--danger); font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field fieldset, fieldset.field { border: 0; margin: 0; padding: 0; }

.field-row { display: grid; gap: 1rem; }
.field-row--tight { grid-template-columns: 1fr 1fr; gap: .5rem; }
.field-row > .field { margin-bottom: 0; }

.field--check .checkbox, .field--checks .checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.field--checks .checkbox + .checkbox { margin-top: .5rem; }
.checkbox input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; flex: 0 0 auto; accent-color: var(--brand); }

.radio-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.radio-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .45rem .8rem;
    border: 1px solid var(--line); border-radius: 999px;
    font-size: .9rem; cursor: pointer;
}
.radio-chip input { accent-color: var(--brand); }
.radio-chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

.password-wrap { position: relative; display: flex; }
.password-wrap input { padding-right: 5rem; }
.password-toggle {
    position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
    background: var(--bg-soft); border: 0; border-radius: 6px;
    padding: .35rem .6rem; font: inherit; font-size: .8rem; font-weight: 600;
    color: var(--muted); cursor: pointer;
}
.password-toggle:hover { color: var(--brand); }

.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.5rem 0; }

/* Elenchi decorati */
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .6rem; }
.check-list li::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    color: var(--ok); font-weight: 700;
}
.check-list--todo li::before { content: "•"; color: var(--warn); }

.numbered-list { padding-left: 1.2rem; }
.numbered-list li { margin-bottom: .6rem; }

.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .55rem 0; border-bottom: 1px solid var(--line);
}
.mini-list li:last-child { border-bottom: 0; }

.detail-list { margin: 0; display: grid; gap: .1rem; }
.detail-list > div { display: flex; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { flex: 0 0 40%; color: var(--muted); font-size: .9rem; }
.detail-list dd { margin: 0; font-weight: 500; }

.quote, .request-item__message {
    margin: 0; padding: .75rem 1rem;
    background: var(--bg-soft); border-left: 3px solid var(--line);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Tabelle */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: .7rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th {
    background: var(--bg-soft); color: var(--muted);
    font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.table tbody tr:hover { background: var(--bg-softer); }
.table--admin td { vertical-align: middle; }

/* 4) HEADER / FOOTER ---------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(14, 22, 38, .97);
    backdrop-filter: saturate(140%) blur(6px);
    color: #fff;
}
.header-inner {
    display: flex; align-items: center; gap: 1rem;
    min-height: 68px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: .6rem; color: #fff; margin-right: auto; }
.logo:hover { text-decoration: none; }
.logo__mark {
    display: grid; place-items: center;
    width: 40px; height: 40px; flex: 0 0 auto;
    border-radius: 10px; background: var(--brand); color: #fff;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__text strong { font-size: 1.05rem; }
.logo__text small { font-size: .74rem; color: #a9b6cd; }
.logo--light { color: var(--text); }
.logo--light .logo__text small { color: var(--muted); }

.nav-toggle {
    display: none;
    width: 42px; height: 38px; padding: 0;
    background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 8px;
    cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 3px auto; background: #fff; border-radius: 2px; }
.nav-toggle--dark { border-color: var(--line); }
.nav-toggle--dark span { background: var(--text); }

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-list { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav-link { color: #dbe3f0; font-size: .95rem; font-weight: 500; padding: .35rem 0; }
.nav-link:hover { color: #fff; text-decoration: none; }
.nav-link.is-active { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
.nav-account { display: flex; align-items: center; gap: .75rem; }
.nav-account .link-btn { color: #a9b6cd; font-size: .9rem; }
.nav-account .btn--ghost { background: rgba(255,255,255,.1); color: #fff; }
.nav-account .btn--ghost:hover { background: rgba(255,255,255,.18); }
.btn--phone { white-space: nowrap; }

.site-footer { margin-top: 4rem; background: var(--ink); color: #c3cddd; }
.footer-grid { display: grid; gap: 2rem; padding: 3rem 0 2rem; }
.footer-brand { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: .5rem; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #8d9bb3; margin-bottom: .75rem; }
.footer-text { font-size: .92rem; font-style: normal; line-height: 1.7; }
.site-footer a { color: #dbe3f0; }
.footer-links, .social-list { list-style: none; padding: 0; margin: 0; }
.footer-links li, .social-list li { margin-bottom: .45rem; font-size: .92rem; }
.social-list { display: flex; gap: 1rem; margin-top: 1rem; }
.hours-list { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.hours-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.hours-list strong { color: #fff; font-weight: 600; }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
    padding: 1.25rem 0 2rem; border-top: 1px solid var(--ink-line);
    font-size: .82rem; color: #8d9bb3;
}
.footer-bottom p { margin: 0; }

/* Pulsanti flottanti */
.fab-stack {
    position: fixed; right: 16px; bottom: 16px; z-index: 90;
    display: flex; flex-direction: column-reverse; gap: .6rem;
}
.fab {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .85rem; border-radius: 999px;
    color: #fff; box-shadow: var(--shadow-lg);
}
.fab:hover { text-decoration: none; filter: brightness(1.05); }
.fab--wa { background: var(--wa); padding-inline: 1.1rem; }
.fab--phone { background: var(--brand); }
.fab__label { font-weight: 600; font-size: .95rem; }

/* Cookie banner */
.cookie-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 95;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    max-width: 640px; margin-inline: auto;
    padding: 1rem 1.25rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: .9rem;
}
.cookie-banner p { margin: 0; flex: 1 1 240px; }
.cookie-banner .btn { flex: 0 0 auto; }

/* 5) HOME ---------------------------------------------------------------- */
.hero {
    background:
        radial-gradient(1100px 420px at 12% -8%, rgba(27,86,211,.5), transparent 60%),
        linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: #fff;
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}
.hero__inner { display: grid; gap: clamp(2rem, 5vw, 3rem); align-items: start; }
.hero__eyebrow {
    display: inline-block; margin-bottom: .75rem;
    font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent);
}
.hero__title { color: #fff; max-width: 20ch; }
.hero__sub { color: #c3cddd; font-size: 1.05rem; max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0; }
.hero__points { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.hero__points li { position: relative; padding-left: 1.6rem; color: #dbe3f0; font-size: .94rem; }
.hero__points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.hero-search {
    background: #fff; color: var(--text);
    border-radius: var(--radius); padding: 1.25rem;
    box-shadow: var(--shadow-lg);
}
.hero-search__title { font-weight: 700; font-size: 1.05rem; margin-bottom: 1rem; }

.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section--alt { background: var(--bg-soft); }
.section__head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem;
}
.section__head--center { flex-direction: column; align-items: center; text-align: center; }
.section__title { margin-bottom: .25rem; }
.section__lead { color: var(--muted); margin: 0; }

.feature-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature-grid--wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.feature__icon {
    display: grid; place-items: center;
    width: 42px; height: 42px; margin-bottom: .75rem;
    border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark);
    font-size: 1.15rem; font-weight: 700;
}
.feature h3, .feature h2 { font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .94rem; margin: 0; }
.feature--card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow-sm);
}

.cta-band { background: linear-gradient(120deg, var(--brand-dark), #123a91); color: #fff; padding: clamp(2rem, 5vw, 3rem) 0; }
.cta-band__inner { display: grid; gap: 1.5rem; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { color: #d6e0f7; margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.split { display: grid; gap: 2rem; align-items: start; }
.split__text p { color: var(--muted); }

.promo-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow-md);
}
.promo-card h3 { font-size: 1.15rem; }
.promo-card p { font-size: .94rem; color: var(--muted); }
.promo-card .btn { margin-top: .5rem; }

/* 6) GRIGLIA AUTO -------------------------------------------------------- */
.car-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.car-grid--compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.car-card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .16s, box-shadow .16s, border-color .16s;
}
.car-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfd8e6; }
.car-card.is-sold { opacity: .78; }

.car-card__media { position: relative; display: block; background: var(--bg-soft); aspect-ratio: 4 / 3; }
.car-card__media img { width: 100%; height: 100%; object-fit: cover; }
.car-card__badge { position: absolute; top: .65rem; left: .65rem; box-shadow: var(--shadow-sm); }
.car-card__count {
    position: absolute; right: .65rem; bottom: .65rem;
    padding: .15rem .5rem; border-radius: 6px;
    background: rgba(14,22,38,.72); color: #fff; font-size: .75rem; font-weight: 600;
}

.car-card__body { display: flex; flex-direction: column; flex: 1; padding: 1rem 1.1rem 1.1rem; }
.car-card__title { font-size: 1.02rem; margin-bottom: .5rem; }
.car-card__title a { color: var(--text); }
.car-card__title a:hover { color: var(--brand); text-decoration: none; }
.car-card__specs {
    display: flex; flex-wrap: wrap; gap: .3rem .75rem;
    list-style: none; padding: 0; margin: 0 0 1rem;
    font-size: .86rem; color: var(--muted);
}
.car-card__specs li { position: relative; }
.car-card__specs li + li::before { content: "•"; position: absolute; left: -.5rem; }
.car-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; }
.car-card__price { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.car-card__price small { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }

.fav-form { display: flex; }
.fav-btn {
    display: grid; place-items: center;
    width: 40px; height: 40px; padding: 0;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 50%;
    color: var(--muted); cursor: pointer;
    transition: color .15s, background .15s, border-color .15s;
}
.fav-btn:hover { color: var(--danger); border-color: #f0c6c6; }
.fav-btn.is-saved { background: var(--danger-soft); border-color: #f0c6c6; color: var(--danger); }
.fav-btn.is-saved svg { fill: currentColor; }
.fav-btn-wide.is-saved { color: var(--danger); }
.fav-btn-wide.is-saved svg { fill: currentColor; }

/* 7) PAGINE ------------------------------------------------------------- */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 2rem 0 1.75rem; }
.page-head__title { margin: .35rem 0 .5rem; }
.page-head__lead { color: var(--muted); margin: 0; max-width: 70ch; }

.breadcrumb { font-size: .85rem; color: var(--muted); padding: 1rem 0 0; }
.breadcrumb span { margin: 0 .25rem; }
.page-head .breadcrumb { padding-top: 0; }

.empty-state {
    text-align: center; padding: 2.5rem 1.5rem;
    background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state--inline { text-align: left; padding: 1.5rem; }
.empty-state p { margin-bottom: .5rem; }
.empty-state .btn { margin-top: 1rem; }
.empty-state__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }

/* Catalogo */
.catalog-layout { display: grid; gap: 1.5rem; padding: 2rem 0 3rem; }
.filters-toggle { display: none; }
.filters {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow-sm);
    align-self: start;
}
.filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.filters__title { font-weight: 700; margin: 0; }
.filters__group { border: 0; padding: 0; margin: 0 0 1rem; }
.filters__group legend { font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }

/* Nel catalogo la colonna dei risultati è più stretta: schede più compatte
   così restano due per riga anche accanto ai filtri */
.catalog-results .car-grid { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); }

.results-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.results-count { margin: 0; }
.sort-form { display: flex; gap: .5rem; align-items: center; }
.sort-form select {
    padding: .5rem .75rem; font: inherit;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}

.pagination { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: 2rem; }
.pagination__link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.4rem; padding: .5rem .7rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--text); font-size: .92rem; font-weight: 600; background: #fff;
}
.pagination__link:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination__link.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination__gap { padding: .5rem .25rem; color: var(--muted); }

/* Scheda auto */
.vehicle { padding: 1rem 0 3rem; }
.vehicle__head { margin-bottom: 1.5rem; }
.vehicle__title { margin-bottom: .5rem; }
.vehicle__meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: 0; font-size: .9rem; }
/* Su telefono l'ordine è: foto, prezzo con i pulsanti di contatto, poi i dettagli.
   Su schermo largo il riquadro prezzo resta affiancato e segue lo scorrimento. */
.vehicle__layout {
    display: grid; gap: 2rem; align-items: start;
    grid-template-areas: "gallery" "aside" "main";
}
.vehicle__gallery-col { grid-area: gallery; min-width: 0; }
.vehicle__aside { grid-area: aside; min-width: 0; }
.vehicle__main { grid-area: main; min-width: 0; }
.vehicle__main > .vehicle__block:first-child { margin-top: 0; }
.vehicle__block { margin-top: 2.25rem; }
.vehicle__block h2 { font-size: 1.25rem; padding-bottom: .5rem; border-bottom: 2px solid var(--line); }

.gallery { border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.gallery__stage { position: relative; aspect-ratio: 4 / 3; background: #0b1220; }
.gallery__image { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.gallery__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: rgba(255,255,255,.9); border: 0; border-radius: 50%;
    font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer;
    box-shadow: var(--shadow-md);
}
.gallery__nav:hover { background: #fff; }
.gallery__nav--prev { left: .75rem; }
.gallery__nav--next { right: .75rem; }
.gallery__counter {
    position: absolute; right: .75rem; bottom: .75rem;
    padding: .2rem .6rem; border-radius: 999px;
    background: rgba(14,22,38,.72); color: #fff; font-size: .8rem; font-weight: 600;
}
.gallery__thumbs {
    display: flex; gap: .5rem; padding: .6rem;
    overflow-x: auto; background: #fff; border-top: 1px solid var(--line);
}
.gallery__thumb {
    flex: 0 0 92px; padding: 0; border: 2px solid transparent; border-radius: 6px;
    background: none; cursor: pointer; overflow: hidden; line-height: 0;
}
.gallery__thumb img { width: 92px; height: 69px; object-fit: cover; }
.gallery__thumb.is-active { border-color: var(--brand); }
.gallery--empty { padding: 1.25rem; text-align: center; }

.spec-grid { display: grid; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 1.25rem 0 0; }
.spec { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); font-size: .9rem; }
.spec dd { margin: 0; font-weight: 600; text-align: right; }

.equipment-list {
    list-style: none; padding: 0; margin: 1.25rem 0 0;
    display: grid; gap: .4rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.equipment-list li { position: relative; padding-left: 1.4rem; font-size: .94rem; }
.equipment-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.price-box {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow-md);
}
.price-box__price { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; color: var(--ink); margin: 0 0 .25rem; }
.price-box__note { font-size: .85rem; color: var(--muted); }
.price-box__alert {
    padding: .7rem .9rem; margin: .75rem 0 0;
    background: var(--warn-soft); border-radius: var(--radius-sm);
    font-size: .88rem; color: var(--warn);
}
.price-box__actions { margin-top: 1.25rem; display: grid; gap: .5rem; }
.price-box__actions .btn--block + .btn--block { margin-top: 0; }
.price-box__facts {
    list-style: none; padding: 1.25rem 0 0; margin: 1.25rem 0 0;
    border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted);
}
.price-box__facts li { position: relative; padding-left: 1.2rem; margin-bottom: .4rem; }
.price-box__facts li::before { content: "•"; position: absolute; left: .25rem; color: var(--brand); }

.lead-form { margin-top: 1.25rem; }
.lead-form__actions { display: grid; gap: .5rem; margin-top: 1.25rem; }
.lead-form__actions .btn--block + .btn--block { margin-top: 0; }
.lead-form__note { font-size: .84rem; color: var(--muted); margin-top: .75rem; }

/* Contatti */
.contact-layout { display: grid; gap: 2rem; align-items: start; }
.contact-cards { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 1.25rem; }
.contact-card {
    display: flex; flex-direction: column; gap: .15rem;
    padding: 1.1rem; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text); box-shadow: var(--shadow-sm);
}
.contact-card:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow-md); }
.contact-card__label { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.contact-card strong { font-size: 1.02rem; }
.contact-card .u-muted { font-size: .84rem; }
.hours-list--lg { font-size: .95rem; }
.hours-list--lg li { border-bottom: 1px solid var(--line); padding: .5rem 0; }
.hours-list--lg li:last-child { border-bottom: 0; }
.hours-list--lg strong { color: var(--text); }

.map-box { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #eef4f7 0%, #f8fbfa 100%); box-shadow: var(--shadow-md); }
.map-box__placeholder { min-height: 320px; padding: 3rem 1.5rem; text-align: center; display: grid; place-content: center; }
.map-box__placeholder h3 { margin: .6rem 0 .35rem; color: var(--brand); }
.map-box__placeholder p { margin: 0 0 1rem; color: var(--muted); }
.map-box__pin { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; margin: 0 auto; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.7rem; box-shadow: 0 10px 24px rgba(10, 120, 95, .22); }
.map-box__placeholder .btn { margin: .35rem .25rem 0; }
.map-box iframe { display: block; width: 100%; height: clamp(360px, 52vw, 520px); border: 0; }

/* Errori */
.error-page { text-align: center; padding: 3rem 0; }
.error-page__code { font-size: clamp(3rem, 12vw, 6rem); font-weight: 800; color: var(--line); margin: 0; line-height: 1; }
.error-page__title { margin-top: .5rem; }
.error-page__text { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.error-page__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem; }

/* 8) AUTENTICAZIONE ----------------------------------------------------- */
.body--auth { background: var(--bg-soft); }
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; padding: 1.25rem; }
.auth-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; max-width: 480px; width: 100%; margin: 0 auto 1.5rem;
}
.auth-main { max-width: 480px; width: 100%; margin: 0 auto; flex: 1; }
.auth-main .flash-stack { padding: 0; margin-bottom: 1rem; }
.auth-footer { max-width: 480px; width: 100%; margin: 2rem auto 0; text-align: center; font-size: .85rem; color: var(--muted); }

.auth-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(1.5rem, 5vw, 2.25rem); box-shadow: var(--shadow-md);
}
.auth-card__title { margin-bottom: .35rem; }
.auth-card__lead { color: var(--muted); font-size: .94rem; margin-bottom: 1.5rem; }
.auth-card__links { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.25rem; font-size: .9rem; }
.auth-card__note { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

/* 9) AREA CLIENTE ------------------------------------------------------- */
.account-layout { display: grid; gap: 1.5rem; align-items: start; }
.account-nav {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.account-nav__user { display: flex; align-items: center; gap: .75rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.account-nav__user strong { display: block; font-size: .95rem; }
.account-nav__user small { color: var(--muted); font-size: .8rem; word-break: break-all; }
.avatar {
    display: grid; place-items: center; flex: 0 0 auto;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand-dark); font-weight: 700;
}

.side-nav { list-style: none; padding: 0; margin: 0 0 1rem; }
.side-nav__link {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .6rem .75rem; margin-bottom: .15rem;
    border-radius: var(--radius-sm);
    color: var(--text); font-size: .94rem; font-weight: 500;
}
.side-nav__link:hover { background: var(--bg-soft); text-decoration: none; }
.side-nav__link.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }

.account-head { margin-bottom: 1.5rem; }
.account-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .35rem; }
.account-main > .card + .card { margin-top: 1.25rem; }

.stat-cards { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1.5rem; }
.stat-card {
    display: flex; flex-direction: column; gap: .15rem;
    padding: 1.1rem 1.25rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--text); box-shadow: var(--shadow-sm);
}
a.stat-card:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow-md); }
.stat-card__value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-card__label { font-size: .85rem; color: var(--muted); }
.stat-card--cta { background: var(--brand-soft); border-color: #c9d9f8; }
.stat-card--warn { background: var(--warn-soft); border-color: #f0d9b3; }
.stat-card--alert { background: var(--danger-soft); border-color: #f3c6c6; }

.request-list { list-style: none; padding: 0; margin: 0; }
.request-item {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: .9rem 0; border-bottom: 1px solid var(--line);
}
.request-item:last-child { border-bottom: 0; }
.request-item__title { margin: 0 0 .15rem; font-weight: 600; }
.request-item__body { display: grid; gap: .35rem; }
.request-item--detailed { align-items: flex-start; }

/* 10) ADMIN ------------------------------------------------------------- */
.body--admin { background: var(--bg-soft); }
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }

.admin-sidebar {
    display: none;
    flex-direction: column; gap: 1.5rem;
    padding: 1.25rem;
    background: var(--ink); color: #c3cddd;
}
.admin-sidebar.is-open { display: flex; }
.admin-logo { display: flex; align-items: center; gap: .6rem; color: #fff; }
.admin-logo:hover { text-decoration: none; }
.admin-logo strong { display: block; font-size: 1rem; }
.admin-logo small { font-size: .76rem; color: #8d9bb3; }
.admin-sidebar .side-nav { margin: 0; }
.admin-sidebar .side-nav__link { color: #c3cddd; }
.admin-sidebar .side-nav__link:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar .side-nav__link.is-active { background: var(--brand); color: #fff; }
.admin-sidebar__foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--ink-line); }
.admin-sidebar__foot .btn--ghost { background: rgba(255,255,255,.1); color: #fff; }
.admin-user { margin: .75rem 0; font-size: .85rem; }
.admin-user strong { display: block; color: #fff; }
.admin-user small { color: #8d9bb3; }

.admin-content { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
    display: flex; align-items: center; gap: 1rem;
    padding: .85rem clamp(1rem, 3vw, 2rem);
    background: #fff; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.admin-topbar__title { margin: 0; font-weight: 700; font-size: 1.05rem; margin-right: auto; }
.admin-main { padding: clamp(1rem, 3vw, 2rem); flex: 1; min-width: 0; }
.admin-main > .flash-stack { padding: 0; margin: 0 0 1.25rem; }

.admin-grid { display: grid; gap: 1.25rem; }
.admin-form .card + .card { margin-top: 1.25rem; }

.toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
    padding: .9rem 1rem; margin-bottom: 1.25rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.field--inline { margin: 0; flex: 1 1 180px; }
.toolbar .field--inline:first-child { flex: 2 1 260px; }

.page-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.row-actions { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.row-actions--spaced { justify-content: flex-start; margin-top: 1.5rem; }

.cell-vehicle { display: flex; align-items: center; gap: .75rem; }
.cell-vehicle img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; background: var(--bg-soft); }
.row--highlight { background: #fffdf5; }
.row--dimmed { opacity: .6; }
.select--status { padding: .35rem .5rem; font-size: .85rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; max-width: 190px; }

.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.form-grid .field { margin-bottom: 0; }
.form-grid .field--full { grid-column: 1 / -1; }

/* Procedura guidata di inserimento auto */
.steps {
    display: grid; gap: .5rem;
    list-style: none; padding: 0; margin: 0 0 1.25rem;
}
.step {
    display: flex; align-items: center; gap: .75rem;
    padding: .75rem 1rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.step__num {
    display: grid; place-items: center; flex: 0 0 auto;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-soft); color: var(--muted); font-weight: 700;
}
.step__text { display: flex; flex-direction: column; line-height: 1.3; }
.step__text small { color: var(--muted); font-size: .82rem; }
.step.is-current { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 86, 211, .1); }
.step.is-current .step__num { background: var(--brand); color: #fff; }
.step.is-done .step__num { background: var(--ok-soft); color: var(--ok); }

/* Controllo di completezza della scheda */
.checklist { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.checklist__item { display: flex; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.checklist__item:last-child { border-bottom: 0; }
.checklist__item small { display: block; color: var(--muted); font-size: .84rem; }
.checklist__item em { font-style: normal; font-size: .8rem; margin-left: .25rem; }
.checklist__mark {
    display: grid; place-items: center; flex: 0 0 auto;
    width: 22px; height: 22px; margin-top: .15rem;
    border-radius: 50%; font-size: .8rem; font-weight: 700;
    background: var(--bg-soft); color: var(--muted);
}
.checklist__item.is-ok .checklist__mark { background: var(--ok-soft); color: var(--ok); }
.checklist__item.is-missing .checklist__mark { background: var(--warn-soft); color: var(--warn); }
.checklist__item.is-ok strong { color: var(--muted); font-weight: 600; }

/* Upload foto */
.dropzone { margin-bottom: 1.25rem; }
.dropzone__area {
    padding: 2rem 1.25rem; text-align: center;
    border: 2px dashed var(--line); border-radius: var(--radius);
    background: var(--bg-softer);
    transition: border-color .15s, background .15s;
}
.dropzone__area p { margin: 0 0 .5rem; }
.dropzone__area .btn { margin-bottom: .75rem; }
.dropzone__area .u-muted { font-size: .84rem; }
.dropzone__area.is-dragover { border-color: var(--brand); background: var(--brand-soft); }

.upload-progress { margin-top: 1rem; }
.upload-progress__bar { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.upload-progress__bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

.photo-grid {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.photo-tile {
    position: relative; border: 2px solid var(--line); border-radius: var(--radius-sm);
    overflow: hidden; background: var(--bg-soft); cursor: grab;
}
.photo-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-tile.is-cover { border-color: var(--brand); }
.photo-tile.dragging { opacity: .45; }
.photo-tile__flag {
    position: absolute; top: .35rem; left: .35rem;
    padding: .1rem .45rem; border-radius: 4px;
    background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; text-transform: uppercase;
}
.photo-tile__actions { position: absolute; top: .35rem; right: .35rem; display: flex; gap: .25rem; }
.photo-tile__actions .btn { background: rgba(255,255,255,.92); }
.photo-tile__actions .btn--danger { color: var(--danger); }

/* Lightbox galleria */
.lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: grid; place-items: center;
    padding: 2rem;
    background: rgba(8, 12, 20, .92);
    cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 90vh; width: auto; border-radius: 6px; }
.lightbox__close {
    position: absolute; top: 1rem; right: 1.25rem;
    width: 44px; height: 44px;
    background: rgba(255,255,255,.14); border: 0; border-radius: 50%;
    color: #fff; font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,.25); }

/* 11) RESPONSIVE -------------------------------------------------------- */
@media (max-width: 900px) {
    /* Aree di tocco comode: nessun pulsante sotto i 44px di altezza */
    .btn { min-height: 44px; }
    .btn--xs { min-height: 34px; }
    .fav-btn { width: 44px; height: 44px; }
    .gallery__thumb { flex-basis: 84px; }
    .side-nav__link, .nav-list a { min-height: 44px; }

    .nav-toggle { display: block; order: 3; }
    .btn--phone { order: 2; }
    .main-nav {
        display: none; order: 4;
        width: 100%; flex-direction: column; align-items: stretch; gap: 0;
        padding-bottom: 1rem;
    }
    .main-nav.is-open { display: flex; }
    .nav-list { flex-direction: column; gap: 0; }
    .nav-list a { display: block; padding: .75rem .25rem; border-bottom: 1px solid rgba(255,255,255,.1); }
    .nav-account { padding-top: 1rem; flex-wrap: wrap; }
    .nav-account .btn { flex: 1 1 auto; }

    .filters-toggle { display: flex; }
    .filters { display: none; }
    .filters.is-open { display: block; }

    .fab--wa .fab__label { display: none; }
    .fab--wa { padding: .85rem; }
}

@media (min-width: 700px) {
    .steps { grid-template-columns: repeat(3, 1fr); }
    .field-row { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-band__inner { grid-template-columns: 1.4fr 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
}

@media (min-width: 901px) {
    .hero__inner { grid-template-columns: 1.35fr .85fr; align-items: center; }
    .catalog-layout { grid-template-columns: 290px 1fr; }
    .vehicle__layout {
        grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr);
        grid-template-areas: "gallery aside" "main aside";
        row-gap: 0;
    }
    /* row-gap è 0: lo spazio tra galleria e dettagli lo dà il margine del blocco */
    .vehicle__main > .vehicle__block:first-child { margin-top: 2.25rem; }
    .vehicle__aside { position: sticky; top: 92px; }
    .split { grid-template-columns: 1.6fr 1fr; }
    .contact-layout { grid-template-columns: 1.1fr .9fr; }
    .account-layout { grid-template-columns: 260px 1fr; }
    .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }

    .admin-shell { grid-template-columns: 250px 1fr; }
    .admin-sidebar { display: flex; position: sticky; top: 0; height: 100vh; }
    .nav-toggle--dark { display: none; }
    .admin-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
    .admin-grid > .card + .card { margin-top: 0; }
}

@media (min-width: 1100px) {
    .form-grid { grid-template-columns: repeat(4, 1fr); }
    .form-grid .field--wide { grid-column: span 2; }
}

@media print {
    .site-header, .site-footer, .fab-stack, .cookie-banner, .lead-form, .filters, .pagination { display: none !important; }
    body { font-size: 12pt; }
    .card, .price-box { box-shadow: none; border-color: #ccc; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ========================================================================== 
   MA.RI.DI.ST. 2026 — identità e componenti portfolio
   ========================================================================== */
:root {
    --ink: #102a43;
    --ink-soft: #153b63;
    --ink-line: #294f72;
    --brand: #153b63;
    --brand-dark: #0d2a49;
    --brand-soft: #e8f0f7;
    --accent: #3c8b5f;
    --bg-soft: #f3f6f8;
    --text: #183247;
    --muted: #647786;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow-md: 0 10px 30px rgba(15, 42, 67, .09);
}

.logo--maridist { gap: .75rem; }
.logo--maridist img { width: 52px; height: 52px; }
.logo--maridist .logo__text strong { color: var(--brand); font-size: 1.18rem; letter-spacing: .045em; }
.logo--maridist .logo__text small { color: var(--accent); font-size: .66rem; letter-spacing: .035em; }
.nav-link--muted { color: var(--muted); font-size: .9rem; }

.hero--industry { background: linear-gradient(115deg, #eef4f8 0%, #fff 58%, #e7f0eb 100%); position: relative; overflow: hidden; }
.hero--industry::after { content: ""; position: absolute; inset: auto -8vw -30% auto; width: 42vw; aspect-ratio: 1; border: 42px solid rgba(21,59,99,.06); border-radius: 50%; }
.hero--industry .hero__inner { position: relative; z-index: 1; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); }
.hero--industry .hero__title { max-width: 820px; font-size: clamp(2.7rem, 6vw, 5.3rem); line-height: .98; letter-spacing: -.045em; }
.hero--industry .hero__sub { max-width: 720px; font-size: 1.18rem; }
.hero--industry .hero__title { color: var(--brand-dark); }
.hero--industry .hero__sub, .hero--industry .hero__points li { color: var(--text); }
.hero-proof { justify-self: end; width: min(100%, 360px); padding: 2.25rem; border: 1px solid rgba(21,59,99,.14); background: rgba(255,255,255,.84); box-shadow: var(--shadow-md); }
.hero-proof img { width: 180px; margin: 0 auto 1.5rem; }
.hero-proof__label { margin: 0; color: var(--brand); font-weight: 800; font-size: 1.55rem; letter-spacing: .06em; }
.hero-proof strong { color: var(--accent); }
.hero-visual { position: relative; justify-self: end; width: min(100%, 460px); margin: 0; box-shadow: 20px 20px 0 var(--accent); }
.hero-visual img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.proof-strip { color: #fff; background: var(--brand); }
.proof-strip__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.proof-strip__grid > div { padding: 1.4rem 2rem; border-left: 1px solid rgba(255,255,255,.18); }
.proof-strip__grid > div:last-child { border-right: 1px solid rgba(255,255,255,.18); }
.proof-strip strong, .proof-strip span { display: block; }
.proof-strip strong { font-size: 1.15rem; }
.proof-strip span { color: #cbd9e4; font-size: .85rem; }

.eyebrow { margin: 0 0 .55rem; color: var(--accent); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service-card { min-height: 250px; padding: 2rem; background: #fff; }
.service-card > span { color: var(--accent); font-size: .78rem; font-weight: 800; }
.service-card h3 { margin-top: 2.4rem; font-size: 1.3rem; color: var(--brand); }
.section-action { margin-top: 2rem; }
.section--dark { color: #eaf1f6; background: var(--brand-dark); }
.section--dark .section__title { color: #fff; }
.process-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 5rem; }
.process-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.18); }
.process-list li { display: grid; grid-template-columns: 70px 1fr; gap: 1rem; padding: 1.35rem 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.process-list li > span { color: #7fc49a; font-weight: 800; }
.process-list strong { color: #fff; font-size: 1.15rem; }
.process-list p { margin: .2rem 0 0; color: #b8c8d5; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.project-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project-card__image { aspect-ratio: 4/3; overflow: hidden; background: var(--brand-soft); }
.project-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.project-card:hover .project-card__image img { transform: scale(1.025); }
.project-card__body { flex: 1; padding: 1.5rem; }
.project-card__body h3 { font-size: 1.3rem; }
.project-card__body h3 a { color: var(--brand); }
.project-card__meta { color: var(--muted); font-size: .9rem; }
.visual-story__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.visual-story__grid > img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.visual-banner { padding-top: 0; }
.visual-banner img { width: 100%; max-height: 520px; object-fit: cover; }
.source-note { margin-top: .7rem; color: var(--muted); font-size: .82rem; }
.service-photo-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.25rem; }
.service-photo { position: relative; min-height: 310px; overflow: hidden; background: var(--brand-dark); }
.service-photo--wide { grid-row: span 2; min-height: 645px; }
.service-photo img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .45s ease; }
.service-photo:hover img { transform: scale(1.025); }
.service-photo::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(6,27,47,.88)); }
.service-photo > div { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 1.6rem; color: #fff; }
.service-photo h3 { margin-bottom: .25rem; font-size: 1.3rem; }
.service-photo p { color: #d5e0e8; font-size: .93rem; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.testimonial { margin: 0; padding: 1.6rem; background: #fff; border: 1px solid var(--line); }
.testimonial > p { margin: 1.6rem 0; color: var(--brand); font-size: 1.08rem; }
.testimonial footer strong, .testimonial footer small { display: block; }
.testimonial footer small { color: var(--muted); }

.page-hero { padding: clamp(4rem, 8vw, 7.5rem) 0; color: #fff; background: var(--brand-dark); }
.page-hero h1 { max-width: 900px; font-size: clamp(2.5rem, 6vw, 4.8rem); letter-spacing: -.04em; }
.page-hero p:not(.eyebrow) { max-width: 760px; color: #c8d5df; font-size: 1.18rem; }
.service-detail-list { border-top: 1px solid var(--line); }
.service-detail { display: grid; grid-template-columns: 90px 1fr; gap: 2rem; padding: 3rem 0; border-bottom: 1px solid var(--line); }
.service-detail > span { color: var(--accent); font-weight: 800; }
.service-detail > div { max-width: 820px; }
.service-detail h2 { color: var(--brand); }
.principles-card, .contact-card { padding: 2rem; background: var(--bg-soft); border-left: 5px solid var(--accent); }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 4rem; align-items: start; }
.contact-card dl { margin: 0; }
.contact-card dt { margin-top: 1.2rem; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.contact-card dd { margin: .2rem 0 0; }
.project-filters { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 1rem; margin-bottom: 2.5rem; align-items: end; }

.project-hero { padding: clamp(4rem, 8vw, 7rem) 0 10rem; color: #fff; background: var(--brand-dark); }
.project-hero h1 { max-width: 1000px; font-size: clamp(2.4rem, 5vw, 4.5rem); }
.project-hero > .container > p:not(.eyebrow) { max-width: 820px; color: #c8d5df; font-size: 1.15rem; }
.project-facts { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 2.5rem; }
.project-facts div { min-width: 140px; }
.project-facts dt { color: #8fb0c7; font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.project-facts dd { margin: .2rem 0 0; font-weight: 700; }
.project-gallery { position: relative; margin-top: -6rem; }
.project-gallery__main { width: 100%; aspect-ratio: 16/8.5; object-fit: cover; box-shadow: var(--shadow-lg); }
.project-gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.project-gallery__grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.case-study { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.case-study h2 { color: var(--brand); }
.case-study__full { grid-column: 1 / -1; max-width: 850px; }
.footer-col--brand { grid-column: span 2; }
.footer-col--brand img { width: min(100%, 360px); margin-bottom: 1rem; filter: brightness(0) invert(1); }
.publish-card { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.admin-logo img { flex: none; }

@media (max-width: 900px) {
    .hero--industry .hero__inner, .process-grid, .contact-layout, .visual-story__grid { grid-template-columns: 1fr; }
    .hero-proof { justify-self: start; }
    .hero-visual { justify-self: start; width: min(92%, 560px); }
    .service-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-grid { grid-template-columns: 1fr; }
    .service-photo-grid { grid-template-columns: 1fr; }
    .service-photo--wide { grid-row: auto; min-height: 420px; }
    .case-study { grid-template-columns: 1fr; }
    .case-study__full { grid-column: auto; }
    .footer-col--brand { grid-column: auto; }
}

@media (max-width: 620px) {
    .logo--maridist .logo__text small { display: none; }
    .hero--industry .hero__title { font-size: clamp(2.4rem, 13vw, 3.6rem); }
    .service-grid, .project-grid, .project-gallery__grid, .project-filters { grid-template-columns: 1fr; }
    .service-detail { grid-template-columns: 48px 1fr; gap: .75rem; }
    .proof-strip__grid { grid-template-columns: 1fr; }
    .proof-strip__grid > div { border: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
    .project-facts { gap: 1.25rem; }
    .publish-card { align-items: stretch; flex-direction: column; }
}

/* 13) RESTYLING CONTEMPORANEO ------------------------------------------ */
:root {
    --ink: #0b2635;
    --ink-soft: #123c50;
    --ink-line: #284e5e;
    --brand: #125574;
    --brand-dark: #0a3449;
    --brand-soft: #e8f2f4;
    --accent: #2daf73;
    --bg-soft: #f2f6f5;
    --bg-softer: #f8faf9;
    --line: #dce6e4;
    --text: #173542;
    --muted: #607681;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 2px 8px rgba(9, 48, 63, .06);
    --shadow-md: 0 14px 38px rgba(9, 48, 63, .11);
    --shadow-lg: 0 22px 56px rgba(9, 48, 63, .15);
}

body { background: #fcfdfc; }

.site-header {
    color: var(--text);
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(18, 85, 116, .1);
    box-shadow: 0 8px 28px rgba(7, 46, 61, .07);
}
.header-inner { min-height: 76px; }
.logo--maridist img { filter: drop-shadow(0 3px 7px rgba(13, 67, 91, .12)); }
.logo--maridist .logo__text strong { color: #0f4d6c; font-size: 1.22rem; }
.logo--maridist .logo__text small { color: #278d60; font-weight: 650; }
.nav-link { color: #294956; font-weight: 650; }
.nav-link:hover, .nav-link.is-active { color: var(--brand); }
.nav-link.is-active { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { border-color: #cbdad7; }
.nav-toggle span { background: var(--brand-dark); }
.btn--phone { background: var(--accent); border-color: var(--accent); box-shadow: 0 8px 20px rgba(45,175,115,.2); }
.btn--phone:hover { background: #23945f; }
.btn--primary { background: var(--brand); box-shadow: 0 8px 20px rgba(18,85,116,.16); }
.btn--primary:hover { background: var(--brand-dark); }

.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(125deg, #092f44 0%, #125b70 62%, #1b765b 135%);
}
.page-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .18;
    background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(90deg, transparent, #000 55%, #000);
}
.page-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 480px;
    aspect-ratio: 1;
    right: -120px;
    top: -250px;
    border: 70px solid rgba(255,255,255,.07);
    border-radius: 50%;
}
.page-hero h1 { text-wrap: balance; }

.hero--industry { background: linear-gradient(120deg, #edf5f4 0%, #fff 57%, #e3f0eb 100%); }
.proof-strip { background: linear-gradient(100deg, #0d4864, #125574 60%, #197255); }
.section--dark { background: linear-gradient(135deg, #082c40, #0b3b4d 70%, #12533f); }
.cta-band { background: linear-gradient(110deg, #0a354b, #125f70 62%, #218158); }
.cta-band p { color: #d9ece7; }

.service-grid { gap: 1rem; background: transparent; border: 0; }
.service-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.service-card:hover { transform: translateY(-5px); border-color: #b8d8d0; box-shadow: var(--shadow-md); }
.service-card h3 { margin-top: 2rem; }
.feature {
    padding: 1.65rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.feature h3 { color: var(--brand); }
.principles-card, .contact-card {
    border: 1px solid var(--line);
    border-top: 5px solid var(--accent);
    border-left: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.visual-story__grid > img, .visual-banner img, .service-photo { border-radius: var(--radius); }
.service-photo-grid { gap: 1.4rem; }
.project-card { border-radius: var(--radius); overflow: hidden; }
.empty-state { border-radius: var(--radius); }
.eyebrow { color: #248d61; }
.section__title { text-wrap: balance; }

@media (max-width: 900px) {
    .header-inner { min-height: 68px; }
    .main-nav { padding-top: .4rem; }
    .nav-list a { color: #294956; border-bottom-color: #e4ecea; }
    .nav-list a:hover, .nav-list a.is-active { color: var(--brand); }
}

@media (max-width: 620px) {
    .logo--maridist .logo__text strong { font-size: 1.05rem; }
    .btn--phone { padding-inline: .85rem; }
    .page-hero { padding-block: 4.25rem; }
}
