/* ==========================================================================
   INDEX SPECIFIC STYLES - SEVRÈ (iOS 26 Ultra-Adaptive Fluid Layout)
   ========================================================================== */

:root {
    /* Tavolozza Oro Cristallino & Luce Translucida */
    --gold-light: rgba(255, 248, 220, 0.4);
    --gold-main: #DAA520;
    --gold-dark: #946f19;
    --gold-pale: #fbf5b7;
    
    /* iOS Glassmorphism Specchiato */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-hover: rgba(255, 255, 255, 0.6);
    
    --text-dark: #121212;
    --font-luxury: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
}

/* --- STRUTTURA FLUIDA DI BASE --- */
.container {
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
}

.section-padding {
    padding: clamp(60px, 8vw, 140px) 0; /* Scalabilità dinamica dei margini verticali */
}

/* --- THE HOLY GRAIL: ULTRA-GLASSMORPHISM COMPONENT CARDS --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(35px) saturate(210%) brightness(102%);
    -webkit-backdrop-filter: blur(35px) saturate(210%) brightness(102%);
    border-radius: clamp(24px, 4vw, 40px); 
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.01),
        0 30px 70px rgba(148, 111, 25, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.8);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 
        0 45px 90px rgba(148, 111, 25, 0.14),
        0 0 0 1px rgba(218, 165, 32, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    min-height: 100vh; /* Sostituito height fisso con altezza minima */
    min-height: -webkit-fill-available; /* Fix nativo per la barra d'indirizzi di Safari iOS */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 40px 0; /* Salvagente per schermi microscopici */
}

.hero-video {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(253, 250, 244, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    width: 100%;
    max-width: 850px;
    padding: clamp(40px, 6vw, 70px) clamp(20px, 4vw, 50px);
    border-radius: clamp(24px, 4.5vw, 44px);
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(40px) saturate(180%) brightness(104%);
    -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(104%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 
        0 40px 100px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 1;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content:hover {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 50px 120px rgba(148, 111, 25, 0.08);
}

.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: clamp(20px, 4vw, 35px);
}

.hero-logo-img {
    width: 100%;
    max-width: clamp(240px, 30vw, 380px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0px 12px 24px rgba(0, 0, 0, 0.06));
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content:hover .hero-logo-img {
    transform: scale(1.025);
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.8;
    margin-bottom: clamp(25px, 4vw, 45px);
    font-weight: 300;
    letter-spacing: 0.5px;
    color: rgba(18, 18, 18, 0.85);
}

.btn-gold-luxury {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: clamp(14px, 2vw, 20px) clamp(30px, 4vw, 55px);
    background: var(--text-dark);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-luxury);
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    border-radius: 100px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap; /* Evita che il testo vada a capo nel bottone */
}

.btn-gold-luxury::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, #AA771C, var(--gold-pale), #DAA520);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.btn-gold-luxury:hover {
    color: var(--text-dark);
    font-weight: 600;
    box-shadow: 0 20px 45px rgba(218, 165, 32, 0.4);
    transform: translateY(-4px) scale(1.02);
}

.btn-gold-luxury:hover::before { opacity: 1; }

/* --- VISION SECTION --- */
.vision-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.vision-card {
    width: 100%;
    padding: clamp(40px, 6vw, 90px) clamp(20px, 4vw, 60px);
    text-align: center;
    max-width: 1000px;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.2) 100%);
    box-shadow: 0 30px 80px rgba(170, 119, 28, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-radius: clamp(24px, 4vw, 40px);
}

