/* ─────────────────────────────────────────────────────────────
   FONT LATO — Pesi secondari (non-critici per LCP)
   Regular (400) e Bold (700) sono nel critical.css inline.
   Light (300) e Black (900) caricati qui in modo deferred.
   ───────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'Lato';
    src: url('/wp-content/mu-plugins/fm/assets/fonts/lato-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lato';
    src: url('/wp-content/mu-plugins/fm/assets/fonts/lato-black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* =================================================================
   FM GLOBAL - CSS UNIFICATO
   =================================================================
   Contenuto:
   - PARTE 1: Stili base e WooCommerce (ex style.css)
   - PARTE 2: Header, Footer e Menu (ex style2.css)
   - PARTE 3: Fix Checkout Mobile (ex style3.css)
   ================================================================= */


/* =================================================================
   PARTE 1: STILI BASE E WOOCOMMERCE
   ================================================================= */

/* =========================================================
   FONT LATO GLOBALE - UNIFICATO
   =========================================================

/* ─────────────────────────────────────────────────────────────
   1. FONT LATO - REGOLA GLOBALE
   Applica Lato a TUTTO il sito
   ───────────────────────────────────────────────────────────── */
html,
body,
body *:not([class*="woofc"]):not(i):not([class*="icon"]) {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   2. HEADER E MENU
   ───────────────────────────────────────────────────────────── */
#fm-header-custom,
#fm-header-custom *:not(i),
#fm-header-custom .fm-nav,
#fm-header-custom .fm-nav-link,
#fm-header-custom .fm-menu-trigger,
#fm-header-custom .fm-dropdown-content,
#fm-header-custom .fm-dropdown-content a,
#fm-header-custom .fm-email-group a {
    font-family: 'Lato', sans-serif !important;
}

/* ─────────────────────────────────────────────────────────────
   3. FOOTER
   ───────────────────────────────────────────────────────────── */
#fm-footer-custom,
#fm-footer-custom *,
#fm-footer-custom .footer-flow-links,
#fm-footer-custom .footer-flow-links a,
#fm-footer-custom .footer-legal {
    font-family: 'Lato', sans-serif !important;
}

/* ─────────────────────────────────────────────────────────────
   4. COOKIE BANNER
   ───────────────────────────────────────────────────────────── */
#fm-cookie-banner,
#fm-cookie-banner *,
#fm-cookie-banner span,
#fm-cookie-banner button,
#fm-cookie-banner a {
    font-family: 'Lato', sans-serif !important;
}

/* ─────────────────────────────────────────────────────────────
   5. WOOCOMMERCE - TUTTE LE PAGINE
   ───────────────────────────────────────────────────────────── */
.woocommerce,
.woocommerce *:not([class*="woofc"]):not(i):not([class*="icon"]),
.woocommerce-page,
.woocommerce-page *:not([class*="woofc"]):not(i):not([class*="icon"]) {
    font-family: 'Lato', sans-serif !important;
}

/* Checkout */
.woocommerce-checkout,
.woocommerce-checkout *:not([class*="woofc"]):not(i):not([class*="icon"]),
.woocommerce-checkout h1,
.woocommerce-checkout h2,
.woocommerce-checkout h3,
.woocommerce-checkout p,
.woocommerce-checkout span,
.woocommerce-checkout label,
.woocommerce-checkout input,
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce-checkout button,
.woocommerce-checkout a,
.woocommerce-checkout td,
.woocommerce-checkout th,
.woocommerce-checkout li,
.woocommerce-billing-fields,
.woocommerce-billing-fields *,
.woocommerce-shipping-fields,
.woocommerce-shipping-fields *,
#order_review,
#order_review *:not([class*="woofc"]):not(i) {
    font-family: 'Lato', sans-serif !important;
}

/* Carrello */
.woocommerce-cart,
.woocommerce-cart *:not([class*="woofc"]):not(i):not([class*="icon"]),
.woocommerce-cart .shop_table,
.woocommerce-cart .shop_table *,
.woocommerce-cart .cart_totals,
.woocommerce-cart .cart_totals * {
    font-family: 'Lato', sans-serif !important;
}

/* Messaggi WooCommerce */
.woocommerce-message,
.woocommerce-message *,
.woocommerce-info,
.woocommerce-info *,
.woocommerce-error,
.woocommerce-error * {
    font-family: 'Lato', sans-serif !important;
}

/* Prodotti */
.single-product,
.single-product *:not([class*="woofc"]):not(i):not([class*="icon"]),
.product,
.product *:not([class*="woofc"]):not(i):not([class*="icon"]),
.products,
.products *:not([class*="woofc"]):not(i):not([class*="icon"]) {
    font-family: 'Lato', sans-serif !important;
}

/* ─────────────────────────────────────────────────────────────
   6. BOTTONI (tutti)
   ───────────────────────────────────────────────────────────── */
button,
.button,
input[type="submit"],
input[type="button"],
.btn,
a.button,
a.btn,
#place_order,
.checkout-button,
.wc-proceed-to-checkout a {
    font-family: 'Lato', sans-serif !important;
}

/* ─────────────────────────────────────────────────────────────
   7. FORM E INPUT
   ───────────────────────────────────────────────────────────── */
input,
select,
textarea,
label,
.form-row,
.form-row *,
.select2-container,
.select2-container *,
.select2-selection,
.select2-selection * {
    font-family: 'Lato', sans-serif !important;
}

/* ─────────────────────────────────────────────────────────────
   8. STRIPE E PAGAMENTI
   ───────────────────────────────────────────────────────────── */
#payment,
#payment *:not(i),
.payment_methods,
.payment_methods *,
.payment_box,
.payment_box *,
#wc-stripe-cc-form,
#wc-stripe-cc-form * {
    font-family: 'Lato', sans-serif !important;
}

/* ─────────────────────────────────────────────────────────────
   9. CONTENUTI GENERICI
   ───────────────────────────────────────────────────────────── */
.entry-content,
.entry-content *:not(i),
.page-content,
.page-content *:not(i),
article,
article *:not(i) {
    font-family: 'Lato', sans-serif;
}

/* ─────────────────────────────────────────────────────────────
   10. ECCEZIONI - Font diversi dove richiesto
   (Decommentare se vuoi mantenere Amaranth per titoli specifici)
   ───────────────────────────────────────────────────────────── */
/*
.header-titolo,
.titolo-testo-medio p,
.bottone-verde {
    font-family: 'Amaranth', cursive !important;
}
*/

/* ═══════════════════════════════════════════════════════════════
   WPC FLY CART - PROTEZIONE ICONE
   NON MODIFICARE QUESTA SEZIONE!
   ═══════════════════════════════════════════════════════════════ */

/* Reset font per WPC Fly Cart - lascia usare il suo font icone */
#woofc-area,
.woofc-cart-link,
[class*="woofc-"],
[id*="woofc"] {
    font-family: inherit;
}

/* Forza il font icone "woofc" per gli elementi che ne hanno bisogno */
#woofc-area .woofc-close,
#woofc-area .woofc-close i,
#woofc-area .woofc-item-qty-minus,
#woofc-area .woofc-item-qty-plus,
#woofc-area .woofc-item-remove,
.woofc-cart-link .woofc-icon,
.woofc-cart-link .woofc-icon i,
.woofc-cart-link i,
#woofc-area i[class*="woofc-icon"],
#woofc-area i,
.woofc-cart-link i {
    visibility: visible !important;
    opacity: 1 !important;
    font-family: "woofc" !important;
    font-style: normal !important;
}

/* Pseudo-elementi con font icone */
#woofc-area .woofc-close::before,
#woofc-area .woofc-close i::before,
#woofc-area .woofc-item-qty-minus::before,
#woofc-area .woofc-item-qty-plus::before,
#woofc-area .woofc-item-remove::before,
.woofc-cart-link .woofc-icon::before,
.woofc-cart-link .woofc-icon i::before,
.woofc-cart-link i::before,
#woofc-area i[class*="woofc-icon"]::before {
    font-family: "woofc" !important;
    visibility: visible !important;
}

/* MA il testo dentro WPC Fly Cart usa Lato */
#woofc-area .woofc-area-heading,
#woofc-area .woofc-item-name,
#woofc-area .woofc-item-name a,
#woofc-area .woofc-item-title,
#woofc-area .woofc-item-title a,
#woofc-area .woofc-item-price,
#woofc-area .woofc-subtotal,
#woofc-area .woofc-total,
#woofc-area .woofc-data-left,
#woofc-area .woofc-data-right,
#woofc-area .woofc-action-cart,
#woofc-area .woofc-action-checkout,
#woofc-area .woofc-continue,
#woofc-area .woofc-continue span,
#woofc-area .woofc-no-item,
#woofc-area .woofc-area-count,
.woofc-cart-link .woofc-cart-link-inner,
.woofc-cart-link .woofc-cart-link-inner-subtotal {
    font-family: 'Lato', sans-serif !important;
}






.titolo-landing-page h3 {
  font-family: Lato !important;
  font-size: 40px;
  color: #4e2801;
  padding-bottom: 10px;
}

/* Elimina la visualizzazione dei prodotti correlati */
.related.products {
  display: none !important;
}




.woofc-undo {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.woofc-undo-inner {
  display: none !important;
}

.titolo-testo-grande p {
  font-family: Lato !important;
  font-size: 40px;
  color: #4e2801;
  padding-bottom: 10px;
  line-height: 1.0;
}

.titolo-testo-medio p {
  font-family: 'Amaranth', cursive;
  font-size: 20px;
  font-weight: 100;
  color: firebrick;
  padding-bottom: 10px;
}

form.cart .button {
   font-size:large;
}

.titolo-testo-normale-justified p {
  font-family: 'Georgia', serif; /* Il 'serif' alla fine è un font di fallback */
  font-size: 20px;
  font-weight: 100;
  text-align: justify;
  color: black;
  padding-bottom: 10px;
}

.header-flow {
  display: flex;
  align-items: center;
  justify-content: center;
	margin-top: -20px;
}

.header-img-libro {
  width: 100px;
  height: 100px;
}

.img-nocciolino-libreria {
  position: relative;
  left: -40px;
  top: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  object-fit: cover;
}

.header-img-nocciolino {
  position: relative;
  /*left: -60px;*/
  top: -100px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  object-fit: cover;
	display: flex;
}

.header-titolo {
  font-family: 'Amaranth', cursive;
  font-size: 40px;
  font-weight: 700;
  color: #4e2801;
  margin: 0;
  padding: 10px;
  text-align: center;
}

@keyframes pulseIn {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.container-landing {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 100%;
  margin: 40px auto 80px;
}

td.actions .coupon {
	visibility: hidden;
	display: none;
}

#customer_details .form-row{
	text-align: left;
}

.woocommerce-form-login-toggle {
	visibility: hidden;
	display: none;
}

.woocommerce-account-fields {
	visibility: hidden;
	display: none;
}

.bottone-verde {
  display: inline-block;
  background-color: #6b963f;
  color: white !important;
  padding: 2.8rem 2rem;
  margin-top: 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-family: 'Amaranth', cursive;
  font-size: 20px;
  font-weight: 600;
  animation: pulseIn 0.6s ease-out;
  transition: transform 0.1s ease;
  box-shadow: 4px 4px 10px 0 rgba(86,117,51,0.3),
  -3px -3px 8px 0 rgba(122,184,75,0.3);
  border: none;
}

.bottone-verde:active {
  transform: scale(0.80);
  background-color: #5a8034;
}

.bottone-verde:hover span {
  color: #fde66a;
}

.box-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
	justify-content: center;
  text-align: center;
	gap: 2rem;
}

.testo-e-bottone {
  display: flex;
  flex-direction: column;
  text-align: center;
  white-space: nowrap;
	margin: 0px;
}

.blocco-contenuto-landing {
  background-color: #f2f1ec;
  padding: 4rem 2rem;
  margin: 10px;
  max-width: 100%;
  box-shadow: 
  8px 8px 20px 2px darkgray,
  -6px -6px 15px 1px gray;
  border-radius: 24px;
  box-sizing: border-box;
  width: 500px;
}

