/**
 * Theme Name: modianus-quatio
 * Author: Quatio di Capasso Romano
 * Author URI: https://quatio.it
 * Description: Astra child theme personalizzato per Caseificio Modianus.
 * Version: 1.0.0
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: modianus-quatio
 * Template: astra
 */

/* =========================================================
   INDICE
   0) Variabili globali
   1) Base / Gallery WordPress
   2) Ricerca AJAX - FiboSearch
   3) WooCommerce - Titoli, prezzi e pulsanti
   4) Box prodotto personalizzati
   5) Scheda tecnica compatta
   6) Checkout / campi form
   7) Note personalizzate
   8) Notice WooCommerce / Fluid Checkout
   9) Pagamenti + colori Fluid Checkout
   10) Free shipping bar
   11) Badge offerta Astra
   12) Footer - pagamenti e spedizionieri
   13) Footer - social
   14) Carrello - box informativi
   15) Footer - canale WhatsApp
   16) CookieYes
   17) Elementor - override specifico
   18) Correzioni varie
   19) Responsive
   ========================================================= */


/* =========================================================
   0) VARIABILI GLOBALI
   ---------------------------------------------------------
   Qui centralizziamo colori, bordi e misure ricorrenti.
   In questo modo, per cambiare look al sito basta modificare
   poche variabili, senza cercare lo stesso colore in tutto il CSS.
   ========================================================= */

:root {
  --md-accent: var(--ast-global-color-1, #c9b26b);
  --md-accent-strong: var(--ast-global-color-0, #cbb86a);
  --md-text: var(--ast-global-color-3, #2f2f2f);
  --md-text-dark: #111;
  --md-text-soft: rgba(47, 47, 47, .88);
  --md-white: #fff;

  --md-border: rgba(0, 0, 0, .10);
  --md-border-soft: rgba(0, 0, 0, .08);
  --md-soft: rgba(0, 0, 0, .02);
  --md-shadow-soft: 0 8px 20px rgba(0, 0, 0, .06);

  --md-danger: #a82626;
  --md-danger-soft: #fbf1f1;
  --md-success-soft: #f3f7ea;
  --md-beige: #f7f4e8;

  /* Notice checkout / codice promo */
  --md-notice-bg: var(--md-beige);
  --md-notice-border: var(--md-border);
  --md-notice-accent: var(--md-accent-strong);
  --md-notice-text: #1f1f1f;

  /* Free shipping bar: fallback generale */
  --md-fs-text: var(--md-text);
  --md-fs-success: #5f7f2d;
  --md-fs-track: #eee7d6;
  --md-fs-fill: var(--md-accent);
  --md-fs-shimmer: rgba(255, 255, 255, .6);
  --md-fs-speed: 1.9s;

  /* Footer gallery */
  --md-footer-icon-w: 64px;
  --md-footer-icon-h: 38px;
  --md-footer-icon-w-mobile: 58px;
  --md-footer-icon-h-mobile: 36px;

  /* CookieYes */
  --cky-primary: var(--md-accent);
  --cky-primary-text: #ffffff;
  --cky-border: rgba(0, 0, 0, .18);
}


/* =========================================================
   1) BASE / GALLERY WORDPRESS
   ========================================================= */

.gallery-icon {
  border: 0 !important;
}

.gallery-item {
  padding: 5px !important;
}

/* Limita le miniature nelle gallery a 3 colonne, usate in alcuni widget. */
.gallery-columns-3 .gallery-item {
  max-width: 75px !important;
  text-align: right;
}


/* =========================================================
   2) RICERCA AJAX - FIBOSEARCH / DGWT
   ========================================================= */

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp {
  min-width: 700px !important;
  background: none !important;
}


/* =========================================================
   3) WOOCOMMERCE - TITOLI, PREZZI E PULSANTI
   ========================================================= */

/* Titolo prodotto nella pagina singola. */
.ast-single-entry-banner[data-post-type="product"] .entry-title {
  font-size: 3.875rem;
}

/* Sticky add to cart: prezzo + titolo prodotto. */
.ast-sticky-add-to-cart-action-wrap .ast-sticky-add-to-cart-action-price,
.ast-sticky-add-to-cart .ast-sticky-add-to-cart-content
.ast-sticky-add-to-cart-title-wrap .ast-sticky-add-to-cart-title {
  font-size: 1.575rem;
  font-weight: 700;
}

/* Archivio prodotti: titolo + prezzo. */
.woocommerce-js ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.6em;
}

.woocommerce-js ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
  font-size: 1.3em;
}

/* Pulsanti WooCommerce principali. */
.woocommerce button.button {
  font-size: 1.3rem !important;
}

.woocommerce-js a.button {
  font-size: 1rem;
}

#order_review .order-total .amount {
  font-size: 1.5rem !important;
}


/* =========================================================
   4) BOX PRODOTTO PERSONALIZZATI (.md-*)
   ---------------------------------------------------------
   Usati nelle schede prodotto per caratteristiche, abbinamenti,
   note e blocchi informativi custom.
   ========================================================= */

.md-prod-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

/* Fix wpautop: evita paragrafi vuoti generati da WordPress dentro la griglia. */
.md-prod-grid > p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.md-prod-grid > p {
  margin: 0 !important;
}

.md-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-radius: 16px;
  box-shadow: var(--md-shadow-soft);
}

.md-card--span2 {
  grid-column: 1 / -1;
}

.md-card--compact {
  padding: 12px;
}

.md-card__kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 8px;
  padding: 5px 10px;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 999px;
  background: rgba(0, 0, 0, .035);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: .9;
}

.md-card__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}

.md-card__content {
  font-size: 15px;
  line-height: 1.55;
  opacity: .92;
}

.md-list {
  margin: 0;
  padding-left: 18px;
}

.md-list li {
  margin: 6px 0;
}

.md-list strong {
  font-weight: 800;
}

.md-card a {
  color: inherit;
  text-decoration: none;
}


/* =========================================================
   5) SCHEDA TECNICA COMPATTA (.md-tech*)
   ========================================================= */

.md-techbox {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.md-techrow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  padding: 10px;
  background: var(--md-soft);
  border: 1px solid var(--md-border-soft);
  border-radius: 14px;
}

