/* ==========================================================
   Greena — Design tokens
   Palette ispirata ai materiali naturali/riciclati, non al
   classico crema+terracotta o nero+verde acido.
   ========================================================== */
:root {
    /* Palette presa letteralmente dagli strati del materiale (vedi
       diagramma "struttura del prodotto" in pagina prodotto) — non un
       generico moodboard "eco", ma i colori reali del prodotto Greena. */
    --color-bg: #E8E6DC;          /* strato UV: sfondo chiaro */
    --color-bg-alt: #B9AFA0;      /* strato d'usura: superfici secondarie */
    --color-dark: #2B2E24;        /* nucleo SPC: sezioni scure, header, footer */
    --color-primary: #5C6B4B;     /* verde muschio: link, accenti secondari */
    --color-accent: #AD7A3E;      /* pellicola decorativa: un vero rovere, CTA */
    --color-accent-dark: #6B4A26; /* legno scuro: bottone secondario, sempre con sfondo pieno */
    --color-text: #20221C;        /* tappeto in foam: testo */
    --color-text-muted: #6f6b5f;
    --color-border: #d3cdbb;

    --font-display: 'Poppins', Arial, sans-serif;
    --font-body: 'Poppins', Arial, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --container-width: 1200px;
    --swatch-notch: 16px;         /* angolo tagliato: firma visiva ricorrente */
}

* { box-sizing: border-box; }

/* Footer sempre in fondo alla finestra, anche nelle pagine con poco
   contenuto (es. una collezione con solo 1-2 accessori): senza questo,
   il footer si fermerebbe subito sotto il contenuto corto, lasciando
   uno spazio bianco vuoto sotto di lui fino in fondo allo schermo. */
html { height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 0.4em;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

a { color: inherit; }

.eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.section-heading { margin-bottom: 40px; }
.section-heading h2 { font-size: 2rem; }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
    background: var(--color-dark);
    color: #fff;
    padding: 22px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease, padding 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled {
    padding: 14px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.logo-img {
    height: 28px;
    width: auto;
    display: block;
}

/* Pagine con una hero in testata: l'header parte trasparente, sovrapposto
   alla foto, con testo/logo chiari — poi, scendendo con la pagina,
   diventa bianco con testo/logo scuri (leggibile anche fuori dalla foto). */
body.has-hero .site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: transparent;
    box-shadow: none;
}
body.has-hero .site-header.is-scrolled {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.logo-img-light { display: none; }
body.has-hero .site-header.is-scrolled .logo-img-dark { display: none; }
body.has-hero .site-header.is-scrolled .logo-img-light { display: block; }
body.has-hero .site-header.is-scrolled .main-nav a,
body.has-hero .site-header.is-scrolled .lang-switch a { color: var(--color-dark); }
body.has-hero .site-header.is-scrolled .lang-switch a.active { color: var(--color-dark); }
body.has-hero .site-header.is-scrolled .main-nav a:hover { border-color: var(--color-accent); }
/* La prima sezione (la hero) deve arrivare fino in cima, dato che
   l'header adesso "galleggia" sopra di lei invece di occupare spazio. */
body.has-hero main { padding-top: 0; }

.main-nav {
    display: flex;
    flex: 1;
    justify-content: center;
}
.main-nav a {
    color: #EDEAE1;
    text-decoration: none;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
    padding-bottom: 4px;
    margin: 0 14px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover { border-color: var(--color-accent); }

/* Pulsante hamburger: nascosto su desktop, mostrato solo sotto il
   breakpoint mobile (vedi sezione Responsive più in basso). */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}
.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
body.has-hero .site-header.is-scrolled .menu-toggle span { background: var(--color-dark); }
/* Trasforma le tre linee in una "X" quando il menu è aperto */
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile a tutta pagina: nascosto di default, mostrato con
   .is-open aggiunta via JS al click sull'hamburger. */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--color-dark);
    display: flex;
    flex-direction: column;
    padding: 20px 24px 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu-top .logo-img { height: 26px; }
.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}
.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 26px;
}
.mobile-menu-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 500;
}
.mobile-menu-nav a:hover { color: var(--color-accent); }
.mobile-menu-lang { display: flex; justify-content: center; gap: 18px; }
.mobile-menu-lang a {
    color: #EDEAE1;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}
.mobile-menu-lang a.active { color: #fff; border-color: var(--color-accent); }
/* Impedisce lo scroll della pagina sotto quando il menu è aperto */
body.mobile-menu-open { overflow: hidden; }

.lang-switch a {
    margin-left: 10px;
    text-decoration: none;
    color: #c9c6b8;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: color 0.2s ease;
}
.lang-switch a.active { color: #fff; font-weight: 600; }

/* ==========================================================
   Sections — generali
   ========================================================== */
.section { padding: 80px 0; }

/* Hero: immagine a tutta pagina con testo overlay in basso a sinistra */
.section-hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: flex-end;
    padding: 0;
    background: var(--color-dark);
    overflow: hidden;
}
/* Solo la Hero della Home è a tutta pagina; le altre pagine (Chi Siamo,
   Servizi, ecc.) restano con l'altezza standard di sempre. */
.section-hero.section-hero-home { min-height: 100vh; }
.section-hero .container {
    position: relative;
    z-index: 2;
    padding-bottom: 64px;
    padding-top: 64px;
    color: #fff;
    max-width: 720px;
}
.section-hero h1 {
    font-size: 3.2rem;
    color: #fff;
}
.section-hero .subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #DCD8C8;
    margin-bottom: 18px;
}
.section-hero .body-text { color: #cfccbd; max-width: 520px; }
.section-hero .hero-media {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1;
}
.section-hero .hero-media img,
.section-hero .hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}
.section-hero .hero-media::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(0deg, rgba(31,42,28,0.92) 0%, rgba(31,42,28,0.15) 65%);
}

