:root {
    --bg-main: #FCFCFA;         
    --verde-pastel: #D8E8DB;    
    --verde-main: #8BB594;      
    --verde-dark: #6C9475;      
    --verde-chiaro: #F2F7F3; 
    
    --arancio-pastel: #FDE8D8;  
    --arancio-main: #F4A27B;    
    --arancio-dark: #D68661;    
    --arancio-chiaro: #FFF7F0;

    --text-dark: #333333;       
    --text-light: #7A7A7A;      
    --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Jost', sans-serif; 
    background-color: transparent; 
    color: var(--text-dark); 
    line-height: 1.6; 
    overflow-x: hidden; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 500; color: var(--text-dark); }
a { text-decoration: none; color: inherit; }

/* --- BLOBS --- */
.parallax-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; background-color: var(--bg-main); }
.blob { position: absolute; filter: blur(80px); opacity: 0.6; animation: floatBlobs infinite alternate ease-in-out; }
.blob-1 { width: 600px; height: 600px; background-color: var(--verde-pastel); top: -10%; left: -10%; animation-duration: 25s; }
.blob-2 { width: 500px; height: 500px; background-color: var(--arancio-pastel); bottom: -15%; right: -10%; animation-duration: 30s; animation-direction: alternate-reverse; }
.blob-3 { width: 400px; height: 400px; background-color: var(--verde-main); top: 30%; left: 40%; opacity: 0.3; animation-duration: 35s; }
@keyframes floatBlobs { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, -40px) scale(1.1); } 100% { transform: translate(-40px, 60px) scale(0.95); } }

.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.animate-on-scroll.show { opacity: 1; transform: translateY(0); }

/* --- NAVBAR & MEGA MENU --- */
.main-nav { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 0 5%; height: 80px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1020; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

/* FIX LOGO: nowrap impedisce di andare a capo! */
.logo { font-size: 1.4rem; font-weight: 600; letter-spacing: 2px; cursor: pointer; color: var(--verde-dark); z-index: 1021; white-space: nowrap;}

.nav-links { display: flex; align-items: center; height: 100%; list-style: none; margin: 0; position: static;} 
.nav-links > li { height: 100%; display: flex; align-items: center; }
.nav-links > li > a { display: block; padding: 0 20px; height: 100%; display: flex; align-items: center; font-size: 0.9rem; text-transform: uppercase; font-weight: 500; letter-spacing: 1px; transition: color 0.3s; position: relative;}
.nav-links > li > a:hover { color: var(--arancio-main); }
.nav-links > li > a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: 25px; left: 20px; background-color: var(--arancio-main); transition: 0.3s; }
.nav-links > li > a:hover::after, .active-page::after { width: calc(100% - 40px); }

.hover-menu { position: static; } 
.mega-box { position: absolute; top: 100%; left: 0; width: 100vw; background: #fff; padding: 40px 10%; display: flex; justify-content: center; gap: 80px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); border-top: 4px solid var(--verde-main); opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 999; pointer-events: none;}
.hover-menu:hover .mega-box { opacity: 1; visibility: visible; pointer-events: auto; }

.mega-col { display: flex; flex-direction: column; min-width: 180px;}
.mega-col h4 { font-family: 'Jost', sans-serif; font-size: 0.85rem; color: #aaa; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 5px;}
.mega-col a { font-size: 0.95rem; color: var(--text-dark); padding: 8px 0; transition: 0.2s; }
.mega-col a:hover { color: var(--verde-main); padding-left: 5px; }

/* --- SIDEBAR E BURGER MOBILE --- */
.mobile-only { display: none !important; }
.desktop-only { display: flex !important; }

/* Il Burger deve stare sempre sopra a tutto! */
.sm-toggle { background: none; border: none; cursor: pointer; align-items: center; justify-content: center; width: 40px; height: 40px; z-index: 10005; position: relative; }
.sm-icon { position: relative; width: 30px; height: 20px; }
.sm-icon-line { position: absolute; left: 0; width: 100%; height: 3px; background: var(--verde-dark); transition: all 0.3s ease; border-radius: 2px; }
.line-1 { top: 0; }
.line-2 { top: 50%; transform: translateY(-50%); }
.line-3 { bottom: 0; }
.sm-toggle.is-open .line-1 { top: 50%; transform: translateY(-50%) rotate(45deg); background: var(--arancio-main); }
.sm-toggle.is-open .line-2 { opacity: 0; transform: translateX(-15px); }
.sm-toggle.is-open .line-3 { bottom: 50%; transform: translateY(50%) rotate(-45deg); background: var(--arancio-main); }

.mobile-sidebar { 
    position: fixed; top: 0; right: -100%; width: 320px; height: 100vh; 
    background: var(--verde-chiaro); 
    z-index: 10002; transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1); 
    overflow-y: auto; box-shadow: -10px 0 30px rgba(0,0,0,0.1); 
    border-left: 5px solid var(--verde-main);
}
.mobile-sidebar.open { right: 0; }
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 10001; display: none; }
.sidebar-overlay.open { display: block; }