.md-techicon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  align-self: stretch;
  width: 44px;
  min-height: 44px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .05);
}

.md-techmeta {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.md-techbtn,
.md-techbtn:link,
.md-techbtn:visited {
  width: fit-content;
}

.md-techsize {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  opacity: .7;
}


.md-short-box {
  border: 1px solid #eadfce;
  background: #fffaf3;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
}

.md-short-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.md-short-title {
  font-size: 18px;
  font-weight: 700;
  color: #2b2118;
  line-height: 1.25;
}

.md-short-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 210px;
}

.md-short-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #e1cfb8;
  background: #ffffff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  color: #3a2a1d;
  white-space: nowrap;
}

.md-short-pill strong {
  font-weight: 700;
}

/* =========================================================
   DESCRIZIONE BREVE PRODOTTO - BOX COMPATTO
   ========================================================= */

.md-short-box {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 18px;
  padding: 18px 20px;
  color: var(--md-text);
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-left: 4px solid var(--md-accent);
  border-radius: 16px;
  box-shadow: var(--md-shadow-soft);
  font-size: 17px;
  line-height: 1.55;
}

/* Titolo sopra, informazioni sotto: così prezzo e formati hanno tutta la riga disponibile */
.md-short-top {
  display: block;
  margin-bottom: 14px;
}

.md-short-title {
  margin: 0 0 12px;
  color: var(--md-text-dark);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.18;
}

/* Riga prezzo + formati centrata */
.md-short-info {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 0 auto 14px;
}

/* Badge informativi */
.md-short-pill {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--md-text-dark);
  background: var(--md-white);
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.md-short-pill strong {
  color: var(--md-text-dark);
  font-size: 16px;
  font-weight: 900;
}

/* Testo descrittivo */
.md-short-box p {
  margin: 0 0 12px;
  color: var(--md-text);
  font-size: 17px;
  line-height: 1.58;
}

/* Elenco benefici */
.md-short-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 22px;
  margin: 0;
  padding-left: 20px;
  color: var(--md-text);
  font-size: 16px;
  line-height: 1.45;
}

.md-short-list li {
  margin: 0;
  padding-left: 2px;
}

.md-short-list li::marker {
  color: var(--md-accent);
}

/* Responsive */
@media (max-width: 640px) {
  .md-short-box {
    padding: 16px;
    font-size: 16px;
  }

  .md-short-title {
    font-size: 22px;
  }

  .md-short-info {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .md-short-pill {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    white-space: normal;
    text-align: center;
  }

  .md-short-pill strong {
    font-size: 15px;
  }

  .md-short-box p {
    font-size: 16px;
  }

  .md-short-list {
    grid-template-columns: 1fr;
    gap: 5px;
    font-size: 15.5px;
  }
}

/* =========================================================
   FIX ASTRA/WOO - DESCRIZIONE BREVE PRODOTTO MODIANUS
   ========================================================= */

.woocommerce-js div.product div.summary 
.woocommerce-product-details__short-description .md-short-box :last-child {
  margin-bottom: 0 !important;
}

.woocommerce-js div.product div.summary 
.woocommerce-product-details__short-description .md-short-box .md-short-top:last-child,
.woocommerce-js div.product div.summary 
.woocommerce-product-details__short-description .md-short-box .md-short-info:last-child,
.woocommerce-js div.product div.summary 
.woocommerce-product-details__short-description .md-short-box .md-short-list:last-child {
  margin-bottom: 0 !important;
}

/* =========================================================
   6) CHECKOUT / CAMPI FORM
   ========================================================= */

div.woocommerce form .woocommerce-billing-fields__field-wrapper {
  margin-top: 3% !important;
}

div.woocommerce form .form-row .woocommerce-input-wrapper span.description {
  padding: 0;
  color: #333;
  font-size: xx-small;
}

#billing_email_field #wcf_cf_gdpr_message_block span,
#billing_email-description {
  font-size: .7rem !important;
  line-height: 1.5 !important;
}


/* =========================================================
   7) NOTE PERSONALIZZATE
   ========================================================= */

/* Nota spedizione sotto i totali del carrello. */
.md-shipping-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  opacity: .85;
}

.md-shipping-note .dashicons {
  margin-top: 1px;
  font-size: 16px;
  line-height: 1;
  opacity: .9;
}

/* Box ordine minimo in pagina prodotto. */
.md-min-order-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 16px;
  padding: 12px 14px;
  color: var(--md-text);
  background: var(--md-beige);
  border: 1px solid var(--md-border-soft);
  border-left: 4px solid var(--md-accent);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
}

.md-min-order-box__icon {
  flex: 0 0 20px;
  margin-top: 2px;
  color: var(--md-text-dark);
  font-size: 20px;
  line-height: 1;
}

.md-min-order-box__content {
  min-width: 0;
}

