/* Cavallini – landing preventivi
   Valori da Figma "Cavallini – Restyling Sito Web" (desktop 1440, mobile 390). */

@font-face {
    font-family: "Oswald";
    src: url("../fonts/oswald-var.woff2") format("woff2");
    font-weight: 200 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Playfair Display";
    src: url("../fonts/playfair-display-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand: #6f5e52;
    --dark: #342418;
    --dark-grey: #333;
    --medium: #eeeceb;
    --light: #f9f9f9;
    --white: #fff;
    --link: #533c2d;
    --menu-border: #cfc5be;
    --card-border: #d5d1c8;
    --disabled: #767676;
    --error: #b3261e;

    --font-body: "Oswald", "Arial Narrow", sans-serif;
    --font-display: "Playfair Display", Georgia, serif;

    --margin: 80px;
    --header-h: 90px;
    --shadow-light: 8px 8px 32px rgba(59, 54, 50, .1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--light);
    color: var(--dark-grey);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: .01em;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
/* niente zoom da doppio tocco su mobile quando si premono più volte i controlli (+/−, scelte) */
button, a, label, input, select, textarea, summary, [role="option"] { touch-action: manipulation; }
p { margin: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
sup { position: relative; top: -.5em; font-size: 75%; line-height: 0; vertical-align: baseline; }   /* ® e ™ in apice senza alzare la riga */

.visually-hidden, .hp {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    background: var(--dark); color: var(--white);
    padding: 8px 16px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

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

[hidden] { display: none !important; }

.preview-bar {
    position: relative; z-index: 60;
    padding: 8px 16px;
    background: #b3261e; color: var(--white);
    font-size: 14px; font-weight: 400; text-align: center;
}

/* ---------- Bottoni ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 40px; padding: 0 16px;
    border: 1px solid var(--dark);
    font-size: 16px; font-weight: 400; line-height: 1; letter-spacing: 0;
    text-decoration: none; white-space: nowrap;
    transition: background-color .2s, color .2s;
}
.btn--outline { background: var(--white); color: var(--dark); }
.btn--outline:hover { background: var(--brand); border-color: var(--brand); color: var(--white); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--white); }
.btn--primary:hover { background: var(--dark); border-color: var(--dark); }

.link-button {
    background: none; border: 0; padding: 0;
    text-decoration: underline; text-underline-position: from-font;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky; top: 0; z-index: 40;
    background: var(--white);
    border-bottom: 1px solid var(--medium);
    /* box-shadow e non filter: un filtro impedirebbe al menu mobile (position: fixed) di coprire lo schermo */
    box-shadow: var(--shadow-light);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1440px; margin: 0 auto;
    padding: 24px var(--margin);
    min-height: var(--header-h);
}
.site-header__logo img { width: 201px; height: auto; }

.site-header__menu { display: flex; align-items: center; gap: 32px; }

.header-phone {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--dark-grey);
    font-size: 16px; line-height: 24px; letter-spacing: .16px;
}
.header-phone a { color: inherit; text-decoration: none; }
.header-phone a:hover { text-decoration: underline; text-underline-position: from-font; }

.site-header__toggle {
    display: none;
    width: 24px; height: 24px; padding: 0;
    align-items: center; justify-content: center;
    background: none; border: 0; color: var(--dark);
}
.mobile-menu__head, .mobile-lang { display: none; }

.lang-switch { position: relative; }
.lang-switch summary {
    display: flex; align-items: center; gap: 4px;
    padding: 8px; list-style: none; cursor: pointer;
    font-size: 14px; font-weight: 400; line-height: 18px; color: var(--dark);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch img:not(.lang-switch__chevron) { width: 23px; height: 17px; object-fit: cover; border: 1px solid var(--white); }
.lang-switch__chevron { transition: transform .2s; }
.lang-switch[open] .lang-switch__chevron { transform: rotate(180deg); }
.lang-switch__menu {
    position: absolute; right: 0; top: 100%;
    margin: 0; padding: 4px 0; list-style: none;
    background: var(--white);
    border: 1px solid var(--menu-border);
    box-shadow: 0 8px 20px rgba(52, 36, 24, .12);
}
.lang-switch__menu a {
    display: flex; align-items: center; gap: 4px;
    padding: 8px 12px; min-width: 96px;
    text-decoration: none; font-size: 14px; font-weight: 400; color: var(--dark);
}
.lang-switch__menu a:hover { background: var(--light); }

/* ---------- Sezione prodotto ---------- */

/* Colonne in proporzione al Figma (733 + 707 su 1440). Oltre i 1440px il contenuto resta
   centrato e il fondo si divide dove inizia il pannello bianco, che così arriva al bordo destro. */
.product {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 733fr) minmax(0, 707fr);
    padding-inline: max(0px, (100% - 1440px) / 2);
    background: linear-gradient(to right, var(--light) calc(50% + 13px), var(--white) 0);
}

.product__info {
    position: relative;
    padding: 60px 64px 80px var(--margin);
    background: var(--light);
}
.product__info-inner {
    position: sticky;
    top: calc(var(--header-h) + 24px);   /* sotto l'header fisso */
}
/* il titolo può occupare tutta la colonna; testo e galleria restano larghi come nel Figma */
.product-intro__text, .gallery { max-width: 520px; }

.pattern {
    position: absolute;
    pointer-events: none;
    user-select: none;
    width: 736px;
    height: 747px;
    max-width: none;
}
/* posizioni del Figma: dietro la galleria (rispetto al blocco titolo+foto) e in basso a destra in "Scopri anche" */
.pattern--left { left: -315px; top: 276px; z-index: -1; }
.pattern--right { right: -371px; top: 59px; }

.product-intro { display: flex; flex-direction: column; gap: 24px; }

.product-intro__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 3.61vw, 52px);   /* 52px a 1440 */
    line-height: 1.04;
    letter-spacing: .01em;
    color: var(--dark);
    text-wrap: balance;
}
.accent { color: var(--brand); }