/* Header standard: come l'Hero ma con altezza scelta dal pannello
   (variabile --header-vh, minimo 38vh). Su mobile resta almeno 38vh. */
.section-hero.section-header-standard { min-height: var(--header-vh, 38vh); }
.section-hero.section-header-standard .container { padding-top: 120px; padding-bottom: 40px; }

/* Text-only section */
.section-text { background: var(--color-bg); }
.section-text h2 { font-size: 1.9rem; }
.section-text .body-text { max-width: 680px; color: var(--color-text-muted); }
/* Privacy Policy e Cookie Policy: testo lungo, meglio a piena larghezza
   invece che nella colonna di lettura stretta usata per i testi brevi. */
.section-text-full .body-text { max-width: none; }

/* Text + image */
.section-text-image { background: var(--color-bg-alt); }
.two-col { display: flex; gap: 56px; align-items: center; flex-wrap: wrap; }
.two-col .col-text, .two-col .col-image { flex: 1 1 420px; }
.two-col h2 { font-size: 1.9rem; }
.two-col img { width: 100%; border-radius: 2px; display: block; }

/* Category grid — il pezzo ispirato a Decodecking, reinterpretato */
/* Pagina formato — intro pulita (senza foto hero, come da mockup) */
.format-intro { background: #fff; padding: 70px 0 6px; }
.format-intro h1 { font-size: 2.3rem; margin: 10px 0 20px; }
.format-description { max-width: 680px; color: var(--color-text-muted); font-size: 1.03rem; }

.format-detail { background: #fff; }

/* ============================================================
   Pagina formato — stile fedele al mockup fornito dal cliente
   ============================================================ */
:root {
    --brand-green: #2f5233;
    --brand-green-dark: #1f3a23;
    --table-border: #e7e5e0;
    --table-zebra: #f7f6f3;
}

.breadcrumb { background: #fff; padding: 18px 0; font-size: 0.85rem; }
body.format-page {
    /* Sfondo bianco su TUTTA la pagina (non solo sui singoli blocchi):
       così durante le animazioni di comparsa non si vede alcuno stacco
       di colore tra un blocco e lo sfondo della pagina. */
    background: #fff;
}
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-green); text-decoration: underline; }
.breadcrumb-sep { margin: 0 8px; color: var(--color-border); }
.breadcrumb-current { color: var(--color-text); font-weight: 500; }

.format-title-brand {
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-green);
    letter-spacing: 0.01em;
    font-size: 2rem;
}
.format-intro-brand .eyebrow { color: var(--brand-green); font-weight: 600; }

.variant-scroll-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: var(--gallery-height, 600px);
    margin-top: 18px;
}
.variant-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 4px 2px;
    /* Scorrimento verticale disponibile ma senza barra di scorrimento a
       vista: le frecce sopra/sotto e il trascinamento indicano che si
       può scorrere per vedere altre varianti. Lo scorrimento avanza di
       un box intero alla volta grazie al calcolo dinamico in JS (non
       serve/non si usa lo scroll-snap CSS, che in alcuni browser dava
       problemi di visualizzazione). */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.variant-list::-webkit-scrollbar { display: none; }

/* Frecce su/giù della colonna varianti: solo il simbolo, ben visibile
   e grande, senza sfondo a "box" (come richiesto). */
.variant-scroll-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 32px;
    margin: 2px 0;
    border: none;
    background: none;
    box-shadow: none;
    color: var(--color-text-muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease;
}
.variant-scroll-btn:hover { color: var(--brand-green); }
/* Restano invisibili quando non c'è altro da scorrere, ma continuano a
   occupare lo spazio: altrimenti la loro comparsa/scomparsa spinge su e
   giù tutto il resto della lista, con un fastidioso "salto" della
   pagina proprio nel punto dove si sta cliccando. */
.variant-scroll-btn[hidden] { visibility: hidden; display: flex; pointer-events: none; }

.variant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    font-family: var(--font-body);
    cursor: pointer;
}
.variant-item .variant-dot {
    width: 104px;
    height: 104px;
    border-radius: 30%;
    background: var(--color-border);
    background-size: cover;
    background-position: center;
    box-shadow: 2px 1px 1px #33333336;
    flex-shrink: 0;
}
.variant-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.variant-item-name { font-size: 0.9rem; color: var(--color-text); transition: color 0.15s ease, font-weight 0.15s ease; }
.variant-item.active .variant-item-name { color: var(--brand-green); font-weight: 700; }
.variant-code { font-family: var(--font-mono); font-size: 0.72rem; color: var(--color-text-muted); }