.md-min-order-box__title {
  margin: 0 0 4px;
  color: var(--md-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.md-min-order-box__text {
  margin: 0;
  color: var(--md-text-soft);
  font-size: 13px;
  line-height: 1.5;
}


/* =========================================================
   8) NOTICE WOOCOMMERCE / FLUID CHECKOUT
   ========================================================= */

/* Evita che le notice restino strette dentro wrapper o colonne del checkout. */
.woocommerce-notices-wrapper,
.woocommerce-NoticeGroup,
.woocommerce-error,
.woocommerce-message,
.woocommerce-info,
.fc-wrapper .woocommerce-notices-wrapper,
.fc-content .woocommerce-notices-wrapper,
.fc-checkout .woocommerce-notices-wrapper {
  width: 100% !important;
  max-width: none !important;
}

.woocommerce-error {
  display: block !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}


/* =========================================================
   8.1) CHECKOUT - BLOCCO "ORDINE MINIMO" NELLO STEP SPEDIZIONE
   ========================================================= */

.woocommerce-checkout .md-checkout-minship {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  background: var(--md-beige);
  border: 1px solid var(--md-border);
  border-left: 4px solid var(--md-accent);
  border-radius: 0;
  box-shadow: none;
}

.woocommerce-checkout .md-checkout-minship__text {
  margin: 0;
  color: var(--md-text-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.woocommerce-checkout .md-checkout-minship__btn {
  width: fit-content;
  padding: 10px 16px;
  color: #fff !important;
  background: var(--md-accent);
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 0;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
}

.woocommerce-checkout .md-checkout-minship__btn:hover {
  filter: brightness(.96);
}

/* Stati disabilitati Fluid Checkout. */
.woocommerce-checkout .md-is-disabled,
.woocommerce-checkout #place_order[disabled],
.woocommerce-checkout button#place_order[disabled] {
  opacity: .55 !important;
  cursor: not-allowed !important;
}

.woocommerce-checkout a.md-is-disabled,
.woocommerce-checkout a.md-is-disabled:hover {
  pointer-events: none !important;
  text-decoration: none !important;
}


/* =========================================================
   8.2) CHECKOUT - CODICE PROMO / COUPON
   ---------------------------------------------------------
   Notice brandizzate: messaggio leggibile, icona laterale,
   pulsante "Congedo" non sovrapposto al testo.
   ========================================================= */

.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-error,
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-message,
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-info {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 10px 0 12px !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Astra/Woo a volte aggiunge pseudo-icone sul <ul>: le disattiviamo. */
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-error::before,
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-message::before,
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-info::before {
  display: none !important;
  content: none !important;
}

.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-error > li,
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-message > li,
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-info > li {
  position: relative !important;
  margin: 0 !important;
  padding: 14px 110px 14px 52px !important; /* icona a sinistra + dismiss a destra */
  overflow-wrap: anywhere !important;
  color: var(--md-notice-text) !important;
  background: var(--md-notice-bg) !important;
  border: 1px solid var(--md-notice-border) !important;
  border-left: 4px solid var(--md-notice-accent) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  word-break: break-word !important;
}

/* Icona info a sinistra. */
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-error > li::before,
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-message > li::before,
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-info > li::before {
  position: absolute !important;
  top: 16px !important;
  left: 16px !important;
  width: 22px !important;
  height: 22px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  content: "" !important;
  opacity: .95 !important;
}

/* Pulsante dismiss ("Congedo"). */
.woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-message-dismiss {
  position: absolute !important;
  top: 50% !important;
  right: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 10px !important;
  color: var(--md-text-dark) !important;
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, .14) !important;
  border-radius: 0 !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transform: translateY(-50%) !important;
  white-space: nowrap !important;
}

@media (hover: hover) {
  .woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-message-dismiss:hover {
    background: rgba(0, 0, 0, .03) !important;
  }
}


/* =========================================================
   9) PAGAMENTI + COLORI FLUID CHECKOUT
   ========================================================= */

/* Nasconde i messaggi PayPal rateali. */
.ppcp-messages {
  display: none !important;
}

/* Stripe: label a sinistra, loghi carte/Klarna a destra. */
#payment .payment_method_stripe > label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

#payment .payment_method_stripe .md-stripe-custom-icons {
  display: inline-flex !important;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin-left: auto;
}

#payment .payment_method_stripe .md-stripe-custom-icons img {
  display: block;
  width: auto;
  max-width: 38px;
  height: 20px;
  border-radius: 2px;
  object-fit: contain;
}

/* Colori selezioni Fluid Checkout / WooCommerce. */
.fc-wrapper #payment .payment_methods > .wc_payment_method > input[name=payment_method]:checked + label::before,
.woocommerce ul#shipping_method .shipping-method__option input[type=radio]:checked + .shipping-method__option-label::before {
  background-color: var(--md-accent) !important;
  border-color: var(--md-accent) !important;
}

.fc-progress-bar--bars .fc-progress-bar__steps .fc-progress-bar__step.is-complete {
  background-color: var(--md-accent) !important;
}

.fc-progress-bar--bars .fc-progress-bar__steps .fc-progress-bar__step.is-current {
  background-color: var(--ast-global-color-2) !important;
}


/* =========================================================
   10) FREE SHIPPING BAR
   ========================================================= */

.md-fs-bar {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding-left: 30px;
  color: var(--md-fs-text);
}

.md-fs-bar::before {
  position: absolute;
  top: 4px;
  left: 0;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%237aa33a' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='18' width='30' height='20' rx='2'/%3E%3Cpath d='M36 24h10l8 8v6H36z'/%3E%3Ccircle cx='20' cy='44' r='5'/%3E%3Ccircle cx='46' cy='44' r='5'/%3E%3Cpath d='M12 24h8'/%3E%3Cpath d='M12 29h14'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  content: "";
  opacity: .85;
  pointer-events: none;
  transform: translateY(-50%);
}

.md-fs-bar__track {
  position: relative;
  width: 100%;
  height: 8px;
  margin: 0 0 10px;
  overflow: hidden;
  background: var(--md-fs-track);
  border-radius: 999px;
}

.md-fs-bar__fill {
  position: relative;
  display: block;
  height: 100%;
  background: var(--md-fs-fill);
  border-radius: 999px;
  transition: width .45s ease;
}

.md-fs-bar__fill::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, transparent 30%, var(--md-fs-shimmer) 50%, transparent 70%, transparent 100%);
  background-size: 180% 100%;
  animation: mdFsShimmer var(--md-fs-speed) linear infinite;
  content: "";
}

@keyframes mdFsShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.md-fs-bar__text {
  color: var(--md-fs-text);
  font-size: 15px;
  line-height: 1.45;
  text-align: left;
}

