.woocommerce ul.products li.product.outofstock .woocommerce-loop-product__title::after {
    content: "Esaurito";
    display: block;
    color: #B0413E;
    font-weight: bold;
    margin-top: 5px;
    font-size: 14px;
}
.woocommerce ul.products li.product.outofstock .woocommerce-loop-product__link::before,
.woocommerce div.product .product-image::before {
    content: "Esaurito";
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(176, 65, 62, 0.9);
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    padding: 5px 10px;
    z-index: 10;
    border-radius: 5px;
    text-transform: uppercase;
}
.single-product .product .woocommerce-variation-availability {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #B0413E; /* Colore sfondo rosso spento */
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 16px;
    z-index: 10;
}

.single-product .product .stock.out-of-stock {
    display: block;
    position: absolute;
    top: 15px;
    left: 15px;
    background: #B0413E;
    color: #fff;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 100;
}
.related-posts-wrap {
    display: none !important;
}

small:has(#wcal_gdpr_no_thanks) {
    display: none !important;
}

/* Nasconde il pulsante/link "Ignora" dello Store Notice */
.woocommerce-store-notice__dismiss-link,
.woocommerce-store-notice a.woocommerce-store-notice__dismiss-link {
  display: none !important;
}

/* Pulsanti principali */
.button, 
.wp-block-button__link, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button {
    border: 3px solid #B0413E !important; /* bordo rosso */
    background: #B0413E !important;       /* sfondo rosso */
    color: #DEDDDB !important;            /* testo bianco sporco */
    box-shadow: none !important;          /* elimina bordi/ombre indesiderati */
    border-radius: 6px;                   /* angoli arrotondati */
}