.product-intro__text { font-size: 16px; line-height: 24px; letter-spacing: .16px; color: var(--dark-grey); }
.product-intro__text p + p { margin-top: 12px; }
.product-intro__text strong, .product-intro__text b { font-weight: 700; }

/* Galleria */
.gallery { display: flex; flex-direction: column; gap: 8px; }
.gallery__main {
    aspect-ratio: 520 / 293;
    border: .825px solid var(--brand);
    border-radius: 4px;
    overflow: hidden;
    background: var(--medium);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.gallery__thumb {
    height: 85px; padding: 0;
    border: 1px solid var(--brand);
    border-radius: 4px;
    overflow: hidden;
    background: var(--medium);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
/* Safari prima di iOS 15 non conosce aspect-ratio: stesse proporzioni con il padding */
@supports not (aspect-ratio: 1 / 1) {
    .gallery__main { position: relative; height: 0; padding-top: calc(56.346% - 1.65px); }   /* 293 / 520, meno il bordo */
    .gallery__main img { position: absolute; top: 0; left: 0; }
}
.gallery__thumb[aria-pressed="true"], .gallery__thumb:hover { border-width: 4px; }

/* ---------- Colonna preventivo ---------- */

.product__quote { background: var(--white); scroll-margin-top: var(--header-h); }

.quote { display: flex; flex-direction: column; height: 100%; }
.quote__body, .quote__thanks {
    display: flex; flex-direction: column; gap: 40px;
    padding: 60px var(--margin) 40px;
    flex: 1;
}
.quote__thanks { justify-content: flex-start; outline: none; }

.quote__intro { display: flex; flex-direction: column; gap: 24px; }
.quote__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    line-height: 34px;
    letter-spacing: .26px;
    color: #000;
}
.quote__intro .quote__title + .quote__lead { margin-top: -16px; }
.quote__lead { font-size: 20px; line-height: 28px; letter-spacing: 0; color: #000; }

.benefits {
    display: flex; gap: 48px;
    margin: 0; padding: 0 12px; list-style: none;
}
.benefit { position: relative; flex: 1 1 0; display: flex; flex-direction: column; }
.benefit + .benefit::before {
    content: ""; position: absolute; left: -24px; top: 0; bottom: 0;
    border-left: 1px solid var(--medium);
}
.benefit__title { font-size: 14px; font-weight: 400; line-height: 24px; text-transform: uppercase; color: var(--dark); }
.benefit__text { font-size: 12px; line-height: 21px; letter-spacing: .12px; color: var(--dark-grey); }

.quote__config { display: flex; flex-direction: column; gap: 40px; }
.typology-config { display: flex; flex-direction: column; gap: 40px; }

.step { display: flex; flex-direction: column; gap: 16px; }
.step__head { display: flex; flex-direction: column; gap: 4px; }
.step__title {
    float: left; width: 100%; /* le legend non rispettano il gap del flex senza float */
    font-size: 20px; font-weight: 400; line-height: 24px; letter-spacing: 0; color: #000;
}
/* Un fieldset flex non distanzia il legend in Safari (titolo attaccato alle opzioni): i fieldset dei passi
   sono blocchi normali e lo spazio sotto il titolo è un padding del legend, rispettato da tutti i browser */
fieldset.step { display: block; }
fieldset.step > .step__title { margin-bottom: 0; padding-bottom: 16px; }
fieldset.step > .step__title + * { clear: both; }
.step__hint { font-size: 14px; line-height: 21px; letter-spacing: .14px; color: #000; }
.step--size { gap: 24px; }
.step--size > .step__title { margin-bottom: -8px; }

/* Tipologia */
.type-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.type-card { position: relative; display: block; }
.type-card input, .choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-card__box {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    height: 100px; padding: 16px;
    background: var(--white);
    border: 1px solid var(--dark);
    cursor: pointer;
    transition: background-color .2s, color .2s;
}
.type-card__icon { width: 42px; height: 42px; object-fit: cover; border: 1px solid transparent; }
.type-card__label { font-size: 16px; font-weight: 400; line-height: 16px; letter-spacing: .16px; color: var(--dark); text-align: center; }
.type-card:hover .type-card__box { background: var(--brand); }
.type-card:hover .type-card__label { color: var(--white); font-weight: 300; font-size: 14px; }
.type-card input:checked + .type-card__box { background: var(--brand); }
.type-card input:checked + .type-card__box .type-card__icon { border-color: var(--white); }
.type-card input:checked + .type-card__box .type-card__label { color: var(--white); font-weight: 700; font-size: 14px; letter-spacing: .14px; }
.type-card input:focus-visible + .type-card__box { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Tendina misure */
.select { position: relative; width: 268px; max-width: 100%; }
.select__button {
    display: flex; align-items: center; gap: 12px;
    width: 100%; height: 42px; padding: 12px;
    background: var(--brand);
    border: 1px solid var(--dark);
    color: var(--white);
    font-size: 16px; font-weight: 500; line-height: 24px; letter-spacing: 0;
    text-align: left;
}
.select__button > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select__button[aria-expanded="true"] { background: var(--dark); }
.select__button[aria-expanded="true"] .select__chevron { transform: rotate(180deg); }
.select__chevron { flex: none; transition: transform .2s; }


.select__menu {
    position: absolute; left: 0; top: 100%; z-index: 10;
    width: 100%; max-height: 300px;
    margin: 0; padding: 0; list-style: none;
    overflow-y: auto; overflow-x: hidden;
    background: var(--white);
    border: 1px solid var(--menu-border);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 8px 20px rgba(52, 36, 24, .12);
    scrollbar-width: thin;
    scrollbar-color: var(--brand) transparent;
    outline: none;
}
.select__option {
    position: relative;
    display: flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 12px;
    font-size: 16px; font-weight: 400; line-height: 16px; letter-spacing: .16px; color: var(--dark);
    cursor: pointer;
}
.select__option::before {
    content: ""; flex: none;
    width: 3px; height: 20px; border-radius: 999px;
    background: transparent;
}
.select__option[aria-selected="true"]::before { background: var(--brand); }
.select__option:hover, .select__option.is-active { background: var(--light); }
/* voce attiva ben visibile quando si naviga con la tastiera (frecce) */
.select__menu:focus-visible .select__option.is-active {
    background: var(--light);
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

/* Su misura */
.custom-size { display: flex; flex-direction: column; gap: 16px; }
.custom-size__title { font-size: 16px; line-height: 24px; letter-spacing: .16px; color: #000; }
.custom-size__fields { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 172px)); gap: 16px; }

/* Campi */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label { font-size: 14px; font-weight: 400; line-height: 16px; color: var(--dark); }
.field__input {
    width: 100%; height: 42px; padding: 12px;
    background: var(--light);
    border: 1px solid var(--dark);
    border-radius: 0;
    font-size: 16px; font-weight: 200; line-height: 24px; letter-spacing: 0; color: var(--dark);
    -webkit-appearance: none; appearance: none;
}
.field__input--soft { border-color: var(--brand); }
.field__input::placeholder { color: var(--dark); opacity: 1; font-weight: 200; }
.field__input--soft::placeholder { color: var(--brand); }
.field__input, .qty__input { transition: background-color .3s ease; }
.field__input:hover, .field__input:focus, .qty__input:hover, .qty__input:focus { background-color: var(--white); }
.field__input:focus, .qty__input:focus {
    outline: 1px solid var(--brand);
    outline-offset: 2px;
    box-shadow: 0 0 0 1px rgb(176, 95, 49);
}
.field__textarea { height: 120px; resize: vertical; }
.field__input[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.field__error { scroll-margin-top: calc(var(--header-h) + 24px); font-size: 12px; line-height: 16px; font-weight: 400; color: var(--error); }

/* Grado magnetico */
.grade-options { display: flex; gap: 16px; }
.choice { position: relative; flex: 1 1 0; min-width: 0; }
.choice__box {
    display: flex; align-items: center; justify-content: center;
    height: 50px; padding: 16px 4px;
    background: var(--white);
    border: 1px solid var(--dark);
    font-size: 14px; line-height: 16px; letter-spacing: .14px; color: var(--dark);
    cursor: pointer;
    transition: background-color .2s, color .2s;
}
.choice:hover .choice__box { background: var(--light); }
.choice input:checked + .choice__box { background: var(--brand); color: var(--white); font-weight: 700; }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Campi aggiunti dall'admin, in fondo al configuratore: stessi componenti degli altri passi */
.typology-extra { display: block; }
.grade-options--wrap { flex-wrap: wrap; }
.grade-options--wrap .choice { flex: 1 1 96px; }
.grade-options--wrap .choice__box { height: auto; min-height: 50px; padding: 12px 8px; text-align: center; }
.native-select { position: relative; }
.native-select__input { padding: 0 40px 0 12px; font-family: inherit; font-weight: 400; cursor: pointer; }
.native-select__input:invalid { font-weight: 200; color: var(--brand); }   /* finché non si sceglie: come un segnaposto */
.native-select::after {
    content: ""; position: absolute; right: 16px; top: 50%;
    width: 8px; height: 8px; margin-top: -7px;
    border-right: 1.5px solid var(--dark); border-bottom: 1.5px solid var(--dark);
    transform: rotate(45deg); pointer-events: none;
}
.step--extra .consent__label { align-items: center; }
.step--extra .consent__box { margin-top: 0; }
.step--extra .consent__text--extra { font-size: 16px; line-height: 24px; letter-spacing: .16px; color: #000; }
.file { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; }
.file__input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; }
.file__button {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    height: 42px; padding: 0 20px;
    background: var(--white); border: 1px solid var(--dark);
    font-size: 14px; line-height: 16px; letter-spacing: .14px; color: var(--dark);
    cursor: pointer; transition: background-color .2s;
}
.file__button:hover { background: var(--light); }
.file__input:focus-visible + .file__button { outline: 2px solid var(--brand); outline-offset: 2px; }
.file__input[aria-invalid="true"] + .file__button { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.file__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 200; line-height: 21px; color: var(--dark); }
.file.has-file .file__name { font-weight: 400; }
.file__remove {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0;
    background: none; border: 0; color: var(--dark); cursor: pointer;
}
.file__remove:hover { color: var(--brand); }
.file__remove[hidden] { display: none; }

/* Quantità */
.qty { display: flex; gap: 8px; }
.qty__btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0;
    background: var(--white);
    border: 1px solid var(--dark);
    color: var(--dark);
}
.qty__btn:hover { background: var(--light); }
.qty__btn:disabled { opacity: .4; cursor: default; }
.qty__input {
    width: 90px; height: 40px; padding: 8px 12px;
    background: var(--light);
    border: 1px solid var(--dark);
    border-radius: 0;
    font-size: 16px; font-weight: 500; line-height: 24px; color: var(--dark);
}

.quote__divider { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--medium); }

/* Dati di contatto */
.quote__contact { display: flex; flex-direction: column; gap: 40px; }
.contact-fields { display: flex; flex-direction: column; gap: 24px; }
.required-note { font-size: 12px; font-weight: 500; line-height: 16px; color: var(--dark); }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.field--wide { grid-column: 1 / -1; }

.consents { display: flex; flex-direction: column; gap: 24px; }
.consent__label { position: relative; display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.consent__input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.consent__box {
    position: relative;
    flex: none; width: 20px; height: 20px; margin-top: 1px;
    border: 1px solid var(--dark);
    background: var(--white);
    transition: all .2s ease;
}
.consent__label:hover .consent__input:not(:checked) + .consent__box { border-color: var(--brand); background: var(--light); }
.consent__input:checked + .consent__box::after {
    content: ""; position: absolute; left: 4px; top: 4px;
    width: 10px; height: 10px; background: var(--brand);
}
.consent__input:focus-visible + .consent__box { outline: 2px solid var(--brand); outline-offset: 2px; }
.consent__text a:hover { text-decoration: none; }
.consent__input[aria-invalid="true"] + .consent__box { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.consent__text { font-size: 12px; font-weight: 400; line-height: 22px; color: var(--dark); }
.consent__text a { text-decoration: underline; text-underline-position: from-font; }
.consent .field__error { display: block; margin: 4px 0 0 28px; }

.form-message {
    padding: 12px 16px;
    border-left: 3px solid var(--error);
    background: #fbeeed;
    font-size: 14px; font-weight: 400; line-height: 21px; color: var(--dark);
}

/* Invio: grigio finché i campi obbligatori non sono compilati, marrone al passaggio e quando è pronto */
.quote__submit {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 50px; padding: 12px 16px;
    background: var(--disabled);
    border: 0;
    color: var(--medium);
    font-size: 16px; font-weight: 400; line-height: 1; letter-spacing: 0;
    transition: background-color .2s;
}
.quote__submit:hover, .quote__submit.is-ready { background: var(--brand); }
.quote__submit.is-ready:hover { background: var(--dark); }
.quote__submit[aria-busy="true"] { cursor: progress; opacity: .8; }
.quote__submit { position: relative; }
.quote__submit[data-tooltip]:not(.is-ready)::after,
.quote__submit[data-tooltip]:not(.is-ready)::before {
    position: absolute; left: 50%; pointer-events: none;
    opacity: 0; transition: opacity .15s ease, transform .15s ease;
}
.quote__submit[data-tooltip]:not(.is-ready)::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    transform: translate(-50%, 4px);
    width: max-content; max-width: min(360px, 90vw);
    padding: 8px 12px;
    background: var(--dark); color: var(--white);
    font-size: 13px; font-weight: 300; line-height: 18px; letter-spacing: .02em; text-align: center; white-space: normal;
    box-shadow: 0 6px 16px rgba(52, 36, 24, .2);
}
.quote__submit[data-tooltip]:not(.is-ready)::before {
    content: ""; bottom: calc(100% + 4px);
    transform: translate(-50%, 4px);
    border: 6px solid transparent; border-top-color: var(--dark); border-bottom: 0;
}
.quote__submit[data-tooltip]:not(.is-ready):hover::after,
.quote__submit[data-tooltip]:not(.is-ready):hover::before,
.quote__submit[data-tooltip]:not(.is-ready):focus-visible::after,
.quote__submit[data-tooltip]:not(.is-ready):focus-visible::before { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Scopri anche ---------- */

.related { position: relative; overflow: hidden; background: var(--light); }
.related__inner {
    position: relative;
    max-width: 1440px; margin: 0 auto;
    padding: var(--margin);
    display: flex; flex-direction: column; gap: 32px; align-items: center;
}
.product + .related .related__inner { padding-top: 142px; }
.related__title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 42px; line-height: 42px; letter-spacing: -.42px;
    color: var(--dark);
    text-align: center;
}
.related__list {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 24px;
    margin: 0; padding: 0; list-style: none;
    width: 100%;
}
.related__list > li { width: 410px; max-width: 100%; }
.related-card {
    display: flex; flex-direction: column; gap: 20px;
    height: 100%; min-height: 455px; padding: 24px;
    background: var(--white);
    text-decoration: none; color: var(--dark);
    transition: box-shadow .2s;
}
.related-card:hover { box-shadow: var(--shadow-light); }
.related-card__image {
    display: block;
    height: 172px;
    border: .5px solid var(--card-border);
    background: var(--light);
    overflow: hidden;
}
.related-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.related-card:hover .related-card__image img { transform: scale(1.03); }
.related-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.related-card__crumb { font-size: 16px; line-height: normal; letter-spacing: .16px; }
.related-card__name { font-size: 26px; font-weight: 400; line-height: 30px; letter-spacing: .26px; margin-bottom: 8px; }
.related-card__text {
    font-size: 14px; line-height: 21px; letter-spacing: .14px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.related-card__link {
    display: flex; align-items: center; gap: 20px; align-self: flex-end;
    font-size: 16px; font-weight: 400; color: var(--link);
}
.related-card__link span { text-decoration: underline; text-underline-position: from-font; }

/* ---------- Footer ---------- */

.site-footer { background: var(--dark); color: var(--white); font-size: 12px; font-weight: 400; line-height: 16px; letter-spacing: 0; }
.site-footer a { color: inherit; }
.site-footer__main {
    display: flex; align-items: center; justify-content: space-between; gap: 32px;
    max-width: 1440px; margin: 0 auto;
    padding: 40px var(--margin);
}
.site-footer__brand { display: flex; flex-direction: column; gap: 32px; width: 361px; padding-right: 60px; }
.site-footer__brand img { width: 207px; }
.site-footer__contacts { display: flex; gap: 32px; color: var(--light); }
.site-footer__contacts dl { display: flex; flex-direction: column; gap: 20px; margin: 0; min-width: 153px; }
.site-footer__contacts dt { font-weight: 700; }
.site-footer__contacts dd { margin: 0; }
/* hover come sul sito: link del footer bianchi → marrone brand; link legali sottolineati → senza sottolineatura, #EEECEB */
.site-footer a { transition: color .2s ease; }
.site-footer__contacts a { text-decoration: none; }
.site-footer__contacts a:hover { color: var(--brand); }
.site-footer__fsc { display: flex; align-items: flex-start; gap: 4px; }
.site-footer__fsc p { width: 124px; line-height: 20px; }
.site-footer__fsc img { width: 67px; border-radius: 8px; }

.site-footer__legal {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
    min-height: 40px; padding: 12px var(--margin);
    border-top: .5px solid #f3f2f2;
}
.site-footer__legal > * + *::before {
    content: ""; display: inline-block; vertical-align: middle;
    width: 1px; height: 16px; margin-right: 12px;
    background: var(--white);
}
.site-footer__legal a, .site-footer__legal .link-button { text-decoration: underline; text-underline-position: from-font; font-size: 12px; line-height: 16px; }
.site-footer__legal a:hover, .site-footer__legal .link-button:hover { text-decoration: none; color: var(--medium); }
.site-footer__legal .link-button::before { text-decoration: none; }

/* ---------- Pagina di ringraziamento ---------- */

.thanks { position: relative; overflow: hidden; background: var(--light); }
.thanks__inner {
    position: relative;
    max-width: 640px; margin: 0 auto;
    padding: 80px 32px 96px;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
}
.thanks__icon {
    display: grid; place-items: center;
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--brand); color: var(--white);
    margin-bottom: 8px;
}
.thanks__title {
    margin: 0;
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(30px, 3.61vw, 42px); line-height: 1.1; letter-spacing: -.01em;
    color: var(--dark); text-wrap: balance;
}
.thanks__text { font-size: 20px; line-height: 28px; color: var(--dark-grey); }
.thanks__note { font-size: 14px; line-height: 21px; color: var(--dark-grey); }
.thanks__summary {
    width: 100%; margin-top: 16px;
    background: var(--white); border: 1px solid var(--medium);
    text-align: left;
}
.thanks__summary-title {
    margin: 0; padding: 14px 24px;
    font-size: 14px; font-weight: 400; line-height: 20px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--dark); border-bottom: 1px solid var(--medium);
}
.thanks__summary dl { margin: 0; padding: 8px 24px; }
.thanks__summary dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--light); }
.thanks__summary dl > div:last-child { border-bottom: 0; }
.thanks__summary dt { color: var(--dark-grey); }
.thanks__summary dd { margin: 0; font-weight: 500; color: var(--dark); text-align: right; }
.thanks__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 16px; }
.thanks__actions .btn { height: 48px; padding: 0 24px; }