.blocco-contenuto-shop {
  background-color: white;
  /*padding: 4rem 2rem;*/
  margin: 0;
  width: 100%;
  align-items: stretch;
  box-shadow: 8px 8px 20px rgba(190, 155, 80, 0.3), -6px -6px 15px rgba(255, 240, 170, 0.5);
  border-radius: 24px;
  box-sizing: border-box;
}

/*.blocco-singolo-shop,*/
.woocommerce {
  background-color: #E6F4EA;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.15);
  padding: 2.5rem;
  border-radius: 20px;
  text-align: center;
  margin: 10px;
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────
   CONTENIMENTO PAGINE WOOCOMMERCE (sostituisce il container di Enfold)
   ───────────────────────────────────────────────────────────── */
body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 30px;
  margin-bottom: 30px;
}

/* Wrapper per pagine shop/prodotto (dal template woocommerce.php) */
.fm-woo-wrap {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

/* FIX MOBILE: Riduce padding su checkout per dare spazio ai campi */
@media (max-width: 768px) {
  body.woocommerce-checkout .woocommerce,
  body.woocommerce-cart .woocommerce {
    padding: 10px 5px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
  }
  .fm-woo-wrap {
    padding: 0 10px;
    margin: 15px auto;
  }
}

/* ─────────────────────────────────────────────────────────────
   CONTENIMENTO PAGINE CUSTOM (sostituisce il container di Enfold)
   ───────────────────────────────────────────────────────────── */
#fm-books-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Pagine legali (Privacy, Terms) */
.fm-legal-page {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 30px;
  font-family: 'Lato', sans-serif;
  line-height: 1.5;
}

.fm-legal-page .fm-legal-logo {
  display: block;
  margin: 20px auto 30px;
  max-height: 90px;
  height: auto;
}

.fm-legal-page h1 {
  text-align: center;
  color: #000;
  font-size: 1.5em;
  margin-bottom: 5px;
}

.fm-legal-page h2 {
  color: #1a2bb5;
  font-size: 1.35em;
  margin-top: 25px;
}

.fm-legal-page p,
.fm-legal-page li {
  font-size: 0.92em;
  line-height: 1.6;
  color: #333;
}

.fm-legal-page ul {
  padding-left: 20px;
}

.fm-legal-page a {
  color: #708e3e;
}

/* Reset .woocommerce per shortcode [add_to_cart] inline (bottoni nei libri, ecc.) */
.woocommerce.add_to_cart_inline,
.book-product-box .woocommerce,
.book-product-box .product.woocommerce {
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  display: inline !important;
}

/* Forza stile bottoni "Aggiungi al carrello" nelle card prodotto */
.book-product-box a.button.add_to_cart_button,
.book-product-box button.single_add_to_cart_button {
  background: #5e8f33 !important;
  color: #fff !important;
  padding: 12px 22px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  border: none !important;
  font-family: Lato !important;
  font-size: 1.1em !important;
  text-decoration: none !important;
  display: inline-block !important;
  cursor: pointer !important;
  transition: background .25s ease, transform .25s ease;
}
.book-product-box a.button.add_to_cart_button:hover,
.book-product-box button.single_add_to_cart_button:hover {
  background: #4c762a !important;
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────
   BOOK FORMAT CARDS: titoli verdi, fx text piccolo
   ───────────────────────────────────────────────────────────── */
/* Titolo formato (es. "Versione digitale EPUB") */
.book-product-box h3.product-title {
  color: #0a3d0a !important;
  font-weight: 700 !important;
}

/* Testo stima valuta: più piccolo */
.book-product-box .fm-fx {
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
  color: #666 !important;
}

/* Valori EUR/USD: verde scuro bold */
.book-product-box .fm-fx strong {
  color: #0a3d0a !important;
  font-weight: 700 !important;
}

/* ─────────────────────────────────────────────────────────────
   CHECKOUT: nascondi testo WooCommerce privacy duplicato
   ───────────────────────────────────────────────────────────── */
.woocommerce-privacy-policy-text {
  display: none !important;
}

/* Checkbox FM privacy: font più piccolo */
#fm_accept_privacy_field .woocommerce-terms-and-conditions-checkbox-text {
  font-size: 0.82em !important;
  line-height: 1.5 !important;
  color: #444 !important;
}

/* ─────────────────────────────────────────────────────────────
   CHECKOUT: bottone "Effettua ordine" centrato
   ───────────────────────────────────────────────────────────── */
#payment .place-order {
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}
#place_order {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  max-width: 600px !important;
  float: none !important;
}

table.shop_table .actions .coupon .button {
   font-size: medium;
}

.actions .button {
  font-size: medium;
  float: inherit;
}

#payment #place_order {
   font-size: medium;
}



/* Pagina Carrello: righe dei totali in 2 colonne vere */
body.woocommerce-cart .cart_totals .shop_table tr {
  display:  table-header-group !important;
  grid-template-columns: 1fr auto; /* sinistra larga, destra stretta */
  align-items: start;
	background-color: whitesmoke !important;
}

.woocommerce-cart .cart_totals table.shop_table tbody {
  display: contents !important;
	width: 100% !important;
}


/* Forza la cella etichetta nella 1a colonna, a sinistra */
body.woocommerce-cart .cart_totals .shop_table tr > th {
  grid-column: 1 !important;
  text-align: left !important;
  width: auto !important;
	background-color: whitesmoke !important;
}

/* Forza la cella importo nella 2a colonna, a destra */
body.woocommerce-cart .cart_totals .shop_table tr > td {
  grid-column: 2 !important;
  text-align: right !important;
  justify-self: end;          /* aderisce al bordo destro della colonna */
  width: auto !important;
  display: block !important;  /* neutralizza eventuali flex/grid del tema */
	background-color: whitesmoke;
}

/* Importo compatto (evita “scivolamenti” verticali) */
body.woocommerce-cart .cart_totals .shop_table .woocommerce-Price-amount.amount {
  display: inline-block;
  line-height: 1.1;
  white-space: nowrap;
}

/* (opzionale) padding uniforme alle righe */
body.woocommerce-cart .cart_totals .shop_table tr > th,
body.woocommerce-cart .cart_totals .shop_table tr > td {
  padding: 8px 12px !important;
}


body.woocommerce-cart td.product-thumbnail,
body.woocommerce-cart th.product-thumbnail {
  display: none !important;
}



/* Pagina conferma ordine: tabella prodotti a 1 colonna */
/*
body.woocommerce-order-received table.shop_table.order_details,
body.woocommerce-order-received table.shop_table.order_details tr,
body.woocommerce-order-received table.shop_table.order_details th,
body.woocommerce-order-received table.shop_table.order_details td{
  display: body !important;
  width: 100% !important;
  text-align: left !important;
  padding: 10px !important;
}
*/

/* Spazio uniforme tra i prodotti */
body.woocommerce-order-received table.shop_table.order_details td {
  border: none !important;       /* togli griglia verticale */
  padding: 6px 0 !important;
}

.checkout_coupon #coupon_code {
  font-size: x-large;
  color: black;
}

.testo-condizioni-shop {
  background-color: #F5F5F5;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.15);
  padding: 2.5rem;
  border-radius: 20px;
  text-align: justify;
}




div form.cart div.quantity input {
  color: black !important;
}

.blocco-contenuto-riga {
    background-color: white !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem 4rem;
    box-sizing: border-box;
    margin: 0rem auto;
    width: 100%;
    align-items: stretch;
}

.blocco-singolo-contenuto {
  background-color: #C5DCA0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 2.5rem;
  border-radius: 20px;
  text-align: center;
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* FOOTER */
.footer-flow {
  background-color: #ffffff;
  margin: 10px;
  text-align: center;
	overflow: hidden;
}

.footer-flow-links {
	background-color: #ffffff;
  margin: 10px;
  text-align: center;
	overflow: hidden;
}

.footer-scritta {
  margin: 0 0 1rem;
  font-size: 1.6em;
  font-family: 'Amaranth';
  color: #4a3a21;
}

.footer-image {
  max-width: 240px;
  width: 30%;
  height: auto;
  display: inline-block;
}

#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 24px;
  color: #555; /* Grigio scuro */
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  padding: 0;
}

#back-to-top .arrow-up {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #555;
  line-height: 1;
}

#back-to-top:hover {
  background-color: #f5f5f5;
}




#Field-numberInput {
  font-size: 18px !important;
  color: black !important;
  border: 1px solid black !important;
}

.woocommerce-info,
.wc_payment_method payment_method_stripe,
.payment_method_stripe {
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce-terms-and-conditions-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.woocommerce-terms-and-conditions-checkbox-text {
  font-family: 'static', sans-serif !important;
  font-size: 1rem !important;
  color: red !important;
}

/* SEZIONI */
/* Colonna sinistra: logo + Nocciolino */
.colonna-libreria {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem; /* distanza tra immagini */
  background-color: #fde9a1 !important;
}

/* Immagine di Nocciolino */
.colonna-nocciolino {
  position: absolute;
  bottom: 0;
  left: 150px; /* distanza da sinistra rispetto al contenitore */
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  background-color: #fde9a1 !important;
}

/* Colonna destra: scritta Libreria allineata a destra */
.colonna-titolo {
  align-items: left;
  text-align: left;
  font-size: 60px;
  font-weight: 600;
  color: #4e2801;
  background-color: #fde9a1 !important;
}

/* CSS per lo Shop */
/* ----------------- */
.header-shop-wrapper {
  position: relative; /* Serve per posizionare l’icona rispetto al titolo */
}

.wpc-fly-cart {
    position: relative;
    display: inline-block;
    margin-left: 15px;
    cursor: pointer;
}

.woocommerce td.product-name a {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
  color: inherit;
  text-align: left;
  display: block;
}

.woocommerce-message a.button {
  visibility: hidden;
  display: none;
}

.wpc-fly-cart-icon {
    font-size: 20px;
    color: #000;
}

.woocommerce-product-gallery__wrapper {
	margin-top: 0px !important;
	width: 15%;
	display: inline-block;
    justify-content: center;
}

.woocommerce .single-product-main-image {
	margin: 0px !important;
	justify-content: center !important;
  display: flex !important;
	width: 100% !important;
	border-color: #F5F5F5 !important;
	float:none !important;
	margin: 0px !important;
  padding: 0px !important;
}

.woocommerce .single-product-main-image img {
	border-color: #F5F5F5 !important;
}

.woocommerce .single-product-main-image div {
  visibility: hidden;
	display: none;
}

.woocommerce-tabs #tab-description ul {
   list-style-position: outside !important;
}

.woocommerce .single-product-main-image a {
    pointer-events: none;
    cursor: default;
    border: none !important;
}

.woocommerce .single-product-main-image .images a  {
    border-color: #F5F5F5;
}

.woocommerce .single-product-main-image:hover {
    filter: none !important;
}

/* Istruzioni per la pagina dei "Prodotti" dello shop */
.woocommerce .cart  {
    justify-content: center !important;
}

.woocommerce form.cart  {
    display: inline-grid !important;
}

div form.cart div.quantity {
    float: left;
    margin: 0 0 0 0;
    padding-bottom: 10px;
    min-width: 130px;
}

#customer_details {
    width: 100%;
    float: left;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

div table.shop_table td {
  /*font-size: 1.15em !important;*/
}

.woocommerce .cart-collaterals {
    display: flex !important;
    justify-content: center !important;  /* Centra orizzontalmente */
}

.product .woocommerce-tabs ul.tabs {
	display:none !important;
}

.product .woocommerce-tabs .panel {
	display:none !important;
}

.woocommerce .cart-collaterals .cart_totals a.button.alt {
    display: flex;
    justify-content: center !important;
    width: 100%;
    font-size: 160% !important;
}

.woocommerce .woocommerce-billing-fields {
    font-size: 140% !important;
}

.woocommerce .price {
    display: inherit !important;
    line-height: unset !important;
    padding: 10px 0px 10px 0px; /* top, right, bottom, left */
}

.col2-set .col-1 {
  width: 50%;
  padding-bottom: 30px;
}

.col2-set .col-2 {
  width: 50%;
  padding-bottom: 30px;
}

