@CHARSET "UTF8";

/* =========================================================================
   VARIABILI GLOBALI (CARATTERE, PROFONDITÀ E OMBRE REALISTICHE)
   ========================================================================= */
:root {
    --dark-blue: #0A192F;
    --dark-blue-light: #112240;
    --dark-blue-lighter: #1d3557; 
    --acid-green: #ccff00;
    --acid-green-hover: #b3e600;
    
    /* Toni base per non avere il "bianco piatto" ovunque */
    --tech-silver: #eef2f6;   /* Grigio metallico chiarissimo */
    --tech-slate: #f8fafc;    /* Grigio ghiaccio per i box */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --bg-page: #d1d5db;       /* Sfondo pagina più scuro per esaltare le ombre */
    
    /* OMBRE REALISTICHE MULTILIVELLO (Stile Apple/Stripe)
       Un'ombra vera ha un nucleo scuro vicino all'oggetto e un alone largo */
    --shadow-real-sm: 0 1px 2px rgba(0,0,0,0.06), 
                      0 2px 4px rgba(0,0,0,0.06);
                      
    --shadow-real-md: 0 2px 4px rgba(0,0,0,0.05), 
                      0 4px 8px rgba(0,0,0,0.05), 
                      0 8px 16px rgba(0,0,0,0.05);
                      
    --shadow-real-lg: 0 2px 4px rgba(0,0,0,0.04), 
                      0 4px 8px rgba(0,0,0,0.04), 
                      0 8px 16px rgba(0,0,0,0.04), 
                      0 16px 32px rgba(0,0,0,0.04), 
                      0 32px 64px rgba(0,0,0,0.04);
    
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;
    --font-heading: 'Teko', sans-serif;
    --font-body: 'Montserrat', sans-serif;

    /* Palette unificata blocchi contenuto: un solo sfondo e un solo bordo per coerenza */
    --block-bg: #eef2f7;
    --block-bg-inner: #f5f7fa;
    --block-border: #e2e8f0;
    --shadow-block: 0 2px 4px rgba(0,0,0,0.06),
                    0 4px 12px rgba(0,0,0,0.06),
                    0 8px 24px rgba(0,0,0,0.06);
    --shadow-block-sm: 0 1px 3px rgba(0,0,0,0.06),
                       0 2px 8px rgba(0,0,0,0.05);

    /* Frecce modal galleria (tema Pneus: accento --acid-green) */
    --gallery-modal-arrow-outside-gap: 18px;
    --gallery-modal-arrow-font-size: calc(46px * 1.1);
    --gallery-modal-arrow-shape-height: calc(56px * 1.1);
    --gallery-modal-arrow-shape-radius: 32%;
    --gallery-modal-arrow-border-width: 1px;
    --gallery-modal-arrow-top: 50%;
    --gallery-modal-arrow-translate-y: -50%;
}

/* =========================================================================
   IMPOSTAZIONI BASE E WRAPPER
   ========================================================================= */
body {
    background-color: var(--bg-page);
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--text-main);
}

.modern-ebay-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    background: var(--tech-slate); /* Sfondo del template non bianco puro */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-real-lg); /* Ombra potente e iper-realistica */
    overflow: hidden;
}

h1, h2, h3 { font-family: var(--font-heading); text-transform: uppercase; margin-top: 0; }
a { transition: all 0.3s ease; text-decoration: none !important; }

/* =========================================================================
   HEADER & NAVBAR
   ========================================================================= */
.main-header { 
    background: var(--dark-blue); 
    padding: 20px; 
    box-shadow: var(--shadow-real-md);
    position: relative;
    z-index: 10;
}
.header-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.logo-img { max-height: 60px; }
.contact-links { display: flex; justify-content: flex-end; gap: 15px; }

.btn-acid,
.btn { background: var(--acid-green); color: var(--dark-blue); font-weight: 700; padding: 10px 24px; border-radius: 50px; }
.btn-acid:hover, .btn:hover { background: var(--acid-green-hover); color: var(--dark-blue); transform: translateY(-2px); box-shadow: var(--shadow-real-sm); }

