/**
 * Scheda prodotto — caricato dopo HOOK_HEADER (Leo/Elementor/moduli).
 * Selettori forti: body#product + #main.product-detail dove serve.
 */

body#product,
body#product.page-product {
  --mco-brand: #b70725;
  --mco-brand-dark: #9a0620;
  --mco-text: #1c1b19;
  --mco-muted: #6b6966;
  --mco-border: #dddbd6;
}

/* Breadcrumb: compatta, allineata a sinistra; “centrata” solo sull’asse Y (spazio tra header e contenuto) */
body#product #wrapper .breadcrumb,
body#product #wrapper .breadcrumb-bg .breadcrumb {
  text-align: left !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  margin-bottom: 0 !important;
}

body#product #wrapper .breadcrumb ol {
  padding: 0 10px 0 0 !important;
  margin: 0 !important;
  margin-left: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 0 !important;
  max-width: 100%;
  box-sizing: border-box;
}

body#product #wrapper .breadcrumb li,
body#product #wrapper .breadcrumb li a {
  font-size: 10px !important;
  line-height: 1.35 !important;
}

body#product #wrapper > .container > .breadcrumb:first-child,
body#product #wrapper .breadcrumb[data-depth] {
  margin-top: 0 !important;
}

body#product .breadcrumb-bg {
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  margin-bottom: 10px !important;
  margin-top: 0 !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

body#product .breadcrumb-bg .breadcrumb {
  margin-left: 0 !important;
  margin-right: 0 !important;
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* Breadcrumb senza wrapper .breadcrumb-bg: stessa centratura verticale nella fascia */
body#product #wrapper > .container > nav.breadcrumb:first-of-type,
body#product #wrapper .container > nav.breadcrumb {
  display: flex !important;
  align-items: center !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body#product #wrapper > .container {
  padding-top: 12px !important;
}

/* Più aria tra breadcrumb e riga prodotto (tabs / colonne) */
body#product #wrapper .container > .row {
  margin-top: 10px !important;
}

/* Breadcrumb: solo desktop (su mobile nascosto) */
@media (max-width: 991px) {
  body#product #wrapper .breadcrumb-bg,
  body#product #wrapper nav.breadcrumb.hidden-sm-down,
  body#product #wrapper .breadcrumb.hidden-sm-down,
  body#product.page-product #wrapper .breadcrumb-bg,
  body#product.page-product #wrapper nav.breadcrumb.hidden-sm-down,
  body#product.page-product #wrapper .breadcrumb.hidden-sm-down {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* Desktop: fascia breadcrumb più centrata tra header e contenuto; prezzo avvicinato al titolo */
@media (min-width: 992px) {
  body#product #wrapper > .container {
    padding-top: 10px !important;
  }

  body#product .breadcrumb-bg {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    margin-bottom: 8px !important;
  }

  body#product #wrapper .container > .row {
    margin-top: 8px !important;
  }

  body#product section#main h1.h1,
  body#product #main h1.h1 {
    margin-bottom: 0.2rem !important;
  }

  body#product .product-prices {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body#product .mabri-pi--after-price {
    margin-top: 4px !important;
  }

  body#product .product-information {
    margin-top: 2px !important;
  }
}

/* Riga tasse/spedizione sotto prezzo: nascosta (etichetta tasse rimossa dal tpl) */
body#product .product-prices .tax-shipping-delivery-label {
  display: none !important;
}

/* Compattezza verticale generale */
body#product .product-prices {
  margin-bottom: 0 !important;
}

body#product .product-prices .product-discount {
  margin-bottom: 2px !important;
}

body#product .product-prices .product-price {
  margin-bottom: 0 !important;
}

@media (max-width: 991px) {
  body#product .product-information {
    margin-top: 6px !important;
  }
}

body#product .js-product-add-to-cart .control-label,
body#product .product-add-to-cart .control-label {
  margin-bottom: 4px !important;
}

/* Disponibilità nativa PS (incluso "Ultimi articoli in magazzino"): nascosta; messaggi sotto allo stepper qty. */
body#product #product-availability.mabri-product-availability--native-off,
body#product.page-product #product-availability.mabri-product-availability--native-off,
.modal.quickview #product-availability.mabri-product-availability--native-off {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

