:root {
    --green: #003321;
    --gold: #c5a059;
    --white: #ffffff;
    --cream: #f9f7f2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--cream); color: var(--green); overflow-x: hidden; }

/* SPLASH SCREEN */
#splash {
    position: fixed;
    inset: 0;
    background: var(--green);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
}
.big-logo { width: 800px; max-width: 80%; opacity: 0; transform: scale(0.85); animation: logoReveal 2.0s forwards ease-out; }
@keyframes logoReveal { to { opacity: 1; transform: scale(1); } }
.loader-line { width: 150px; height: 1px; background: var(--gold); margin-top: 40px; transform: scaleX(0); animation: load 1.5s forwards 0.5s; }
@keyframes load { to { transform: scaleX(1); } }
#splash.hidden { transform: translateY(-100%); }

/* NAVBAR */
.navbar { position: fixed; top: 0; width: 100%; padding: 40px 6%; display: flex; justify-content: space-between; align-items: center; z-index: 2000; transition: 0.5s; }
.nav-logo { height: 80px; filter: brightness(10); opacity: 0; transition: 0.5s; }
.navbar.scrolled { background: rgba(0, 51, 33, 0.9); padding: 20px 6%; backdrop-filter: blur(15px); }
.navbar.scrolled .nav-logo { opacity: 1; }

.menu-trigger { cursor: pointer; width: 35px; height: 12px; display: flex; flex-direction: column; justify-content: space-between; z-index: 2500; }
.menu-trigger span { width: 100%; height: 1px; background: white; transition: 0.4s; }
.menu-trigger.active span { background: white; }
.menu-trigger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-trigger.active span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

/* FULL MENU */
.full-menu { position: fixed; inset: 0; background: var(--green); z-index: 2100; display: flex; align-items: center; justify-content: center; transform: translateY(-100%); transition: 0.8s cubic-bezier(0.85, 0, 0.15, 1); }
.full-menu.open { transform: translateY(0); }
.menu-link { color: white; text-decoration: none; font-family: 'Cormorant Garamond', serif; font-size: clamp(2.5rem, 5vw, 4rem); margin: 10px 0; transition: 0.4s; display: block; text-align: center; }
.menu-link:hover { color: var(--gold); font-style: italic; }

/* HERO & SLIDESHOW */
.hero { position: relative; height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; color: white; text-align: center; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.slide { 
    position: absolute; inset: 0; 
    background-size: cover; background-position: center; 
    opacity: 0; transition: opacity 2.5s ease-in-out; 
    transform: scale(1.1);
}
.slide.active { opacity: 1; transform: scale(1); transition: opacity 2.5s ease-in-out, transform 10s linear; }

.hero-overlay { position: absolute; inset: 0; background: rgba(0, 51, 33, 0.4); z-index: 1; }
.hero-content { position: relative; z-index: 2; padding: 0 10%; }
.hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(3rem, 10vw, 6.5rem); line-height: 0.9; font-weight: 300; margin-bottom: 25px; }
.subtitle { letter-spacing: 6px; text-transform: uppercase; font-size: 0.75rem; color: var(--gold); display: block; margin-bottom: 20px; }
.btn-discover { color: white; text-decoration: none; text-transform: uppercase; letter-spacing: 3px; font-size: 0.7rem; display: inline-block; transition: 0.3s; }
.btn-discover:hover { color: var(--gold); letter-spacing: 5px; }

/* SCROLL INDICATOR */
.scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 2; opacity: 0.5; text-align: center; color: white; font-size: 0.6rem; letter-spacing: 2px; text-transform: uppercase; }
.mouse { width: 1px; height: 50px; background: rgba(255,255,255,0.3); margin: 0 auto 10px; position: relative; overflow: hidden; }
.mouse::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: white; animation: scrollAnim 2s infinite; }
@keyframes scrollAnim { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* REVEAL ON SCROLL */
.section { padding: 120px 10%; }
.title-serif { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 300; }
.divider { width: 50px; height: 1px; background: var(--gold); margin: 30px 0 60px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.img-placeholder { background: #e8e5de; aspect-ratio: 1/1; transition: 1s; }
.product-item:hover .img-placeholder { transform: scale(0.97); }

.reveal { opacity: 0; transform: translateY(30px); transition: 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Il contenitore mantiene il quadrato perfetto */
.img-container {
    width: 100%;
    aspect-ratio: 1 / 1; /* Crea un quadrato perfetto */
    overflow: hidden;    /* Taglia l'immagine se esce dai bordi */
    background: #e8e5de; /* Colore di cortesia mentre carica */
    margin-bottom: 15px;
}

/* L'immagine si adatta al contenitore */
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* Riempie il quadrato senza deformarsi */
    display: block;
    transition: transform 1.2s cubic-bezier(0.15, 0, 0.15, 1);
}

/* Effetto zoom raffinato al passaggio del mouse */
.product-item:hover .product-img {
    transform: scale(1.05);
}
/* CATALOG SPECIFIC */
.catalog-hero {
    padding-top: 180px;
    padding-bottom: 60px;
    text-align: center;
    background: var(--green);
    color: white;
}

.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--green);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
    position: relative;
}

.filter-btn.active, .filter-btn:hover {
    opacity: 1;
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
}

/* Product Card Enhancement */
.img-container {
    position: relative;
    overflow: hidden;
    background: #e8e5de;
    aspect-ratio: 1/1;
    margin-bottom: 20px;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 51, 33, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.5s;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.7rem;
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.product-info .category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 5px;
}

.product-info h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
}

