/*
 Theme Name:   Electro Child
 Theme URI:     https://themeforest.net/item/electro-electronics-store-woocommerce-theme/15720624
 Description:   This is the child theme of Electro
 Author:        MadrasThemes
 Author URI:    https://madrasthemes.com/
 Template:      electro
 Version:       3.3.1
 License:       GNU General Public License v2 or later
 License URI:   http://www.gnu.org/licenses/gpl-2.0.html
 Tags:          light, dark, two-columns, right-sidebar, responsive-layout
 Text Domain:   electro-child
*/

/* =========================================
   1. FONT DEFINITIONS (Caricamento Font)
   ========================================= */

@font-face {
    font-family: 'Brush Script MT';
    src: url('https://framanfer.it/wp-content/uploads/font/brush-script-mt.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/brush-script-mt.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'ALS Script';
    src: url('https://framanfer.it/wp-content/uploads/font/ALSScript.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/ALSScript.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'StefanoCorsivo';
    src: url('https://framanfer.it/wp-content/uploads/font/StefanoCorsivo.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/StefanoCorsivo.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
} 
@font-face {
    font-family: 'Edwardian Script ITC';
    src: url('https://framanfer.it/wp-content/uploads/font/edwardianscriptitc-webfont.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/edwardianscriptitc-webfont.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Tastymia';
    src: url('https://framanfer.it/wp-content/uploads/font/Testimonia-ZVA2q.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/Testimonia-ZVA2q.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'NWD';
    src: url('https://framanfer.it/wp-content/uploads/font/NewWaltDisneyUi-8YdA.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/NewWaltDisneyUi-8YdA.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'OldEnglish';
    src: url('https://framanfer.it/wp-content/uploads/font/OldeEnglishRegular-Zd2J.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/OldeEnglishRegular-Zd2J.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'LyGoals';
    src: url('https://framanfer.it/wp-content/uploads/font/LoftygoalsRegular-9Y5Xy.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/LoftygoalsRegular-9Y5Xy.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Guavyne';
    src: url('https://framanfer.it/wp-content/uploads/font/GuavineDemoRegular-1jGgL.woff2') format('woff2'),
         url('https://framanfer.it/wp-content/uploads/font/GuavineDemoRegular-1jGgL.woff') format('woff');
    font-weight: normal; font-style: normal; font-display: swap;
}

/* --------------------------
   FONT-SIZE ADJUSTMENTS
   (Aggiustamento ottico per rendere i corsivi leggibili come Arial)
--------------------------- */

*:where([style*="Brush Script MT"]) { font-size: calc(2.5 * 1em) !important; }
*:where([style*="ALS Script"]) { font-size: calc(2.3 * 1em) !important; }
*:where([style*="Edwardian Script ITC"]) { font-size: calc(2.1 * 1em) !important; }
*:where([style*="Tastymia"]) { font-size: calc(2.2 * 1em) !important; }
*:where([style*="NWD"]) { font-size: calc(1.8 * 1em) !important; }
*:where([style*="OldEnglish"]) { font-size: calc(2 * 1em) !important; }
*:where([style*="LyGoals"]) { font-size: calc(2 * 1em) !important; }
*:where([style*="Guavyne"]) { font-size: calc(1.8 * 1em) !important; }


/* =========================================
   2. LAYOUT & GRAFICA GENERALE
   ========================================= */

/* Scroll to top */
@media (max-width: 1000px) { .back-to-top-wrapper {right: 90%;} }
@media (min-width: 1001px) { .back-to-top-wrapper {right: 94%;} }
.back-to-top-link { top: 90%; display: block; position: fixed; opacity: 0.5; }
@media (max-width: 1000px) { .back-to-top-link {top: 92%;} }
.back-to-top-link:hover { opacity: 0.8; }

/* Nascondi elementi indesiderati */
.wa__popup_powered .wa__popup_icon-ninja { display: none; } /* Icona whatsapp */
.tagged_as { display: none; } /* Codice prodotto */
.cat-item.cat-item-15 { display: none; } /* Senza categoria footer */
.newsletter-form { display: none; } /* Newsletter */
.go4269172405 { display: none !important; }
.woocommerce-NoticeGroup.woocommerce-NoticeGroup-updateOrderReview { display: none; }
.wcpa_price_summary { margin-top: 0px !important; }
.wcpa_wrap .wcpa_field_wrap { margin: 0 0 0; }
.availability { display: none !important; }

/* Colors & Typography */
p { color: black !important; margin-bottom: 0; } 
li { color: black !important; } 
#tab-description a { color: blue; }
.fw-bold.mb-0 { font-size: 13px !important; }
span.call-us-number { font-size: 18px !important; }
.single_add_to_cart_button.button { color: #000; }

/* Backgrounds */
div#content { background-color: #fff; }
.top-bar.hidden-lg-down.d-none.d-xl-block { background-color: #fff; }
header#masthead { background-color: #c6c6c6; }

/* Images */
.attachment-electro_blog_medium.size-electro_blog_medium.wp-post-image { max-width: 60% !important; }

/* Spaziatura Carosello Prodotti */
section.section-products-carousel .products-carousel { padding-bottom: 1em; }


/* =========================================
   3. MENU & HEADER
   ========================================= */

/* Centraggio Menu e Newsletter */
#menu-tutte-le-categorie-1 { padding-left: 4%; }
.primary-nav-menu .dropdown-menu .dropdown-menu { left: 100% !important; }
.electro-navbar-primary .nav { justify-content: center; }
.footer-newsletter-inner.row { justify-content: center; }

/* Navbar Sticky */
.header-v3.stuck .masthead+.electro-navbar-primary { display: block; }

/* Fix 3° Livello Menu (Corretto) */
.electro-navbar-primary .nav.yamm > li:last-child > ul ul { left: -100% !important; right: 100% !important; }


/* =========================================
   4. CHECKOUT & FORMS
   ========================================= */

/* Layout Checkout: Campi affiancati su Desktop */
@media (min-width: 768px) {
  form.woocommerce-checkout .form-row-first,
  form.woocommerce-checkout .form-row-last,
  p#billing_codice_fiscale_partita_iva_field,
  p#billing_codicesdi_field {
    width: 48% !important;
    display: inline-block;
    vertical-align: top;
    margin-right: 1.5%;
  }
  /* Rimuove margine destro dall'ultimo elemento */
  form.woocommerce-checkout .form-row-last { margin-right: 0; }
}

/* Cookie Banner Mobile (Nascondi icona gestione) */
@media (max-width: 425px) {
  #cmplz-manage-consent .cmplz-manage-consent { display: none !important; }
}


/* Nasconde i messaggi di errore sotto i campi specifici */
#billing_address_1_description, 
#billing_email_description, 
#billing_phone_description {
    display: none !important;
}

/* FIX spazio vuoto Safari iPhone Electro */
html, body {
    height: auto !important;
    min-height: auto !important;
}

.site-content,
#content,
.elementor-section,
.elementor-container {
    min-height: unset !important;
    height: auto !important;
}

/* Fix viewport iOS 100vh bug */
@supports (-webkit-touch-callout: none) {
  .elementor-section {
    min-height: auto !important;
    height: auto !important;
  }
}




/* Gestione Coupon su Mobile */
@media (max-width: 768px) {
    /* 1. Nascondi il coupon originale incastrato nella tabella */
    .woocommerce-cart-form .actions .coupon {
        display: none !important;
    }

    /* 2. Stile per il nuovo coupon sopra il tasto checkout */
    .custom-mobile-coupon button {
        background-color: #222 !important;
        border-radius: 3px !important;
        transition: all 0.3s ease;
    }
    
    .custom-mobile-coupon button:hover {
        background-color: #f7941d !important; /* Colore tipico Electro se lo usi */
    }

    .custom-mobile-coupon input:focus {
        border-color: #333 !important;
    }
}

/* Nascondi il nuovo coupon su Desktop (dove quello originale va bene) */
@media (min-width: 769px) {
    .custom-mobile-coupon {
        display: none !important;
    }
}

.single-product-wrapper {    margin-bottom: 0 !important;}
#tab-description p {margin-bottom: 0.5em !important;}

/* Fix e Personalizzazione Pulsante Mostra/Nascondi Password */
button.show-password-input {
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
    border: none !important;
    color: #333 !important; /* Colore grigio scuro/nero, cambialo se vuoi */
    font-weight: bold !important;
    width: auto !important;
    right: 15px !important; /* Distanza dal bordo destro dell'input */
    cursor: pointer !important;
    text-indent: 0 !important;
}

/* Scritta di default: Mostra */
button.show-password-input::after {
    content: "Mostra password" !important;
    font-size: 13px !important;
    font-family: inherit !important;
    display: block !important;
}

/* Scritta quando la password è visibile: Nascondi */
button.show-password-input.display-password::after {
    content: "Nascondi password" !important;
}

/* Nascondiamo eventuali icone Dashicons rotte sotto il tasto */
button.show-password-input::before {
    display: none !important;
}