/*
Theme Name: La Baia del Buongustaio - Gourmet Theme
Theme URI: https://labaiadelbuongustaio.it
Author: Dreamwebsites Lab
Description: Tema e-commerce ultra-veloce e su misura per eccellenze gastronomiche.
Version: 1.0.0
Text Domain: baia-gourmet
*/

/* --- ANIMAZIONI --- */

/* --- ANIMAZIONI HEADER & BRAND --- */
.logo-gourmet-shine {
    background: linear-gradient(
        110deg,
        #FDFBF7 0%,      /* Crema */
        #D4AF37 35%,     /* Oro */
        #FDFBF7 50%,     /* Luce (Crema chiaro) */
        #E64823 75%,     /* Riflesso Terracotta */
        #FDFBF7 100%     /* Ritorno al Crema */
    );
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gourmetShine 7s linear infinite;
}

@keyframes gourmetShine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

@keyframes customGoldPulse {
    0%, 100% { 
        opacity: 1; 
        box-shadow: 0 0 10px #D4AF37; 
    }
    50% { 
        opacity: 0.3; 
        box-shadow: 0 0 2px #D4AF37; 
    }
}

.gold-pulsing-dot {
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    background-color: #D4AF37 !important;
    border-radius: 50% !important;
    animation: customGoldPulse 1.5s ease-in-out infinite !important;
    flex-shrink: 0 !important;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@layer components {
    /* Bottone Standard: Elegante, scuro con bordo oro */
    .btn-baia {
        @apply px-6 py-2 border border-gold/50 text-cream font-medium 
        transition-all duration-300 ease-out 
        hover:border-gold hover:bg-gold/10 hover:scale-105 
        active:scale-95 active:bg-gold/20 rounded-md;
    }

    /* Bottone Primario: Pieno (Terracotta) */
    .btn-primary {
        @apply px-6 py-2 bg-terracotta text-white font-bold
        transition-all duration-300 ease-out 
        hover:bg-opacity-90 hover:scale-105 hover:shadow-lg
        active:scale-95 rounded-md;
    }
}

/* --- CHECKOUT PREMIUM "LA BAIA" - CONSOLIDATO E SOFISTICATO --- */

/* 1. Form Row Spacing */
form.checkout .form-row {
    margin-bottom: 20px !important;
    padding: 0 !important;
    width: 100% !important;
}

/* 2. Input, Select, Textarea */
form.checkout .form-row input[type="text"],
form.checkout .form-row input[type="email"],
form.checkout .form-row input[type="tel"],
form.checkout .form-row textarea,
form.checkout .form-row select {
    background-color: #1b1815 !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #FDFBF7 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    appearance: none !important;
}

/* 3. Textarea specifico */
form.checkout .form-row textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

/* 4. Etichette (Label) */
form.checkout .form-row label {
    color: #9ca3af !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
    display: block !important;
}

/* 5. Select2 (Provincia) */
.select2-container--default .select2-selection--single {
    background-color: #1b1815 !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    height: 48px !important;
    border-radius: 12px !important;
    padding: 6px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #FDFBF7 !important;
    line-height: 36px !important;
}

/* 6. Colonna destra: Order Review (Stile Sofisticato) */
#order_review {
    background: linear-gradient(145deg, #1f1c19, #1b1815) !important;
    border: 1px solid rgba(212, 175, 55, 0.25) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4) !important;
    border-radius: 24px !important;
    padding: 40px !important;
    color: #FDFBF7 !important;
}

/* Titolo Order Review */
#order_review h2 {
    font-family: 'Fraunces', serif !important;
    color: #FDFBF7 !important;
    font-size: 28px !important;
    margin-bottom: 25px !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
    padding-bottom: 15px !important;
}

/* Tabella Prodotti */
.shop_table.woocommerce-checkout-review-order-table {
    width: 100%;
    margin-bottom: 30px !important;
    border-collapse: separate !important;
    border-spacing: 0 15px !important;
}