.validate-state label {
   float: left;
}

.validate-phone label {
   float: left;
}

.notes label {
   float: left;
}

.woocommerce-billing-fields h3 {
   color: darkslateblue;
}

.woocommerce-additional-fields h3 {
   color: darkslateblue;
}

.woocommerce-message {
  font-size: 1.1rem !important;
  padding: 0 !important;
}

ul.woocommerce-error,
ul.woocommerce-error a {
  font-size: 1.1rem !important;
  padding-left: 0px;
  padding-right: 0px;
  color: red;
}

.order-total {
  background-color: grey !important;
  color: black !important;
}

th.product-thumbnail {
	visibility: hidden;
	display: none;
}

td.product-thumbnail {
	visibility: hidden;
	display: none;
}

th.product-remove,
th.product-name,
th.product-price,
th.product-quantity,
th.product-subtotal {
   background-color: #3E4A3F;
   color: #ffffff;
}

th.product-total {
   background-color: #3E4A3F !important;
   color: #ffffff;
   text-align: right;
   border-width: 0px !important;
}

td.product-total {
   float:right;
}

#place_order.button.alt {
   margin-top: 50px !important;
   font-size: large !important;
}

.order-again a {
    font-size: large !important;
}

input#wc-stripe-new-payment-method{
	visibility: hidden !important;
}

p.woocommerce-SavedPaymentMethods-saveNew.woocommerce-validated {
	visibility: hidden !important;
}

a.button.wc-backward {
   margin: 0 auto;
   display: inline-block;
   float: none;
	font-size: large !important;
}

.col2-set .col-1 h3  {
   font-size: 180% !important;
   padding-bottom: 20px;
   float: left;
}

.col2-set .col-2 h3 {
   font-size: xx-large !important;
   padding-bottom: 20px;
}

.required_field {
   float: left;
}

.optional {
   font-size: large;
}

.optional label span {
   font-size: large !important;
}
.woocommerce .price span {
    font-size: 23px !important;
    font-weight: 600 !important;
}

.woocommerce .woocommerce-product-gallery  {
    background-color: #F5F5F5;
    width: 10% !important;
    height: auto !important;
}

.woocommerce .single-product-summary {
    overflow: visible !important;
}

.woocommerce .summary {
    float: left !important;
    width: 100% !important;
    background-color: #C5DCA0;
}
.woocommerce .wc-tabs-wrapper {
    padding: 0 0 0 0 !important;
    margin: 0 0 0 0 !important;
    font-size: 140%;
	  background-color: #C5DCA0;
}

.woocommerce .product_title {
  background-color: #C5DCA0;
  padding: 0;
  margin: 0;
  font-size: large;
}

.woocommerce .woocommerce-tabs h2 {
  font-size: 130% !important;
  background-color: #C5DCA0;
  padding: 0;
  margin: 0;
}

.woocommerce-Tabs-panel.woocommerce-Tabs-panel--description.panel.entry-content.wc-tab
{
  background-color: #C5DCA0;
  padding: 0;
}

.woocommerce-Tabs-panel--description {
  background-color: #C5DCA0 !important; 
}

.woocommerce div.product .woocommerce-tabs .panel {
  border: none !important;
}


#tab-title-description {
  visibility: hidden;
}

.woocommerce-info {
  background-color: #C5DCA0; 
  border: none;
}

.woocommerce .product_meta {
    visibility: hidden;
}

div.product p.stock {
  color: red;
  text-transform: uppercase;
  text-decoration: underline;
  font-size: x-large;
}

.woofc-item-thumb {
	visibility: hidden;
	display: none;
}

.woocommerce-tabs .panel > div {
  display: flex;
  justify-content: center;
  background-color: #C5DCA0;
}

/* ─────────────────────────────────────────────────────────────
   WPC FLY CART — Layout basato su struttura HTML reale:
   .woofc-item
     ├── .woofc-item-thumb (nascosto)
     ├── .woofc-item-info (.woofc-item-title + .woofc-item-price)
     ├── .woofc-item-qty (.woofc-item-qty-inner: - input +)
     └── .woofc-item-remove (X)
   ───────────────────────────────────────────────────────────── */

/* Item container: il vero container è .woofc-item-inner */
#woofc-area .woofc-item-inner {
  display: flex !important;
  gap: 0 8px !important;
  border-bottom: 1px solid #eee !important;
}

/* Thumb: nascosto */
#woofc-area .woofc-item-thumb {
  display: none !important;
}

/* Info (titolo + prezzo): prima colonna */
#woofc-area .woofc-item-info {
  grid-column: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-width: 0 !important;
}

#woofc-area .woofc-item-title {
  font-size: 13px !important;
  line-height: 1.3 !important;
  display: block !important;
}

#woofc-area .woofc-item-price {
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

/* Qty controls: allineati con il titolo */
#woofc-area .woofc-item-qty {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

#woofc-area .woofc-item-qty-inner {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
  margin-top: -25px !important;
}

.woofc-item-qty-minus,
.woofc-item-qty-plus {
  display: flex !important;
  height: 30px !important;
  width: 30px !important;
  color: black;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
}

#woofc-area .woofc-item-qty input {
  width: 30px !important;
  height: 30px !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #ddd !important;
  font-size: 13px !important;
}

/* non mostrare le righe con gli articoli rimossi */
#woofc-area .woofc-items > div:has(.woofc-undo) {
  display: none !important;
  visibility: hidden !important;
}

/* X rimuovi: allineata con qty */
#woofc-area .woofc-item-remove {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin-top: -10px !important;
  padding: 0 !important;
  cursor: pointer;
  position: static !important;
  float: none !important;
}

/* Icona X: allineamento preciso */
#woofc-area .woofc-item-remove i.woofc-icon-icon10 {
  margin-top: 5px !important;
  display: flex !important;
  margin-left: 15px !important;
}

/* ─────────────────────────────────────────────────────────────
   WPC FLY CART — MOBILE: layout a 2 righe
   Riga 1: [Nome prodotto ─────────────────────]
   Riga 2: [CHF 12.90]      [- 1 +]      [×]
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #woofc-area .woofc-item-inner {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 6px 8px !important;
    padding: 12px 0 !important;
  }

  /* "Spacchetta" info: titolo e prezzo diventano figli diretti del grid */
  #woofc-area .woofc-item-info {
    display: contents !important;
  }

  /* Titolo: riga 1, tutta la larghezza */
  #woofc-area .woofc-item-title {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    font-size: 13px !important;
  }

  /* Prezzo: riga 2, colonna 1 */
  #woofc-area .woofc-item-price {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: block !important;
  }

  /* Qty: riga 2, colonna 2 */
  #woofc-area .woofc-item-qty {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: center !important;
  }

  #woofc-area .woofc-item-qty-inner {
    margin-top: 0 !important;
  }

  /* X: riga 2, colonna 3, centrata verticalmente */
  #woofc-area .woofc-item-remove {
    grid-column: 3 !important;
    grid-row: 2 !important;
    align-self: center !important;
    margin-top: 0 !important;
  }

  #woofc-area .woofc-item-remove i.woofc-icon-icon10 {
    margin-top: 12px !important;
    margin-left: 5px !important;
  }
}



/* Stile mobile-first per tabella download ordine */
.woocommerce-table--order-downloads.shop_table.order_details {
  width: 100% !important;
  border-collapse: collapse;
}

/* Nascondi l'intestazione: useremo i data-title nei td */
.woocommerce-table--order-downloads.shop_table.order_details thead {
  display: none !important;
}

/* Ogni riga diventa un "card" */
.woocommerce-table--order-downloads.shop_table.order_details tr {
  display: block !important;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  padding: 10px;
  background: #fff;
}

/* Ogni cella in colonna: label sopra, valore sotto */
.woocommerce-table--order-downloads.shop_table.order_details td {
  display: block !important;
  width: 100% !important;
  padding: 6px 0;
  text-align: left;
  border: none !important;
}

/* Label preso dal data-title */
.woocommerce-table--order-downloads.shop_table.order_details td::before {
  content: attr(data-title);
  display: block;
  font-weight: 600;
  margin-bottom: 3px;
  color: #333;
  font-size: 0.9em;
  opacity: 0.85;
}

/* Link download ben visibile */
.woocommerce-table--order-downloads.shop_table.order_details td.download-file a {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.95em;
}

/* Adatta font e spaziature su schermi più grandi */
@media (min-width: 768px) {
  .woocommerce-table--order-downloads.shop_table.order_details tr {
    padding: 15px;
  }
  .woocommerce-table--order-downloads.shop_table.order_details td {
    padding: 8px 0;
    font-size: 1em;
  }
}

/* Ingrandisce l'icona del carrello */
.woofc-cart-link .woofc-cart-icon {
    font-size: 28px !important;
}

.woofc-cart-link {
	float: right;
	font-size: 20px;
}

/* Ingrandisce il totale accanto al carrello */
.woofc-cart-link .woofc-cart-total {
    font-size: 22px !important;
    font-weight: bold;
}

/* Ingrandisce il numero nel cerchio rosso */
.woofc-cart-link .woofc-cart-count {
    font-size: 16px !important;
    padding: 4px 7px !important;
    top: -10px !important;
    right: -10px !important;
}

.woofc-cart-link-inner-subtotal {
  background-color: transparent;
  font-size: 1.2rem !important;
  color: black;
  padding-right: 10px;
  font-weight: 600;
}  

.woofc-count { 
  display: none !important; 
  visibility: hidden !important;
}

.img-nocciolino-shop a {
    z-index: 9999 !important;
    pointer-events: auto !important;
}

.header-shop-wrapper {
    position: relative !important;
}