/* Il core sostituisce #product-availability con un .alert in errore: mostra solo quello */
body#product .product-add-to-cart .alert.ajax-error,
.modal.quickview .product-add-to-cart .alert.ajax-error {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  margin-top: 8px !important;
}

body#product .js-mabri-qty-stock-msg,
body#product.page-product .js-mabri-qty-stock-msg,
.modal.quickview .js-mabri-qty-stock-msg {
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mco-brand, #b70725);
  background: rgba(183, 7, 37, 0.08);
  border: 1px solid rgba(183, 7, 37, 0.35);
  border-radius: 8px;
}

body#product .js-mabri-qty-stock-msg[hidden],
body#product.page-product .js-mabri-qty-stock-msg[hidden],
.modal.quickview .js-mabri-qty-stock-msg[hidden] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* In flusso (vedi tpl: riga flex + messaggio sotto): spinge il contenuto sotto, niente sovrapposizione */
body#product .js-mabri-qty-stock-msg.mabri-qty-stock-msg--visible,
body#product.page-product .js-mabri-qty-stock-msg.mabri-qty-stock-msg--visible,
.modal.quickview .js-mabri-qty-stock-msg.mabri-qty-stock-msg--visible {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  width: 100%;
  max-width: 100%;
  flex: 0 0 auto;
}

body#product .product-additional-info,
body#product.page-product .product-additional-info {
  margin-top: 2px !important;
}

body#product .product-additional-info .mabri-pi--payments,
body#product.page-product .product-additional-info .mabri-pi--payments {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body#product .product-additional-info .mabri-pi-payments-title,
body#product.page-product .product-additional-info .mabri-pi-payments-title {
  margin-top: 0 !important;
  margin-bottom: 4px !important;
}

/* Acquista subito + CTA */
body#product .mabri-product-add-actions {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  gap: 8px !important;
  vertical-align: middle !important;
}

body#product .mco-btn.mco-btn--secondary {
  min-height: 46px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  line-height: 1.2 !important;
  border: 2px solid var(--mco-brand) !important;
  background: #fff !important;
  color: var(--mco-brand) !important;
  font-weight: 800 !important;
  text-transform: none !important;
  box-shadow: none !important;
}

body#product .mco-btn.mco-btn--secondary:hover:not(:disabled) {
  background: rgba(183, 7, 37, 0.06) !important;
  color: var(--mco-brand-dark) !important;
  border-color: var(--mco-brand-dark) !important;
}

body#product .mco-btn.mco-btn--secondary:disabled {
  opacity: 0.45 !important;
}

/* Prezzo principale più evidente — escludi wrapper hook custom (class in product-prices.tpl) */
body#product .product-prices .product-price .current-price .current-price-value:not(.current-price-value--has-custom-hook),
body#product .product-prices .current-price-value:not(.current-price-value--has-custom-hook),
body#product #main .product-prices .current-price .current-price-value:not(.current-price-value--has-custom-hook),
body.page-product .product-prices .product-price .current-price .current-price-value:not(.current-price-value--has-custom-hook),
body.page-product .product-prices .current-price-value:not(.current-price-value--has-custom-hook),
body.page-product #main .product-prices .current-price .current-price-value:not(.current-price-value--has-custom-hook) {
  font-size: clamp(1.75rem, 4.2vw, 2.35rem) !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
}

body#product .product-prices .product-price.has-discount .current-price .current-price-value:not(.current-price-value--has-custom-hook),
body.page-product .product-prices .product-price.has-discount .current-price .current-price-value:not(.current-price-value--has-custom-hook) {
  font-size: clamp(1.65rem, 3.8vw, 2.15rem) !important;
}

/* Wrapper prezzo da hook: niente clamp / 30px ereditato sul blocco MQ */
body#product .product-prices .current-price > .current-price-value--has-custom-hook,
body.page-product .product-prices .current-price > .current-price-value--has-custom-hook,
body#product #main .product-prices .current-price > .current-price-value--has-custom-hook {
  font-size: unset !important;
  font-weight: unset !important;
  line-height: unset !important;
}

