/* Tipografia Base */
#full-home-wrapper {
    font-size: 1rem;
    /* 16px base */
    color: #333;
    -webkit-font-smoothing: antialiased;
}

/* Hero Section */
.hero-luxury .ls-3 {
    letter-spacing: 0.3rem;
}

.hero-luxury .ls-2 {
    letter-spacing: 0.2rem;
}

/* Colore Oro Vitagliano */
.text-gold {
    color: rgb(190, 145, 113) !important;
}

.bg-gold {
    background-color: rgb(190, 145, 113) !important;
}

.border-gold {
    border-color: rgb(190, 145, 113) !important;
}

/* Grid Categories con Effetto Zoom */
.group-hover-zoom {
    cursor: pointer;
}

.group-hover-zoom {
    transition: transform 0.5s ease;
}

.group-hover-zoom:hover .category-card {
    transform: scale(1.1);
    /* Zoom dell'immagine */
}

.category-card {
    background: #be9272;
    color: #fff !important;
    text-decoration: none !important;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Responsività */
@media (max-width: 768px) {
    .vh-100 {
        min-height: 600px;
    }

    .display-1 {
        font-size: 3.5rem;
    }

    .border-end-md {
        border: none !important;
    }

    .vh-50 {
        height: 350px;
    }

    .home-category-grid {
        padding: 12px !important;
    }

    .home-category-grid > .row {
        row-gap: 12px;
    }

    .home-category-grid .group-hover-zoom.border-start {
        border-left: 0 !important;
    }

    .home-category-grid .category-card {
        display: flex;
        width: 100%;
        aspect-ratio: 16 / 9;
        min-height: 0 !important;
        height: auto !important;
        max-height: 220px;
        padding: 1rem 1.25rem !important;
    }

    .home-category-grid .category-card h3 {
        font-size: 1.15rem;
    }

    #full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container {
        margin-top: 18px;
        padding: 0 14px;
    }
}

/* WooCommerce Overrides */
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 22px;
    padding: 0 18px;
}

#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .btn,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .add_to_cart_button,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .product_type_simple,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .product_type_variable,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .product_type_grouped,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .product_type_external,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .added_to_cart,
#full-home-wrapper .woocommerce ul.products li.product .button.add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 154px;
    min-height: 46px;
    padding: 10px 16px !important;
    border: none !important;
    border-radius: 4px !important;
    background-color: #be9272 !important;
    color: #fff !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 0.98rem !important;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    text-decoration: none !important;
    letter-spacing: 0;
    box-shadow: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Hover e focus per il bottone Scegli/Aggiungi al Carrello */
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .btn:hover,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .btn:focus,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .add_to_cart_button:hover,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .add_to_cart_button:focus,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .added_to_cart:hover,
#full-home-wrapper .woocommerce ul.products li.product .add-to-cart-container .added_to_cart:focus,
#full-home-wrapper .woocommerce ul.products li.product .button.add_to_cart_button:hover,
#full-home-wrapper .woocommerce ul.products li.product .button.add_to_cart_button:focus {
    background-color: #a77c60 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: none !important;
}

/* Rendiamo il prezzo più visibile ed elegante */
.product-grid-luxury .price {
    color: rgb(190, 145, 113) !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
}

/* Effetto al passaggio del mouse sulla card prodotto */
.product-grid-luxury .product:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Badge Offerta (On Sale) */
.onsale {
    background-color: var(--color-gold) !important;
    color: #fff !important;
    font-family: var(--font-title);
    text-transform: uppercase;
    padding: 5px 12px !important;
    border-radius: 0 !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    min-height: auto !important;
}

/* Overlay colorato all'hover sulle categorie in Home */
.category-card {
    position: relative;
    z-index: 1;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #a77c60;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.group-hover-zoom:hover .category-card::before,
.group-hover-zoom .category-card:focus-visible::before {
    opacity: 1;
}

/* Assicuriamoci che testi e link restino sempre sopra l'overlay */
.category-card>.text-center {
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

/* Testo e focus sempre leggibili sulla card-link */
.category-card:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -6px;
}

/* Assicuriamo che il testo sia sempre ben contrastato e bianco all'hover/focus */
.group-hover-zoom:hover .category-card h3,
.group-hover-zoom:hover .category-card span,
.group-hover-zoom:hover .category-card,
.group-hover-zoom .category-card:focus-visible {
    color: #fff !important;
}

/* --- OVERRIDE HOVER BOTTONI SCURI E OUTLINE --- */
/* Bottoni outline chiari (es. bottone slider hero se è outline-light) */
.btn-outline-light:hover {
    background-color: var(--color-gold) !important;
    border-color: var(--color-gold) !important;
    color: #fff !important;
}

/* Bottoni dark e outline-dark */
.btn-dark:hover,
.btn-outline-dark:hover {
    background-color: var(--color-gold) !important;
    border-color: var(--color-gold) !important;
    color: #fff !important;
}

/* Aggiungiamo una riga per garantire il comportamento sulla transizione */
.btn {
    transition: all 0.3s ease-in-out !important;
}

/* CTA "La nostra storia": stessa logica colori delle card categorie */
#storia .home-story-btn {
    background-color: #be9272 !important;
    border-color: #be9272 !important;
    color: #fff !important;
}

#storia .home-story-btn:hover,
#storia .home-story-btn:focus,
#storia .home-story-btn:focus-visible {
    background-color: #a77c60 !important;
    border-color: #a77c60 !important;
    color: #fff !important;
}