.btn-outline,
.btn-ghost { background: transparent; color: var(--acid-green); border: 2px solid var(--acid-green); font-weight: 700; padding: 8px 24px; border-radius: 50px; }
.btn-outline:hover, .btn-ghost:hover { background: rgba(204, 255, 0, 0.1); color: var(--acid-green); }

.top-menu { background: var(--dark-blue-light); border-bottom: 3px solid var(--acid-green); }
.top-menu ul { display: flex; justify-content: center; margin: 0; padding: 0; list-style: none; }
.top-menu .navbar-nav > li > a { color: var(--white) !important; background-color: transparent !important; padding: 15px 30px; display: block; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.top-menu .navbar-nav > li > a:hover { color: var(--acid-green) !important; background-color: var(--dark-blue-lighter) !important; }

/* =========================================================================
   LAYOUT CONTENUTI
   ========================================================================= */
.content-area { padding: 40px 30px; }

/* Blocco unificato: un'unica classe .block, varianti solo in CSS (nth-child, contesto) */
.block {
    background: var(--block-bg);
    padding: 25px 30px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 25px;
    box-shadow: var(--shadow-block);
    border: 1px solid var(--block-border);
}
.block:last-child { margin-bottom: 0; }
/* Titolo prodotto: primo .block in .info-section */
.info-section > .block:nth-child(1) { padding: 28px 30px; }
.info-section > .block:nth-child(1) h1 {
    font-size: clamp(1.5rem, 4vw + 1rem, 42px);
    line-height: 1.25;
    color: var(--dark-blue);
    margin: 0 0 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.info-section > .block:nth-child(1) h1 + div {
    width: 60px; height: 4px; background: var(--acid-green);
    margin-bottom: 14px; border-radius: 2px;
}
.info-section > .block:nth-child(1) p { color: var(--text-muted); font-size: 14px; font-weight: 600; letter-spacing: 0.5px; margin: 0; }
.info-section > .block:nth-child(1) p span { color: var(--text-main); font-size: 16px; }
/* Specifiche: secondo .block */
.info-section > .block:nth-child(2) h2 { color: var(--dark-blue); font-size: 28px; margin: 0 0 18px 0; display: flex; align-items: center; gap: 10px; }
.info-section > .block:nth-child(2) h2 span { color: var(--acid-green); }
/* Certificati: terzo .block (section) */
.info-section > .block:nth-child(3) { margin-bottom: 22px; padding: 22px 24px; }
.info-section > .block:nth-child(3) h2 { font-size: 22px; color: var(--dark-blue); margin: 0 0 18px 0; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.info-section > .block:nth-child(3) h2 span { color: var(--acid-green); }
.info-section > .block:nth-child(3) > div {
    display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
}
.info-section > .block:nth-child(3) > div > div:first-child { text-align: center; }
.info-section > .block:nth-child(3) > div > div:first-child img { max-width: 100px; max-height: 50px; object-fit: contain; display: block; margin: 0 auto 8px auto; }
.info-section > .block:nth-child(3) > div > div:first-child p { font-size: 12px; color: var(--text-muted); font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: 0.5px; }
.info-section > .block:nth-child(3) > div > div:last-child { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.info-section > .block:nth-child(3) a {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 120px; height: 90px; padding: 8px; border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-block-sm); border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s; background: var(--white);
}
.info-section > .block:nth-child(3) a:hover { border-color: var(--acid-green); box-shadow: var(--shadow-real-sm); }
.info-section > .block:nth-child(3) a img { max-width: 100%; max-height: 100%; object-fit: contain; }
.info-section > .block:nth-child(3) a span {
    position: absolute; bottom: 6px; right: 6px; font-size: 10px; padding: 4px 8px;
    background: var(--dark-blue); color: var(--acid-green); border-radius: 20px; font-weight: 600; opacity: 0.8;
}
/* Alert (quarto .block = contenitore; figli .block = singolo alert) */
.info-section > .block:nth-child(4) { background: transparent; box-shadow: none; border: none; padding: 0; margin-top: 4px; margin-bottom: 0; }
.info-section > .block:nth-child(4) > .block {
    padding: 14px 18px 14px 20px; margin-bottom: 12px;
    border-radius: var(--border-radius-sm); box-shadow: var(--shadow-block-sm);
    border: 1px solid var(--block-border); background: var(--block-bg);
}
.info-section > .block:nth-child(4) > .block:last-child { margin-bottom: 0; }
.info-section > .block:nth-child(4) > .block:nth-child(1) { border-left: 4px solid #2563eb; }
.info-section > .block:nth-child(4) > .block:nth-child(2) { border-left: 4px solid var(--acid-green); }
.info-section > .block:nth-child(4) .block p:first-of-type { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--dark-blue); margin: 0 0 6px 0; letter-spacing: 0.3px; text-transform: none; }
.info-section > .block:nth-child(4) .block p:last-of-type { font-size: 13px; line-height: 1.5; color: var(--text-main); margin: 0; }
/* Policy (card spedizione/note): .policies-wrapper > .block */
.policies-wrapper > .block { padding: 30px; }
.policies-wrapper > .block h3 { color: var(--dark-blue); font-size: 26px; margin: 0; }
.policies-wrapper > .block h3 + div { width: 50px; height: 3px; background: var(--acid-green); margin-top: 8px; margin-bottom: 14px; border-radius: 2px; }
.policies-wrapper > .block > div:nth-of-type(2) {
    background: var(--block-bg-inner); padding: 12px 14px; border-radius: var(--border-radius-sm);
    border: 1px solid var(--block-border); margin-bottom: 14px;
}
.policies-wrapper > .block > div:nth-of-type(2) p:first-of-type { font-weight: 600; color: var(--text-main); font-size: 15px; margin: 0 0 4px 0; line-height: 1.4; }
.policies-wrapper > .block > div:nth-of-type(2) p:last-of-type { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.4; }
.policies-wrapper > .block p { margin-bottom: 12px; line-height: 1.5; }
.policies-wrapper > .block p:last-child { margin-bottom: 0; }
.policies-wrapper > .block > p { font-size: 14px; color: var(--text-main); word-wrap: break-word; overflow-wrap: break-word; }
.policies-wrapper > .block > p strong { display: block; margin-bottom: 6px; }

/* =========================================================================
   GALLERY - Una famiglia di classi .gallery-* (stesso blocco ripetuto da template/DB)
   ========================================================================= */
.gallery-section { margin-bottom: 30px; }

.white-bg-box,
.gallery-bg { background: var(--white); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-real-md); }

.gallery-wrapper .main-image-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-real-md);
}
/* Contenitore immagine principale: sempre quadrato, responsive (larghezza = 100% colonna) */
.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slide principale: una classe .gallery-slide, id="preview_image_N" (N da DB) */
.preview-target,
.gallery-slide {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0; visibility: hidden; transition: opacity 0.4s ease-in-out;
    background: var(--white); display: flex; align-items: center; justify-content: center;
}
.preview-target a, .gallery-slide a { display: block; width: 100%; height: 100%; position: relative; text-align: center; }
/* Immagine contenuta nel quadrato: mantiene le proporzioni, nessun ritaglio né zoom */
.preview-target img, .gallery-slide img { width: 100%; height: 100%; object-fit: contain; position: absolute; top: 0; left: 0; }