.md-fs-remaining-price {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.md-fs-checkout-row td {
  padding: 12px 18px !important;
  border-top: 0 !important;
}

#order_review table.shop_table tr.md-fs-checkout-row td {
  padding: 10px 16px !important;
  background-color: var(--md-accent) !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* Variante checkout: barra bianca su fondo oro. */
.woocommerce-checkout .md-fs-bar--checkout {
  margin: 0;
  --md-fs-text: #ffffff;
  --md-fs-success: #ffffff;
  --md-fs-track: rgba(255, 255, 255, .22);
  --md-fs-fill: #f4faea;
  --md-fs-shimmer: rgba(255, 255, 255, .70);
  --md-fs-speed: 1.9s;
}

.woocommerce-checkout .md-fs-bar--checkout::before {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='18' width='30' height='20' rx='2'/%3E%3Cpath d='M36 24h10l8 8v6H36z'/%3E%3Ccircle cx='20' cy='44' r='5'/%3E%3Ccircle cx='46' cy='44' r='5'/%3E%3Cpath d='M12 24h8'/%3E%3Cpath d='M12 29h14'/%3E%3C/svg%3E");
}

.woocommerce-checkout .md-fs-bar--checkout .md-fs-bar__text,
.woocommerce-checkout .md-fs-bar--checkout .md-fs-bar__text strong,
.woocommerce-checkout .md-fs-bar--checkout .md-fs-remaining-price {
  color: #ffffff !important;
}


/* =========================================================
   11) BADGE OFFERTA ASTRA
   ========================================================= */

.woocommerce ul.products li.product .ast-on-card-button.ast-onsale-card,
.woocommerce-page ul.products li.product .ast-on-card-button.ast-onsale-card,
.woocommerce div.product .ast-on-card-button.ast-onsale-card,
.woocommerce-page div.product .ast-on-card-button.ast-onsale-card {
  z-index: 9;
  display: inline-block;
  width: auto;
  max-width: max-content;
  padding: 8px 16px;
  color: var(--ast-global-color-5, #ffffff) !important;
  background: linear-gradient(135deg, var(--ast-global-color-0) 0%, var(--ast-global-color-1) 100%) !important;
  border: 1px solid var(--ast-global-color-0) !important;
  border-radius: 30px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
}

.single-product .product .ast-onsale-card {
  top: 1.5em;
  right: auto;
  left: 1.5em;
}

.woocommerce ul.products li.product .ast-on-card-button.ast-onsale-card:hover,
.woocommerce-page ul.products li.product .ast-on-card-button.ast-onsale-card:hover {
  background: linear-gradient(135deg, var(--ast-global-color-1) 0%, var(--ast-global-color-0) 100%) !important;
  border-color: var(--ast-global-color-1) !important;
}


/* =========================================================
   12) FOOTER - PAGAMENTI E SPEDIZIONIERI
   ---------------------------------------------------------
   Desktop: blocchi allineati a destra.
   Mobile: vedi sezione responsive, dove vengono allineati a sinistra
   per evitare overflow.
   ========================================================= */

#media_gallery-4.payment-shipping-widget {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  width: 100% !important;
  text-align: right !important;
}

#media_gallery-4 .footer-payment-block,
#media_gallery-4 .footer-shipping-block {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  width: auto !important;
  max-width: 100% !important;
  text-align: right !important;
}

#media_gallery-4 .footer-payment-block,
.footer-payment-block {
  margin-top: 12px !important;
}

#media_gallery-4 .footer-shipping-block {
  margin-top: 26px !important;
}

#media_gallery-4 .widget-title,
.md-footer-social .widget-title {
  margin: 0 0 12px !important;
  padding: 0 !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
}

#media_gallery-4 .widget-title {
  text-align: right !important;
  white-space: nowrap !important;
}

#media_gallery-4 .footer-icon-gallery {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#media_gallery-4 .footer-icon-gallery .gallery-item {
  display: inline-flex !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#media_gallery-4 .footer-icon-gallery .gallery-icon {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--md-footer-icon-w) !important;
  min-width: var(--md-footer-icon-w) !important;
  height: var(--md-footer-icon-h) !important;
  min-height: var(--md-footer-icon-h) !important;
  margin: 0 !important;
  padding: 4px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

#media_gallery-4 .footer-icon-gallery img {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  object-fit: contain !important;
}


/* =========================================================
   13) FOOTER - SOCIAL
   ========================================================= */

/* Social nativi Astra: desktop a destra, in colonna. */
[data-section="section-fb-social-icons-1"] {
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
  text-align: right !important;
}

[data-section="section-fb-social-icons-1"] .ast-footer-social-1-wrap {
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
}

[data-section="section-fb-social-icons-1"] .footer-social-inner-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right !important;
}

[data-section="section-fb-social-icons-1"] .footer-social-inner-wrap p,
.footer-social-inner-wrap p {
  margin-bottom: 0 !important;
}