.sidebar-header { 
    padding: 30px 20px 10px; background: transparent; color: var(--text-dark);
    display: flex; justify-content: flex-end; 
}
.sidebar-header button {
    background: none; border: none; font-size: 2rem; color: var(--verde-dark); font-weight: 300; cursor: pointer; line-height: 1;
}

.accordion-menu { list-style: none; padding: 0; }
.accordion-menu > li > a, .accordion-title { 
    display: block; padding: 18px 20px; font-family: 'Jost', sans-serif; text-transform: uppercase; font-size: 1rem; letter-spacing: 1px; border-bottom: 1px solid rgba(0,0,0,0.05); color: var(--verde-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 500;
}
.accordion-content { display: none; background: transparent; }
.accordion-content > a { 
    display: block; padding: 12px 20px 12px 35px; font-size: 0.95rem; border-bottom: none; color: #555; font-family: 'Jost', sans-serif; text-transform: uppercase;
}
.accordion-content > a:hover, .accordion-title:hover { color: var(--arancio-main); }

.nested-accordion { border-bottom: none; }
.nested-title { font-size: 0.95rem !important; padding: 15px 20px 15px 35px !important; background: transparent; border-bottom: 1px solid rgba(0,0,0,0.03); color: #444;}
.nested-content > a { padding-left: 50px !important; font-size: 0.85rem !important; color: #777;}


/* --- GESTIONE VISTE (SPA) --- */
.view-section { 
    display: none; 
    animation: fadeIn 0.5s ease; 
    flex: 1 0 auto;
}
.active-view { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* --- CAROSELLO HERO --- */
.hero-slider { position: relative; height: 75vh; max-width: 1400px; margin: 0 auto; border-radius: 0 0 20px 20px; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease-in-out; display: flex; align-items: center; padding: 5%; }
.slide::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.2) 100%); z-index: 1; }
.active-slide { opacity: 1; z-index: 2; }
.slide-content { position: relative; z-index: 3; max-width: 500px; }
.slide-content h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; color: var(--verde-dark); }
.slide-content p { font-size: 1.2rem; margin-bottom: 30px; }