/* Tabella specifiche, zebra + bordi, come nel mockup */
.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--table-border); }
.spec-table tr:nth-child(odd) { background: var(--table-zebra); }
.spec-table th, .spec-table td {
    text-align: left;
    padding: 16px 20px;
    border-bottom: 1px solid var(--table-border);
    font-weight: 400;
    font-size: 0.95rem;
    vertical-align: top;
}
.spec-table th { font-weight: 700; color: var(--color-text); width: 38%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* Certificazioni: icone reali del catalogo, ritagliate al contenuto e
   con sfondo trasparente (niente più margine bianco/grigio intorno).
   Il riquadro si adatta alla larghezza del logo invece di forzarlo in
   un box fisso, così non viene mai tagliato. */
.cert-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 24px 0 10px;
}
.cert-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; width: auto; max-width: 120px; }
.cert-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    background: none;
    border-radius: 0;
}
.cert-icon-circle img { height: 100%; width: auto; max-width: 120px; object-fit: contain; }
.cert-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
    line-height: 1.3;
}

/* Struttura a strati: numeri pieni verdi + barre colorate (non un disegno) */
.section-layers-brand .layer-number-brand {
    background: var(--brand-green);
    border-color: var(--brand-green);
    color: #fff;
}
.layers-image { flex: 1 1 380px; display: flex; align-items: center; justify-content: center; }
.layers-image img { width: 100%; height: auto; max-width: 480px; display: block; }