/* Scheda prodotto — riga tier (anche se .product-prices non avvolge il blocco) */
body#product .mabri-ceramics-price-info--product-sheet .mabri-price-mq-line2,
body.page-product .mabri-ceramics-price-info--product-sheet .mabri-price-mq-line2,
body#product .product-prices .mabri-price-mq-line2,
body.page-product .product-prices .mabri-price-mq-line2 {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile: prezzo principale più grande (sopra resta il clamp desktop) */
@media (max-width: 991px) {
  body#product .product-prices .product-price .current-price .current-price-value:not(.current-price-value--has-custom-hook),
  body#product .product-prices .current-price-value:not(.current-price-value--has-custom-hook),
  body#product #main .product-prices .current-price .current-price-value:not(.current-price-value--has-custom-hook),
  body#product.page-product .product-prices .product-price .current-price .current-price-value:not(.current-price-value--has-custom-hook),
  body#product.page-product .product-prices .current-price-value:not(.current-price-value--has-custom-hook),
  body#product.page-product #main .product-prices .current-price .current-price-value:not(.current-price-value--has-custom-hook),
  body.page-product .product-prices .product-price .current-price .current-price-value:not(.current-price-value--has-custom-hook),
  body.page-product .product-prices .current-price-value:not(.current-price-value--has-custom-hook),
  body.page-product #main .product-prices .current-price .current-price-value:not(.current-price-value--has-custom-hook) {
    font-size: clamp(2.4rem, 8.5vw, 3.25rem) !important;
  }

  body#product .product-prices .product-price.has-discount .current-price .current-price-value:not(.current-price-value--has-custom-hook),
  body#product.page-product .product-prices .product-price.has-discount .current-price .current-price-value:not(.current-price-value--has-custom-hook),
  body.page-product .product-prices .product-price.has-discount .current-price .current-price-value:not(.current-price-value--has-custom-hook) {
    font-size: clamp(2.25rem, 7.75vw, 2.95rem) !important;
  }
}

body#product section#main h1.h1.product-detail-name,
body#product section#main.product-detail h1.h1.product-detail-name,
body#product section#main h1.product-detail-name,
body#product section#main.product-detail h1.product-detail-name,
body#product h1.h1.product-detail-name,
body#product h1.product-detail-name,
body#product.page-product h1.h1.product-detail-name,
body#product.page-product h1.product-detail-name {
  font-size: clamp(1.65rem, 2.4vw + 0.85rem, 2.85rem) !important;
  line-height: 1.2 !important;
  margin-bottom: 0.35rem !important;
  margin-top: 0 !important;
  font-weight: 700 !important;
  max-width: 100% !important;
  width: 100%;
  box-sizing: border-box;
  /* Parole intere a capo (no trattino/sillabazione) */
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  -moz-hyphens: none !important;
}

/* Titolo a tutta larghezza colonna info (margine destro allineato al layout) */
@media (min-width: 992px) {
  body#product #main .product-container > .row > .col-md-6:last-child > h1.h1,
  body#product #main .product-container > .row > .col-md-6:last-child > h1.product-detail-name,
  body#product.page-product #main .product-container > .row > .col-md-6:last-child > h1.h1,
  body#product.page-product #main .product-container > .row > .col-md-6:last-child > h1.product-detail-name {
    padding-right: 0 !important;
    margin-right: 0 !important;
  }
}

/* Colonna: riga .mabri-product-quantity-row (stepper + CTA) + messaggio giacenza a tutta larghezza */
body#product .product-actions .product-quantity,
body#product.page-product .product-actions .product-quantity,
body#product .product-quantity,
body#product.page-product .product-quantity,
.modal.quickview .product-quantity {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  text-align: left;
  border-bottom: none !important;
  margin-bottom: 0;
}

body#product .mabri-product-quantity-row,
body#product.page-product .mabri-product-quantity-row,
.modal.quickview .mabri-product-quantity-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  width: 100%;
  min-width: 0;
}