.gallery-slide:first-child,
.preview-target:target,
.gallery-slide:target { opacity: 1; visibility: visible; z-index: 10; }
.gallery-slide:first-child { z-index: 5; }
.active-default { opacity: 1; visibility: visible; z-index: 5; }
.main-image-container:has(.gallery-slide:target) .gallery-slide:first-child:not(:target),
.main-image-container:has(.preview-target:target) .active-default:not(:target) { opacity: 0; visibility: hidden; }

.zoom-indicator,
.gallery-zoom {
    position: absolute; bottom: 15px; right: 15px;
    background: var(--dark-blue); color: var(--acid-green);
    padding: 8px 15px; border-radius: 20px; font-size: 12px; font-weight: 600; opacity: 0.8;
}

/* Thumbnails: stessa larghezza del main-image-container, sempre quadrati e responsive (senza calcolo numero) */
.thumbnails-container,
.gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}
/* Thumbnail: una classe .gallery-thumb, href="#preview_image_N" */
.thumb-box,
.gallery-thumb {
    flex: 1 1 0;
    min-width: 0;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    border-radius: var(--border-radius-sm);
    background: var(--white);
    box-shadow: var(--shadow-real-md);
    overflow: hidden;
}
.gallery-thumb { border-radius: var(--border-radius-sm); }
/* Miniatura contenuta nel quadrato: mantiene le proporzioni, nessun ritaglio né zoom */
.thumb-box img, .gallery-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb-box:hover, .thumb-box:focus, .gallery-thumb:hover, .gallery-thumb:focus { border-color: var(--acid-green); transform: translateY(-3px); box-shadow: var(--shadow-real-sm); }