.btn-primary-orange, .btn-primary-verde { color: var(--white); padding: 16px 35px; border: none; border-radius: 30px; font-size: 0.9rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
.btn-primary-orange { background-color: var(--arancio-main); box-shadow: 0 10px 20px rgba(244, 162, 123, 0.4); }
.btn-primary-orange:hover { background-color: var(--arancio-dark); transform: translateY(-3px); }
.btn-primary-verde { background-color: var(--verde-main); box-shadow: 0 10px 20px rgba(139, 181, 148, 0.4); }
.btn-primary-verde:hover { background-color: var(--verde-dark); transform: translateY(-3px); }
.full-width { width: 100%; margin-top: 20px; }

/* --- CAROSELLO CATEGORIE HOME --- */
.category-carousel-wrapper { margin: 40px 0; }
.cat-carousel { display: flex; justify-content: center; overflow-x: auto; gap: 20px; padding: 20px 5%; scrollbar-width: none; }
.cat-carousel::-webkit-scrollbar { display: none; }
.cat-carousel-item { flex: 0 0 auto; width: 140px; text-align: center; cursor: pointer; }
.cat-carousel-item img { width: 120px; height: 120px; object-fit: cover; border-radius: 30px; margin-bottom: 10px; box-shadow: 0 10px 20px rgba(0,0,0,0.08); transition: 0.3s; border: 3px solid #fff; }
.cat-carousel-item:hover img { transform: translateY(-8px); border-color: var(--arancio-main); }
.cat-carousel-item span { font-size: 0.9rem; font-weight: 500; color: var(--text-dark); display: block; line-height: 1.2;}

/* --- NUOVA SEZIONE ZIG-ZAG HOME --- */
.zigzag-section { padding: 40px 5%; max-width: 1400px; margin: 0 auto; }
.macro-row { display: flex; align-items: center; gap: 60px; margin-bottom: 80px; }
.macro-row:nth-child(even) { flex-direction: row-reverse; }
.macro-img { flex: 1; }
.macro-img img { width: 100%; height: 500px; object-fit: cover; border-radius: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.macro-text { flex: 1; padding: 20px; }
.macro-text h3 { font-size: 3rem; color: var(--verde-dark); margin-bottom: 15px; font-family: 'Playfair Display', serif;}
.divider-verde { width: 60px; height: 3px; background-color: var(--verde-main); margin-bottom: 20px;}
.divider-arancio { width: 60px; height: 3px; background-color: var(--arancio-main); margin-bottom: 20px;}
.macro-text p { font-size: 1.15rem; color: var(--text-dark); margin-bottom: 30px; line-height: 1.6; }

/* --- SEZIONI HOME --- */
.bg-verde-chiaro { background-color: rgba(242, 247, 243, 0.8); backdrop-filter: blur(5px); padding: 60px 0;}
.bg-arancio-chiaro { background-color: rgba(255, 247, 240, 0.8); backdrop-filter: blur(5px); }

.values-bar { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; padding: 40px 5%; border-top: 1px solid #fff; border-bottom: 1px solid #fff; text-transform: uppercase; font-weight: 500; font-size: 0.9rem; letter-spacing: 1px;}
.value-item { display: flex; align-items: center; gap: 12px; }
.value-dot { width: 14px; height: 14px; border-radius: 50%; }
.green-dot { background-color: var(--verde-main); box-shadow: 0 0 10px var(--verde-main); }
.orange-dot { background-color: var(--arancio-main); box-shadow: 0 0 10px var(--arancio-main); }

.philosophy-section { padding: 80px 5%; text-align: center; border-radius: 30px; margin: 40px 20px; box-shadow: inset 0 0 20px rgba(0,0,0,0.02);}
.philosophy-content { max-width: 800px; margin: 0 auto; }
.philosophy-content h2 { font-size: 2.8rem; margin-bottom: 20px; color: var(--verde-dark); }
.divider-verde { width: 80px; height: 3px; background-color: var(--verde-main); margin: 0 auto 30px; }

/* --- CATALOGO GRIGLIA --- */
.catalog-header { text-align: center; padding: 60px 20px 40px; }
.catalog-header h2 { font-size: 3rem; font-style: italic; color: var(--verde-dark); text-transform: capitalize;}
.divider-pastel { width: 60px; height: 4px; background: linear-gradient(90deg, var(--verde-main), var(--arancio-main)); margin: 15px auto; border-radius: 5px; }

.catalog-container { padding: 0 5% 80px; max-width: 1400px; margin: 0 auto; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px 30px; }

.product-card { position: relative; background: var(--white); border-radius: 15px; padding: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); cursor: pointer; transition: 0.3s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); z-index: 10;}
.product-img { overflow: hidden; border-radius: 10px; margin-bottom: 15px; height: 350px; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover .product-img img { transform: scale(1.05); }

.badge-arancio { position: absolute; top: 25px; left: 25px; background: var(--arancio-main); color: white; padding: 5px 15px; font-size: 0.75rem; text-transform: uppercase; border-radius: 20px; font-weight: 600; z-index: 2;}

.product-info h3 { font-size: 1.2rem; font-family: 'Jost', sans-serif; margin-bottom: 10px; }
.desc-short { font-size: 0.95rem; color: var(--text-light); margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Pallini in Griglia */
.color-dots-grid { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap;}
.color-dots-grid span { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.1); }

/* --- DETTAGLIO PRODOTTO & GALLERIA --- */
.product-detail-container { max-width: 1200px; margin: 60px auto; padding: 0 5%; }
.product-detail-layout { display: flex; gap: 60px; background: var(--white); padding: 40px; border-radius: 30px; box-shadow: 0 20px 50px rgba(0,0,0,0.05); align-items: stretch;}
.product-detail-image { flex: 1; display: flex; flex-direction: column; }
.product-detail-image img#detail-img { width: 100%; height: 600px; object-fit: cover; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);}

.thumbnail-gallery { display: flex; gap: 10px; margin-top: 15px; overflow-x: auto; padding-bottom: 5px;}
.thumbnail-img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 3px solid transparent; transition: 0.3s; opacity: 0.7;}
.thumbnail-img:hover, .thumbnail-img.active { border-color: var(--arancio-main); opacity: 1; transform: scale(1.05); }

.product-detail-info { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; position: relative;}
.back-btn { background: none; border: none; color: var(--text-light); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; margin-bottom: 20px; transition: 0.3s; }
.back-btn:hover { color: var(--arancio-main); }
#detail-title { font-size: 2.5rem; line-height: 1.2; margin: 15px 0; color: var(--verde-dark); }
.detail-divider { width: 50px; height: 3px; background: var(--arancio-main); margin-bottom: 20px; }
.detail-desc { font-size: 1.1rem; margin-bottom: 20px; color: var(--text-dark); }
.detail-long-desc { margin-bottom: 30px; padding-left: 20px; }
.detail-long-desc li { margin-bottom: 10px; font-size: 0.95rem; }

.detail-specs { background: var(--bg-main); padding: 20px; border-radius: 10px; width: 100%; margin-bottom: 30px; border-left: 4px solid var(--verde-main); }
.spec-row { margin-bottom: 8px; font-size: 0.95rem; }
.spec-row strong { color: var(--verde-dark); }
.detail-colors { margin-bottom: 30px; }
.color-dots-large { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap;}
.color-dot-l { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #ddd; box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.color-dot-l.has-img { cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.color-dot-l.has-img:hover { transform: scale(1.15); border-color: var(--arancio-main) !important; }
.color-dot-l.active-dot { border: 3px solid var(--arancio-main) !important; box-shadow: 0 0 10px rgba(244, 162, 123, 0.5); }

/* --- CONTATTI E FOOTER --- */
.contact-box { max-width: 600px; margin: 0 auto 80px; background: rgba(255,255,255,0.9); padding: 40px; border-radius: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.08); }
.border-arancio { border-top: 5px solid var(--arancio-main); }
.input-group { display: flex; gap: 20px; margin-bottom: 20px; }
input, textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; background: var(--white); font-family: inherit; outline: none; }
input:focus, textarea:focus { border-color: var(--arancio-main); }

footer { 
    background: var(--text-dark); 
    color: var(--white); 
    padding: 60px 5% 20px; 
    text-align: center; 
    flex-shrink: 0;
}
.footer-wrap { display: flex; justify-content: space-between; max-width: 1200px; margin: 0 auto 40px; flex-wrap: wrap; gap: 40px; text-align: left;}
.footer-brand h3 { margin-bottom: 15px; color: var(--verde-pastel); font-size: 1.5rem; }
.footer-links p { margin-bottom: 10px; color: #ccc; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; color: #aaa; font-size: 0.9rem; }
.footer-developer { margin-top: 10px; font-size: 0.95rem; color: var(--white); }

/* --- PRIVACY & COOKIE BANNER --- */
.cookie-banner { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(150px); width: 90%; max-width: 650px; background: #fff; padding: 1.5rem; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); z-index: 9999; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; opacity: 0; transition: all 0.5s ease-out; pointer-events: none; border-top: 4px solid var(--verde-main);}
.cookie-banner.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto;}
.cookie-content { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 20px; }
.cookie-content p { font-size: 0.95rem; margin: 0; color: var(--text-dark); }
.cookie-content a { color: var(--arancio-main); font-weight: 600; text-decoration: underline;}
.cookie-content button { background-color: var(--verde-main); color: var(--white); padding: 12px 25px; border: none; border-radius: 30px; font-size: 0.9rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: 0.3s; box-shadow: 0 5px 15px rgba(139, 181, 148, 0.4); font-family: 'Jost', sans-serif; white-space: nowrap; }
.cookie-content button:hover { background-color: var(--verde-dark); transform: translateY(-2px); }


/* ==========================================================================
   MEDIA QUERIES - MOBILE FIX DEFINITIVO
   ========================================================================== */
@media (max-width: 1024px) {
    /* Uccidiamo il menu desktop, lasciamo solo la roba mobile */
    .desktop-only, .nav-links { display: none !important; }
    .mobile-only { display: flex !important; }
    
    .main-nav { height: 70px; padding: 0 15px; }
    .logo { font-size: 1.1rem; } /* Logo più piccolo per non spezzarsi */
    
    .hero-slider { height: 60vh; border-radius: 0; }
    .slide::after { background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0.4) 100%); }
    .slide-content { align-self: flex-end; padding-bottom: 40px; text-align: center; }
    .slide-content h1 { font-size: 2.5rem; }
    
    .cat-carousel { justify-content: flex-start; } 

    /* Fix Zig-Zag per Mobile: impilato in colonna */
    .macro-row, .macro-row:nth-child(even) { 
        flex-direction: column; 
        text-align: center; 
        gap: 30px; 
        margin-bottom: 60px;
    }
    .macro-img img { height: 300px; width: 100%; object-fit: cover; }
    .divider-verde, .divider-arancio { margin: 0 auto 20px auto !important; }

    .product-grid { grid-template-columns: 1fr; } /* Prodotti in 1 colonna */
    
    .product-detail-layout { flex-direction: column; padding: 20px; }
    .product-detail-image img#detail-img { height: 400px; }
    
    .input-group { flex-direction: column; gap: 0; }
    input { margin-bottom: 20px; }
    .footer-wrap { flex-direction: column; text-align: center; }

    .cookie-banner { flex-direction: column; text-align: center; bottom: 0; width: 100%; border-radius: 20px 20px 0 0; }
    .cookie-content { flex-direction: column; text-align: center; }
    .cookie-content button { width: 100%; }
}

/* ==========================================================================
   MEDIA QUERIES - SCHERMI 4K & ULTRA-WIDE (Aumentato respiro)
   ========================================================================== */
@media (min-width: 1800px) {
    .main-nav { padding: 0 10%; height: 100px; }
    .logo { font-size: 1.8rem; }
    .nav-links > li > a { font-size: 1.1rem; padding: 0 30px; }

    .hero-slider { height: 85vh; max-width: 1800px; }
    .slide-content h1 { font-size: 5rem; }
    .slide-content p { font-size: 1.6rem; margin-bottom: 40px; }
    
    .zigzag-section, .catalog-container, .product-detail-container { max-width: 1600px; }
    
    .macro-row { gap: 150px; margin-bottom: 150px; }
    .macro-text h3 { font-size: 4.5rem; margin-bottom: 30px; }
    .macro-text p { font-size: 1.6rem; line-height: 1.8; margin-bottom: 40px;}
    
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)); gap: 80px; }
    .product-img { height: 500px; }
    
    .product-detail-image img#detail-img { height: 800px; }
    #detail-title { font-size: 4rem; }
    .detail-desc { font-size: 1.5rem; line-height: 1.8;}
}