/* Desktop: colonna info allineata al margine destro del container; CTA a tutta larghezza */
@media (min-width: 992px) {
  body#product #main .product-container > .row > .col-md-6:last-child {
    padding-right: 0 !important;
    padding-left: 22px !important;
  }

  body#product #main .product-container > .row > .col-md-6:last-child .product-information,
  body#product #main .product-container > .row > .col-md-6:last-child .product-actions,
  body#product #main .product-container > .row > .col-md-6:last-child .js-product-add-to-cart {
    max-width: 100%;
  }

  /* Una sola riga: quantità | Aggiungi al carrello | Acquista subito (stessa larghezza utile) */
  body#product #main .mabri-product-quantity-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  body#product #main .mabri-product-quantity-row > .qty {
    flex: 0 0 auto;
    align-self: center;
  }

  body#product #main .mabri-product-add-actions {
    flex: 1 1 0;
    min-width: 0;
    display: flex !important;
    width: auto !important;
    max-width: none !important;
  }

  body#product #main .mabri-product-add-actions .add-to-cart,
  body#product #main .mabri-product-add-actions button[data-button-action='add-to-cart'] {
    width: 100% !important;
    flex: 1 1 auto;
    box-sizing: border-box;
  }

  body#product #main .mabri-product-quantity-row > .js-mabri-buy-now {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box;
    min-height: 46px;
  }

  body#product #main .mabri-product-quantity-row > *:not(.qty):not(.add):not(.js-mabri-buy-now) {
    flex: 1 1 100%;
    width: 100%;
  }
}

/*
 * Mobile: «Acquista subito» è sibling di .add (tpl), niente display:contents (rompeva lo stepper).
 * Riga 1: quantità | Acquista subito — Riga 2: Aggiungi al carrello a tutta larghezza.
 */
@media (max-width: 991px) {
  body#product .mabri-product-quantity-row,
  body#product.page-product .mabri-product-quantity-row {
    display: grid;
    grid-template-columns: min-content 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 10px;
  }

  body#product .mabri-product-quantity-row > .qty,
  body#product.page-product .mabri-product-quantity-row > .qty {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    min-width: min-content !important;
    width: max-content;
    max-width: 100%;
  }

  body#product .mabri-product-quantity-row > .add.mabri-product-add-actions,
  body#product.page-product .mabri-product-quantity-row > .add.mabri-product-add-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex !important;
    flex-direction: row;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  body#product .mabri-product-quantity-row > .add .add-to-cart,
  body#product .mabri-product-quantity-row > .add button[data-button-action='add-to-cart'],
  body#product.page-product .mabri-product-quantity-row > .add .add-to-cart,
  body#product.page-product .mabri-product-quantity-row > .add button[data-button-action='add-to-cart'] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto;
    box-sizing: border-box;
  }

  body#product .mabri-product-quantity-row > .js-mabri-buy-now,
  body#product.page-product .mabri-product-quantity-row > .js-mabri-buy-now {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    white-space: normal;
    text-align: center;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body#product .mabri-product-quantity-row > *:not(.qty):not(.add):not(.js-mabri-buy-now),
  body#product.page-product .mabri-product-quantity-row > *:not(.qty):not(.add):not(.js-mabri-buy-now) {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

body#product .product-quantity .qty,
body#product .product-actions .product-quantity .qty,
body#product.page-product .product-quantity .qty,
body#product.page-product .product-actions .product-quantity .qty {
  margin-bottom: 0 !important;
  margin-right: 0;
  width: auto !important;
  max-width: 100%;
  float: none !important;
  display: inline-block !important;
  vertical-align: middle;
}

body#product .product-quantity .add,
body#product .product-quantity .wishlist,
body#product .product-quantity .compare,
body#product.page-product .product-quantity .add,
body#product.page-product .product-quantity .wishlist,
body#product.page-product .product-quantity .compare {
  margin-bottom: 0 !important;
}

body#product .product-actions .product-quantity .add,
body#product.page-product .product-actions .product-quantity .add {
  border-radius: 0;
  background: transparent !important;
}

/* TouchSpin del core: non far “flottare” frecce verticali fuori dallo stepper */
body#product .js-mabri-product-qty-stepper .bootstrap-touchspin,
body#product.page-product .js-mabri-product-qty-stepper .bootstrap-touchspin {
  display: contents !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  float: none !important;
}

body#product .product-quantity .bootstrap-touchspin .input-group-btn-vertical,
body#product.page-product .product-quantity .bootstrap-touchspin .input-group-btn-vertical {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