/* CARRELLO */
/* Titolo Totale Carrello */
.cart_totals > h2,
.woocommerce-cart h2 {
  font-size: 1.4rem !important;
  font-weight: bold;
  text-transform: uppercase;
  color: #4e2801;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Box codice promozionale */
.woocommerce-cart .woocommerce-form-coupon {
  margin-bottom: 2rem;
}

.woocommerce-billing-fields__field-wrapper {
    clear: both !important;
}

.checkout_coupon.woocommerce-form-coupon p.form-row.form-row-first {
    margin-left: 10% !important;
    width: 45% !important;
}

.checkout_coupon.woocommerce-form-coupon p.form-row.form-row-last {
    margin-right: 10% !important;
    width: 30% !important;
}

.woocommerce-cart-form__cart-item .woocommerce-Price-amount.amount {
  text-align: left;
  font-size: 1.25em !important;
}

.form-row label {
  display: block;
  font-size: medium;
}

.woocommerce-input-wrapper input.input-text,
.woocommerce-input-wrapper textarea.input-text {
   border-color: black !important;
   font-size: 18px !important;
   color: black !important;
}

.woocommerce-cart .woocommerce-form-coupon input.input-text {
  border-radius: 10px;
  border: 1px solid;
  padding: 0.75rem;
  width: 100%;
}

.woocommerce-cart .woocommerce-form-coupon button {
  background-color: #6b963f;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  padding: 0.7rem 1.2rem;
  margin-top: 0.5rem;
}

p.checkout-inline-error-message {
  background-color: #F5F5F5;
  color: red;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0px;
}

p.woocommerce-notice.woocommerce-notice--success.woocommerce-thankyou-order-received {
  background-color: #377E47;
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 600;
  padding-bottom: 30px;
  padding-top: 30px;
}

.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details {
  font-size: 1.0rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  width: 100% !important;
  flex-wrap: wrap;
}

.woocommerce-order-downloads__title,
.woocommerce-order-details__title {
  color: #377E47;
  font-size: 2.0rem;
  font-weight: 600;
  padding-top: 30px;
}

th.download-product,
th.download-remaining,
th.download-expires,
th.download-file {
    font-size: 1.0rem !important;
    font-weight: 600 !important;
    background-color: #C3C3C3;
    text-align: center;
    color: black;
}

.woocommerce-table.woocommerce-table--order-details tfoot th {
    font-size: 1.0rem !important;
    font-weight: 600 !important;
    background-color: #C3C3C3;
    text-align: left;
    color: black;
}

.woocommerce-Price-amount.amount  {
    /*font-size: 20px !important;
    font-weight: 600 !important;*/
    text-align: center;
    color: black;
}

.woocommerce-customer-details address {
    color: black;
    font-size: 1.0rem !important;
}

.woocommerce-table.woocommerce-table--order-details tfoot td {
    font-size: 1.0rem !important;
    text-align: right;
    color: black;
}

.order-again {
    display: flex;
    width: 100%;
    justify-content: center;
}

td.download-product {
  pointer-events: none;
  cursor: default;
	background-color: lightgray !important;
}

th.woocommerce-table__product-name.product-name {
    font-size: 1.0rem;
    font-weight: 600;
    background-color: #C3C3C3;
    text-align: left;
    color: black;
    padding-bottom: 20px;
}

td.woocommerce-table__product-name.product-name {
  pointer-events: none;
  cursor: default;
}

td.download-product a {
   font-size: 1.0rem;
   color: black;
}

td.download-remaining {
   font-size: 1.0rem;
   color: black;
}

td.download-expires time {
   font-size: 1.0rem;
   color: black;
}

.woocommerce-MyAccount-downloads-file.button.alt {
   font-size: 1.0rem;
   background-color: white;
   color: darkgreen;
   text-decoration: underline !important;
   float: none;
   padding: 0 !important;
   margin: 0 !important;
}

body.woocommerce-page .checkout_coupon.woocommerce-form-coupon {
   width: 100%;
   justify-content: center;
}

/* Subtotale e totale */
.woocommerce .cart-subtotal td,
.woocommerce .order-total td,
.woocommerce .tax-rate-ch-iva-libri-1 td,
tr.woocommerce-shipping-totals.shipping ul.woocommerce-shipping-methods li {
  color: #6b963f !important;
  font-weight: 700 !important;
  font-size: 1rem;
  text-align: right !important;
}

.woocommerce-Price-currencySymbol,
.woocommerce-Price-amount.amount{
	font-size: large !important;
}

/* Divider con “OPPURE” */
.cart_totals .wc-proceed-to-checkout:before {
  content: attr(data-title);
  display: block;
  border-top: 1px solid #ccc;
  margin: 2rem 0 1rem;
}

.cart_totals .wc-proceed-to-checkout::after {
  content: attr(data-title);
  display: block;
  text-align: center;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #333;
  position: relative;
}

.cart_totals .wc-proceed-to-checkout::after:before,
.cart_totals .wc-proceed-to-checkout::after:after {
  content: attr(data-title);
  position: absolute;
  top: 50%;
  width: 30%;
  border-top: 1px solid #ccc;
}

.cart_totals .wc-proceed-to-checkout::after:before {
  left: 0;
}

.cart_totals .wc-proceed-to-checkout::after:after {
  right: 0;
}

/* Bottone verde “Procedi al pagamento” */
.woocommerce .checkout-button.button {
  background-color: #6b963f !important;
  color: white !important;
  font-size: 0.9rem !important;
  font-weight: bold !important;
  padding: 0.9rem 2rem !important;
  border: none !important;
  border-radius: 10px !important;
  margin-top: 1rem;
  box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
}

.character-title {
  font-size: 32px; /* o 2rem */
  font-weight: bold;
  color: #991e1e; /* rosso scuro, come il testo esistente */
  text-align: center;
  margin-bottom: 10px;
  margin-top: 25px;
}

.character-block p {
  text-align: justify;
  font-size: 20px;
  color: black;
  max-width: 900px;
	margin: 40px auto 40px auto;
}

.character-block ul {
  text-align: justify;
  font-size: 20px;
  color: black;
  max-width: 900px;
  margin: 0 auto 40px auto;
}


/*----------------*/
/* PER SMARTPHONE */
/*----------------*/
@media only screen and (max-width: 900px)
{
  .language-links-white a {
    font-size: 1.8rem;
  }

  .language-links-white .l1 {
    top: 340px;
    left: 10%;
    transform: translateX(-50%);
    animation-delay: 0.1s;
  }

  .language-links-white .l2 {
    top: 400px;
    left: 25%;
    transform: translateX(-50%);
    animation-delay: 0.2s;
  }

  .language-links-white .l3 {
    top: 460px;
    left: 45%;
    transform: translateX(-50%);
  }

  .language-links-white .l4 {
    top: 400px;
    left: 65%;
    transform: translateX(-50%);
    animation-delay: 0.4s;
  }

  .language-links-white .l5 {
    top: 340px;
    left: 85%;
    transform: translateX(-50%);
    animation-delay: 0.5s;
  }
	
	.container-landing {
    display: flex;
    justify-content: center;
    gap: 40px;
    /*flex-wrap: wrap;*/
    max-width: 100%;
    margin: 40px auto 80px;
  }

	.footer-image {
    max-width: 340px;
    width: 80%;
    height: auto;
    display: inline-block;
  }
	







/* PERSONALIZZAZIONE DELLA PAGINA CHECKOUT-CARRELLO */

/* ── DESKTOP: tabella normale con header visibile ── */
.woocommerce-cart table.shop_table {
  width: 100%;
  border-collapse: collapse;
}

/* Override WooCommerce shop_table_responsive: forza layout tabella su desktop */
@media (min-width: 769px) {
  .woocommerce-cart table.shop_table_responsive {
    display: table !important;
  }
  .woocommerce-cart table.shop_table_responsive thead {
    display: table-header-group !important;
  }
  .woocommerce-cart table.shop_table_responsive tbody {
    display: table-row-group !important;
  }
  .woocommerce-cart table.shop_table_responsive tr {
    display: table-row !important;
  }
  .woocommerce-cart table.shop_table_responsive td,
  .woocommerce-cart table.shop_table_responsive th {
    display: table-cell !important;
  }
  /* Nascondi le label ::before su desktop (servono solo mobile) */
  .woocommerce-cart table.shop_table_responsive td::before {
    display: none !important;
  }
}

.woocommerce-cart table.shop_table thead th {
  background-color: #3E4A3F;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px;
  border: none;
}

.cart-subtotal th,
.order-total th {
  font-weight: bold;
  font-size: large !important;
  border: none !important;
}

/* ── MOBILE CART ── */
@media (max-width: 768px) {

  /* ═══════════════════════════════════════════
     A) TABELLA PRODOTTI (dentro il form)
     ═══════════════════════════════════════════ */
  .woocommerce-cart form table.shop_table {
    display: block !important;
    border: none !important;
  }
  .woocommerce-cart form table.shop_table thead {
    display: none !important;
  }
  .woocommerce-cart form table.shop_table tbody {
    display: block !important;
  }

  /* Card prodotto: flex container per poter usare order + position */
  .woocommerce-cart form table.shop_table tr.cart_item {
    display: flex !important;
    flex-wrap: wrap !important;
    position: relative !important;
    background: #f9faf8 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    padding: 16px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
  }

  /* Reset tutti i td (escluso background per non sovrascrivere product-remove) */
  .woocommerce-cart form table.shop_table tr.cart_item td {
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    color: #333 !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
  }

  /* ── X rimuovi: prima riga piena con testo "Rimuovi prodotto" ── */
  .woocommerce-cart form td.product-remove {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    order: 0 !important;
    padding: 6px 10px !important;
    background: #e8f2e0 !important;
    border-radius: 6px !important;
    margin-bottom: 10px !important;
    border-bottom: none !important;
  }
  .woocommerce-cart form td.product-remove a.remove {
    font-size: 16px !important;
    color: #5e8f33 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
  }
  .woocommerce-cart form td.product-remove::before {
    display: none !important;
  }
  /* Testo "Rimuovi prodotto" accanto alla X — multilingua */
  .woocommerce-cart form td.product-remove::after {
    content: "Remove product" !important;
    display: inline-block !important;
    font-size: 0.78rem !important;
    color: #5e8f33 !important;
    font-weight: 500 !important;
  }
  html[lang="it-IT"] .woocommerce-cart form td.product-remove::after,
  html[lang="it"] .woocommerce-cart form td.product-remove::after {
    content: "Rimuovi prodotto" !important;
  }
  html[lang="de-DE"] .woocommerce-cart form td.product-remove::after,
  html[lang="de"] .woocommerce-cart form td.product-remove::after {
    content: "Produkt entfernen" !important;
  }
  html[lang="fr-FR"] .woocommerce-cart form td.product-remove::after,
  html[lang="fr"] .woocommerce-cart form td.product-remove::after {
    content: "Retirer le produit" !important;
  }
  html[lang="es-ES"] .woocommerce-cart form td.product-remove::after,
  html[lang="es"] .woocommerce-cart form td.product-remove::after {
    content: "Eliminar producto" !important;
  }

  /* ── Thumb: nascosto ── */
  .woocommerce-cart form td.product-thumbnail {
    display: none !important;
  }

  /* ── Nome prodotto: riga piena, bold, sfondo grigio ── */
  .woocommerce-cart form td.product-name {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    padding: 8px 10px !important;
    order: 1 !important;
    width: 100% !important;
    background: #f0f0f0 !important;
    border-radius: 6px !important;
    margin-bottom: 6px !important;
  }
  .woocommerce-cart form td.product-name::before {
    display: none !important;
  }

  /* ── Prezzo, Quantità, Subtotale: label + valore su una riga ── */
  .woocommerce-cart form td.product-price {
    order: 2 !important;
  }
  .woocommerce-cart form td.product-quantity {
    order: 3 !important;
  }
  .woocommerce-cart form td.product-subtotal {
    order: 4 !important;
  }

  .woocommerce-cart form td.product-price,
  .woocommerce-cart form td.product-quantity,
  .woocommerce-cart form td.product-subtotal {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 9px 0 !important;
    border-top: 1px solid #eee !important;
    width: 100% !important;
  }

  /* Override WooCommerce responsive ::before: inline, non block */
  .woocommerce-cart form table.shop_table_responsive td.product-price::before,
  .woocommerce-cart form table.shop_table_responsive td.product-quantity::before,
  .woocommerce-cart form table.shop_table_responsive td.product-subtotal::before,
  .woocommerce-cart form td.product-price::before,
  .woocommerce-cart form td.product-quantity::before,
  .woocommerce-cart form td.product-subtotal::before {
    content: attr(data-title) !important;
    display: inline-block !important;
    float: none !important;
    width: auto !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    color: #555 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Quantità input compatto */
  .woocommerce-cart form td.product-quantity .quantity {
    display: inline-block !important;
  }
  .woocommerce-cart form td.product-quantity .quantity input.qty {
    width: 40px !important;
    height: 32px !important;
    text-align: center !important;
    padding: 2px !important;
    font-size: 0.85rem !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
  }

  /* ── Riga actions (coupon + aggiorna) ── */
  .woocommerce-cart form table.shop_table td.actions {
    display: block !important;
    padding: 5px 0 0 0 !important;
    width: 100% !important;
  }
  /* Nasconde hidden inputs che prendono spazio */
  .woocommerce-cart form table.shop_table td.actions input[type="hidden"] {
    display: none !important;
  }
  /* TR che contiene actions: niente card styling */
  .woocommerce-cart form table.shop_table tbody > tr:not(.cart_item) {
    display: block !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }
  .woocommerce-cart .actions .coupon {
    display: none !important;
  }
  .woocommerce-cart .actions .button[name="update_cart"] {
    display: block !important;
    margin: 0 auto !important;
    width: 100% !important;
    text-align: center !important;
  }
  .woocommerce-cart .actions > .button {
    display: block !important;
    margin: 0 auto !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* ═══════════════════════════════════════════
     B) TOTALE CARRELLO
     ═══════════════════════════════════════════ */
  .woocommerce-cart .cart_totals {
    margin-top: 20px;
  }

  .woocommerce-cart .cart_totals h2 {
    font-size: 1.15rem !important;
    text-align: center;
    margin-bottom: 10px;
  }

  .woocommerce-cart .cart_totals table.shop_table {
    width: 100% !important;
    display: table !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
  }

  .woocommerce-cart .cart_totals table.shop_table tbody {
    display: table-row-group !important;
  }

  .woocommerce-cart .cart_totals table.shop_table tr {
    display: table-row !important;
    background: #f9faf8 !important;
  }

  .woocommerce-cart .cart_totals table.shop_table tr > th,
  .woocommerce-cart .cart_totals table.shop_table tr > td {
    display: table-cell !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #eee !important;
    background: transparent !important;
    vertical-align: middle !important;
  }

  .woocommerce-cart .cart_totals table.shop_table tr > th {
    text-align: left !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #333 !important;
    width: 45% !important;
  }

  .woocommerce-cart .cart_totals table.shop_table tr > td {
    text-align: right !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #333 !important;
  }

  /* Nasconde ::before di WooCommerce responsive nei totali */
  .woocommerce-cart .cart_totals table.shop_table_responsive td::before {
    display: none !important;
  }

  /* Spedizione: testo più piccolo */
  .woocommerce-cart .cart_totals tr.shipping-note th {
    font-size: 0.78rem !important;
    font-weight: 400 !important;
    font-style: italic !important;
    color: #666 !important;
  }

  /* Riga Totale: enfasi */
  .woocommerce-cart .cart_totals tr.order-total {
    background: #f0f4ed !important;
  }
  .woocommerce-cart .cart_totals tr.order-total > th {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #0a3d0a !important;
    border-bottom: none !important;
  }
  .woocommerce-cart .cart_totals tr.order-total > td {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #0a3d0a !important;
    border-bottom: none !important;
  }

} /* fine @media max-width 768px carrello */

	/* INIZIO PERSONALIZZAZIONE DELLA CONFERMA DELL'ORDINE */

/* 1) Nascondi l’header della tabella */
  .woocommerce-table--order-downloads.shop_table thead,
  table:has(> thead > tr > th.download-product) thead {
    display: none !important;
  }

  /* 2) Trasforma righe in blocchi */
  .woocommerce-table--order-downloads.shop_table,
  .woocommerce-table--order-downloads.shop_table tbody,
  .woocommerce-table--order-downloads.shop_table tr,
  .woocommerce-table--order-downloads.shop_table td,
  table:has(> thead > tr > th.download-product),
  table:has(> thead > tr > th.download-product) tbody,
  table:has(> thead > tr > th.download-product) tr,
  table:has(> thead > tr > th.download-product) td {
    display: block !important;
    width: 100% !important;
  }

  /* 3) Ogni riga diventa una card */
  .woocommerce-table--order-downloads.shop_table tr,
  table:has(> thead > tr > th.download-product) tr {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
  }

  /* 4) Celle dentro la card */
  .woocommerce-table--order-downloads.shop_table td,
  table:has(> thead > tr > th.download-product) td {
    border: 0 !important;
    padding: 6px 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.35;
    font-size: 0.92rem; /* testo un po' più piccolo */
  }

  /* 5) Etichette colonna prese da data-title */
	
  .woocommerce-table--order-downloads.shop_table td::before,
  table:has(> thead > tr > th.download-product) td::before {
    content: attr(data-title);
    display: block;
    font-weight: 600;
    opacity: .8;
    margin-bottom: 3px;
  }

	
  /* 6) Pulsante download: largo e leggibile */
  .woocommerce-table--order-downloads.shop_table td.download-file a.button,
  table:has(> thead > tr > th.download-product) td.download-file a.button {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    white-space: normal !important;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.95em;
    margin-top: 6px;
  }
		
  /* FINE PERSONALIZZAZIONE DELLA CONFERMA DELL'ORDINE */	


	.woocommerce-order-overview li.woocommerce-order-overview__order, .woocommerce-order-overview li.woocommerce-order-overview__total
{
	padding: 0 !important;
}

  .woocommerce-order-overview li.woocommerce-order-overview__date, .woocommerce-order-overview li.woocommerce-order-overview__payment-method 
{
	padding: 0 !important;
	margin: 0 !important;
}
}

.fm-close-overlay {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #333;
  z-index: 102; /* sopra al menu */
  cursor: pointer;
}

@media (max-width: 900px) {
  .fm-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 16px; /* un po’ più di spazio in alto per la "X" */
    gap: 12px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 101;
  }

  /* Pulsante "X" dentro il menu */
  .fm-close-menu {
    align-self: flex-end; /* allinea a destra */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 12px;
    cursor: pointer;
    line-height: 1;
  }

  .fm-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ====================
   --  NUOVO CODICE  --
   ==================== */

/* =========================================================
   OMOGENEIZZAZIONE TABELLA CARRELLO
   ========================================================= */

/* 1. Intestazioni della tabella (PRODOTTO, PREZZO, ecc.) */
.woocommerce-cart table.shop_table thead th {
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    background-color: #3E4A3F !important;
    color: #ffffff !important;
    padding: 15px !important;
    border: none !important;
}

/* 2. Testo generale nelle celle (Nomi prodotti, Prezzi) */
.woocommerce-cart table.shop_table td {
    font-size: 16px !important;
    vertical-align: middle !important; /* Allinea tutto al centro verticalmente */
    color: #444 !important;
    padding: 20px 15px !important;
}

/* 3. Link del nome prodotto */
.woocommerce-cart table.shop_table td.product-name a {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #3E4A3F !important;
    text-decoration: none !important;
}

/* 4. Prezzi e Subtotali (per farli uguali al nome prodotto) */
.woocommerce-cart table.shop_table td.product-price .amount,
.woocommerce-cart table.shop_table td.product-subtotal .amount {
    font-size: 16px !important;
    font-weight: 600 !important; /* Un po' più marcato per risaltare */
    color: #000 !important;
}

/* 5. Simbolo valuta (CHF) - lo rendiamo coerente */
.woocommerce-cart table.shop_table .woocommerce-Price-currencySymbol {
    font-size: 14px !important;
    font-weight: 400 !important;
    margin-right: 4px !important;
}

/* 6. Input quantità (il numero dentro il box) */
.woocommerce-cart table.shop_table .quantity input.qty {
    font-size: 16px !important;
    font-weight: 400 !important;
    height: 40px !important;
}

/* 7. Icona Rimuovi (la X cerchiata) — solo desktop */
@media (min-width: 769px) {
  .woocommerce-cart table.shop_table td.product-remove a.remove {
      font-size: 24px !important;
      display: flex !important;
      align-items: center;
      justify-content: center;
      color: #88ca94 !important;
  }
}

/* Responsive: mantieni i font leggibili anche su piccoli schermi */
@media (max-width: 768px) {
    .woocommerce-cart table.shop_table td {
        font-size: 14px !important;
    }
}

/* =========================================================
   BOTTONE AGGIORNA CARRELLO (Update Cart)
   ========================================================= */

/* 1. Stato Normale (quando è attivo) */
.woocommerce-cart .actions .button[name="update_cart"] {
    background-color: #88ca94 !important;
    color: #ffffff !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    padding: 12px 25px !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    height: auto !important;
    line-height: 1 !important;
    width: auto !important;
    float: right !important; /* Lo tiene allineato a destra come da standard */
}

/* 2. Effetto Hover (quando ci passi sopra col mouse) */
.woocommerce-cart .actions .button[name="update_cart"]:hover {
    background-color: #3E4A3F !important; /* Diventa verde foresta */
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

/* 3. Stato Disabilitato (quando non sono state fatte modifiche) */
.woocommerce-cart .actions .button[name="update_cart"]:disabled,
.woocommerce-cart .actions .button[name="update_cart"][disabled] {
    background-color: #e0e0e0 !important; /* Grigio chiaro */
    color: #999999 !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 4. Correzione mobile: fallo occupare tutta la larghezza se necessario */
@media (max-width: 768px) {
    .woocommerce-cart .actions .button[name="update_cart"] {
        width: 100% !important;
        float: none !important;
        margin-top: 10px !important;
    }
}

/* =========================================================
   CHECKOUT FORM & NOTICES STYLING (LATO ONLY)
   ========================================================= */

/* 1. Unificazione Font Globale Checkout */
.woocommerce-checkout, 
.woocommerce-checkout * {
    font-family: 'Lato', sans-serif !important;
}

/* 2. Messaggi WooCommerce (Errori, Info, Successo) */
.woocommerce-error, 
.woocommerce-info, 
.woocommerce-message {
    background-color: #ffffff !important;
    border: none !important;
    border-left: 5px solid #88ca94 !important; /* Verde brand */
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
    padding: 20px 25px !important;
    margin-bottom: 30px !important;
    font-size: 15px !important;
    color: #3E4A3F !important;
    list-style: none !important;
}

/* Colori specifici per tipo di messaggio */
.woocommerce-error { border-left-color: #e26c6c !important; } /* Rosso per errori */
.woocommerce-message { border-left-color: #5e8f33 !important; } /* Verde scuro per successo */
.woocommerce-info { border-left-color: #C78929 !important; } /* Oro per info/coupon */

.woocommerce-error li, .woocommerce-info li {
    padding: 0 !important;
    margin: 0 !important;
}

/* 3. Etichette dei campi (Nome, Indirizzo, ecc.) */
.woocommerce-checkout label {
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #3E4A3F !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* 4. Campi di Input (Box dove si scrive) */
.woocommerce-checkout input.input-text, 
.woocommerce-checkout textarea.input-text,
.select2-container--default .select2-selection--single {
    font-size: 16px !important;
    padding: 12px 15px !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 8px !important;
    background-color: #fcfcfc !important;
    transition: all 0.2s ease-in-out !important;
    height: auto !important;
    color: #000 !important;
}

.woocommerce-checkout input.input-text:focus, 
.woocommerce-checkout textarea.input-text:focus {
    border-color: #88ca94 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(136, 202, 148, 0.15) !important;
    outline: none !important;
}

/* 5. Tabella Revisione Ordine (Dettagli a destra/sotto) */
#order_review, 
#order_review_heading {
    background-color: #f7f9f7 !important; /* Grigio-verde chiarissimo */
    padding: 30px !important;
    border-radius: 20px !important;
}

.woocommerce-checkout-review-order-table thead th {
    font-size: 13px !important;
    text-transform: uppercase !important;
    color: #666 !important;
    border-bottom: 2px solid #ddd !important;
    padding-bottom: 15px !important;
}

.woocommerce-checkout-review-order-table td, 
.woocommerce-checkout-review-order-table th {
    font-size: 15px !important;
    padding: 15px 0 !important;
    border-top: 1px solid #eee !important;
}

.woocommerce-checkout-review-order-table .order-total th, 
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #3E4A3F !important;
}

/* 6. Box Pagamenti (Stripe, PayPal, ecc.) */
#payment {
    background: transparent !important;
    border: none !important;
}

#payment ul.payment_methods {
    border-bottom: 1px solid #eee !important;
    padding-bottom: 20px !important;
}

#payment div.payment_box {
    background-color: #E6F4EA !important; /* Menta */
    border-radius: 10px !important;
    color: #3E4A3F !important;
    font-size: 14px !important;
}

#payment div.payment_box::before {
    border-bottom-color: #E6F4EA !important;
}

/* Correzione per i link nelle checkbox (Privacy) */
.woocommerce-checkout .checkbox a {
    color: #5e8f33 !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

/* =========================================================
   BOTTONE PROCEDI CON L'ORDINE (Checkout Button)
   Identico a Aggiorna Carrello
   ========================================================= */

/* 1. Stato Normale */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.button {
    background-color: #88ca94 !important;
    color: #ffffff !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    padding: 14px 30px !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(136, 202, 148, 0.3) !important;
    display: block !important;
    text-align: center !important;
    width: 100% !important; /* Solitamente nel carrello occupa tutta la larghezza del box totale */
    margin-bottom: 10px !important;
}

/* 2. Effetto Hover */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.button:hover {
    background-color: #3E4A3F !important; /* Verde foresta */
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
    color: #ffffff !important;
}

/* 3. Effetto al click (Active) */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.button:active {
    transform: translateY(0) !important;
}

/* 4. Correzione icone se presenti (WooCommerce a volte mette una freccetta) */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button.button::after {
    display: none !important; /* Pulizia totale */
}

/* 5. Responsive: Assicurati che sia leggibile su mobile */
@media (max-width: 768px) {
    .woocommerce-cart .wc-proceed-to-checkout a.checkout-button.button {
        font-size: 14px !important;
        padding: 14px 20px !important;
    }
}

/* =========================================================
   STRIPE FIELDS - BRUTE FORCE STYLE
   ========================================================= */

/* Forza il contenitore esterno a sembrare un input di testo */
.wc-stripe-elements-field, 
.wc-stripe-custom-input {
    background-color: #fcfcfc;
    border: 1px solid #d1d1d1;
    border-radius: 8px;
    padding: 12px 15px;
    height: 48px;
    box-sizing: border-box;
    margin: 0;
    box-shadow: none;
}

/* Quando il campo è cliccato (Focus) */
.wc-stripe-elements-field--focus {
    border-color: #88ca94;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(136, 202, 148, 0.15);
}

/* Etichette sopra i campi carta */
#wc-stripe-cc-form label {
    font-family: 'Lato';
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #3E4A3F;
    margin-bottom: 8px;
}

/* Rimuovi spazi extra tra i campi Scadenza e CVC */
#wc-stripe-cc-form .form-row {
    padding: 0;
    margin-bottom: 20px;
}

/* Checkbox privacy unificato */
.woocommerce-form__label-for-checkbox {
    font-size: 0.95em;
    line-height: 1.4;
}
.woocommerce-form__label-for-checkbox a {
    text-decoration: underline;
    color: #3e4a3f; /* Colore brand */
}

/* Disabilita bottone (già presente, ma rafforza) */
#place_order.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.quantity input.qty {
  height: 43px;
  width: 43px;
  display: inline;
  padding: 0 5px 0;
  line-height: 41px;
  vertical-align: middle;
  margin: 0;
  text-align: center;
}