.vision-card h2 {
    font-family: var(--font-luxury);
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    font-weight: 400;
    letter-spacing: clamp(3px, 1vw, 6px);
    text-transform: uppercase;
    margin-bottom: clamp(20px, 4vw, 40px);
    background: linear-gradient(180deg, #121212 30%, #6e541b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vision-card h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-main), transparent);
    margin: 15px auto 0 auto;
}

.brand-text {
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    line-height: 1.9;
    font-weight: 300;
    letter-spacing: 0.8px;
    color: rgba(18, 18, 18, 0.85);
    max-width: 850px;
    margin: 0 auto;
}

.brand-text strong {
    font-weight: 500;
    color: #946f19;
    background: linear-gradient(120deg, rgba(251, 245, 183, 0.4) 0%, rgba(218, 165, 32, 0.1) 100%);
    padding: 2px 8px;
    border-radius: 8px;
}

/* --- CRAFTSMANSHIP GRID --- */
.craft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Responsività automatica senza media queries rigide */
    gap: clamp(20px, 4vw, 50px);
}

/* ==========================================================================
   FIX DISPOSITIVI DESKTOP: PROPORZIONI IMMAGINI PERFETTE (ASPECT RATIO)
   ========================================================================== */

/* --- CORREZIONE CRAFTSMANSHIP GRID --- */
.craft-image-wrapper {
    position: relative;
    width: 100%;
    /* SOSTITUITO height fisso con aspect-ratio verticale luxury (rapporto 3:4) */
    aspect-ratio: 3 / 4; 
    border-radius: clamp(24px, 4vw, 40px); 
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.craft-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ora riempie lo spazio senza MAI subire tagli sproporzionati o schiacciamenti */
    object-position: center;
    transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}


/* --- CORREZIONE CAROUSEL E-COMMERCE --- */
.product-img-holder {
    position: relative;
    width: 100%;
    /* SOSTITUITO height fisso con aspect-ratio da catalogo d'alta moda (rapporto 2:3) */
    aspect-ratio: 2 / 3; 
    overflow: hidden;
    border-top-left-radius: clamp(20px, 3vw, 38px);
    border-top-right-radius: clamp(20px, 3vw, 38px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.product-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.craft-image-wrapper:hover .craft-img { transform: scale(1.06); }

.image-overlay-glass {
    position: absolute;
    bottom: clamp(15px, 3vw, 35px); 
    left: clamp(15px, 3vw, 35px); 
    right: clamp(15px, 3vw, 35px);
    padding: clamp(20px, 3vw, 35px) 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: clamp(16px, 2.5vw, 28px);
    text-align: center;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.04);
}

.image-overlay-glass h3 {
    font-family: var(--font-luxury);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
}

/* --- CAROUSEL E-COMMERCE LUXURY --- */
.section-header {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 90px);
}