/* Fix per navbar su pagine diverse dalla home */
.catalog-page .navbar:not(.scrolled) {
    background: var(--green);
}
/* FOOTER STYLES */
.footer {
    background: var(--green);
    color: var(--cream);
    padding: 100px 0 40px 0;
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-logo {
    width: 200px;
    margin-bottom: 25px;
    /* Se il logo è scuro, lo rendiamo bianco/oro */
    filter: brightness(0) invert(1);
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.8;
    opacity: 0.7;
    max-width: 300px;
}

.footer h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: var(--gold);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 15px;
}

.footer ul li a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.6;
    transition: 0.3s;
    letter-spacing: 1px;
}

.footer ul li a:hover {
    opacity: 1;
    padding-left: 5px;
    color: var(--gold);
}

.footer-contact p {
    font-size: 0.85rem;
    line-height: 1.8;
    opacity: 0.6;
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(197, 160, 89, 0.2); /* Sottile linea oro */
    padding-top: 40px;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.4;
}

.social-links a {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-left: 30px;
    transition: 0.3s;
}

.social-links a:hover {
    color: var(--white);
}

/* Responsività per schermi piccoli */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    .footer-brand p {
        margin: 0 auto;
    }
    .footer-bottom .container {
        flex-direction: column;
        gap: 20px;
    }
}
.product-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Evita che i prodotti nascosti occupino spazio */
.product-item[style*="display: none"] {
    opacity: 0;
    transform: scale(0.9);
}

/* CONTACT PAGE SPECIFIC */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 100px;
    align-items: start;
}

.contact-description {
    margin: 20px 0 50px 0;
    line-height: 1.8;
    opacity: 0.8;
}

.contact-details .detail-item {
    margin-bottom: 30px;
}

.detail-item span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 5px;
}

.detail-item p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
}

/* FORM STYLES */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(0, 51, 33, 0.1);
    padding-bottom: 10px;
    transition: 0.3s;
}

.form-group:focus-within {
    border-bottom-color: var(--gold);
}

.form-group label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background: none;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--green);
    padding: 5px 0;
}

.btn-submit {
    align-self: flex-start;
    background: var(--green);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.4s;
    margin-top: 20px;
}

.btn-submit:hover {
    background: var(--gold);
    transform: translateY(-3px);
}

/* Responsività */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}
/* Il contenitore mantiene il quadrato perfetto */
.img-container {
    width: 100%;
    aspect-ratio: 1 / 1; /* Crea un quadrato perfetto */
    overflow: hidden;    /* Taglia l'immagine se esce dai bordi */
    background: #e8e5de; /* Colore di cortesia mentre carica */
    margin-bottom: 15px;
}

/* L'immagine si adatta al contenitore */
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* Riempie il quadrato senza deformarsi */
    display: block;
    transition: transform 1.2s cubic-bezier(0.15, 0, 0.15, 1);
}

/* Effetto zoom raffinato al passaggio del mouse */
.product-item:hover .product-img {
    transform: scale(1.05);
}

/* GALLERY SPECIFIC */
.gallery-intro {
    text-align: center;
    margin-bottom: 80px;
    padding-top: 100px;
}

.gallery-intro .divider {
    margin: 30px auto;
}

/* Griglia stile Masonry Semplice */
.gallery-grid {
    column-count: 3; /* Numero di colonne su desktop */
    column-gap: 20px;
}

.gallery-item {
    position: relative;
    margin-bottom: 20px; /* Spazio verticale tra le immagini */
    overflow: hidden;
    break-inside: avoid; /* Evita che l'immagine si spezzi tra le colonne */
    background: #e8e5de;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 51, 33, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.6s ease;
    backdrop-filter: blur(5px);
}

.gallery-overlay span {
    color: var(--gold);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-style: italic;
    transform: translateY(20px);
    transition: 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Responsività Galleria */
@media (max-width: 992px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }
}

/* REVIEWS SPECIFIC */
.review-card {
    background: white;
    padding: 40px;
    border: 1px solid rgba(0, 51, 33, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    transition: 0.4s;
}

.review-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.03);
    border-color: var(--gold);
}

.review-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--green);
}

.review-author {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
}

/* Adattamento per mobile */
@media (max-width: 768px) {
    .review-card {
        padding: 30px 20px;
    }
}