/* =========================
   --  FINE NUOVO CODICE  --
   ========================= */





/* Etichette fisse per le colonne (solo mobile) — remove gestito separatamente */
@media (max-width: 768px) {
  /* stile comune: solo price e quantity */
  .woocommerce-cart table.shop_table td.product-price::before,
  .woocommerce-cart table.shop_table td.product-quantity::before {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
  }

  /* Rimuovi: nascondere ::before */
  .woocommerce-cart table.shop_table td.product-remove::before {
    display: none !important;
  }

  /* EN */
  html[lang|="en"] .woocommerce-cart table.shop_table td.product-price::before    { content: "Price"; }
  html[lang|="en"] .woocommerce-cart table.shop_table td.product-quantity::before { content: "Quantity"; }
  /* IT */
  html[lang|="it"] .woocommerce-cart table.shop_table td.product-price::before    { content: "Prezzo"; }
  html[lang|="it"] .woocommerce-cart table.shop_table td.product-quantity::before { content: "Quantità"; }
  /* DE */
  html[lang|="de"] .woocommerce-cart table.shop_table td.product-price::before    { content: "Preis"; }
  html[lang|="de"] .woocommerce-cart table.shop_table td.product-quantity::before { content: "Anzahl"; }
  /* FR */
  html[lang|="fr"] .woocommerce-cart table.shop_table td.product-price::before    { content: "Prix"; }
  html[lang|="fr"] .woocommerce-cart table.shop_table td.product-quantity::before { content: "Quantité"; }
  /* ES */
  html[lang|="es"] .woocommerce-cart table.shop_table td.product-price::before    { content: "Precio"; }
  html[lang|="es"] .woocommerce-cart table.shop_table td.product-quantity::before { content: "Cantidad"; }
}