/* =========================================================================
   INFO PRODOTTO E TITOLO
   ========================================================================= */
.title-box h1 { font-size: 42px; line-height: 1.1; color: var(--dark-blue); margin-bottom: 5px; }
.subtitle { color: var(--text-muted); font-size: 16px; font-weight: 600; margin-bottom: 25px; }

/* GERARCHIA: Livello 1 - Titolo prodotto */
.title-box-enhanced {
    background: var(--block-bg);
    padding: 28px 30px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 25px;
    box-shadow: var(--shadow-block);
    border: 1px solid var(--block-border);
}
.title-box-enhanced h1 {
    font-size: clamp(1.5rem, 4vw + 1rem, 42px);
    line-height: 1.25;
    color: var(--dark-blue);
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.title-accent-bar {
    width: 60px;
    height: 4px;
    background: var(--acid-green);
    margin-bottom: 14px;
    border-radius: 2px;
}
.title-box-enhanced .product-vehicle {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}
.title-box-enhanced .product-tech-short {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

/* =========================================================================
   SPECIFICHE TECNICHE (EFFETTO DASHBOARD 3D)
   ========================================================================= */
.specs-card {
    background: var(--tech-silver); /* Grigio metallico, non bianco */
    padding: 25px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 25px;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.7), /* Luce superiore per profondità */
                var(--shadow-real-md);
    border: 1px solid var(--block-border);
    border-top: 4px solid var(--acid-green); /* Tocco sportivo in alto */
}

.specs-card h2 {
    /* color: var(--dark-blue); */
    color: var(--acid-green);
    font-size: 28px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.specs-card h2 span { color: var(--acid-green); }

.specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Ogni specifica sembra un "tasto" fisico bianco incastonato nel pannello grigio */
.specs-list li {
    background: var(--white);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-real-sm); /* Ombra reale sul tasto */
    border-bottom: 2px solid var(--block-border);
}

.specs-list span {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.specs-list strong {
    color: var(--dark-blue);
    font-size: 18px;
    font-weight: 700;
}

/* GERARCHIA: Livello 2 - Specifiche tecniche (tutte uguali, 2 colonne, adattabili al testo) */
.specs-card-enhanced {
    background: var(--block-bg);
    padding: 25px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 25px;
    box-shadow: var(--shadow-block);
    border: 1px solid var(--block-border);
}
.specs-card-enhanced h2 {
    color: var(--dark-blue);
    font-size: 28px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.specs-card-enhanced h2 span { color: var(--acid-green); }

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
/* Una sola classe per riga: .spec-row. Label = primo span, valore = secondo span (adatto a template/DB) */
.spec-row,
.spec-item {
    background: var(--block-bg-inner);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: var(--shadow-block-sm);
    border: 1px solid var(--block-border);
    min-width: 0;
}
.spec-row > span:first-child,
.spec-item .specs-label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.spec-row > span:last-child,
.spec-item .spec-value {
    color: var(--dark-blue);
    font-size: 16px;
    font-weight: 700;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* =========================================================================
   CERTIFICATI DI OMOLOGAZIONE (TUV + miniatura apribile in modal)
   ========================================================================= */
.certificates-section {
    margin-bottom: 22px;
    padding: 22px 24px;
    background: var(--block-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-block);
    border: 1px solid var(--block-border);
}
.certificates-title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--dark-blue);
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}
.certificates-title span { color: var(--acid-green); }

.certificates-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
}
.cert-tuv-block {
    text-align: center;
}
.cert-tuv-symbol {
    max-width: 100px;
    max-height: 50px;
    object-fit: contain;
    display: block;
    margin: 0 auto 8px auto;
}
.cert-tuv-desc {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cert-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.cert-thumb-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 90px;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-block-sm);
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.cert-thumb-box:hover { border-color: var(--acid-green); box-shadow: var(--shadow-real-sm); }
.cert-thumb-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.cert-zoom {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 10px;
    padding: 4px 8px;
}

/* Badge certificati NAD / TUV (sezione certificati CEF) */
.cert-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    margin-top: 8px;
}
.cert-badge {
    width: 80px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cert-badge--nad {
    border: 4px solid #8B0000;
    color: #8B0000;
    background: transparent;
    font-size: 30px;
    letter-spacing: 0.02em;
}
.cert-badge--tuv {
    color: #4A90D9;
    background: #4A90D9;
    position: relative;
    font-size: 28px;
    clip-path: polygon(29.29% 0%, 70.71% 0%, 100% 29.29%, 100% 70.71%, 70.71% 100%, 29.29% 100%, 0% 70.71%, 0% 29.29%);
}
.cert-badge--tuv::before {
    content: '';
    position: absolute;
    inset: 12%;
    background: var(--white);
    clip-path: polygon(29.29% 0%, 70.71% 0%, 100% 29.29%, 100% 70.71%, 70.71% 100%, 29.29% 100%, 0% 70.71%, 0% 29.29%);
    z-index: 0;
}
.cert-badge--tuv > * { position: relative; z-index: 1; }

/* =========================================================================
   GERARCHIA: LIVELLO 3 - ALERT INFORMATIVI (non come specifiche, impatto secondario)
   ========================================================================= */
.info-alerts {
    margin-top: 4px;
    margin-bottom: 0;
}

/* Blocco vuoto come 3° figlio (es. template CAL senza certificati/EPREL): nascosto per mantenere 4° = alert come in VET/CEL */
.info-section > .block:nth-child(3):empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    min-height: 0;
    height: 0;
    overflow: hidden;
}