[data-section="section-fb-social-icons-1"] .footer-social-item {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin: 0 !important;
  padding: 6px 0 !important;
  color: var(--ast-global-color-0, #c8b56a) !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transition: filter .25s ease, color .25s ease !important;
}

/* Mantiene poco spazio tra Facebook e Instagram. */
[data-section="section-fb-social-icons-1"] .footer-social-item:first-child {
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

[data-section="section-fb-social-icons-1"] .ahfb-svg-iconset {
  display: inline-flex !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  margin-right: 12px !important;
  color: var(--ast-global-color-0, #c8b56a) !important;
  transition: filter .25s ease, color .25s ease !important;
}

[data-section="section-fb-social-icons-1"] svg {
  display: block !important;
  width: 32px !important;
  height: 32px !important;
  fill: currentColor !important;
}

[data-section="section-fb-social-icons-1"] .social-item-label {
  color: var(--ast-global-color-0, #c8b56a) !important;
  white-space: nowrap !important;
  transition: filter .25s ease, color .25s ease !important;
}

[data-section="section-fb-social-icons-1"] .footer-social-item:hover,
[data-section="section-fb-social-icons-1"] .footer-social-item:focus {
  color: var(--ast-global-color-0) !important;
  outline: none !important;
}

[data-section="section-fb-social-icons-1"] .footer-social-item:hover .ahfb-svg-iconset,
[data-section="section-fb-social-icons-1"] .footer-social-item:focus .ahfb-svg-iconset,
[data-section="section-fb-social-icons-1"] .footer-social-item:hover svg,
[data-section="section-fb-social-icons-1"] .footer-social-item:focus svg,
[data-section="section-fb-social-icons-1"] .footer-social-item:hover .social-item-label,
[data-section="section-fb-social-icons-1"] .footer-social-item:focus .social-item-label {
  color: var(--ast-global-color-0) !important;
  fill: var(--ast-global-color-0) !important;
}

@media (hover: hover) {
  [data-section="section-fb-social-icons-1"] .footer-social-item:hover,
  [data-section="section-fb-social-icons-1"] .footer-social-item:focus {
    filter: brightness(1.08) !important;
  }
}

/* Social custom HTML, se usato dentro widget custom. */
.md-footer-social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.md-footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ast-global-color-0, #c8b56a);
  font-weight: 800;
  text-decoration: none;
}

.md-footer-social-link svg {
  display: block;
  fill: currentColor;
}


/* =========================================================
   14) CARRELLO - BOX INFORMATIVI
   ========================================================= */

.woocommerce-cart .md-cart-info-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
  margin: 0 0 18px !important;
}

.woocommerce-cart .md-cart-info-card {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 16px 18px;
  background: #fff !important;
  border: 1px solid var(--md-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.woocommerce-cart .md-cart-info-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  min-width: 50px;
  height: 50px;
  color: var(--md-text-dark);
  background: #f5f2e8;
  border-radius: 10px;
}

.woocommerce-cart .md-cart-info-card__icon svg {
  display: block;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.woocommerce-cart .md-cart-info-card__icon--truck svg {
  width: 30px;
  height: 30px;
  color: var(--md-text-dark);
}

.woocommerce-cart .md-cart-info-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.woocommerce-cart .md-cart-info-card__eyebrow {
  margin: 0 0 6px;
  color: #8a7a45;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.woocommerce-cart .md-cart-info-card__title {
  margin: 0 0 6px;
  color: #2b2b2b;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.woocommerce-cart .md-cart-info-card__text {
  margin: 0;
  color: #4b4b4b;
  font-size: 14px;
  line-height: 1.55;
}

.woocommerce-cart .md-cart-info-card__text strong {
  color: #1f1f1f;
  font-weight: 800;
}

/* Stati: volutamente discreti, cambia solo il fondo dell'icona. */
.woocommerce-cart .md-cart-info-card.is-warning .md-cart-info-card__icon {
  background: var(--md-danger-soft);
}

.woocommerce-cart .md-cart-info-card.is-success .md-cart-info-card__icon {
  background: var(--md-success-soft);
}

.woocommerce-cart .md-cart-info-card.is-neutral .md-cart-info-card__icon {
  background: #f5f2e8;
}

.woocommerce-cart .md-cart-progress {
  width: 100%;
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  background: #eee7d6;
  border-radius: 999px;
}

.woocommerce-cart .md-cart-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--md-accent);
  border-radius: 999px;
  transition: width .35s ease;
}

.woocommerce-cart table.shop_table {
  margin-top: 6px !important;
}


/* =========================================================
   15) FOOTER - CANALE WHATSAPP
   ========================================================= */

.md-wa-channel-widget {
  margin-top: 6px;
}

.md-wa-channel-desc {
  margin: 0 0 12px;
  font-size: .8em !important;
  line-height: 1.45;
  opacity: .88;
}

.md-wa-channel-qr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  text-decoration: none !important;
}

.md-wa-channel-qr img {
  box-sizing: border-box;
  width: 104px;
  max-width: 38%;
  height: auto;
  padding: 6px;
  background: #fff;
  border-radius: 10px;
}

.md-wa-channel-cta {
  display: inline-block;
  color: #fff;
  line-height: 1.25;
}

.md-wa-channel-cta strong {
  color: var(--ast-global-color-0, #c8b56a);
  font-weight: 900;
}

.md-wa-channel-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.35;
  opacity: .75;
}

.md-wa-channel-note a {
  color: var(--ast-global-color-0, #c8b56a);
  font-weight: 800;
  text-decoration: none;
}

.md-wa-channel-note a:hover {
  text-decoration: underline;
}


/* =========================================================
   16) COOKIEYES
   ========================================================= */

.cky-btn-revisit-wrapper {
  background-color: #cbba4b!important;
}
.cky-revisit-bottom-left{
    bottom: 85px!important;
    left: 20px!important;
}

button.cky-btn.cky-btn-accept[data-cky-tag="accept-button"],
button.cky-btn.cky-btn-reject[data-cky-tag="reject-button"],
button.cky-btn.cky-btn-preferences[data-cky-tag="detail-save-button"] {
  color: var(--cky-primary-text) !important;
  background-color: var(--cky-primary) !important;
  border-color: var(--cky-primary) !important;
}


/* =========================================================
   17) ELEMENTOR - OVERRIDE SPECIFICO
   ---------------------------------------------------------
   Selector volutamente specifico: riguarda solo il pulsante
   dell'elemento Elementor indicato.
   ========================================================= */

.elementor-element-6cc5796 .elementor-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 44px !important;
  padding: 12px 22px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

.elementor-element-6cc5796 .elementor-button-text,
.elementor-element-6cc5796 .elementor-button-icon {
  font-size: 15px !important;
}


/* =========================================================
   18) CORREZIONI VARIE
   ========================================================= */

.ast-site-identity {
  padding-top: 10px;
}

.ast-scroll-to-top-right {
  right: 23px !important;
  bottom: 70px !important;
}

/* Correzione: line-height 0 rende il pulsante poco accessibile e può tagliare il testo. */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  font-size: 1.4em !important;
  line-height: 1.2 !important;
}

.home .ast-article-single {
  padding-top: 0 !important;
}

/* Nasconde link/form indesiderati senza lasciare interazioni residue. */
.form-link-wrapper,
.form-link-wrapper a {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Pulsanti add to cart disabilitati: evita click involontari. */
.woocommerce div.product form.cart .single_add_to_cart_button.disabled,
.woocommerce div.product form.cart .single_add_to_cart_button:disabled,
.ast-sticky-add-to-cart .single_add_to_cart_button.disabled,
.ast-sticky-add-to-cart .single_add_to_cart_button:disabled {
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.woocommerce .fc-shipping-method__no-shipping-methods .shipping-method__options {
  border: none !important;
}

#media_image-1 {
  margin-bottom: .9em !important;
}

#customer_login{padding: 2em;}


/* =========================================================
   19) RESPONSIVE
   ========================================================= */

/* Tablet: la ricerca non deve forzare una larghezza eccessiva. */
@media (max-width: 1024px) {
  .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp {
    min-width: 100% !important;
  }
}

/* Mobile generale. */
@media (max-width: 768px) {
  .md-prod-grid {
    grid-template-columns: 1fr;
  }

  .md-fs-bar {
    padding-left: 0;
  }

  .md-fs-bar::before {
    display: none;
  }
}

/* Mobile stretto / smartphone. */
@media (max-width: 767px) {
  /* Checkout ordine minimo: bottone full width. */
  .woocommerce-checkout .md-checkout-minship {
    padding: 12px;
  }

  .woocommerce-checkout .md-checkout-minship__btn {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  /* Coupon: il pulsante dismiss va sotto al testo, così non lo copre. */
  .woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-error > li,
  .woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-message > li,
  .woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-info > li {
    padding: 12px 12px 12px 46px !important;
  }

  .woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-message-dismiss {
    position: static !important;
    width: fit-content !important;
    margin-top: 10px !important;
    transform: none !important;
  }

  .woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-error > li::before,
  .woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-message > li::before,
  .woocommerce-checkout [data-substep-id="coupon_codes"] .fc-coupon-code-messages ul.woocommerce-info > li::before {
    top: 12px !important;
    left: 12px !important;
  }

  /* Carrello: box informativi in una sola colonna. */
  .woocommerce-cart .md-cart-info-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin: 0 0 16px !important;
  }

  .woocommerce-cart .md-cart-info-card {
    padding: 14px;
    border-radius: 0 !important;
  }

  .woocommerce-cart .md-cart-info-card__icon {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .woocommerce-cart .md-cart-info-card__icon svg {
    width: 20px;
    height: 20px;
  }

  .woocommerce-cart .md-cart-info-card__icon--truck svg {
    width: 26px;
    height: 26px;
  }

  .woocommerce-cart .md-cart-info-card__title {
    font-size: 16px;
  }

  .woocommerce-cart .md-cart-info-card__text {
    font-size: 13px;
    line-height: 1.5;
  }

  /* Footer WhatsApp: QR e testo centrati sul mobile. */
  .site-footer .md-wa-channel-widget {
    text-align: center !important;
  }

  .site-footer .md-wa-channel-qr {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .site-footer .md-wa-channel-qr img {
    display: block !important;
    width: 100% !important;
    max-width: 160px !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  .site-footer .md-wa-channel-cta {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
  }

  .site-footer .md-wa-channel-note {
    text-align: center !important;
  }

  /* Footer pagamenti/spedizioni: mobile allineato a sinistra e senza overflow. */
  #media_gallery-4.payment-shipping-widget,
  #media_gallery-4.payment-shipping-widget * {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  #media_gallery-4.payment-shipping-widget {
    align-items: flex-start !important;
    text-align: left !important;
  }

  #media_gallery-4 .md-footer-social,
  #media_gallery-4 .footer-payment-block,
  #media_gallery-4 .footer-shipping-block {
    align-items: flex-start !important;
    width: 100% !important;
    text-align: left !important;
  }

  #media_gallery-4 .widget-title,
  #media_gallery-4 .md-footer-social__title {
    text-align: left !important;
    white-space: normal !important;
  }

  #media_gallery-4 .footer-icon-gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
  }

  #media_gallery-4 .footer-icon-gallery .gallery-icon {
    width: var(--md-footer-icon-w-mobile) !important;
    min-width: var(--md-footer-icon-w-mobile) !important;
    height: var(--md-footer-icon-h-mobile) !important;
    min-height: var(--md-footer-icon-h-mobile) !important;
  }

  /* Social Astra: mobile allineato a sinistra, come gli altri blocchi footer. */
  [data-section="section-fb-social-icons-1"],
  [data-section="section-fb-social-icons-1"] .ast-footer-social-1-wrap {
    justify-content: flex-start !important;
    width: 100% !important;
    text-align: left !important;
  }

  [data-section="section-fb-social-icons-1"] .footer-social-inner-wrap {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    text-align: left !important;
  }

  [data-section="section-fb-social-icons-1"] .footer-social-item {
    justify-content: flex-start !important;
  }

  [data-section="section-fb-social-icons-1"] .social-item-label {
    white-space: normal !important;
  }
}