/* =================================================================
   PARTE 2: HEADER, FOOTER E MENU (FM Global UI)
   ================================================================= */

/* =========================================================
   FM GLOBAL UI - UNIFICATO
   ========================================================= */

/* Reset base (senza Enfold non servono più i !important) */
body {
    margin: 0;
    padding: 0;
}

*, *::before, *::after {
    box-sizing: border-box;
}

:root { 
    --fm-green: #88ca94; 
    --fm-footer-bg: #3E4A3F;
    --enfold-main-color-primary: #0a3d0a; /* was Enfold theme color, keep for books page */
}

/* HEADER - TOP BAR (Social ed Email in riga) */
#fm-header-custom { display: block; width: 100%; clear: both; }

#fm-header-custom .fm-top-bar { 
    background: #3E4A3F; 
    padding: 10px 0; 
    z-index: 5001; 
    position: relative; 
    width: 100vw; 
    left: 50%; 
    right: 50%; 
    margin-left: -50vw; 
    margin-right: -50vw; 
}

#fm-header-custom .fm-top-all-in-one { 
    display: flex !important; 
    flex-direction: row !important; 
    justify-content: center !important; 
    align-items: center !important; 
    gap: 25px !important; 
    flex-wrap: nowrap !important; 
}

#fm-header-custom .fm-email-group, 
#fm-header-custom .fm-social-group { 
    display: flex !important; 
    align-items: center !important; 
    gap: 8px !important; 
}

#fm-header-custom .fm-email-group img, 
#fm-header-custom .fm-social-group img { 
    width: 20px !important; 
    height: 20px !important; 
    display: block !important; 
    object-fit: contain !important; 
    margin: 0 !important; 
    background: transparent !important; 
}

#fm-header-custom .fm-email-group a { 
    color: #fff !important; 
    font-size: 1rem !important; 
    text-decoration: none !important;
}

/* 3. MAIN HEADER & MENU DESKTOP */
#fm-header-custom .fm-main-header { 
    background: #fff; 
    border-bottom: 1px solid #e0e0e0; 
    z-index: 5000; 
    position: relative; 
    width: 100vw; 
    left: 50%; 
    right: 50%; 
    margin-left: -50vw; 
    margin-right: -50vw; 
}

#fm-header-custom .fm-main-header-inner { 
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 12px 16px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

#fm-header-custom .fm-logo img { 
    max-height: 85px; 
    width: auto; 
    display: block; 
}

/* Fix Allineamento: Language e Menu sulla stessa riga */
#fm-header-custom .fm-menu-group { 
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center !important; 
    gap: 24px !important; 
}

#fm-header-custom .fm-nav { 
    display: flex !important; 
    flex-direction: row !important; 
    align-items: center !important; 
    gap: 24px !important; 
}

/* Nasconde pulsanti mobile su Desktop */
#fm-js-ham, #fm-js-close, .fm-hamburger, .fm-close-menu { 
    display: none !important; 
}

#fm-header-custom .fm-menu-trigger,
#fm-header-custom .fm-nav-link { 
    font-size: 0.95rem !important; 
    font-weight: 500 !important; 
    color: #333 !important; 
    padding: 8px 0; 
    background: transparent !important; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    border: none !important;
    text-decoration: none !important;
}

/* Tutti i link nel header senza sottolineatura */
#fm-header-custom a {
    text-decoration: none !important;
}

/* 4. DROPDOWNS */
.fm-language-selector, .fm-has-dropdown { 
    position: relative !important; 
}

.fm-dropdown-content { 
    position: absolute !important; 
    top: 100% !important; 
    left: 0 !important; 
    min-width: 200px; 
    background: #ffffff !important; 
    border-radius: 6px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    display: none !important; 
    padding: 10px 0; 
    z-index: 99999 !important; 
}

/* Mostra dropdown quando attivato da JS (is-open) */
.is-open > .fm-dropdown-content { 
    display: block !important; 
}

.fm-dropdown-content a { 
    display: block !important; 
    padding: 10px 20px !important; 
    font-size: 0.9rem !important; 
    color: #333 !important; 
    text-align: left !important; 
    background: #fff !important; 
    text-decoration: none !important;
}

.fm-dropdown-content a:hover { 
    background: #f1f1f1 !important; 
}

/* 5. FOOTER (Con tue personalizzazioni) */
#fm-footer-custom {
    display: block !important;
    width: 100% !important;
    background: var(--fm-footer-bg) !important;
    color: #fff !important;
    text-align: center !important;
    padding: 20px 0 !important;
    box-shadow: 0 0 0 100vmax var(--fm-footer-bg) !important;
    clip-path: inset(0 -100vmax) !important;
    /*margin-top: 40px !important;*/
    margin-bottom: -50px !important; /* Tua modifica */
    font-size: 14px !important; /* Base font size per il footer */
}

#fm-footer-custom a,
#fm-footer-custom span { 
    background: transparent !important;
}

#fm-footer-custom .footer-flow-links {
    margin-bottom: 20px !important;
    background: var(--fm-footer-bg) !important;
    font-size: 14px !important;
}

#fm-footer-custom .footer-flow-links a { 
    color: var(--fm-green) !important; 
    text-decoration: none !important; 
    margin: 0 15px !important; 
    display: inline-block !important;
    padding: 8px 4px !important;
    min-height: 44px !important;
    line-height: 28px !important;
}

#fm-footer-custom .footer-legal { 
    font-size: 12px !important; 
    line-height: 1.7 !important; 
    color: #fff !important; 
}

/* 6. BACK TO TOP BUTTON (Con tue personalizzazioni SVG) */
#scroll-top-link { display: none !important; }

#back-to-top { 
    position: fixed !important; 
    bottom: 25px !important; 
    right: 25px !important; 
    width: 46px !important; 
    height: 46px !important; 
    border-radius: 50% !important; 
    background: #ffffff !important; 
    border: 1px solid #e0e0e0 !important; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important; 
    z-index: 99999 !important; 
    display: none; 
    align-items: center !important; 
    justify-content: center !important; 
    cursor: pointer;
    padding: 0 !important;
    transition: all 0.2s ease-in-out;
    color: #444 !important; 
}

#back-to-top svg {
    width: 20px !important; 
    height: 20px !important; 
    display: block;
}

#back-to-top:hover {
    background: #fcfcfc !important;
    transform: translateY(-3px); 
    color: #88ca94 !important; 
    border-color: #88ca94 !important;
}