.shop_table th {
    color: #9ca3af !important;
    text-transform: uppercase;
    font-size: 11px !important;
    letter-spacing: 0.1em !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.shop_table td {
    color: #FDFBF7 !important;
    padding: 15px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Riga Totale (Oro) */
.order-total th, 
.order-total td {
    color: #D4AF37 !important;
    font-size: 20px !important;
    font-family: 'Fraunces', serif !important;
    padding-top: 20px !important;
    border-top: 2px solid rgba(212, 175, 55, 0.3) !important;
    border-bottom: none !important;
}

/* Metodi di pagamento */
.payment_methods label {
    color: #FDFBF7 !important;
    font-weight: 600 !important;
    cursor: pointer;
}

.payment_box {
    background: rgba(255, 255, 255, 0.03) !important;
    padding: 15px !important;
    margin-top: 10px !important;
    border-radius: 8px !important;
    color: #9ca3af !important;
    font-size: 13px !important;
}

/* Hack Testo Spedizione */
.woocommerce-shipping-totals th {
    font-size: 0 !important;
}
.woocommerce-shipping-totals th::after {
    content: "Spedizione" !important;
    font-size: 11px !important;
    text-transform: uppercase;
}

/* --- STILE NOTIFICHE E MESSAGGI WOOCOMMERCE --- */

/* Contenitore generale notifiche (Errori, Successi, Info) */
.woocommerce-error, 
.woocommerce-message, 
.woocommerce-info {
    background-color: #1b1815 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    margin-bottom: 24px !important;
    color: #FDFBF7 !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
}

/* Notifica di Errore (Bordo e dettagli Rossi/Terracotta) */
.woocommerce-error {
    border-left: 4px solid #E64823 !important;
}

/* Notifica di Successo (Bordo e dettagli Oro) */
.woocommerce-message {
    border-left: 4px solid #D4AF37 !important;
}

/* Bottoni dentro le notifiche (es. "Visualizza carrello") */
.woocommerce-message .button, 
.woocommerce-error .button, 
.woocommerce-info .button {
    background: rgba(212, 175, 55, 0.1) !important;
    border: 1px solid #D4AF37 !important;
    color: #D4AF37 !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    margin-left: auto !important;
    transition: all 0.3s ease !important;
}

.woocommerce-message .button:hover {
    background: #D4AF37 !important;
    color: #1b1815 !important;
}

/* Container dello slider: sta dietro tutto */
.bg-slider-container {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Le singole slide */
.slide {
    position: absolute;
    inset: 0;
    /* Cambia cover con contain */
    background-size: cover; 
    /* Centra l'immagine */
    background-position: center center; 
    /* Impedisce che l'immagine si ripeta */
    background-repeat: no-repeat;
    /* Aggiungiamo un colore di sfondo per coprire le bande vuote */
    background-color: #1b1815; 
    opacity: 0;
    animation: slider-fade 12s infinite;
}

/* Ritardi per sincronizzare le 3 immagini */
.slide-1 { animation-delay: 0s; }
.slide-2 { animation-delay: 4s; }
.slide-3 { animation-delay: 8s; }

@keyframes slider-fade {
    0% { opacity: 0; }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; }
    100% { opacity: 0; }
}

/* Allinea perfettamente i prezzi di spedizione a destra sulla tabella checkout */
.woocommerce-checkout-review-order-table tfoot tr.woocommerce-shipping-totals td {
    text-align: right !important;
}

/* Feedback tattile universale */
button:active, 
input[type="submit"]:active, 
input[type="button"]:active, 
.button:active, 
a.button:active, 
.woocommerce-button:active, 
.woocommerce-Button:active {
    transform: scale(0.97) translateY(2px) !important;
    transition: transform 0.05s ease !important;
    opacity: 0.9 !important;
}

/* Stile blindato per i bottoni/link gourmet */
body header a.gourmet-button-force, 
body header button.gourmet-button-force,
body footer a.gourmet-button-force, 
body footer button.gourmet-button-force {
    transition: all 0.2s ease !important;
    display: inline-block !important;
    cursor: pointer !important;
    opacity: 1 !important;
}

body header a.gourmet-button-force:active, 
body header button.gourmet-button-force:active,
body footer a.gourmet-button-force:active, 
body footer button.gourmet-button-force:active {
    transform: scale(0.92) !important;
    opacity: 0.7 !important;
}