@media (max-width: 720px) {
    .composition-grid, .specs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Product single page — hero */
.product-hero { position: relative; padding: 0; min-height: 70vh; display: flex; align-items: flex-end; background: var(--color-dark); overflow: hidden; }
.product-hero .hero-media { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.product-hero .hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.product-hero .hero-media::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(0deg, rgba(31,42,28,0.92) 0%, rgba(31,42,28,0.15) 65%); }
.product-hero-content { position: relative; z-index: 2; padding: 60px 0 50px; text-align: center; }
.product-hero-content h1 { color: #fff; font-size: 2.6rem; letter-spacing: 0.02em; margin-bottom: 24px; }
.product-hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn.btn-outline { background: var(--color-accent-dark); border: none; color: #fff; }

/* Scheda articolo + texture */
.product-info-row { padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; }
.product-info-card { flex: 1 1 420px; background: #fff; padding: 60px 50px; }
.product-info-card dl { margin: 0 0 24px; }
.product-info-card dt { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-primary); margin-top: 16px; }
.product-info-card dt:first-child { margin-top: 0; }
.product-info-card dd { margin: 4px 0 0; color: var(--color-text); white-space: pre-line; }

/* Nuovo layout pagina prodotto: colonna "Varianti" verticale a sinistra,
   colonna principale (titolo + foto + galleria + tabella specifiche) a
   destra, come nel mockup fornito dal cliente. */
/* Nuovo layout pagina prodotto: colonna "Varianti" verticale a sinistra,
   colonna principale (titolo + foto + galleria) a destra, e la tabella
   specifiche subito sotto A PIENA LARGHEZZA (non schiacciata nella
   colonna immagine), come richiesto dal cliente. */
:root { --gallery-height: 780px; }
.format-detail-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-areas:
        "variants main"
        "table table";
    gap: 36px;
    align-items: start;
    padding: 20px 0 50px;
}
.product-variants-col { grid-area: variants; min-width: 0; }
.product-variants-col > .eyebrow { font-size: 0.68rem; padding-left: 6px; }
.product-main-col { grid-area: main; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.product-spec-col { grid-area: table; min-width: 0; }

/* Pagina Accessorio: stesso stile di immagine/tabella del prodotto, ma
   senza la colonna varianti (gli accessori non hanno colori/varianti). */
.accessory-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    grid-template-areas: "main table";
    gap: 40px;
    align-items: start;
    padding: 20px 0 50px;
}
@media (max-width: 900px) {
    .accessory-detail-grid { grid-template-columns: 1fr; grid-template-areas: "main" "table"; }
}
.variant-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--color-text);
    margin: 0;
    min-height: 1.6rem;
}
.product-description { color: var(--color-text-muted); margin-bottom: 20px; }
.product-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-muted);
}
.product-texture { flex: 0 0 auto; height: var(--gallery-height); background: #fff; display: flex; flex-direction: column; }
.product-texture .product-zoom-wrap { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
/* Le immagini si adattano in proporzione dentro il riquadro ad altezza
   fissa, senza essere ritagliate (contain, non cover): può comparire un
   bordo bianco sopra/sotto o ai lati se la foto ha proporzioni diverse
   dal riquadro, ma l'immagine intera resta sempre visibile. */
.product-texture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-texture a.product-lightbox-item, .product-detail-image a.product-lightbox-item { display: block; width: 100%; height: 100%; cursor: zoom-in; }
#v-gallery-thumbs.product-gallery-thumbs { display: flex; gap: 6px; padding: 8px 0 0; flex-wrap: wrap; }
#v-gallery-thumbs .product-gallery-thumb { display: block; width: 64px; height: 64px; flex-shrink: 0; border: 2px solid transparent; opacity: 0.7; transition: opacity 0.15s ease, border-color 0.15s ease; cursor: pointer; }
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-gallery-thumb:hover { opacity: 1; }
.product-gallery-thumb.active { opacity: 1; border-color: var(--color-accent); }

/* Lente di ingrandimento ad hover (stile e-commerce) sull'immagine
   principale del prodotto: mostra la stessa foto ingrandita, seguendo
   la posizione del cursore, solo su dispositivi con mouse reale. */
.product-zoom-lens {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 2;
}
.product-zoom-lens.is-active { opacity: 1; }

/* Frecce prev/next per scorrere la galleria dell'immagine principale */
.product-gallery-nav {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text, #222);
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.15s ease;
}
.product-gallery-nav:hover { background: #fff; }
.product-gallery-nav-next { right: 16px; }
.product-gallery-nav-prev { right: 58px; }

@media (max-width: 640px) {
    .product-gallery-nav { display: none !important; }
}

@media (max-width: 600px) {
    /* Sul mobile la griglia resta a due colonne (Varianti + immagine),
       come nel mockup, ma più strette — e la tabella specifiche sta
       comunque a piena larghezza sotto, grazie alla grid-template-area
       "table" definita sopra. */
    .format-detail-grid { grid-template-columns: 78px 1fr; gap: 14px; padding: 12px 0 30px; --gallery-height: 380px; }
    .variant-scroll-wrap { margin-top: 12px; }
    .variant-list { gap: 12px; }
    .variant-item { justify-content: center; }
    .variant-item .variant-dot { width: 56px; height: 56px; }
    .variant-item-text { display: none; }
    .variant-title { font-size: 1.05rem; }
}

/* Foto ambiente + composizione/diagramma */
.product-detail-row { padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; }
.product-detail-image { flex: 1 1 420px; min-height: 420px; position: relative; background: #fff; }
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-detail-panel { flex: 1 1 420px; background: #fff; padding: 50px; border-left: 1px solid var(--color-border); display: flex; flex-direction: column; justify-content: center; }
.composition-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.composition-pct { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--color-accent); }
.composition-label { display: block; font-size: 0.82rem; color: var(--color-text-muted); margin-top: 4px; }

/* Specifiche tecniche: elenco verticale (non griglia compatta), per
   riempire lo spazio disponibile nel pannello invece di lasciare vuoto. */
.specs-grid { margin-bottom: 10px; }
.specs-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid var(--color-border);
}
.specs-item:first-child { padding-top: 0; }
.specs-value { order: 2; font-family: var(--font-display); font-size: 1.5rem; color: var(--color-accent); white-space: nowrap; }
.specs-label { order: 1; font-size: 0.85rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.structure-diagram { width: 100%; border-radius: 2px; margin-top: 10px; }

/* Struttura a strati: testo vero + disegno tecnico */
.section-layers { background: #fff; }
.layers-row { display: flex; gap: 60px; flex-wrap: wrap; align-items: center; }
.layers-list { flex: 1 1 380px; }
.layer-item { display: flex; gap: 16px; margin-top: 22px; }
.layer-item:first-of-type { margin-top: 20px; }
.layer-number {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 0.85rem;
}
.layer-item strong { display: block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; }
.layer-item p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 0.92rem; }
.layers-diagram { flex: 1 1 380px; }
.layers-diagram img { width: 100%; display: block; }

/* Altre finiture (pagina prodotto singolo) — sempre sfondo bianco */
.section-related { background: #fff; }
.section-related .category-card { background: var(--color-bg-alt); }

@media (max-width: 720px) {
    .composition-grid { grid-template-columns: repeat(2, 1fr); }
    .product-info-card, .product-detail-panel { padding: 36px 24px; }
}

.section-category-grid { background: var(--color-bg); }

/* Values grid (Chi Siamo) */
.section-values { background: var(--color-bg-alt); }
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-top: 30px;
}
.value-card { border-top: 1px solid var(--color-border); padding-top: 20px; }
.value-number { display: block; font-family: var(--font-mono); color: var(--color-accent); font-size: 0.85rem; margin-bottom: 10px; }
.value-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.value-card p { color: var(--color-text-muted); font-size: 0.92rem; margin: 0; }

/* Map embed (Contatti) */
.section-map { padding: 0; }
.section-map .container { padding-top: 60px; }
.map-embed { width: 100%; height: 420px; }
.location-preview-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 24px; }

/* Banner cookie: nascosto di default, mostrato via JS al primo
   caricamento se non è ancora stato accettato su questo dispositivo. */
.cookie-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 500;
    background: var(--color-dark);
    color: #EDEAE1;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    padding: 18px 22px;
    display: none;
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner.is-shown { transform: translateY(0); opacity: 1; }
.cookie-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cookie-banner-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #DCD8C8;
    flex: 1 1 420px;
}
.cookie-banner-text a { color: var(--color-accent); text-decoration: underline; }
.cookie-banner-accept {
    flex-shrink: 0;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 26px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.cookie-banner-accept:hover { background: var(--color-accent-dark); }

@media (max-width: 640px) {
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 16px; }
    .cookie-banner-inner { gap: 14px; }
    .cookie-banner-accept { width: 100%; padding: 12px; }
}

/* News list */
.section-news-list { background: var(--color-bg); }
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);   /* 2 colonne anche con una sola news */
    gap: 30px;
}
@media (max-width: 720px) { .news-grid { grid-template-columns: 1fr; } }
.news-card { display: block; text-decoration: none; color: inherit; }
.news-card-image { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 2px; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.news-card:hover .news-card-image img { transform: scale(1.05); }
.news-card-category {
    position: absolute; top: 14px; left: 14px;
    background: var(--color-dark); color: #fff;
    font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 5px 10px; border-radius: 2px;
}
.news-card-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-primary); display: block; margin: 14px 0 6px; }
.news-card-body h3 { font-size: 1.25rem; margin: 0 0 8px; }
.news-card-body p { color: var(--color-text-muted); font-size: 0.92rem; margin: 0; }
.news-empty-state { padding: 20px 0 60px; text-align: center; }
.news-empty-state .hint { font-size: 1rem; max-width: 480px; margin: 0 auto; }