/* 7. MOBILE RESPONSIVE */
@media (max-width: 900px) {
    /* HAMBURGER - Forza visibilità con specificità alta */
    #fm-header-custom #fm-js-ham,
    #fm-header-custom .fm-hamburger,
    body #fm-js-ham,
    body .fm-hamburger { 
        display: flex !important; 
        visibility: visible !important;
        opacity: 1 !important;
        background: none !important;
        border: none !important;
        width: 30px !important;
        height: 24px !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        cursor: pointer !important;
        padding: 0 !important;
        z-index: 10002 !important;
    }
    
    /* Linee dell'hamburger */
    #fm-header-custom .fm-hamburger span,
    body .fm-hamburger span {
        display: block !important;
        width: 100% !important;
        height: 3px !important;
        background-color: #333 !important;
        border-radius: 2px !important;
    }
    
    /* CLOSE BUTTON */
    #fm-header-custom #fm-js-close,
    #fm-header-custom .fm-close-menu,
    body #fm-js-close,
    body .fm-close-menu { 
        display: block !important; 
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important; 
        top: 15px !important; 
        right: 20px !important; 
        z-index: 10001 !important; 
        background: none !important;
        border: none !important;
        font-size: 1.8rem !important;
        cursor: pointer !important;
        color: #333 !important;
    }

    /* NAV MENU MOBILE - Container */
    #fm-header-custom .fm-nav { 
        position: fixed !important; 
        top: 0 !important; 
        left: 0 !important; 
        right: 0 !important; 
        bottom: 0 !important; 
        background: #fff !important; 
        flex-direction: column !important;
        align-items: flex-start !important; /* Allinea tutto a sinistra */
        justify-content: flex-start !important;
        padding: 80px 30px 30px 30px !important; 
        transform: translateX(100%) !important; 
        transition: transform 0.3s ease !important; 
        z-index: 10000 !important; 
        overflow-y: auto !important;
        gap: 0 !important; /* Rimuovi gap, usiamo padding */
    }

    #fm-header-custom .fm-nav.open { 
        transform: translateX(0) !important; 
    }
    
    /* TUTTI gli elementi del menu - stile uniforme */
    #fm-header-custom .fm-nav > * {
        width: 100% !important;
        text-align: left !important;
    }
    
    /* Link e trigger del menu */
    #fm-header-custom .fm-nav .fm-nav-link,
    #fm-header-custom .fm-nav .fm-has-dropdown,
    #fm-header-custom .fm-nav .fm-language-selector {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border-bottom: 1px solid #eee !important;
    }
    
    #fm-header-custom .fm-nav .fm-nav-link,
    #fm-header-custom .fm-nav .fm-menu-trigger {
        display: block !important;
        padding: 15px 0 !important;
        font-size: 1.1rem !important;
        text-align: left !important;
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    /* Dropdown containers */
    #fm-header-custom .fm-nav .fm-has-dropdown,
    #fm-header-custom .fm-nav .fm-language-selector {
        position: relative !important;
    }
    
    /* Dropdown content nel menu mobile */
    #fm-header-custom .fm-nav .fm-dropdown-content {
        position: static !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 0 10px 20px !important;
        margin: 0 !important;
        background: #fafafa !important;
    }
    
    #fm-header-custom .fm-nav .fm-dropdown-content a {
        padding: 12px 0 !important;
        border-bottom: 1px solid #eee !important;
        font-size: 1rem !important;
    }
    
    #fm-header-custom .fm-nav .fm-dropdown-content a:last-child {
        border-bottom: none !important;
    }
    
    /* Carrello nel menu mobile */
    #fm-header-custom .fm-nav > div:last-child {
        margin-top: 15px !important;
        padding-top: 15px !important;
        border-top: 1px solid #ddd !important;
        border-bottom: none !important;
        justify-content: flex-start !important;
    }
    
    /* Nascondi il selettore lingua nel menu mobile se vuoi mostrarlo altrove */
    /* #fm-header-custom .fm-nav .fm-language-selector { display: none !important; } */

    #back-to-top {
        bottom: 20px !important;
        right: 20px !important;
    }
				  
				      /* PULSANTE CLOSE (X) - Posizionamento assoluto in alto a destra */
    #fm-header-custom .fm-nav .fm-close-menu,
    #fm-header-custom .fm-nav #fm-js-close {
        position: absolute !important;
        top: 48px !important;
        right: 60px !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        padding: 10px !important;
        margin: 0 !important;
        border: none !important;
        border-bottom: none !important;
        background: transparent !important;
        font-size: 28px !important;
        font-weight: 300 !important;
        color: #333 !important;
        cursor: pointer !important;
        z-index: 10001 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        line-height: 1 !important;
    }
    
    #fm-header-custom .fm-nav .fm-close-menu:hover,
    #fm-header-custom .fm-nav #fm-js-close:hover {
        color: #88ca94 !important;
    }

    /* Assicurati che il nav abbia position relative per il posizionamento assoluto del close */
    #fm-header-custom .fm-nav {
        position: fixed !important; /* già presente, ma confermiamo */
    }
    
    /* Esclude il pulsante close dalle regole generali degli elementi menu */
    #fm-header-custom .fm-nav > .fm-close-menu,
    #fm-header-custom .fm-nav > #fm-js-close {
        border-bottom: none !important;
        width: auto !important;
    }
}


/* =================================================================
   PARTE 3: FIX CHECKOUT MOBILE
   ================================================================= */

/* ===== CHECKOUT MOBILE ===== */
@media (max-width: 768px) {
    
    /* 1. FORM CHECKOUT - Larghezza piena */
    .woocommerce-checkout form.checkout,
    .woocommerce-checkout .woocommerce-form-coupon-toggle,
    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    /* 2. CAMPI INPUT - Larghezza piena e leggibili */
    .woocommerce-checkout .form-row,
    .woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
    .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .woocommerce-checkout input[type="text"],
    .woocommerce-checkout input[type="email"],
    .woocommerce-checkout input[type="tel"],
    .woocommerce-checkout input.input-text,
    .woocommerce-checkout textarea.input-text,
    .woocommerce-checkout select,
    .woocommerce-checkout .select2-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        font-size: 16px !important;
    }
    
    /* Select2 dropdown fix */
    .woocommerce-checkout .select2-container--default .select2-selection--single {
        width: 100% !important;
        height: 48px !important;
        padding: 10px 15px !important;
    }
    
    /* 3. NOME + COGNOME - Stack verticale su mobile */
    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
    
    /* 4. TABELLA RIEPILOGO ORDINE */
    .woocommerce-checkout #order_review,
    .woocommerce-checkout #order_review_heading {
        padding: 12px 8px !important;
        margin: 10px 0 !important;
        border-radius: 12px !important;
    }
    
    .woocommerce-checkout-review-order-table {
        width: 100% !important;
        table-layout: fixed !important;
    }
    
    .woocommerce-checkout-review-order-table td,
    .woocommerce-checkout-review-order-table th {
        padding: 10px 5px !important;
        word-wrap: break-word !important;
        font-size: 14px !important;
    }
    
    /* 5. SEZIONE PAGAMENTO - STRIPE */
    .woocommerce-checkout #payment {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .woocommerce-checkout #payment ul.payment_methods {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .woocommerce-checkout #payment ul.payment_methods li {
        padding: 10px 0 !important;
        margin: 0 !important;
    }
    
    .woocommerce-checkout .payment_box,
    .woocommerce-checkout .payment_box.payment_method_stripe {
        width: 100% !important;
        padding: 12px 10px !important;
        margin: 10px 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    /* Stripe UPE Elements */
    .woocommerce-checkout .wc-stripe-upe-element,
    .woocommerce-checkout #wc-stripe-card-element,
    .woocommerce-checkout .wc-stripe-elements-field {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Container interno Stripe */
    .woocommerce-checkout #wc-stripe-cc-form,
    .woocommerce-checkout .wc-stripe-upe-form {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* iFrame Stripe */
    .woocommerce-checkout .wc-stripe-upe-element iframe,
    .woocommerce-checkout #wc-stripe-card-element iframe,
    .woocommerce-checkout .StripeElement iframe {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Form row dentro Stripe */
    .woocommerce-checkout #wc-stripe-cc-form .form-row {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
        margin-bottom: 15px !important;
    }
    
    /* 6. TERMINI E CONDIZIONI - Testo normale */
    .woocommerce-checkout .woocommerce-form__label-for-checkbox {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        text-align: left !important;
    }
    .woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Privacy text: resta nascosto anche su mobile */
    .woocommerce-checkout .woocommerce-privacy-policy-text {
        display: none !important;
    }
    
    .woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text,
    .woocommerce-checkout .woocommerce-privacy-policy-text p,
    .woocommerce-checkout .woocommerce-form__label-for-checkbox span {
        display: inline !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        text-transform: none !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    /* Checkbox allineato col testo */
    .woocommerce-checkout .woocommerce-form__label-for-checkbox {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .woocommerce-checkout .woocommerce-form__label-for-checkbox input[type="checkbox"] {
        flex-shrink: 0 !important;
        margin-top: 3px !important;
        width: 18px !important;
        height: 18px !important;
    }
    
    /* 7. BOTTONE ORDINE */
    .woocommerce-checkout #place_order {
        width: 100% !important;
        padding: 16px 20px !important;
        font-size: 16px !important;
        margin-top: 20px !important;
    }
    
    /* 8. LABELS */
    .woocommerce-checkout label {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }
    
    .woocommerce-checkout label .optional {
        font-size: 11px !important;
        text-transform: lowercase !important;
    }
    
    /* 9. COUPON BOX */
    .woocommerce-checkout .checkout_coupon {
        width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }
    
    .woocommerce-checkout .checkout_coupon input#coupon_code {
        width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    .woocommerce-checkout .checkout_coupon button {
        width: 100% !important;
    }
    
    /* 10. TITOLI SEZIONI */
    .woocommerce-checkout .woocommerce-billing-fields h3,
    .woocommerce-checkout .woocommerce-shipping-fields h3,
    .woocommerce-checkout #order_review_heading {
        font-size: 1.2em !important;
        margin-bottom: 15px !important;
    }
}

/* Fix per schermi molto piccoli */
@media (max-width: 400px) {
    .woocommerce-checkout #order_review,
    .woocommerce-checkout #order_review_heading {
        padding: 10px !important;
    }
    
    .woocommerce-checkout-review-order-table td,
    .woocommerce-checkout-review-order-table th {
        font-size: 13px !important;
        padding: 8px 3px !important;
    }
}


/* =================================================================
   FIX CENTRATURA LIBRO/GALLERIA SU MOBILE
   ================================================================= */
@media (max-width: 768px) {
    
    /* Container libro - forza centratura */
    #fm-books-page .book-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
    
    /* Immagine libro - rimuove larghezza fissa */
    #fm-books-page .book-image {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
    }
    
    /* Galleria libro - forza overflow hidden */
    #fm-books-page .book-gallery {
        max-width: 290px !important;
        width: 82% !important;
        margin: 0 auto !important;
        overflow: hidden !important;
        position: relative !important;
        clip-path: inset(0 2px 0 2px) !important;
    }
    
    /* Box testo libro - riduce padding laterale */
    #fm-books-page .text-box,
    #fm-books-page .book-text {
        padding: 20px 12px !important;
        width: calc(100% - 20px) !important;
    }
    
    /* Frecce navigazione */
    #fm-books-page .bg-nav.bg-prev {
        left: 5px !important;
    }
    #fm-books-page .bg-nav.bg-next {
        right: 5px !important;
    }
    
    /* Container pagina libri - previene scroll orizzontale */
    #fm-books-page {
        width: 100% !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* Body e html - previene scroll orizzontale globale */
    body.page #fm-books-page,
    html body #fm-books-page {
        overflow-x: hidden !important;
    }
}

/* =================================================================
   FIX STILE NOTE IVA E CAMBIO VALUTA (Checkout)
   ================================================================= */
.woocommerce-checkout-review-order-table tr.fm-vat-note,
.woocommerce-checkout-review-order-table tr.fm-vat-note td,
.woocommerce-checkout-review-order-table tr.fm-fx-total,
.woocommerce-checkout-review-order-table tr.fm-fx-total td,
.woocommerce-checkout-review-order-table #fm-fx-display {
    background: transparent !important;
    background-color: transparent !important;
    font-size: 13px !important;
    color: #5e8f33 !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    border: none !important;
}

.woocommerce-checkout-review-order-table #fm-fx-display *,
.woocommerce-checkout-review-order-table #fm-fx-display div,
.woocommerce-checkout-review-order-table #fm-fx-display span,
.woocommerce-checkout-review-order-table #fm-fx-display strong {
    font-size: 13px !important;
    color: inherit !important;
    background: transparent !important;
}

/* =================================================================
   FIX CARRELLO MOBILE - Riduce padding laterali
   ================================================================= */
@media (max-width: 768px) {
    
    /* Container principale carrello */
    body.woocommerce-cart .woocommerce {
        padding: 10px 5px !important;
        margin: 0 !important;
    }
    
    /* Tabella carrello */
    .woocommerce-cart table.shop_table {
        width: 100% !important;
    }
    
    .woocommerce-cart table.shop_table td {
        padding: 12px 8px !important;
    }
    
    /* Celle prodotto - più spazio per il testo */
    .woocommerce-cart table.shop_table td.product-name {
        width: 100% !important;
        display: block !important;
        padding: 15px 10px !important;
    }
    
    /* Etichette "Rimuovi", "Prodotto", "Prezzo", etc. */
    .woocommerce-cart table.shop_table td::before {
        font-size: 13px !important;
        margin-bottom: 5px !important;
    }
    
    /* Box totali carrello */
    .woocommerce-cart .cart_totals {
        width: 100% !important;
        padding: 0 !important;
    }
    
    .woocommerce-cart .cart_totals table {
        width: 100% !important;
    }
    
    .woocommerce-cart .cart_totals th,
    .woocommerce-cart .cart_totals td {
        padding: 10px 8px !important;
    }
}

/* =================================================================
   NASCONDE CALCOLATORE SPEDIZIONE NEL CARRELLO
   ================================================================= */
.woocommerce-cart .woocommerce-shipping-calculator,
.woocommerce-cart .shipping-calculator-button,
.woocommerce-cart tr.woocommerce-shipping-totals,
.woocommerce-cart tr.shipping,
.woocommerce-cart tr[class*="shipping"]:not(.shipping-note) {
    display: none !important;
}