/* Schermi molto stretti: icone footer leggermente più compatte. */
@media (max-width: 360px) {
  #media_gallery-4 .footer-icon-gallery .gallery-icon {
    width: 54px !important;
    min-width: 54px !important;
  }
}

/* Box ordine minimo sotto galleria prodotto */
.woocommerce div.product div.images .md-min-order-box{
  margin-top: 12px;
}
/* Box ordine minimo sotto galleria immagini (single product) */
.single-product .woocommerce-product-gallery .md-min-order-box--gallery{
  margin: 12px 0 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.md-product-delivery-box-wrap {
	margin: 16px 0 18px;
	max-width: 520px;
}

.single-product .mdsdp-delivery-box {
	width: 100%;
}

@media (max-width: 768px) {
	.md-product-delivery-box-wrap {
		margin: 14px 0 16px;
		max-width: 100%;
	}
}

/* =========================================================
   MOBILE HEADER - sfondo bianco a tutta larghezza
   ========================================================= */

@media (max-width: 921px) {

	body.single-product #masthead,
	body.single-product #ast-mobile-header,
	body.single-product .ast-mobile-header-wrap,
	body.single-product .ast-primary-header-bar,
	body.single-product .ast-primary-header-bar .ast-builder-grid-row-container,
	body.single-product .ast-primary-header-bar .ast-builder-grid-row-container-inner {
		background: #ffffff !important;
	}

	body.single-product .ast-primary-header-bar {
		width: 100vw !important;
		max-width: 100vw !important;
		margin-left: calc(50% - 50vw) !important;
		margin-right: calc(50% - 50vw) !important;
	}

	body.single-product .ast-primary-header-bar .site-primary-header-wrap {
		width: 100% !important;
		max-width: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 18px !important;
		padding-right: 18px !important;
		box-sizing: border-box !important;
		background: #ffffff !important;
	}

	body.single-product .ast-primary-header-bar .ast-builder-grid-row {
		width: 100% !important;
		max-width: none !important;
		background: #ffffff !important;
	}
}
.md-short-top {
  display: flex;
  flex-wrap: wrap;
}

.md-short-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.md-short-production-row {
  width: 100%;
  align-items: center;
}

.md-short-production-label {
  z-index: 9;
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 8px 16px;
  color: var(--ast-global-color-5, #fff) !important;
  background: linear-gradient(
    135deg,
    var(--ast-global-color-0) 0%,
    var(--ast-global-color-1) 100%
  ) !important;
  border: 1px solid var(--ast-global-color-0) !important;
  border-radius: 30px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  text-align: center;
}
@media (max-width: 767px) {
  .ast-single-entry-banner[data-post-type="product"] .entry-title {
    font-size: clamp(2rem, 9vw, 2.875rem) !important;
    line-height: 1.08;
  }
}

@media (min-width: 922px) {
  #secondary,
  #secondary.widget-area.secondary {
    margin-top: 0 !important;
    background-color: #ffffff !important;
    padding: 0.2em !important;
  }
}
.ast-plain-container.ast-single-post #primary{margin-top:1em!important;}
.comments-area{margin-top: 0!important;}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{margin-top: .7em!important;}
/* ===== MDB2B ASTRA PADDING FIX ===== */
body.ast-padded-layout {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/* ===== /MDB2B ASTRA PADDING FIX ===== */


/* ==========================================================
   MODIANUS B2B MOBILE MENU UX v1
   Solo menu mobile; desktop invariato
   ========================================================== */

@media (max-width: 767px) {

    .ast-mobile-popup-content li.md-b2b-mobile-account {
        position: relative !important;
        margin: 14px 0 !important;
        padding: 14px 0 !important;
        border-top: 1px solid rgba(180,145,55,.55) !important;
        border-bottom: 1px solid rgba(180,145,55,.55) !important;
    }

    .ast-mobile-popup-content li.md-b2b-mobile-account > a {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        min-height: 30px !important;
        padding: 0 0 0 45px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
    }

    .ast-mobile-popup-content li.md-b2b-mobile-account > a::before {
        content: "" !important;
        position: absolute !important;
        left: 17px !important;
        top: 50% !important;
        width: 12px !important;
        height: 12px !important;
        border: 1.7px solid currentColor !important;
        border-radius: 50% !important;
        transform: translateY(-14px) !important;
        box-sizing: border-box !important;
    }

    .ast-mobile-popup-content li.md-b2b-mobile-account > a::after {
        content: "" !important;
        position: absolute !important;
        left: 13px !important;
        top: 50% !important;
        width: 20px !important;
        height: 11px !important;
        border: 1.7px solid currentColor !important;
        border-radius: 11px 11px 4px 4px !important;
        transform: translateY(3px) !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================
   MODIANUS B2B - MOBILE PRODUCT BANNER COMPACT v1

   Compatta titolo e breadcrumb della scheda prodotto.
   Solo smartphone.
   Nessuna modifica alla logica del catalogo professionale.
   ========================================================== */

@media (max-width: 767px) {

    /*
     * Banner Astra superiore:
     * elimina l'altezza superflua.
     */
    body.single-product section.ast-single-entry-banner {
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.single-product section.ast-single-entry-banner > .ast-container {
        display: block !important;

        min-height: 0 !important;
        height: auto !important;

        padding-top: 10px !important;
        padding-bottom: 8px !important;

        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /*
     * Titolo prodotto.
     * Sostituisce visivamente la dimensione mobile precedente.
     */
    body.single-product section.ast-single-entry-banner h1.entry-title {
        margin: 0 0 5px !important;
        padding: 0 !important;

        font-size: 22px !important;
        line-height: 1.12 !important;
    }

    /*
     * Breadcrumb più compatto.
     */
    body.single-product section.ast-single-entry-banner
    .ast-breadcrumbs-wrapper,

    body.single-product section.ast-single-entry-banner
    .ast-breadcrumbs-inner,

    body.single-product section.ast-single-entry-banner
    nav.breadcrumb-trail,

    body.single-product section.ast-single-entry-banner
    .ast-breadcrumbs,

    body.single-product section.ast-single-entry-banner
    ul.trail-items {
        min-height: 0 !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    body.single-product section.ast-single-entry-banner ul.trail-items {
        font-size: 11.5px !important;
        line-height: 1.3 !important;
    }

    /*
     * Il nome completo è già presente nell'H1:
     * non occorre ripeterlo nel breadcrumb mobile.
     */
    body.single-product section.ast-single-entry-banner
    li.trail-item.trail-end {
        display: none !important;
    }

    /*
     * Recupera lo spazio fra banner e contenuto prodotto.
     */
    body.single-product #content.site-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.single-product #content.site-content > .ast-container {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.single-product #content .ast-woocommerce-container {
        margin-top: 0 !important;
        padding-top: 6px !important;
    }

}


/* ==========================================================
   MODIANUS B2B MOBILE GALLERY v1
   Slideshow WooCommerce nativo, frecce e swipe
   ========================================================== */

@media (max-width: 767px) {

    /* Elimina il separatore dopo Latticini. */
    body.single-product .ast-single-entry-banner
    .trail-item:nth-last-child(2)::after,

    body.single-product .ast-single-entry-banner
    .trail-item:nth-last-child(2) > a::after,

    body.single-product .ast-single-entry-banner
    .trail-item:nth-last-child(2) > span::after,

    body.single-product .ast-single-entry-banner
    .trail-item:nth-last-child(2) .ast-breadcrumbs-separator {
        display: none !important;
        content: none !important;
    }

    /* Nasconde il nome prodotto duplicato nel breadcrumb. */
    body.single-product .ast-single-entry-banner
    .trail-item.trail-end {
        display: none !important;
    }

    /* Gallery compatta. */
    body.single-product .woocommerce-product-gallery {
        position: relative !important;
        margin-top: 4px !important;
        margin-bottom: 10px !important;
    }

    body.single-product
    .woocommerce-product-gallery .flex-control-thumbs {
        display: none !important;
    }

    body.single-product
    .woocommerce-product-gallery .flex-viewport {
        margin-bottom: 0 !important;
    }

    body.single-product
    .woocommerce-product-gallery__image img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: 330px !important;
        object-fit: contain !important;
        margin: 0 auto !important;
    }

    body.single-product div.product div.images {
        margin-bottom: 10px !important;
    }

    /* Frecce slideshow. */
    body.single-product .md-gallery-arrow {
        position: absolute !important;
        top: 50% !important;
        z-index: 20 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 40px !important;
        height: 40px !important;

        padding: 0 !important;
        margin: 0 !important;

        border: 0 !important;
        border-radius: 50% !important;

        background: rgba(255,255,255,.92) !important;
        color: #171717 !important;

        box-shadow: 0 2px 10px rgba(0,0,0,.14) !important;

        font-family: Arial, sans-serif !important;
        font-size: 30px !important;
        font-weight: 400 !important;
        line-height: 1 !important;

        transform: translateY(-50%) !important;
        cursor: pointer !important;
    }

    body.single-product .md-gallery-prev {
        left: 10px !important;
    }

    body.single-product .md-gallery-next {
        right: 10px !important;
    }

    /* Come nel B2C: niente pallini sotto la fotografia. */
    body.single-product .md-gallery-dots {
        display: none !important;
    }
}

/* ==========================================================
   MODIANUS B2B PRODUCT SUMMARY UX v1

   Scheda prodotto professionale più compatta su smartphone.
   Solo presentazione: listini e azioni B2B invariati.
   ========================================================== */

@media (max-width: 767px) {

    /* Spazio sotto la gallery. */

    body.single-product div.product div.images {
        margin-bottom: 9px !important;
    }

    body.single-product div.product div.summary {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Riquadro informativo. */

    body.single-product
    .woocommerce-product-details__short-description {
        margin-top: 0 !important;
        margin-bottom: 9px !important;
    }

    body.single-product
    .woocommerce-product-details__short-description
    .md-short-box {
        padding: 12px 14px !important;
        margin: 0 0 9px !important;

        font-size: 14px !important;
        line-height: 1.45 !important;
    }

    /*
     * Il titolo è già visibile sopra la gallery.
     * Nascondiamo solo il duplicato nel box inferiore.
     */

    body.single-product
    .woocommerce-product-details__short-description
    .md-short-title {
        display: none !important;
    }

    body.single-product
    .woocommerce-product-details__short-description
    .md-short-top {
        margin: 0 0 7px !important;
    }

    /* Formati e informazioni sintetiche. */

    body.single-product
    .woocommerce-product-details__short-description
    .md-short-info {
        display: flex !important;
        flex-wrap: wrap !important;

        align-items: center !important;
        justify-content: flex-start !important;

        width: 100% !important;
        min-width: 0 !important;

        gap: 6px !important;
        margin: 0 !important;
    }

    body.single-product
    .woocommerce-product-details__short-description
    .md-short-pill {
        width: auto !important;
        max-width: 100% !important;

        padding: 6px 10px !important;

        font-size: 13px !important;
        line-height: 1.3 !important;

        white-space: normal !important;
        text-align: left !important;
    }

    body.single-product
    .woocommerce-product-details__short-description
    .md-short-pill strong {
        font-size: 13px !important;
    }

    /* Testo introduttivo e caratteristiche. */

    body.single-product
    .woocommerce-product-details__short-description
    .md-short-box p {
        font-size: 14px !important;
        line-height: 1.45 !important;

        margin-bottom: 7px !important;
    }

    body.single-product
    .woocommerce-product-details__short-description
    .md-short-list {
        grid-template-columns: 1fr !important;

        gap: 3px !important;
        margin-top: 7px !important;

        font-size: 13.5px !important;
        line-height: 1.4 !important;
    }

    /* Listino generato dal plugin B2B: valori intatti. */

    body.single-product .mdb2b-approved-price {
        margin-top: 8px !important;
        margin-bottom: 10px !important;
    }

    /* CTA commerciale più evidente e comoda da toccare. */

    body.single-product
    .mdb2b-single-cta {
        margin-top: 8px !important;
        padding: 12px !important;
    }

    body.single-product
    .mdb2b-single-cta .button {
        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: 100% !important;
        min-height: 44px !important;

        padding: 11px 15px !important;

        box-sizing: border-box !important;
        text-align: center !important;
    }

}

/* ==========================================================
   MODIANUS B2B TERMS MOBILE TABLE CARDS v1
   Solo pagina termini B2B, solo visualizzazione mobile.
   Nessuna modifica ai contenuti contrattuali.
   ========================================================== */

@media (max-width: 767px) {

    .md-b2b-terms {
        max-width: 100%;
        min-width: 0;
    }

    .md-b2b-terms > div:has(> table) {
        max-width: 100% !important;
        overflow-x: visible !important;
    }

    .md-b2b-terms table,
    .md-b2b-terms tbody,
    .md-b2b-terms tr,
    .md-b2b-terms td {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .md-b2b-terms table {
        border: 0 !important;
        border-collapse: separate !important;
        margin: 12px 0 22px;
    }

    .md-b2b-terms table thead {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
    }

    .md-b2b-terms table tbody tr {
        margin: 0 0 12px !important;
        padding: 4px 0 !important;
        border: 1px solid #dedede !important;
        border-left: 3px solid #c7ad43 !important;
        border-radius: 10px;
        background: #fff;
        overflow: hidden;
    }

    .md-b2b-terms table td {
        padding: 9px 12px !important;
        border: 0 !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        text-align: left !important;
    }

    .md-b2b-terms table td + td {
        border-top: 1px solid #eeeeee !important;
    }

    .md-b2b-terms table td::before {
        display: block;
        margin-bottom: 3px;
        font-size: 11px;
        line-height: 1.35;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .035em;
        color: #666;
    }

    /* Prima tabella: pagamenti */

    .md-b2b-terms > div:nth-of-type(1)
    td:nth-child(1)::before {
        content: "Modalità";
    }

    .md-b2b-terms > div:nth-of-type(1)
    td:nth-child(2)::before {
        content: "Condizioni principali";
    }

    .md-b2b-terms > div:nth-of-type(1)
    td:nth-child(3)::before {
        content: "Commissioni / Note";
    }

    /* Seconda tabella: spedizione e resa */

    .md-b2b-terms > div:nth-of-type(2)
    td:nth-child(1)::before {
        content: "Opzione";
    }

    .md-b2b-terms > div:nth-of-type(2)
    td:nth-child(2)::before {
        content: "Costi";
    }

    .md-b2b-terms > div:nth-of-type(2)
    td:nth-child(3)::before {
        content: "Limiti / Note";
    }
}


/* ==========================================================
   MODIANUS B2B TERMS BASIL MOBILE CENTER v1
   Centra la fogliolina nella pagina Termini B2B su mobile.
   ========================================================== */

@media (max-width: 767px) {

    body.page-id-54243
    .elementor-54243
    .elementor-element.elementor-element-c815ce8
    > .elementor-widget-container {
        padding: 0 !important;
    }

}