/* Process steps */
.section-process { background: var(--color-bg-alt); text-align: center; }
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin: 50px 0 40px;
}
.process-step-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.6rem;
    color: var(--color-accent);
    margin-bottom: 10px;
}
.process-step p { color: var(--color-text-muted); max-width: 260px; margin: 0 auto; }

/* Contact form */
.section-contact-form { background: var(--color-bg-alt); }
.contact-grid { display: flex; gap: 60px; flex-wrap: wrap; }
.contact-info { flex: 1 1 360px; }
.contact-info h2 { font-size: 1.9rem; }
.contact-info .body-text { color: var(--color-text-muted); }
.contact-form {
    flex: 1 1 420px;
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.contact-form label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
.contact-form input, .contact-form textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
}
.contact-form button { align-self: flex-start; }
.contact-form .success { font-family: var(--font-body); text-transform: none; letter-spacing: normal; color: #2d5a2d; background: #e8f5e9; padding: 10px 14px; border-radius: 2px; }
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 4px;
}
.version-group { margin-bottom: 40px; }
.version-group:last-child { margin-bottom: 0; }
.version-group-title {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

/* Più di 2 versioni: le affianco in griglia (fino a 4 per riga) invece
   di impilarle una sotto l'altra, come le altre griglie del sito. */
.version-groups-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    align-items: start;
}
.version-groups-row .version-group { margin-bottom: 0; }
.category-grid-compact { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 3px; }

@media (max-width: 1100px) {
    .version-groups-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .version-groups-row { grid-template-columns: 1fr; }
}
.category-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    text-decoration: none;
    background: var(--color-dark);
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.3s ease;
}
.category-card:hover img { transform: scale(1.06); opacity: 0.75; }
.category-card-label {
    position: absolute;
    left: 20px;
    bottom: 18px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.6);
}

/* Gallery */
.section-gallery { background: var(--color-bg-alt); }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.gallery-grid img { width: 100%; border-radius: 2px; display: block; }