.gold-title {
    font-family: var(--font-luxury);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(45deg, #8a5f13, #DAA520, #fbf5b7, #AA771C);
    background-size: 400% 400%;
    animation: goldShimmer 10s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

@keyframes goldShimmer {
    0% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 50% }
}

.slider-wrapper {
    position: relative;
    width: 100%;
}

.products-slider {
    display: flex;
    gap: clamp(20px, 3vw, 35px);
    overflow-x: auto;
    scroll-behavior: smooth;
    list-style: none;
    padding: 20px 5px 40px 5px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch; /* Scroll elastico iper-fluido nativo iOS */
}

.products-slider::-webkit-scrollbar { display: none; }

.product-card {
    flex: 0 0 calc(33.333% - 24px);
    min-width: 290px; /* Impedisce alle card di schiacciarsi su mobile */
    display: flex;
    flex-direction: column;
}

.product-img-holder {
    position: relative;
    width: 100%;
    height: clamp(320px, 40vh, 460px);
    overflow: hidden;
    border-top-left-radius: clamp(20px, 3vw, 38px);
    border-top-right-radius: clamp(20px, 3vw, 38px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.product-img-holder img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.badge-luxury {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--text-dark);
    padding: 6px 16px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.product-info {
    padding: clamp(20px, 3vw, 35px) clamp(15px, 2.5vw, 30px);
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.12);
    border-bottom-left-radius: clamp(20px, 3vw, 38px);
    border-bottom-right-radius: clamp(20px, 3vw, 38px);
}

.product-info h3 {
    font-family: var(--font-luxury);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: 1.5px;
}

.price {
    font-weight: 500;
    color: var(--gold-dark);
    font-size: clamp(1.1rem, 1.8vw, 1.25rem);
    margin-bottom: 25px;
}

.btn-shop-now {
    display: block;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(218, 165, 32, 0.35);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 100px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-shop-now:hover {
    background: var(--text-dark);
    color: #fff;
    border-color: var(--text-dark);
}

/* Frecce Fluttuanti Apple UI */
.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-size: 20px;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-arrow:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.08);
}

.slide-arrow:active { transform: translateY(-50%) scale(0.95); }

#slide-arrow-prev { left: -25px; }
#slide-arrow-next { right: -25px; }

/* --- DYNAMIC NATIVE ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: iOS_FluidUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.99);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes iOS_FluidUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (iOS ADAPTIVE RESPONSIVE MATRIX)
   ========================================================================== */

@media (max-width: 1480px) {
    #slide-arrow-prev { left: 10px; }
    #slide-arrow-next { right: 10px; }
}

@media (max-width: 1200px) {
    .product-card { flex: 0 0 calc(50% - 15px); }
}

@media (max-width: 768px) {
    .product-card { flex: 0 0 82%; } /* Su smartphone mostra una card principale e lascia intravedere la successiva */
    .slide-arrow { display: none !important; } /* Su mobile si usa lo swiping touch elastico nativo Apple */
    .hero-content { background: rgba(255, 255, 255, 0.45); } /* Aumenta il contrasto sotto la luce del sole */
}

@media (max-width: 480px) {
    .product-card { flex: 0 0 88%; }
    .container { width: 88%; }
    .craft-grid { grid-template-columns: 1fr; } /* Fallback di sicurezza per schermi strettissimi */
}

/* ==========================================================================
   SFUMATURA CINEMATOGRAFICA HERO (Eliminazione Stacco Netto)
   ========================================================================== */

.hero-section {
    /* Crea una maschera invisibile: 100% visibile in alto, sfuma a zero negli ultimi 15% della sezione */
    -webkit-mask-image: linear-gradient(to bottom, 
        rgba(0, 0, 0, 1) 0%, 
        rgba(0, 0, 0, 1) 80%, 
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(to bottom, 
        rgba(0, 0, 0, 1) 0%, 
        rgba(0, 0, 0, 1) 80%, 
        rgba(0, 0, 0, 0) 100%
    );
}

/* Modifica calibrata dell'overlay per legarsi cromaticamente allo sfondo liquido inferiore */
.video-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Il gradiente ora accompagna l'occhio sfumando verso lo sfondo porcellanato (#f4f2eb) della pagina */
    background: linear-gradient(to bottom, 
        rgba(253, 250, 244, 0.3) 0%, 
        rgba(253, 250, 244, 0.1) 60%,
        rgba(244, 242, 235, 0.9) 95%,
        #f4f2eb 100%
    );
    z-index: -1;
}

/* Raccordo di transizione morbido per la sezione immediatamente successiva alla Hero */
.hero-section + section {
    margin-top: -60px; /* Sovrappone leggermente l'inizio della seconda sezione per unire i flussi di luce */
    padding-top: 100px; /* Ridà respiro interno ai contenuti per non accavallare i testi */
    position: relative;
    z-index: 3;
}

/* Forza le frecce del carosello in primo piano su PC */
.slide-arrow {
    position: absolute;
    z-index: 100 !important; /* Li porta sopra a qualsiasi card o sfondo */
    cursor: pointer !important; /* Garantisce la manina del mouse */
    pointer-events: auto !important; /* Forza il browser a intercettare il click */
}

/* Evita che il contenitore dei prodotti copra lo spazio delle frecce */
.slider-wrapper {
    position: relative;
    overflow: visible;
}