body#product .js-mabri-product-qty-stepper.mco-cart-line__qty,
body#product .mco-cart-line__qty.js-mabri-product-qty-stepper,
body#product.page-product .js-mabri-product-qty-stepper.mco-cart-line__qty,
body#product.page-product .mco-cart-line__qty.js-mabri-product-qty-stepper {
  position: relative;
  z-index: 2;
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--mco-border) !important;
  border-radius: 8px !important;
  overflow: hidden;
  background: #fff !important;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(28, 27, 25, 0.06) !important;
}

body#product .mco-cart-line__qty-btn,
body#product.page-product .mco-cart-line__qty-btn {
  flex: 0 0 44px !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 46px !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: #f4f3f0 !important;
  color: var(--mco-text) !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  font: inherit !important;
  line-height: 1 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  transition: background 0.15s ease, color 0.15s ease;
}

body#product .mco-cart-line__qty-btn:hover:not(:disabled),
body#product.page-product .mco-cart-line__qty-btn:hover:not(:disabled) {
  background: rgba(183, 7, 37, 0.08) !important;
  color: var(--mco-brand) !important;
}

body#product .mco-cart-line__qty-btn:disabled,
body#product.page-product .mco-cart-line__qty-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

/* Niente cornice “browser” al click; solo focus tastiera leggero */
body#product .mco-cart-line__qty-btn:focus,
body#product.page-product .mco-cart-line__qty-btn:focus {
  outline: none !important;
  box-shadow: none !important;
}

body#product .mco-cart-line__qty-btn:focus-visible,
body#product.page-product .mco-cart-line__qty-btn:focus-visible {
  outline: 2px solid rgba(183, 7, 37, 0.45) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
  z-index: 3;
}

body#product .mco-cart-line__qty-btn::-moz-focus-inner,
body#product.page-product .mco-cart-line__qty-btn::-moz-focus-inner {
  border: 0 !important;
}

/* Segni − / + sempre leggibili (fallback se lo stroke SVG è poco visibile) */
body#product .mco-cart-line__qty-glyph,
body#product.page-product .mco-cart-line__qty-glyph {
  display: inline-block !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  color: inherit !important;
  pointer-events: none;
}

body#product .mco-cart-line__qty-btn svg,
body#product.page-product .mco-cart-line__qty-btn svg {
  display: none !important;
}

body#product .js-mabri-product-qty-stepper .input-group-btn-vertical,
body#product.page-product .js-mabri-product-qty-stepper .input-group-btn-vertical {
  display: none !important;
}

body#product .mco-cart-line__qty-input#quantity_wanted,
body#product #quantity_wanted.mco-cart-line__qty-input,
body#product.page-product .mco-cart-line__qty-input#quantity_wanted,
body#product.page-product #quantity_wanted.mco-cart-line__qty-input {
  width: 56px !important;
  min-width: 52px !important;
  max-width: 80px !important;
  height: 46px !important;
  box-sizing: border-box !important;
  border: none !important;
  border-left: 1px solid var(--mco-border) !important;
  border-right: 1px solid var(--mco-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  padding: 0 4px !important;
  margin: 0 !important;
  text-align: center !important;
  font-weight: 800 !important;
  color: var(--mco-text) !important;
  -moz-appearance: textfield !important;
}

body#product #quantity_wanted.mco-cart-line__qty-input::-webkit-outer-spin-button,
body#product #quantity_wanted.mco-cart-line__qty-input::-webkit-inner-spin-button,
body#product.page-product #quantity_wanted.mco-cart-line__qty-input::-webkit-outer-spin-button,
body#product.page-product #quantity_wanted.mco-cart-line__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

body#product .product-additional-info .mabri-pi--payments:first-child,
body#product.page-product .product-additional-info .mabri-pi--payments:first-child {
  margin-top: 0;
}

body#product .product-actions button.btn.btn-primary.add-to-cart.mco-btn.mco-btn--primary,
body#product .add-to-cart.mco-btn.mco-btn--primary,
body#product.page-product .add-to-cart.mco-btn.mco-btn--primary {
  min-height: 46px !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
  line-height: 1.2 !important;
  border: none !important;
  background: var(--mco-brand) !important;
  color: #fff !important;
  font-weight: 800 !important;
  text-transform: none !important;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(28, 27, 25, 0.1) !important;
}