/* Hover: elegante, invertito */
.button:hover, 
.wp-block-button__link:hover, 
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.woocommerce input.button:hover {
    background: transparent !important;
    color: #B0413E !important;   /* testo rosso */
    border-color: #B0413E !important;
    box-shadow: none !important;
}
/* Forza la visualizzazione del footer anche su WooCommerce */
.woocommerce-page #colophon,
.woocommerce #colophon,
#colophon.site-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Box spedizione: linea verticale + testo compatto */
.em-ship-info{
  border-left: 5px solid #B0413E;
  padding: 10px 12px;
  background: transparent;
  margin: 12px 0 14px 0;
  font-size: 14px;
  line-height: 1.35;        /* nessuno spazio extra tra le righe */
}
.em-ship-info > div{ margin: 0; }
.em-ship-info .em-free-ship{ color:#B0413E; font-weight:700; }

/* —— FIX SPAZIO VUOTO MOBILE tra galleria e titolo ————————— */
@media (max-width: 768px){

  /* Azzera gap del contenitore prodotto (grid/flex Kadence) */
  .single-product div.product,
  .single-product div.product .product {
    display: block !important;
    gap: 0 !important;
    row-gap: 0 !important;
    grid-gap: 0 !important;
    grid-row-gap: 0 !important;
  }

  /* Galleria: niente margini/padding extra */
  .single-product div.product .woocommerce-product-gallery,
  .single-product .product .woocommerce-product-gallery,
  .single-product div.product .images {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    min-height: 0 !important;
  }
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
  .single-product .woocommerce-product-gallery .flex-viewport {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Sommario (blocco del titolo e testi): niente margini/padding in testa */
  .single-product div.product .summary,
  .single-product .product .entry-summary,
  .single-product .content-area .product .summary,
  .single-product .product .summary.entry-summary {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  /* Se il primo elemento del sommario ha margine proprio (es. h1) */
  .single-product .entry-summary > *:first-child {
    margin-top: 0 !important;
  }

  /* In alcuni setup Kadence aggiunge gap sul wrapper principale della pagina */
  .single-product .site-container .content-area .site-main {
    gap: 0 !important;
    row-gap: 0 !important;
  }
}
/* Correzione Spazio Bianco Eccessivo Galleria WooCommerce su Mobile (Kadence) */
@media screen and (max-width: 768px) {
    /* 1. Contenitore principale di WooCommerce (Soluzione spesso risolutiva) */
    .woocommerce-product-gallery {
        height: auto !important; 
        min-height: auto !important;
        margin-bottom: 0 !important; 
    }

    /* 2. Il viewport dello slider (FlexSlider) che spesso ha un'altezza fissa */
    .woocommerce-product-gallery .flex-viewport {
        height: auto !important; 
        min-height: auto !important;
        max-height: none !important; /* Molto importante se 'max-height' è impostato */
    }

    /* 3. Il contenitore specifico di Kadence se è presente */
    .kadence-woo-image-wrap {
        height: auto !important;
        min-height: auto !important;
    }
}
/* Assicura che l'immagine principale occupi lo spazio necessario subito */
/* Utile per l'LCP e per ridurre il CLS (Cumulative Layout Shift) */
@media screen and (max-width: 768px) {
    .woocommerce-product-gallery {
        min-height: 40vh; /* Riserva il 40% dell'altezza dello schermo mobile */
        background-color: #f7f7f7; /* Colore di sfondo temporaneo leggero */
    }
    /* Assicura che l'area del prodotto sia pronta subito */
    .product {
        display: block !important;
    }
}
/* Forzo il blocco di navigazione del footer a essere un elenco verticale */
.site-footer .footer-navigation ul.menu {
    display: block !important;
    padding: 0;
    margin: 0;
}

.site-footer .footer-navigation ul.menu li {
    display: block !important;
    margin-right: 0 !important; /* Rimuove lo spazio orizzontale tra le voci */
    margin-bottom: 8px !important; /* Aggiunge spazio verticale tra le voci */
}

/* Rimuove l'eventuale separatore automatico (ad esempio una barra verticale) */
.site-footer .footer-navigation ul.menu li::after {
    content: none !important;
}
/* ==========================================
   CHECKOUT A BLOCCHI — stile "pulito" come foto 2
   - campi input bianchi
   - box selezionabili bianchi
   - riepilogo ordine a destra bianco
   ========================================== */

/* 1) Campi modulo (input/select/textarea) bianchi */
body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-text-input textarea,
body.woocommerce-checkout .wc-block-components-textarea textarea,
body.woocommerce-checkout .wc-block-components-select select,
body.woocommerce-checkout input[type="text"],
body.woocommerce-checkout input[type="email"],
body.woocommerce-checkout input[type="tel"],
body.woocommerce-checkout input[type="search"],
body.woocommerce-checkout textarea,
body.woocommerce-checkout select {
  background: #fff !important;
}

/* 2) Box selezionabili (spedizione, pagamenti, radio option) bianchi */
body.woocommerce-checkout .wc-block-components-radio-control__option,
body.woocommerce-checkout .wc-block-checkout__payment-method {
  background: #fff !important;
  border: 1px solid rgba(0,0,0,0.18) !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  margin: 10px 0 !important;
}

/* 3) Stato selezionato: bordo più evidente (resta elegante) */
body.woocommerce-checkout .wc-block-components-radio-control__option.is-selected,
body.woocommerce-checkout .wc-block-checkout__payment-method.is-active {
  border-color: rgba(0,0,0,0.45) !important;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.10) !important;
}

/* 4) Riepilogo ordine (colonna destra) come "pannello" bianco */
body.woocommerce-checkout .wc-block-components-order-summary,
body.woocommerce-checkout .wc-block-checkout__order-summary,
body.woocommerce-checkout .wc-block-checkout__sidebar {
  background: #fff !important;
  border: 1px solid rgba(0,0,0,0.12) !important;
  border-radius: 12px !important;
  padding: 16px !important;
}

/* 5) Evita che lo sfondo del tema si infili in wrapper interni */
body.woocommerce-checkout .wc-block-components-panel,
body.woocommerce-checkout .wc-block-components-card,
body.woocommerce-checkout .wc-block-components-checkout-step {
  background: transparent !important;
}

/* 6) Coupon/righe totali dentro il riepilogo: niente trasparenze strane */
body.woocommerce-checkout .wc-block-components-totals-wrapper,
body.woocommerce-checkout .wc-block-components-totals-item,
body.woocommerce-checkout .wc-block-components-order-summary__content {
  background: transparent !important;
}

/* 7) Micro-miglioria: radio sempre leggibile su bianco */
body.woocommerce-checkout .wc-block-components-radio-control__input {
  background: #fff !important;
}
/* ==================================================
   FIX RADIO + TESTO (Woo Blocks Checkout)
   - niente testo tagliato
   - pallino fisso a sinistra
   - testo sempre in riga (può andare a capo SOLO nel suo spazio)
   ================================================== */

body.woocommerce-checkout .wc-block-components-radio-control__option {
  display: flex !important;
  align-items: center !important;
  position: relative !important;

  /* spazio riservato al radio */
  padding-left: 46px !important;
}

/* Il radio resta ancorato a sinistra e centrato verticalmente */
body.woocommerce-checkout .wc-block-components-radio-control__option
.wc-block-components-radio-control__input {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
}

/* Il testo occupa tutto lo spazio rimanente */
body.woocommerce-checkout .wc-block-components-radio-control__label-group {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Se hai descrizioni sotto (es. bonifico), lasciale respirare */
body.woocommerce-checkout .wc-block-components-radio-control__secondary-label,
body.woocommerce-checkout .wc-block-components-radio-control__description {
  margin-top: 6px !important;
}

/* Prezzo/icone: se presenti, non devono schiacciare il testo */
body.woocommerce-checkout .wc-block-components-shipping-rate__price,
body.woocommerce-checkout .wc-block-components-payment-method-icons,
body.woocommerce-checkout .wc-block-components-payment-method-icons-container {
  margin-left: 12px !important;
}