/* Blocco informativo: compatto, valore semantico “informazione” non “dato tecnico” */
.alert-informative {
    padding: 14px 18px 14px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    box-shadow: var(--shadow-block-sm);
    border: 1px solid var(--block-border);
    background: var(--block-bg);
}
.alert-informative:last-child { margin-bottom: 0; }

.alert-informative-title {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--dark-blue);
    margin: 0 0 6px 0;
    letter-spacing: 0.3px;
    text-transform: none;
}
.alert-informative-body {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-main);
    margin: 0;
}

/* Prezzo / Verifica: stesso blocco, solo accento sinistro diverso (blu / verde) */
.alert-informative.alert-commercial { border-left: 4px solid #2563eb; }
.alert-informative.alert-warning-enhanced { border-left: 4px solid var(--acid-green); }

/* Legacy: alert-card (se usato altrove) */
.alert-card {
    padding: 22px 25px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
    box-shadow: var(--shadow-block);
    border: 1px solid var(--block-border);
    background: var(--block-bg);
}
.blue-alert { background: var(--block-bg); color: var(--text-main); border: 1px solid var(--block-border); border-left: 4px solid #2563eb; }
.green-alert { background: var(--block-bg); color: var(--text-main); border: 1px solid var(--block-border); border-left: 4px solid var(--acid-green); }
.alert-card strong { color: var(--dark-blue); font-family: var(--font-heading); font-size: 22px; display: block; margin-bottom: 5px; letter-spacing: 0.5px; }

/* =========================================================================
   GERARCHIA: LIVELLO 4 - SPEDIZIONE E NOTE ORDINE (informazioni vendita)
   ========================================================================= */
.policies-wrapper { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px; 
    margin-top: 28px; 
    padding-top: 28px; 
    border-top: 1px solid var(--block-border);
    align-items: stretch;
}
.policies-wrapper > .block {
    min-height: 100%;
}

.policy-card { 
    background: var(--block-bg); 
    padding: 30px; 
    border-radius: var(--border-radius-lg); 
    box-shadow: var(--shadow-block); 
    border: 1px solid var(--block-border);
}

.policy-card h3 { color: var(--dark-blue); font-size: 26px; margin-bottom: 0; }
.policy-card p { margin-bottom: 12px; line-height: 1.5; }
.policy-card p:last-child { margin-bottom: 0; }

/* Titolo SPEDIZIONE differenziato: barra accent come nel blocco titolo prodotto */
.policy-card-spedizione .policy-card-heading { margin-bottom: 0; }
.policy-card .policy-title-accent {
    width: 50px;
    height: 3px;
    background: var(--acid-green);
    margin-top: 8px;
    margin-bottom: 14px;
    border-radius: 2px;
}
/* Barra accent sotto il titolo (SPEDIZIONE e NOTE ORDINE) */
.policy-card-spedizione .policy-card-heading,
.policy-card-note .policy-card-heading { margin-bottom: 0; }

/* Specifica spedizione: blocco visibile ma leggero (come spec-item del template) */
.policy-spec-block {
    background: var(--block-bg-inner);
    padding: 12px 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--block-border);
    margin-bottom: 14px;
}
.policy-spec-block .policy-spec-main {
    font-weight: 600;
    color: var(--text-main);
    font-size: 15px;
    margin: 0 0 4px 0;
    line-height: 1.4;
}
.policy-spec-block .policy-spec-note {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.policy-card .policy-note-title { margin-top: 16px; margin-bottom: 6px; }
.policy-card .policy-note-body { font-size: 14px; color: var(--text-main); word-wrap: break-word; overflow-wrap: break-word; }
.policy-card .small-text { font-size: 13px; color: #475569; margin-top: 10px; }
.policy-list { word-wrap: break-word; overflow-wrap: break-word; }

/* =========================================================================
   MISURE COMPATIBILI (tabella calze da neve / catene - template CAL, CAT)
   ========================================================================= */
.misure-compatibili-outer {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}
.misure-compatibili-wrapper {
    background: var(--block-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-block);
    border: 1px solid var(--block-border);
    padding: 25px 30px;
    margin-bottom: 25px;
}
.misure-compatibili-wrapper h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--dark-blue);
    margin: 0 0 18px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}
.misure-compatibili-wrapper h2 span { color: var(--acid-green); }
.misure-compatibili-scroll {
    overflow-x: auto;
    margin-top: 8px;
    -webkit-overflow-scrolling: touch;
}
.table-misure-compatibili {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 14px;
    font-family: var(--font-body);
}
.table-misure-compatibili th,
.table-misure-compatibili td {
    border: 1px solid var(--block-border);
    padding: 8px 10px;
}
.table-misure-compatibili thead th {
    background: var(--dark-blue-lighter);
    color: var(--white);
    font-weight: 600;
    white-space: nowrap;
}
.table-misure-compatibili tbody tr:nth-child(even) {
    background: var(--block-bg-inner);
}
.table-misure-compatibili tbody td {
    color: var(--text-main);
}

/* =========================================================================
   MODALI GALLERY - Stessa famiglia .gallery-modal* (id="view_picture_N" da DB)
   ========================================================================= */
.dialogo,
.gallery-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10, 25, 47, 0.95); backdrop-filter: blur(8px); z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
}
.dialogo:target,
.gallery-modal:target { opacity: 1; visibility: visible; }
.modal-box,
.gallery-modal-box { width: 90vw; max-width: 1000px; height: 85vh; position: relative; display: flex; flex-direction: column; align-items: center; }
.chiudi-modal,
.gallery-modal-close { align-self: flex-end; color: var(--acid-green); font-family: var(--font-heading); font-size: 24px; margin-bottom: 10px; letter-spacing: 1px; }
.chiudi-modal:hover, .gallery-modal-close:hover { color: var(--white); }
/* Area immagine nel modal: sempre quadrata, responsive; immagine ritagliata dal lato più lungo */
.modal-content,
.gallery-modal-content {
    position: relative;
    flex: 0 0 auto;
    width: min(calc(90vw - 80px), min(1000px, 85vh));
    aspect-ratio: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-lg);
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
/* Sfondo bianco e ombra sullo strato sotto, così le frecce possono uscire dal riquadro senza clip */
.modal-content::before,
.gallery-modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: var(--border-radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-real-lg);
    pointer-events: none;
}
/* Immagine nel modal: contenuta nel quadrato, mantiene le proporzioni, nessun ritaglio né zoom */
.modal-content img, .gallery-modal-content img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; display: block; }
.nav-arrow,
.gallery-modal-prev,
.gallery-modal-next {
    position: absolute;
    top: var(--gallery-modal-arrow-top);
    transform: translateY(var(--gallery-modal-arrow-translate-y));
    font-size: var(--gallery-modal-arrow-font-size);
    font-weight: 700;
    line-height: 1;
    color: var(--acid-green);
    box-sizing: border-box;
    width: var(--gallery-modal-arrow-shape-height);
    min-width: var(--gallery-modal-arrow-shape-height);
    height: var(--gallery-modal-arrow-shape-height);
    min-height: var(--gallery-modal-arrow-shape-height);
    aspect-ratio: 1;
    margin: 0;
    padding: 0;
    border-radius: var(--gallery-modal-arrow-shape-radius);
    background: transparent;
    border: var(--gallery-modal-arrow-border-width) solid currentColor;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    place-items: center;
    place-content: center;
    text-align: center;
    box-shadow: none;
    z-index: 2;
}
.nav-arrow:hover, .gallery-modal-prev:hover, .gallery-modal-next:hover {
    color: var(--white);
    border-color: currentColor;
}
/* Frecce fuori dal box immagine (ancorate al bordo del riquadro) */
.left-arrow, .gallery-modal-prev {
    left: auto;
    right: 100%;
    margin-right: var(--gallery-modal-arrow-outside-gap);
}
.right-arrow, .gallery-modal-next {
    right: auto;
    left: 100%;
    margin-left: var(--gallery-modal-arrow-outside-gap);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.main-footer { background: var(--dark-blue); color: #ccd6f6; text-align: center; padding: 40px 20px; margin-top: 40px; border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg); box-shadow: 0 -10px 20px rgba(0,0,0,0.1); }
.main-footer p { margin: 0; font-size: 15px; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 768px) {
    :root {
        --gallery-modal-arrow-outside-gap: 10px;
        --gallery-modal-arrow-font-size: calc(24px * 1.1);
        --gallery-modal-arrow-shape-height: calc(48px * 1.1);
        --gallery-modal-arrow-shape-radius: 30%;
    }
    .header-content { text-align: center; justify-content: center; }
    .contact-links { margin-top: 15px; justify-content: center; }
    .title-box h1,
    .title-box-enhanced h1,
    .info-section > .block:nth-child(1) h1 { font-size: 32px; }
    .thumbnails-container,
    .gallery-thumbs { gap: 8px; }
    .policies-wrapper { grid-template-columns: 1fr; }
    .specs-list,
    .specs-grid { grid-template-columns: 1fr 1fr; }
    .certificates-content { grid-template-columns: 1fr; }
    .cert-tuv-block { margin-bottom: 8px; }
    .info-section > .block:nth-child(3) > div { grid-template-columns: 1fr; }
    .info-section > .block:nth-child(3) > div > div:first-child { margin-bottom: 8px; }
    .gallery-modal-close { padding: 12px 0; display: inline-block; }
    .chiudi-modal { padding: 12px 0; display: inline-block; }
    .table-misure-compatibili { font-size: 12px; }
    .table-misure-compatibili th,
    .table-misure-compatibili td { padding: 6px 8px; }
}