body#product .product-actions .add .btn.add-to-cart.mco-btn--primary,
body#product.page-product .product-actions .add .btn.add-to-cart.mco-btn--primary {
  text-transform: none !important;
}

body#product .product-actions button.btn.btn-primary.add-to-cart.mco-btn.mco-btn--primary:hover,
body#product .add-to-cart.mco-btn.mco-btn--primary:hover,
body#product.page-product .add-to-cart.mco-btn.mco-btn--primary:hover {
  background: var(--mco-brand-dark) !important;
  color: #fff !important;
}

body#product .add-to-cart.mco-btn.mco-btn--primary .material-icons,
body#product.page-product .add-to-cart.mco-btn.mco-btn--primary .material-icons {
  display: none !important;
}

@media (max-width: 991px) {
  body#product .mco-cart-line__qty-btn,
  body#product.page-product .mco-cart-line__qty-btn {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
  }

  body#product .mco-cart-line__qty-input#quantity_wanted,
  body#product #quantity_wanted.mco-cart-line__qty-input,
  body#product.page-product .mco-cart-line__qty-input#quantity_wanted,
  body#product.page-product #quantity_wanted.mco-cart-line__qty-input {
    width: 58px !important;
    height: 48px !important;
    min-height: 48px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 479px) {
  body#product .product-actions .product-quantity .qty,
  body#product.page-product .product-actions .product-quantity .qty {
    margin-bottom: 0 !important;
  }
}

/*
 * Ceramiche (mabri_ceramics_shipping): questo foglio è caricato DOPO HOOK_HEADER (head.tpl),
 * quindi deve contenere il nascondimento dello stepper — ceramics.css del modulo viene prima e non vince sui !important del tema.
 * :has(#mabri-ceramics-selector) = solo pagine dove il calcolatore MQ/Scatole è presente nel DOM.
 */
body#product.page-product:has(#mabri-ceramics-selector) .js-product-add-to-cart > span.control-label,
body#product:has(#mabri-ceramics-selector) .js-product-add-to-cart > span.control-label {
  display: none !important;
}

body#product.page-product:has(#mabri-ceramics-selector) .product-actions .product-quantity .qty,
body#product.page-product:has(#mabri-ceramics-selector) .mabri-product-quantity-row > .qty,
body#product:has(#mabri-ceramics-selector) .product-actions .product-quantity .qty,
body#product:has(#mabri-ceramics-selector) .mabri-product-quantity-row > .qty {
  display: none !important;
}

@media (max-width: 991px) {
  body#product.page-product:has(#mabri-ceramics-selector) .mabri-product-quantity-row,
  body#product:has(#mabri-ceramics-selector) .mabri-product-quantity-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    grid-template-columns: unset !important;
    grid-template-rows: unset !important;
  }

  body#product.page-product:has(#mabri-ceramics-selector) .mabri-product-quantity-row > .add.mabri-product-add-actions,
  body#product.page-product:has(#mabri-ceramics-selector) .mabri-product-quantity-row > .js-mabri-buy-now,
  body#product:has(#mabri-ceramics-selector) .mabri-product-quantity-row > .add.mabri-product-add-actions,
  body#product:has(#mabri-ceramics-selector) .mabri-product-quantity-row > .js-mabri-buy-now {
    grid-column: unset !important;
    grid-row: unset !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
  }
}

/* Titolo prodotto: ulteriore blocco in coda al foglio (massima priorità nel cascade del file).
   Copre anche body senza id #product, quickview e sillabazione da CSS esterni / Leo. */
body.page-product #wrapper #main h1.h1,
body.page-product #wrapper section#main h1.h1,
body.page-product #wrapper #main h1.h1.product-detail-name,
body.page-product #wrapper section#main h1.h1.product-detail-name,
body.page-product section#main.product-detail h1.h1.product-detail-name,
body#product #wrapper #main h1.h1,
body#product #wrapper section#main h1.h1,
body#product #wrapper #main h1.h1.product-detail-name,
body#product #wrapper section#main h1.h1.product-detail-name,
.modal.quickview .modal-body h1.h1,
.modal.quickview h1.h1 {
  overflow-wrap: normal !important;
  word-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  -moz-hyphens: none !important;
}