/* =================================================================
   CARRELLO HEADER - Desktop vs Mobile
   ================================================================= */
/* Desktop: mostra carrello dentro menu */
.fm-cart-desktop {
    display: flex !important;
}
.fm-cart-mobile {
    display: none !important;
}

/* Mobile: mostra carrello fuori menu */
@media (max-width: 900px) {
    .fm-cart-desktop {
        display: none !important;
    }
    .fm-cart-mobile {
        display: flex !important;
        align-items: center;
        margin-right: 10px;
    }
    
    /* Header mobile - allineamento verticale */
    #fm-header-custom .fm-main-header-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    
    /* Logo più piccolo su mobile */
    #fm-header-custom .fm-logo img {
        max-height: 50px !important;
    }
    
    /* Gruppo menu allineato */
    #fm-header-custom .fm-menu-group {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    /* Selettore lingua compatto */
    #fm-header-custom .fm-language-selector .fm-menu-trigger {
        font-size: 0.85rem !important;
        padding: 5px !important;
    }
    
    #fm-header-custom .fm-language-selector {
        margin-right: 12px !important;
    }
    
    /* Carrello compatto */
    .fm-cart-mobile .woofc-cart-link {
        font-size: 0.85rem !important;
    }
    
    /* Hamburger allineato */
    #fm-header-custom .fm-hamburger {
        margin-left: 5px !important;
    }
}

/* =================================================================
   FIX SPAZIO SOPRA CHECKBOX TERMINI (Checkout)
   ================================================================= */
.woocommerce-checkout .form-row.validate-required:has(#fm_accept_privacy),
.woocommerce-checkout #fm_accept_privacy_field,
.woocommerce-checkout p:has(#fm_accept_privacy),
.woocommerce-checkout #payment .form-row:first-child {
    margin-top: 25px !important;
    padding-top: 15px !important;
    border-top: none !important;
}

/* Selettore diretto per il checkbox privacy */
.woocommerce-checkout label[for="fm_accept_privacy"] {
    display: block !important;
    margin-top: 20px !important;
}

/* Nasconde hamburger quando il menu è aperto */
@media (max-width: 900px) {
    #fm-header-custom .fm-nav.open ~ .fm-hamburger,
    #fm-header-custom .fm-nav.open + .fm-hamburger {
        display: none !important;
    }
}

/* =================================================================
   FIX COUPON/CODICE PROMOZIONALE - Checkout Mobile
   ================================================================= */
/* Form coupon - centrato su tutti i dispositivi */
.woocommerce-form-coupon,
.checkout_coupon,
#woocommerce-checkout-form-coupon,
form.checkout_coupon.woocommerce-form-coupon {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 20px 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Quando nascosto, mantieni display:none */
.woocommerce-form-coupon[style*="display:none"],
.woocommerce-form-coupon[style*="display: none"],
.checkout_coupon[style*="display:none"],
.checkout_coupon[style*="display: none"] {
    display: none !important;
}

/* Rimuovi float e centra le righe */
.woocommerce-form-coupon .form-row,
.woocommerce-form-coupon .form-row-first,
.woocommerce-form-coupon .form-row-last,
.checkout_coupon .form-row,
.checkout_coupon .form-row-first,
.checkout_coupon .form-row-last,
#woocommerce-checkout-form-coupon .form-row,
#woocommerce-checkout-form-coupon .form-row-first,
#woocommerce-checkout-form-coupon .form-row-last {
    float: none !important;
    width: 100% !important;
    max-width: 300px !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 auto 10px auto !important;
    padding: 0 !important;
}

/* Input codice coupon */
.woocommerce-form-coupon #coupon_code,
.checkout_coupon #coupon_code,
#woocommerce-checkout-form-coupon #coupon_code,
.woocommerce-form-coupon input.input-text,
.checkout_coupon input.input-text {
    width: 100% !important;
    max-width: 280px !important;
    text-align: center !important;
    padding: 12px 15px !important;
    font-size: 16px !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
}

/* Bottone applica coupon */
.woocommerce-form-coupon .form-row-last .button,
.checkout_coupon .form-row-last .button,
#woocommerce-checkout-form-coupon .form-row-last .button,
.woocommerce-form-coupon button[name="apply_coupon"],
.checkout_coupon button[name="apply_coupon"] {
    width: auto !important;
    min-width: 150px !important;
    padding: 12px 25px !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

/* Nascondi il div clear */
.woocommerce-form-coupon .clear,
.checkout_coupon .clear,
#woocommerce-checkout-form-coupon .clear {
    display: none !important;
}

/* =================================================================
   FIX SPAZIO COUPON TOGGLE - Checkout
   ================================================================= */
/* Riduci margini del container toggle */
.woocommerce-form-coupon-toggle {
    margin-bottom: 5px !important;
    padding: 0 !important;
}

/* Riduci margini del box info "Hai un coupon?" */
.woocommerce-form-coupon-toggle .woocommerce-info {
    margin-bottom: 5px !important;
    padding: 10px 15px !important;
}

/* Form coupon nascosto - zero spazio */
.checkout_coupon.woocommerce-form-coupon[style*="display:none"],
.checkout_coupon.woocommerce-form-coupon[style*="display: none"],
.checkout_coupon.woocommerce-form-coupon.fm-coupon-hidden,
form.checkout_coupon[style*="display:none"],
form.checkout_coupon[style*="display: none"] {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Riduci spazio dei notices wrapper vuoti */
.woocommerce-notices-wrapper:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* =================================================================
   FIX STRIPE CAMPI SCADENZA/CVC - Larghezza container
   ================================================================= */
/* Assicura che il container Stripe abbia abbastanza larghezza */
.wc-stripe-upe-element,
.wc-stripe-upe-element[data-payment-method-type="card"],
#wc-stripe-upe-form .wc-stripe-upe-element {
    width: 100% !important;
    min-width: 300px !important;
    max-width: 100% !important;
}

/* Container form Stripe */
#wc-stripe-upe-form,
.wc-upe-form {
    width: 100% !important;
    min-width: 300px !important;
}

/* Payment box - assicura larghezza sufficiente */
.payment_box.payment_method_stripe {
    width: 100% !important;
    min-width: 320px !important;
    padding: 15px !important;
    box-sizing: border-box !important;
}

/* Fieldset Stripe */
fieldset#wc-stripe-upe-form {
    width: 100% !important;
    min-width: 300px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Mobile - mantieni larghezza minima */
@media (max-width: 768px) {
    .wc-stripe-upe-element,
    #wc-stripe-upe-form,
    .payment_box.payment_method_stripe {
        min-width: 280px !important;
        width: 100% !important;
    }
    
    /* Riduci padding per dare più spazio */
    .payment_box.payment_method_stripe {
        padding: 10px 5px !important;
    }
}

/* =================================================================
   FIX RIGA SPEDIZIONE CARRELLO - Stesso font, larghezze colonne
   ================================================================= */
/* Forza larghezze colonne tabella carrello */
.cart_totals .shop_table th {
    width: 50% !important;
}

.cart_totals .shop_table td {
    width: 50% !important;
}

/* Riga spedizione - prima colonna più stretta */
.cart_totals .shop_table tr.shipping-note th {
    width: 30% !important;
    font-size: 0.85em !important;
    font-weight: normal !important;
    color: #666 !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    vertical-align: middle !important;
}

/* Riga spedizione - seconda colonna più larga */
.cart_totals .shop_table tr.shipping-note td {
    width: 70% !important;
    font-size: 0.85em !important;
    color: #666 !important;
    font-style: italic !important;
    text-align: right !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    vertical-align: middle !important;
}


/* ═══════════════════════════════════════════════════════════════
   OVERRIDE FINALI — MOBILE CART (in fondo al file per vincere la cascata)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* 1. Riga "Rimuovi prodotto": sfondo verde */
  body.woocommerce-cart form td.product-remove {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    padding: 6px 10px !important;
    background: #e8f2e0 !important;
    border-radius: 6px !important;
    margin-bottom: 10px !important;
    border: none !important;
  }
  body.woocommerce-cart form td.product-remove a.remove {
    font-size: 16px !important;
    color: #5e8f33 !important;
    line-height: 1 !important;
  }
  body.woocommerce-cart form td.product-remove::before {
    display: none !important;
  }

  /* 2. Nome prodotto: bold */
  body.woocommerce-cart form table.shop_table td.product-name,
  body.woocommerce-cart form table.shop_table td.product-name a {
    font-weight: 700 !important;
  }

  /* 3. Bottone "Aggiorna carrello": meno spazio, centrato */
  body.woocommerce-cart form table.shop_table td.actions {
    display: block !important;
    padding: 5px 0 0 0 !important;
  }
  body.woocommerce-cart form table.shop_table tbody > tr:not(.cart_item) {
    display: block !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.woocommerce-cart .actions .button[name="update_cart"] {
    display: block !important;
    margin: 0 auto !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* 4. Input quantità: compatto */
  body.woocommerce-cart form td.product-quantity .quantity input.qty {
    width: 40px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    text-align: center !important;
    padding: 2px !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   CHECKOUT MOBILE FIXES
   ═══════════════════════════════════════════════════════════════ */

/* 1. Nascondi icona su "Hai un codice promozionale?" */
.woocommerce-form-coupon-toggle .woocommerce-info::before {
  display: none !important;
}

/* 2. Checkout mobile: padding laterale */
@media (max-width: 768px) {
  .woocommerce-checkout .woocommerce-checkout-review-order,
  .woocommerce-checkout form.woocommerce-checkout,
  .woocommerce-checkout .woocommerce-form-coupon-toggle,
  .woocommerce-checkout form.checkout_coupon {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  .woocommerce-checkout .form-row {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 3. Privacy text: nascosto anche su mobile */
  .woocommerce-checkout .woocommerce-privacy-policy-text {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT: rimuovi spazi eccessivi zona privacy + bottone ordine
   ═══════════════════════════════════════════════════════════════ */

/* Wrapper termini: collassato ma non rimosso dal DOM */
.woocommerce-terms-and-conditions-wrapper {
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Privacy text nascosto: zero spazio */
.woocommerce-privacy-policy-text {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Checkbox FM privacy: override inline margin-bottom:20px */
#fm_accept_privacy_field {
  margin-top: 5px !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
}

/* PayPal reCAPTCHA container vuoto: override inline margin:20px 0 */
#ppcp-recaptcha-v2-container {
  margin: 0 !important;
  padding: 0 !important;
}

/* Place order container: riduci padding */
#payment .place-order,
.form-row.place-order {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  margin-top: 0 !important;
}

/* Noscript: nascosto e zero spazio */
#payment .place-order noscript,
.form-row.place-order noscript {
  display: none !important;
}

/* PayPal/Google Pay buttons vuoti */
#ppc-button-ppcp-applepay[style*="display: none"],
#ppc-button-ppcp-googlepay:empty {
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

/* Billing fields: padding mobile */
@media (max-width: 768px) {
  .woocommerce-billing-fields {
    padding: 10px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CART VUOTO: messaggio "sessione scaduta" / "carrello vuoto"
   ═══════════════════════════════════════════════════════════════ */
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-message {
  list-style: none !important;
  padding: 15px 20px !important;
  margin: 15px 10px !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
}

.woocommerce-cart .woocommerce-error li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.9rem !important;
}

/* Link "Ritorna al negozio" */
.woocommerce-cart a.wc-backward,
.woocommerce-cart .woocommerce-error a {
  display: inline-block !important;
  color: #5e8f33 !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  text-decoration: underline !important;
}

@media (max-width: 768px) {
  .woocommerce-cart .woocommerce-error,
  .woocommerce-cart .woocommerce-info {
    margin: 10px !important;
    padding: 12px 15px !important;
    font-size: 0.85rem !important;
  }
  .woocommerce-cart .cart-empty,
  .woocommerce-cart .return-to-shop {
    text-align: center !important;
    padding: 10px !important;
  }
  .woocommerce-cart .return-to-shop a.wc-backward {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 12px !important;
    background: #88ca94 !important;
    color: #fff !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
  }
}