/* CTA */
.section-cta {
    background: var(--color-dark);
    color: #fff;
    text-align: center;
}
.section-cta h2 { color: #fff; font-size: 2rem; }
.section-cta p { color: #DCD8C8; max-width: 560px; margin: 0 auto 20px; }

.hero-buttons { display: flex; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.hero-buttons > * { margin-top: 0; }
.hero-buttons > *:not(:first-child) { margin-left: 16px; }

.btn, .btn-primary {
    display: inline-block;
    padding: 13px 30px;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    /* Angolo tagliato: come i campioni fisici di materiale, riconoscibili
       al tatto dall'angolo smussato — firma visiva ricorrente del sito. */
    clip-path: polygon(0 0, calc(100% - var(--swatch-notch)) 0, 100% var(--swatch-notch), 100% 100%, 0 100%);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.btn:hover, .btn-primary:hover { transform: translateY(-1px); }

/* ==========================================================
   Footer
   ========================================================== */
.site-footer { background: var(--color-dark); color: #DCD8C8; }
.footer-grid {
    display: flex;
    gap: 60px;
    padding: 56px 0 30px;
    flex-wrap: wrap;
}
.footer-brand { flex: 1 1 280px; }
.footer-brand .logo { display: block; margin-bottom: 14px; }
.footer-brand p { color: #a9a794; font-size: 0.92rem; max-width: 320px; }
.footer-contact a { color: #cfccbd; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-contact { color: #a9a794; font-size: 0.85rem; line-height: 1.6; margin: 10px 0 0; }
.footer-address { margin-top: 6px; }
.footer-col { flex: 0 0 160px; display: flex; flex-direction: column; gap: 10px; }
.footer-col-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7d7c68;
    margin-bottom: 4px;
}
.footer-col a { color: #DCD8C8; text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom {
    border-top: 1px solid #3a4433;
    padding: 18px 0;
    font-size: 0.8rem;
    color: #7d7c68;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-bottom p { margin: 0; }
.footer-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.footer-social a {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid #4a5441; color: #d8d6c4;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.footer-social a:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* ==========================================================
   Responsive
   ========================================================== */
/* L'hamburger scatta già a una larghezza piuttosto ampia (1240px):
   con tutte le voci di menu, sotto quella soglia il menu orizzontale
   andrebbe a capo su due righe invece di stare su una sola. */
@media (max-width: 1240px) {
    .main-nav { display: none; }
    .lang-switch { display: none; }
    .menu-toggle { display: flex; }
}

@media (max-width: 720px) {
    .section { padding: 48px 0; }
    .section-hero { min-height: 60vh; }
    .section-hero.section-header-standard { min-height: max(38vh, var(--header-vh, 38vh)); }
    .section-hero.section-hero-home { min-height: 100vh; }
    .section-hero h1 { font-size: 2.2rem; }
    .two-col { gap: 30px; }
    /* Un po' di respiro in più ai lati del footer, che su schermi
       stretti risultava troppo attaccato al bordo sinistro. */
    .site-footer .container { padding-left: 32px; padding-right: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .category-card img { transition: none; }
}

/* Statistiche a colonne (numero + titolo + descrizione) */
.section-stats { background: #fff; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px 0;
}
.stat-item {
    padding: 8px 40px;
    border-left: 1px solid var(--color-border);
}
.stat-item:first-child { border-left: none; padding-left: 0; }
.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--color-dark);
    line-height: 1;
    margin-bottom: 14px;
}
.stat-title { display: block; font-size: 1rem; margin-bottom: 8px; }
.stat-description { color: var(--color-text-muted); font-size: 0.92rem; margin: 0; }

@media (max-width: 860px) {
    .stats-grid { grid-template-columns: 1fr; gap: 32px; }
    .stat-item { border-left: none; padding: 0 0 24px; border-bottom: 1px solid var(--color-border); }
    .stat-item:first-child { padding-left: 0; }
    .stat-item:last-child { border-bottom: none; padding-bottom: 0; }
}

/* Tabella specifiche tecniche (Caratteristica / Norma / Valore) */
.section-spec-table { background: var(--color-bg); }
.spec-table-wrap { overflow-x: auto; }
.spec-table-full { width: 100%; border-collapse: collapse; background: transparent; }
.spec-table-full th, .spec-table-full td {
    text-align: left;
    padding: 14px 20px;
    border-bottom: 1px solid #fff;
    font-size: 0.92rem;
}
.spec-table-full th {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 500;
}
.spec-table-full tr:last-child td { border-bottom: none; }
.spec-table-cta {
    display: inline-block;
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: underline;
    color: var(--color-dark);
}

@media (max-width: 720px) {
    .spec-table-full thead { display: none; }
    .spec-table-full, .spec-table-full tbody, .spec-table-full tr, .spec-table-full td { display: block; width: 100%; }
    .spec-table-full tr { padding: 14px 20px; border-bottom: 1px solid #fff; }
    .spec-table-full td { border-bottom: none; padding: 3px 0; }
    .spec-table-full td::before { content: attr(data-label) ": "; font-weight: 600; }
}

/* Griglia loghi (es. Certificazioni) */
.section-logos-grid { background: #fff; }
.section-heading-center { text-align: center; margin-bottom: 30px; }
.logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 48px;
}
.logo-item { display: flex; align-items: center; justify-content: center; height: 56px; }
.logo-item img { max-height: 56px; max-width: 160px; object-fit: contain; filter: grayscale(100%); opacity: 0.75; transition: filter 0.2s ease, opacity 0.2s ease; }
.logo-item:hover img { filter: grayscale(0%); opacity: 1; }

/* Vetrina collezioni: foto e testo alternati, stile editoriale */
.section-showcase { padding: 0; }
.showcase-row { display: flex; min-height: 560px; }
.showcase-row-reverse { flex-direction: row-reverse; }
.showcase-media { flex: 1 1 50%; }
.showcase-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase-text {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 90px;
    background: #fff;
}
.showcase-text .btn { align-self: flex-start; }
.showcase-tag {
    display: inline-block;
    align-self: flex-start;
    background: var(--color-dark);
    color: #fff;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    padding: 8px 16px;
    margin-bottom: 20px;
}
.showcase-heading { font-size: 2.2rem; margin: 0 0 20px; color: var(--color-text-muted); font-weight: 400; }
.showcase-description { color: var(--color-text-muted); margin: 0 0 30px; max-width: 480px; line-height: 1.7; }
.btn.btn-outline-dark {
    display: inline-block;
    align-self: flex-start;
    border: 1px solid var(--color-dark);
    color: var(--color-dark);
    text-decoration: none;
    padding: 15px 30px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline-dark:hover { background: var(--color-dark); color: #fff; }

@media (max-width: 860px) {
    .showcase-row, .showcase-row-reverse { flex-direction: column; min-height: 0; }
    .showcase-media { aspect-ratio: 4 / 3; }
    .showcase-text { padding: 40px 24px; }
    .showcase-heading { font-size: 1.6rem; }
}

/* Logo + Testo: logo centrato in alto, testo formattato sotto */
.container-narrow { max-width: 860px; }
.section-logo-text { background: var(--color-bg); text-align: center; }
.logo-text-logo { margin-bottom: 30px; }
.logo-text-logo img { height: 44px; width: auto; }
.logo-text-title { margin-bottom: 24px; }
.logo-text-body { color: var(--color-text-muted); line-height: 1.8; }
.logo-text-body p, .logo-text-body div { margin: 0 0 20px; }
.logo-text-body p:last-child, .logo-text-body > div:last-child { margin-bottom: 0; }
.logo-text-body strong, .logo-text-body b { color: var(--color-text); font-weight: 600; }

/* Griglia caratteristiche con icone */
.section-icon-features { background: #fff; }
.icon-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 32px;
}
.icon-feature-item { padding: 4px; }
.icon-feature-svg { width: 34px; height: 34px; color: var(--color-dark); margin-bottom: 18px; }
.icon-feature-title { display: block; font-size: 1rem; margin-bottom: 8px; }
.icon-feature-description { color: var(--color-text-muted); font-size: 0.92rem; margin: 0; line-height: 1.6; }

/* Griglia Categorie Servizi: sempre a colonna unica, piena larghezza */
.service-categories-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.service-category-card {
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.service-category-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.service-category-card.is-not-clickable { cursor: default; }
.service-category-card.is-not-clickable:hover { box-shadow: none; transform: none; }
.service-category-card-image { flex: 0 0 340px; overflow: hidden; }
.service-category-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-category-card-body { padding: 36px; display: flex; flex-direction: column; flex: 1; }
.service-category-card-body h3 { margin: 0 0 14px; font-size: 1.5rem; }
.service-category-card-text { color: var(--color-text-muted); line-height: 1.7; margin: 0 0 20px; flex: 1; font-size: 18px; }
.service-category-card-text p, .service-category-card-text div { margin: 0 0 14px; }
.service-category-card-link { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-accent); }

@media (max-width: 720px) {
    .service-category-card { flex-direction: column; }
    .service-category-card-image { flex: 0 0 auto; aspect-ratio: 16 / 9; }
    .service-category-card-body { padding: 24px; }
}

/* Elenco progetti di una categoria servizio */
.service-category-intro { max-width: 700px; margin-top: 16px; color: var(--color-text-muted); line-height: 1.7; }
.service-category-header { width: 100%; height: 380px; overflow: hidden; }
.service-category-header img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) {
    .service-category-header { height: 220px; }
}
.service-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.service-project-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--color-border); text-decoration: none; color: inherit; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.service-project-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.service-project-card-image { aspect-ratio: 4 / 3; overflow: hidden; }
.service-project-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-project-card-body { padding: 20px; }
.service-project-card-body h3 { margin: 0 0 8px; font-size: 1.1rem; }
.service-project-card-body p { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }

/* Dettaglio progetto: galleria + descrizione */
.service-project-detail { margin-top: 30px; }
.service-project-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 140px;
    gap: 8px;
    margin-bottom: 32px;
}
.service-project-gallery .service-project-lightbox-item { display: block; overflow: hidden; cursor: zoom-in; }
.service-project-gallery .service-project-lightbox-item.is-main { grid-column: span 4; grid-row: span 3; }
.service-project-gallery .service-project-lightbox-item:not(.is-main) { grid-column: span 2; }
.service-project-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-project-description { max-width: 760px; color: var(--color-text-muted); line-height: 1.8; }
.service-project-description p, .service-project-description div { margin: 0 0 18px; }

@media (max-width: 640px) {
    .service-project-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
    .service-project-gallery .service-project-lightbox-item.is-main { grid-column: span 2; grid-row: span 2; }
    .service-project-gallery .service-project-lightbox-item:not(.is-main) { grid-column: span 1; }
}

/* ===== Pagina Agenti: mappa + elenco ===== */
.section-agents { background: var(--color-bg); }
.agents-intro { max-width: 680px; margin-bottom: 28px; }
.agents-sent { margin-bottom: 20px; }
.agents-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: stretch; min-height: 640px; }
.agents-panel { min-width: 0; }
.agents-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.agents-filters input, .agents-filters select {
    width: 100%; padding: 12px 14px; font: inherit; font-size: 0.92rem;
    border: 1px solid var(--color-border); border-radius: 2px; background: #fff; color: var(--color-text);
}
.agents-filters input[type=search] { grid-column: 1 / -1; }
.agents-reset { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .05em; background: none; border: 1px solid var(--color-border); border-radius: 2px; cursor: pointer; color: var(--color-text); padding: 12px 14px; }
.agents-reset:hover { border-color: var(--color-accent); color: var(--color-accent); }
.agents-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--color-text-muted); margin: 0 0 12px; }
.agents-list { list-style: none; margin: 0; padding: 0 8px 0 0; display: grid; gap: 14px; max-height: 640px; overflow-y: auto; }
.agent-card { background: #fff; padding: 22px 24px; border-left: 3px solid transparent; border-radius: 2px; cursor: default; transition: border-color .2s, box-shadow .2s; }
.agent-card[hidden] { display: none; }
.agent-card.is-active { border-left-color: var(--color-accent); box-shadow: 0 6px 22px rgba(0,0,0,.08); }
.agent-card h3 { margin: 8px 0 2px; font-size: 1.15rem; }
.agent-card p { margin: 4px 0; font-size: 0.9rem; color: var(--color-text-muted); }
.agent-company { font-weight: 500; color: var(--color-text) !important; }
.agent-type { display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 2px; background: var(--color-bg); color: var(--color-text-muted); }
.agent-type-rivenditore { background: var(--color-accent); color: #fff; }
.agent-type-showroom { background: var(--color-dark, #2B2E24); color: #fff; }
.agent-type-magazzino { background: var(--color-accent-dark, #6B4A26); color: #fff; }
.agent-contacts { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.9rem; display: grid; gap: 3px; }
.agent-contacts a { color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-border); }
.agent-contacts a:hover { color: var(--color-accent); }
.agent-actions { display: flex; align-items: center; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.agent-directions { font-family: var(--font-mono); font-size: 0.8rem; color: var(--color-text); text-decoration: underline; }

.agents-map-wrap { display: flex; flex-direction: column; position: relative; min-height: 460px; }
/* Il riquadro riempie tutta l'altezza del blocco (come l'elenco a sinistra) */
.agents-map-stage { flex: 1 1 auto; width: 100%; min-height: 420px; background: #f3f1ea; border-radius: 2px; overflow: hidden; }
.agents-map-stage[hidden] { display: none; }
.agents-map-stage svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: block; }
.map-loading { padding: 40px; text-align: center; }
.italy-map-svg, .world-map-svg { width: 100%; height: 100%; }
.map-region { fill: #d6d2c2; stroke: #fff; stroke-width: 1.4; transition: fill .2s; }
.map-region.has-agents { fill: var(--color-bg-alt, #B9AFA0); cursor: pointer; }
.map-region.has-agents:hover, .map-region.is-selected { fill: var(--color-accent); }
.map-country { fill: #e1ddcf; stroke: #fff; stroke-width: .6; transition: fill .25s, opacity .25s; }
.map-country.has-agents { fill: var(--color-bg-alt, #B9AFA0); cursor: pointer; }
.map-country.has-agents:hover { fill: var(--color-accent); }
.map-country.is-current { fill: var(--color-bg-alt, #B9AFA0); }
.map-country.is-dim { opacity: .55; }
/* Vista di un solo paese (come l'Italia): solo la sagoma, senza sfondo né paesi vicini */
.agents-map-stage.is-solo { background: none; }
.is-solo .map-country { vector-effect: non-scaling-stroke; stroke-width: 1.4px; }
.is-solo .map-country.is-dim { display: none; }
.is-solo .map-country.is-current:hover { fill: var(--color-bg-alt, #B9AFA0); }
.map-marker { cursor: pointer; outline: none; transition: opacity .2s; }
.map-marker .dot { fill: var(--color-dark, #2B2E24); stroke: #fff; stroke-width: 2; transition: fill .2s; }
.map-marker.cluster .dot { fill: var(--color-accent-dark, #6B4A26); }
.map-marker .count { fill: #fff; font-family: var(--font-mono); font-size: 12px; font-weight: 500; pointer-events: none; }
.map-marker:hover .dot, .map-marker:focus .dot, .map-marker.is-active .dot { fill: var(--color-accent); }
.map-marker .pulse { fill: var(--color-accent); opacity: .5; transform-origin: center; transform-box: fill-box; animation: agent-pulse 2.4s ease-out infinite; pointer-events: none; }
.map-marker .pulse-2 { animation-delay: 1.2s; }
.map-marker.is-dim { opacity: .15; }
@keyframes agent-pulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .map-marker .pulse { animation: none; opacity: .25; } }
.agents-views { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.view-pill { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .05em; background: #fff; border: 1px solid var(--color-border); border-radius: 20px; padding: 7px 14px; cursor: pointer; color: var(--color-text); transition: background .2s, border-color .2s, color .2s; }
.view-pill span { opacity: .6; margin-left: 4px; }
.view-pill-cont { border-style: dashed; }
.view-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.view-pill.is-active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.agents-back { font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: .05em; background: none; border: 0; padding: 0 0 10px; cursor: pointer; color: var(--color-text); }
.agents-back:hover { color: var(--color-accent); }
.agents-filters select[hidden] { display: none; }
.agents-map-tip { position: absolute; transform: translate(-50%, calc(-100% - 10px)); background: var(--color-dark, #2B2E24); color: #fff; font-size: 0.8rem; padding: 6px 10px; border-radius: 2px; white-space: nowrap; pointer-events: none; z-index: 2; }

.agent-modal { position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.agent-modal[hidden] { display: none; }
.agent-modal-box { position: relative; background: var(--color-bg); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; padding: 34px 32px; border-radius: 2px; }
.agent-modal-box h3 { margin: 0 0 6px; }
.agent-modal-to { margin: 0 0 18px; color: var(--color-text-muted); }
.agent-modal-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--color-text-muted); }
.agent-modal-box .contact-form { padding: 0; box-shadow: none; background: none; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
body.agent-modal-open { overflow: hidden; }

@media (max-width: 900px) {
    .agents-layout { grid-template-columns: 1fr; }
    .agents-map-wrap { order: -1; min-height: 0; }
    .agents-map-stage { flex: none; height: 82vw; min-height: 340px; max-height: 560px; }
    .agents-list { max-height: none; padding-right: 0; }
}

/* ===== Pagina News (scheda): articolo + colonna laterale + galleria ===== */
.news-article { background: var(--color-bg); }
.news-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.news-article-lead { font-size: 1.25rem; line-height: 1.6; font-weight: 300; color: var(--color-text); margin: 0 0 28px; }
.news-article-body .body-text { color: var(--color-text-muted); line-height: 1.8; }
.news-aside { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 22px; }
.news-aside .btn { align-self: flex-start; }
.news-aside-box { background: rgba(0,0,0,0.05); padding: 24px; border-radius: 2px; }
.news-aside-box h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); margin: 0 0 14px; font-weight: 500; }
.news-aside-box dl { margin: 0; display: grid; gap: 12px; font-size: 0.92rem; }
.news-aside-box dt { font-size: 0.75rem; color: var(--color-text-muted); }
.news-aside-box dd { margin: 2px 0 0; font-weight: 500; }
.news-share { display: flex; gap: 10px; }
.news-share a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; font-size: .8rem; font-weight: 600; transition: background .2s, color .2s; }
.news-share a:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.news-back { display: inline-block; margin-bottom: 26px; font-family: var(--font-mono); font-size: .8rem; text-decoration: none; color: var(--color-text-muted); }
.news-back:hover { color: var(--color-accent); }

.news-gallery { background: #fff; }
.news-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.news-gallery-item { position: relative; display: block; overflow: hidden; border-radius: 2px; background: var(--color-dark); aspect-ratio: 4/3; }
.news-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease, opacity .3s; }
.news-gallery-item:hover img { transform: scale(1.05); opacity: .9; }
.news-gallery-item::after { content: "+"; position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--color-dark); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; opacity: 0; transition: opacity .25s; }
.news-gallery-item:hover::after { opacity: 1; }

@media (max-width: 900px) {
    .news-article-layout { grid-template-columns: 1fr; gap: 36px; }
    .news-aside { position: static; }
    .news-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Mappa Italia di dettaglio: formato verticale, non a riquadro largo */
#map-italy { background: none; }