@media (max-width: 640px) {
    .thanks__inner { padding: 48px 20px 64px; }
    .thanks__text { font-size: 17px; line-height: 25px; }
    .thanks__summary dl { padding: 4px 16px; }
    .thanks__summary-title { padding: 12px 16px; }
    .thanks__actions { flex-direction: column; width: 100%; }
    .thanks__actions .btn { width: 100%; }
}

/* ---------- Pagine di servizio ---------- */

.page__inner { max-width: 820px; margin: 0 auto; padding: 80px 32px; }
.page__title {
    margin: 0 0 32px;
    font-family: var(--font-display);
    font-size: 42px; line-height: 48px; color: var(--dark);
}
.page__body { color: var(--dark-grey); }
.page__body h2, .page__body h3 { font-weight: 500; color: var(--dark); margin: 32px 0 8px; }
.page__body p { margin: 0 0 16px; }

/* ---------- Banner cookie ---------- */

.cookie-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
    max-width: 720px; margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--medium);
    box-shadow: 0 8px 32px rgba(52, 36, 24, .18);
}
.cookie-banner__inner { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.cookie-banner__title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 28px; color: var(--dark); }
.cookie-banner__text { font-size: 14px; line-height: 21px; color: var(--dark-grey); }
.cookie-banner__text a { color: var(--dark); }
.cookie-banner__prefs { display: flex; flex-direction: column; gap: 12px; }
.cookie-pref { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.cookie-pref input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.cookie-pref strong { font-weight: 500; color: var(--dark); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
    :root { --margin: 48px; }
    .product__info { padding-right: 40px; }
    .benefits { gap: 32px; padding: 0; }
    .benefit + .benefit::before { left: -16px; }
}

@media (max-width: 1080px) {
    .site-footer__main { flex-wrap: wrap; align-items: flex-start; }
    .site-footer__brand { width: auto; padding-right: 0; }
}

@media (max-width: 1024px) {
    :root { --margin: 32px; --header-h: 45px; }

    .site-header__inner { padding: 8px var(--margin); min-height: 0; }
    .site-header__logo img { width: 158px; }
    .site-header__toggle { display: inline-flex; }
    /* Menu mobile come quello del sito: pannello a tutto schermo #342418, testi bianchi */
    .site-header__menu {
        position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100;   /* non inset: Safari solo da iOS 14.5 */
        display: flex; flex-direction: column; align-items: stretch; gap: 32px;
        padding: 8px var(--margin) 32px;   /* logo e chiusura nella stessa posizione dell'header */
        background: var(--dark);
        color: var(--white);
        overflow-y: auto;
        opacity: 0; visibility: hidden;
        transition: opacity .3s ease, visibility .3s ease;
    }
    .site-header.is-open .site-header__menu { opacity: 1; visibility: visible; }
    .site-header.is-open { z-index: 200; }   /* sopra anche il banner cookie */
    html.menu-open { overflow: hidden; }

    .mobile-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
    .mobile-menu__head img { width: 158px; height: auto; filter: brightness(0) invert(1); }   /* stesso logo, in bianco */
    .mobile-menu__close {
        display: flex; align-items: center; justify-content: center;
        width: 24px; height: 24px; padding: 0;
        background: none; border: 0; color: var(--white);
    }

    .site-header__menu .header-phone { color: var(--white); font-size: 18px; line-height: 28px; align-items: flex-start; }
    .site-header__menu .header-phone img { filter: brightness(0) invert(1); margin-top: 2px; }
    /* un numero per riga: la barra di separazione non serve (font-size e line-height 0 la annullano) */
    .site-header__menu .header-phone > span { display: flex; flex-direction: column; gap: 8px; font-size: 0; line-height: 0; }
    .site-header__menu .header-phone a { font-size: 18px; line-height: 28px; }

    .site-header__menu .btn { width: 100%; height: 50px; font-size: 16px; }
    .site-header__menu .btn--outline { background: var(--white); border-color: var(--white); color: var(--dark); }
    .site-header__menu .btn--outline:hover { background: var(--brand); border-color: var(--brand); color: var(--white); }

    .site-header__menu .lang-switch { display: none; }
    .mobile-lang { display: flex; gap: 8px; }
    .mobile-lang a {
        display: flex; align-items: center; gap: 6px;
        padding: 8px 16px;
        color: var(--white); text-decoration: none;
        font-size: 14px; font-weight: 400; line-height: 1;
        transition: background-color .2s ease;
    }
    .mobile-lang a:hover, .mobile-lang a[aria-current="true"] { background: #e4e4e4; color: var(--dark); }
    .mobile-lang img { width: 23px; height: 17px; object-fit: cover; }

    .product { grid-template-columns: minmax(0, 1fr); }
    .product__info { padding: 40px var(--margin) 48px; }
    .product__info-inner { position: static; max-width: none; }
    .pattern--left { display: none; }

    .quote__body, .quote__thanks { padding: 32px var(--margin); gap: 32px; }
}

@media (max-width: 640px) {
    .product-intro__title { font-size: 26px; line-height: 34px; letter-spacing: .26px; }
    .gallery__main { aspect-ratio: 326 / 293; }
    .gallery__thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gallery__thumb { height: auto; aspect-ratio: 106 / 85; }
    @supports not (aspect-ratio: 1 / 1) {
        .gallery__main { padding-top: calc(89.877% - 1.65px); }   /* 293 / 326, meno il bordo */
        .gallery__thumb { position: relative; height: 0; padding-top: calc(80.189% - 2px); }   /* 85 / 106, meno il bordo */
        .gallery__thumb img { position: absolute; top: 0; left: 0; }
    }

    .quote__title { font-size: 20px; line-height: 24px; font-family: var(--font-body); font-weight: 400; letter-spacing: 0; color: var(--dark); }
    .quote__contact .quote__title { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 30px; color: #000; }
    .quote__lead { font-size: 14px; line-height: 21px; letter-spacing: .14px; }
    .quote__intro { gap: 32px; }
    .quote__intro .quote__title + .quote__lead { margin-top: -24px; }
    /* su mobile solo le etichette, affiancate */
    .benefits { gap: 24px; padding: 0; justify-content: flex-start; }   /* 12px esatti tra testo e lineetta */
    .benefit { flex: 0 1 auto; justify-content: center; }
    .benefit + .benefit::before { left: -12px; }
    /* su una riga finché ci stanno; i titoli più lunghi (inglese) vanno a capo invece di uscire dallo schermo */
    .benefit { min-width: 0; }
    .benefit__title { font-size: clamp(11px, 3.2vw, 14px); line-height: 20px; }
    .benefit__text { display: none; }

    .type-options { gap: 12px; }

    /* configuratore: sempre 12px tra etichetta e controllo */
    .quote__config .step { gap: 12px; }
    .quote__config fieldset.step > .step__title { padding-bottom: 12px; }
    .quote__config .step--size { gap: 24px; }
    .quote__config .step--size > .step__title { margin-bottom: -12px; }
    .quote__config .custom-size { gap: 12px; }
    .quote__config .field { gap: 12px; }
    .select { width: 100%; }
    .custom-size__fields { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
    .grade-options { gap: 16px; }
    .choice__box { padding: 16px 0; }

    .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .quote__contact { gap: 24px; }
    .consent__box { width: 18px; height: 18px; }
    .consent__text { line-height: 16px; }
    .consents { gap: 24px; }

    .related__inner { padding: 48px var(--margin) 64px; gap: 24px; align-items: stretch; }
    .related__title { font-size: 26px; line-height: 40px; text-align: left; letter-spacing: 0; }
    .related__list > li { width: 100%; }
    .related-card { min-height: 429px; }
    .related-card__name { font-size: 20px; line-height: 24px; }
    .related-card__link { align-self: flex-start; }
    .pattern--right { display: none; }

    .site-footer__main { flex-direction: column; gap: 68px; padding: 32px var(--margin); }
    .site-footer__contacts { flex-direction: column; gap: 32px; }
    .site-footer__legal { padding: 32px var(--margin); row-gap: 12px; }

    .cookie-banner { left: 8px; right: 8px; bottom: 8px; }
    .cookie-banner__inner { padding: 20px; }
    .cookie-banner__actions .btn { flex: 1 1 auto; }
}

/* schermi molto stretti (es. iPhone SE 1ª gen.): le etichette dei vantaggi possono andare a capo */
@media (max-width: 340px) {
    .benefit__title { white-space: normal; }
}
