/* =========================================================================
 * SBFIT — Negozio: shop, categorie prodotto, carrello e avvisi WooCommerce
 * Stessa grafica della pagina di pagamento (css/checkout.css).
 * Solo presentazione: nessuna modifica alla logica di WooCommerce.
 * ========================================================================= */

body.sbfit-notices {
  --sbc-pink:        #F48CA2;
  --sbc-pink-strong: #D6607A;
  --sbc-pink-soft:   #FFF1F4;
  --sbc-ink:         #1B1D2E;
  --sbc-muted:       #6E7280;
  --sbc-line:        #E6E6EC;
  --sbc-bg:          #F7F6F8;
  --sbc-radius:      16px;
}

/* ---------------------------------------------------------------- Override di sbfit-core
 * Il plugin (sbfit-core/assets/css/checkout.css) forza con !important rosa chiaro,
 * maiuscolo e 13px su bottoni, titoli, prezzi e badge. Qui, solo sulle pagine
 * negozio, rimettiamo la grafica del checkout (servono !important anche a noi). */

body.sbfit-shop .amount bdi { color: inherit !important; }
body.sbfit-shop ul.products li.product .woocommerce-loop-product__title { color: var(--sbc-ink) !important; }
body.sbfit-shop ul.products li.product .price { color: var(--sbc-ink) !important; }
body.sbfit-shop ul.products li.product .price ins,
body.sbfit-shop ul.products li.product .price ins .amount bdi { color: var(--sbc-pink-strong) !important; }
body.sbfit-shop ul.products li.product .price del,
body.sbfit-shop ul.products li.product .price del .amount bdi { color: var(--sbc-muted) !important; }
body.sbfit-shop ul.products li.product .onsale { background-color: var(--sbc-pink-strong) !important; }

body.sbfit-shop ul.products li.product .button,
body.sbfit-shop a.button.alt,
body.sbfit-shop .wc-proceed-to-checkout a.checkout-button {
  font-family: inherit; font-size: 14px !important; font-weight: 700;
  text-transform: none; line-height: 1.2;
  background-color: var(--sbc-pink-strong) !important;
  border: 0 !important; border-color: transparent !important; border-radius: 999px;
  color: #fff !important;
}
body.sbfit-shop ul.products li.product .button:hover,
body.sbfit-shop a.button.alt:hover,
body.sbfit-shop .wc-proceed-to-checkout a.checkout-button:hover {
  background-color: #C24E68 !important; color: #fff !important;
}
body.sbfit-shop .wc-proceed-to-checkout a.checkout-button { font-size: 15.5px !important; }

/* ---------------------------------------------------------------- Bottoni condivisi */

body.sbfit-shop a.button,
body.sbfit-shop button.button,
body.sbfit-shop input.button,
body.sbfit-shop a.button.add_to_cart_button,
body.sbfit-shop a.button.product_type_simple,
body.sbfit-shop a.button.product_type_variable {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--sbc-pink-strong); color: #fff;
  border: 0; border-radius: 999px;
  padding: 11px 18px; min-height: 42px; box-sizing: border-box;
  font-size: 14px; font-weight: 700; line-height: 1.2;
  text-transform: none; letter-spacing: .01em; text-decoration: none;
  box-shadow: none; cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .1s ease, opacity .15s ease;
}
body.sbfit-shop a.button:hover,
body.sbfit-shop button.button:hover,
body.sbfit-shop input.button:hover,
body.sbfit-shop a.button.add_to_cart_button:hover { background: #C24E68; color: #fff; }
body.sbfit-shop a.button:active,
body.sbfit-shop button.button:active { transform: translateY(1px); }
body.sbfit-shop a.button:focus-visible,
body.sbfit-shop button.button:focus-visible,
body.sbfit-shop input.button:focus-visible {
  outline: 2px solid var(--sbc-pink-strong); outline-offset: 2px;
}

/* Bottone secondario (bordo rosa) */
body.sbfit-shop button.button[name="update_cart"],
body.sbfit-shop button.button[name="apply_coupon"],
body.sbfit-shop #pwgc-redeem-button {
  background: #fff; color: var(--sbc-pink-strong);
  border: 1.5px solid var(--sbc-pink);
}
body.sbfit-shop button.button[name="update_cart"]:hover,
body.sbfit-shop button.button[name="apply_coupon"]:hover,
body.sbfit-shop #pwgc-redeem-button:hover { background: var(--sbc-pink-soft); color: var(--sbc-pink-strong); }
body.sbfit-shop button.button:disabled,
body.sbfit-shop button.button:disabled[disabled] { opacity: .45; cursor: default; pointer-events: none; }

/* Stato "sto aggiungendo" / "aggiunto" del bottone AJAX */
body.sbfit-shop a.button.loading { opacity: .6; }
body.sbfit-shop a.button.loading::after { display: none; }
body.sbfit-shop a.button.added::after {
  content: "✓"; font-family: inherit; margin: 0; position: static; font-weight: 700;
}

/* Campi condivisi (coupon, buono regalo, ordinamento) */
body.sbfit-shop input.input-text,
body.sbfit-shop #pwgc-redeem-gift-card-number,
body.sbfit-shop select.orderby {
  box-sizing: border-box; min-height: 42px;
  padding: 10px 14px; font-size: 14.5px; color: var(--sbc-ink); line-height: 1.3;
  background-color: #fff;
  border: 1.5px solid var(--sbc-line); border-radius: 10px;
  box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease;
}
body.sbfit-shop input.input-text:focus,
body.sbfit-shop #pwgc-redeem-gift-card-number:focus,
body.sbfit-shop select.orderby:focus {
  border-color: var(--sbc-pink); outline: 0; box-shadow: 0 0 0 3px rgba(244, 140, 162, .18);
}
body.sbfit-shop input::placeholder { color: #A9ACB8; }

/* ---------------------------------------------------------------- Avvisi ("aggiunto al carrello" ecc.) */

body.sbfit-notices .woocommerce-message,
body.sbfit-notices .woocommerce-info,
body.sbfit-notices .woocommerce-error {
  display: flex; flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  position: relative;
  background: var(--sbc-pink-soft) !important;
  border: 1px solid rgba(244, 140, 162, .45) !important;
  border-left: 3px solid var(--sbc-pink) !important;
  border-radius: 12px;
  color: var(--sbc-ink); font-size: 14px; line-height: 1.5;
  padding: 12px 14px 12px 44px; margin: 0 0 16px;
  list-style: none;
}
body.sbfit-notices .woocommerce-message::before,
body.sbfit-notices .woocommerce-info::before,
body.sbfit-notices .woocommerce-error::before {
  color: var(--sbc-pink-strong); position: absolute; top: 50%; left: 16px; transform: translateY(-50%);
}
body.sbfit-notices .woocommerce-error { background: #FFF3F3 !important; border-left-color: #E05B5B !important; }
body.sbfit-notices .woocommerce-error::before { color: #E05B5B; }
body.sbfit-notices .woocommerce-message,
body.sbfit-notices .woocommerce-info,
body.sbfit-notices .woocommerce-error { text-align: left; }
/* errori: ul > li, ogni riga a tutta larghezza con il bottone a destra */
body.sbfit-notices .woocommerce-error li {
  flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0;
}
/* WooCommerce sposta il focus sull'avviso via script (tabindex=-1): niente contorno blu */
body.sbfit-notices .woocommerce-message:focus,
body.sbfit-notices .woocommerce-info:focus,
body.sbfit-notices .woocommerce-error:focus { outline: none; }
body.sbfit-notices .woocommerce-message a:not(.button),
body.sbfit-notices .woocommerce-info a:not(.button) { color: var(--sbc-pink-strong); font-weight: 600; }

/* Il link "Visualizza carrello" va in fondo a destra, come bottone secondario */
body.sbfit-notices .woocommerce-message .button,
body.sbfit-notices .woocommerce-info .button,
body.sbfit-notices .woocommerce-error .button {
  order: 2; margin-left: auto; float: none;
  display: inline-flex; align-items: center; border-radius: 999px;
  font-weight: 600; text-transform: none; text-decoration: none; line-height: 1.3;
  background: #fff !important; color: var(--sbc-pink-strong) !important;
  border: 1.5px solid var(--sbc-pink) !important;
  padding: 7px 16px !important; min-height: 0 !important; font-size: 13px !important;
}
body.sbfit-notices .woocommerce-message .button:hover,
body.sbfit-notices .woocommerce-info .button:hover,
body.sbfit-notices .woocommerce-error .button:hover { background: var(--sbc-pink-soft) !important; }

/* ---------------------------------------------------------------- Shop e categorie: testata */

body.sbfit-archive #primary,
body.sbfit-archive .site-main {
  max-width: 1120px; margin: 0 auto; padding: 8px 16px 48px; box-sizing: border-box; width: 100%;
}
body.sbfit-archive .woocommerce-breadcrumb {
  font-size: 12.5px; color: var(--sbc-muted); margin: 8px 0 10px;
}
body.sbfit-archive .woocommerce-breadcrumb a { color: var(--sbc-muted); text-decoration: none; }
body.sbfit-archive .woocommerce-breadcrumb a:hover { color: var(--sbc-pink-strong); }
body.sbfit-archive .woocommerce-products-header { margin: 0 0 6px; }
body.sbfit-archive .woocommerce-products-header__title {
  font-size: 30px; font-weight: 700; color: var(--sbc-ink); margin: 0; line-height: 1.2;
}
body.sbfit-archive .term-description { font-size: 14.5px; color: var(--sbc-muted); margin: 6px 0 0; }
body.sbfit-archive .term-description p:last-child { margin-bottom: 0; }

body.sbfit-archive .woocommerce-result-count {
  float: left; margin: 14px 0 18px; font-size: 13px; color: var(--sbc-muted); line-height: 42px;
}
body.sbfit-archive .woocommerce-ordering { float: right; margin: 14px 0 18px; }
body.sbfit-archive .woocommerce-ordering select.orderby {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236E7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

/* ---------------------------------------------------------------- Griglia prodotti (shop, categorie, "Potresti essere interessato a") */

body.sbfit-shop ul.products {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
  clear: both; margin: 0 0 28px; padding: 0; list-style: none;
}
body.sbfit-shop ul.products::before,
body.sbfit-shop ul.products::after { display: none !important; content: none !important; }

body.sbfit-shop ul.products li.product {
  float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--sbc-line); border-radius: var(--sbc-radius);
  box-shadow: 0 1px 3px rgba(20, 20, 40, .04);
  overflow: hidden; position: relative; text-align: left;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
body.sbfit-shop ul.products li.product:hover {
  border-color: rgba(244, 140, 162, .55);
  box-shadow: 0 10px 28px rgba(20, 20, 40, .08);
  transform: translateY(-2px);
}
body.sbfit-shop ul.products li.product a.woocommerce-loop-product__link {
  display: flex; flex-direction: column; flex: 1 1 auto; text-decoration: none; color: inherit;
}
body.sbfit-shop ul.products li.product a img {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  margin: 0 !important; border-radius: 0; box-shadow: none;
}
body.sbfit-shop ul.products li.product .woocommerce-loop-product__title {
  font-size: 15.5px !important; font-weight: 700; color: var(--sbc-ink);
  line-height: 1.3; margin: 0; padding: 14px 16px 4px !important;
}
body.sbfit-shop ul.products li.product .price {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px;
  font-size: 15px !important; font-weight: 700; color: var(--sbc-ink) !important;
  margin: 0 !important; padding: 0 16px 14px;
}
body.sbfit-shop ul.products li.product .price ins { color: var(--sbc-pink-strong); text-decoration: none; font-weight: 700; }
body.sbfit-shop ul.products li.product .price del { color: var(--sbc-muted); font-size: 13px; font-weight: 500; opacity: 1; }

/* Badge offerta */
body.sbfit-shop ul.products li.product .onsale {
  position: absolute; top: 12px; left: 12px; right: auto; z-index: 2;
  margin: 0; min-width: 0; min-height: 0; padding: 5px 11px;
  background: var(--sbc-pink-strong); color: #fff;
  border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3;
  box-shadow: 0 2px 8px rgba(214, 96, 122, .3);
}

/* Bottone della card a tutta larghezza, in fondo */
body.sbfit-shop ul.products li.product .button {
  display: flex; text-align: center;
  margin: auto 16px 16px !important; width: calc(100% - 32px);
}
/* Link "Visualizza carrello" che WooCommerce aggiunge dopo l'aggiunta AJAX */
body.sbfit-shop ul.products li.product a.added_to_cart {
  display: block; text-align: center; margin: -8px 16px 14px; padding: 0;
  font-size: 13px; font-weight: 600; color: var(--sbc-pink-strong); text-decoration: none;
}
body.sbfit-shop ul.products li.product a.added_to_cart:hover { text-decoration: underline; }

/* Paginazione */
body.sbfit-archive nav.woocommerce-pagination { text-align: center; margin: 8px 0 0; }
body.sbfit-archive nav.woocommerce-pagination ul {
  display: inline-flex; gap: 6px; border: 0; margin: 0; padding: 0;
}
body.sbfit-archive nav.woocommerce-pagination ul li { border: 0; float: none; overflow: visible; }
body.sbfit-archive nav.woocommerce-pagination ul li a,
body.sbfit-archive nav.woocommerce-pagination ul li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; box-sizing: border-box;
  border: 1.5px solid var(--sbc-line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 600; color: var(--sbc-ink); text-decoration: none;
}
body.sbfit-archive nav.woocommerce-pagination ul li a:hover { border-color: var(--sbc-pink); color: var(--sbc-pink-strong); background: #fff; }
body.sbfit-archive nav.woocommerce-pagination ul li span.current {
  background: var(--sbc-pink-strong); border-color: var(--sbc-pink-strong); color: #fff;
}

body.sbfit-archive .woocommerce-info.woocommerce-no-products-found { margin-top: 16px; }

/* ---------------------------------------------------------------- Carrello */

body.woocommerce-cart.sbfit-shop .page-header { display: none; }
body.woocommerce-cart.sbfit-shop .page-content > .woocommerce {
  max-width: 1120px; margin: 0 auto; padding: 16px 16px 48px; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 0 26px; align-items: start;
}
body.woocommerce-cart.sbfit-shop .page-content > .woocommerce > * { grid-column: 1 / -1; }
body.woocommerce-cart.sbfit-shop .page-content > .woocommerce > .cart-collaterals { display: contents; }
body.woocommerce-cart.sbfit-shop .page-content > .woocommerce > .woocommerce-cart-form { grid-column: 1; grid-row: 2; margin: 0 0 26px; }
body.woocommerce-cart.sbfit-shop .page-content > .woocommerce > .cart-collaterals > .cart_totals {
  grid-column: 2; grid-row: 2 / span 2; position: sticky; top: 16px;
  float: none; width: auto; margin: 0 0 26px;
}
body.woocommerce-cart.sbfit-shop .page-content > .woocommerce > .cart-collaterals > .cross-sells {
  grid-column: 1; grid-row: 3; float: none; width: auto; margin: 0;
}

/* Card */
body.woocommerce-cart.sbfit-shop .woocommerce-cart-form,
body.woocommerce-cart.sbfit-shop .cart_totals {
  background: #fff;
  border: 1px solid var(--sbc-line); border-radius: var(--sbc-radius);
  padding: 20px 24px; box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(20, 20, 40, .04);
}
body.woocommerce-cart.sbfit-shop .cart_totals h2,
body.woocommerce-cart.sbfit-shop .cross-sells h2 {
  font-size: 17px; font-weight: 700; color: var(--sbc-ink); margin: 0 0 12px; line-height: 1.3;
}
body.woocommerce-cart.sbfit-shop .cross-sells h2 { font-size: 19px; margin-bottom: 16px; }

/* Tabella prodotti: righe pulite, senza griglia */
body.woocommerce-cart.sbfit-shop table.shop_table {
  width: 100%; border: 0; border-radius: 0; margin: 0; border-collapse: collapse; font-size: 14.5px;
}
body.woocommerce-cart.sbfit-shop table.shop_table th,
body.woocommerce-cart.sbfit-shop table.shop_table td {
  border: 0; border-bottom: 1px solid var(--sbc-line); background: transparent !important;
  padding: 14px 8px; vertical-align: middle; color: var(--sbc-ink);
}
body.woocommerce-cart.sbfit-shop table.cart thead th {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sbc-muted); padding-top: 0; padding-bottom: 10px;
}
body.woocommerce-cart.sbfit-shop table.cart td.product-remove { width: 36px; padding-left: 0; }
body.woocommerce-cart.sbfit-shop table.cart a.remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sbc-bg); color: var(--sbc-muted) !important;
  font-size: 18px; font-weight: 400; line-height: 1; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
body.woocommerce-cart.sbfit-shop table.cart a.remove:hover { background: var(--sbc-pink-soft); color: var(--sbc-pink-strong) !important; }
body.woocommerce-cart.sbfit-shop table.cart td.product-thumbnail { width: 72px; }
body.woocommerce-cart.sbfit-shop table.cart td.product-thumbnail img {
  width: 64px !important; height: 64px; object-fit: cover; border-radius: 12px; display: block; box-shadow: none;
}
body.woocommerce-cart.sbfit-shop table.cart td.product-name a {
  font-weight: 700; font-size: 15px; color: var(--sbc-ink); text-decoration: none;
}
body.woocommerce-cart.sbfit-shop table.cart td.product-name a:hover { color: var(--sbc-pink-strong); }
body.woocommerce-cart.sbfit-shop table.cart td.product-name .variation { font-size: 13px; color: var(--sbc-muted); margin: 4px 0 0; }
body.woocommerce-cart.sbfit-shop table.cart td.product-price { color: var(--sbc-muted); }
body.woocommerce-cart.sbfit-shop table.cart td.product-subtotal { font-weight: 700; text-align: right; padding-right: 0; }
body.woocommerce-cart.sbfit-shop table.cart th.product-subtotal { text-align: right; padding-right: 0; }
body.woocommerce-cart.sbfit-shop table.cart td.product-quantity .qty {
  width: 64px; min-height: 40px; text-align: center; border: 1.5px solid var(--sbc-line); border-radius: 10px;
}

/* Riga azioni: coupon a sinistra, aggiorna a destra */
body.woocommerce-cart.sbfit-shop table.cart td.actions {
  border-bottom: 0; padding: 18px 0 0; text-align: right;
}
body.woocommerce-cart.sbfit-shop table.cart td.actions .coupon {
  float: left; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
body.woocommerce-cart.sbfit-shop table.cart td.actions .coupon label { display: none; }
body.woocommerce-cart.sbfit-shop table.cart td.actions .coupon .input-text {
  width: 190px !important; margin: 0; float: none;
}
body.woocommerce-cart.sbfit-shop table.cart td.actions .coupon .button,
body.woocommerce-cart.sbfit-shop table.cart td.actions > .button { float: none; margin: 0; }

/* Totali */
body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table th,
body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table td { padding: 11px 0; }
body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table th { font-weight: 500; color: var(--sbc-muted); width: auto; }
body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table td { text-align: right; color: var(--sbc-muted); }
body.woocommerce-cart.sbfit-shop .cart_totals .order-total th,
body.woocommerce-cart.sbfit-shop .cart_totals .order-total td {
  border-bottom: 0; padding-top: 14px; font-size: 17px; font-weight: 700; color: var(--sbc-ink);
}
body.woocommerce-cart.sbfit-shop .cart_totals .order-total td .amount { color: var(--sbc-pink-strong); }

body.woocommerce-cart.sbfit-shop .wc-proceed-to-checkout { padding: 8px 0 0; }
/* Buono regalo */
body.woocommerce-cart.sbfit-shop #pwgc-redeem-gift-card-form { border-top: 1px solid var(--sbc-line); padding-top: 14px; }
body.woocommerce-cart.sbfit-shop #pwgc-redeem-gift-card-container { margin-bottom: 16px; }
body.woocommerce-cart.sbfit-shop #pwgc-redeem-gift-card-container label {
  display: block; font-size: 13px; font-weight: 600; color: var(--sbc-ink); margin: 0 0 6px;
}
body.woocommerce-cart.sbfit-shop #pwgc-redeem-gift-card-container br { display: none; }
body.woocommerce-cart.sbfit-shop #pwgc-redeem-gift-card-container {
  display: flex; flex-wrap: wrap; gap: 8px;
}
body.woocommerce-cart.sbfit-shop #pwgc-redeem-gift-card-container label,
body.woocommerce-cart.sbfit-shop #pwgc-redeem-error { flex: 1 0 100%; }
body.woocommerce-cart.sbfit-shop #pwgc-redeem-error:empty { display: none; }
body.woocommerce-cart.sbfit-shop #pwgc-redeem-error { color: #C0392B; font-size: 13px; }
body.woocommerce-cart.sbfit-shop #pwgc-redeem-gift-card-number { flex: 1 1 140px; width: auto; min-width: 0; margin: 0; }
body.woocommerce-cart.sbfit-shop #pwgc-redeem-button {
  flex: 0 0 auto; min-height: 42px; padding: 9px 18px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}

/* Bottone "Procedi con l'ordine": come "Effettua ordine" */
body.woocommerce-cart.sbfit-shop .wc-proceed-to-checkout a.checkout-button {
  display: flex; width: 100%; margin: 0;
  padding: 15px 22px; font-size: 15.5px; font-weight: 700; letter-spacing: .02em;
}

/* Prodotti consigliati: 3 per riga sotto al carrello */
body.woocommerce-cart.sbfit-shop .cross-sells ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Carrello vuoto */
body.woocommerce-cart.sbfit-shop .cart-empty.woocommerce-info { margin-bottom: 18px; }
body.woocommerce-cart.sbfit-shop .return-to-shop { margin: 0; }
body.woocommerce-cart.sbfit-shop .wc-empty-cart-message { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- Tablet e mobile */

@media (max-width: 1023px) {
  body.sbfit-shop ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

  body.woocommerce-cart.sbfit-shop .page-content > .woocommerce { display: block; }
  body.woocommerce-cart.sbfit-shop .page-content > .woocommerce > .cart-collaterals > .cart_totals { position: static; }
  /* totali prima dei consigliati */
  body.woocommerce-cart.sbfit-shop .cart-collaterals { display: flex !important; flex-direction: column; }
  body.woocommerce-cart.sbfit-shop .cart-collaterals .cart_totals { order: 1; }
  body.woocommerce-cart.sbfit-shop .cart-collaterals .cross-sells { order: 2; }
}

@media (max-width: 768px) {
  body.sbfit-shop ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body.sbfit-shop ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; padding: 12px 12px 4px !important; }
  body.sbfit-shop ul.products li.product .price { font-size: 14px !important; padding: 0 12px 12px; }
  body.sbfit-shop ul.products li.product .button {
    margin: auto 12px 12px !important; width: calc(100% - 24px);
    padding: 9px 10px; min-height: 38px; font-size: 13px !important;
  }
  body.sbfit-shop ul.products li.product .onsale { top: 8px; left: 8px; font-size: 11px; padding: 4px 9px; }
  body.sbfit-shop ul.products li.product:hover { transform: none; }

  body.sbfit-archive .woocommerce-products-header__title { font-size: 24px; }
  body.sbfit-archive .woocommerce-result-count { line-height: 1.4; margin: 12px 0 0; float: none; }
  body.sbfit-archive .woocommerce-ordering { float: none; margin: 10px 0 16px; }
  body.sbfit-archive .woocommerce-ordering select.orderby { width: 100%; }

  body.sbfit-notices .woocommerce-message .button,
  body.sbfit-notices .woocommerce-info .button { margin-left: 0; }

  /* Carrello: ogni prodotto diventa un blocco, niente tabella */
  body.woocommerce-cart.sbfit-shop .page-content > .woocommerce { padding: 8px 12px 32px; }
  body.woocommerce-cart.sbfit-shop .woocommerce-cart-form,
  body.woocommerce-cart.sbfit-shop .cart_totals { padding: 16px; border-radius: 14px; }
  body.woocommerce-cart.sbfit-shop table.cart,
  body.woocommerce-cart.sbfit-shop table.cart tbody { display: block; }
  body.woocommerce-cart.sbfit-shop table.cart thead { display: none; }
  body.woocommerce-cart.sbfit-shop table.cart tr.cart_item {
    display: grid; grid-template-columns: 64px 1fr 28px; gap: 4px 12px;
    padding: 0 0 14px; margin: 0 0 14px; border-bottom: 1px solid var(--sbc-line);
  }
  body.woocommerce-cart.sbfit-shop table.cart tr.cart_item td {
    display: block; border: 0; padding: 0; text-align: left !important;
  }
  body.woocommerce-cart.sbfit-shop table.cart tr.cart_item td::before { display: none; }
  body.woocommerce-cart.sbfit-shop table.cart td.product-thumbnail {
    display: block !important; grid-column: 1; grid-row: 1 / span 3; width: auto;
  }
  body.woocommerce-cart.sbfit-shop table.cart td.product-remove { grid-column: 3; grid-row: 1; width: auto; }
  body.woocommerce-cart.sbfit-shop table.cart td.product-name { grid-column: 2; grid-row: 1; }
  body.woocommerce-cart.sbfit-shop table.cart td.product-price { display: none !important; }
  body.woocommerce-cart.sbfit-shop table.cart td.product-quantity {
    grid-column: 2; grid-row: 2; font-size: 13px; color: var(--sbc-muted);
    display: flex !important; align-items: center; gap: 8px;
  }
  body.woocommerce-cart.sbfit-shop table.cart td.product-quantity .quantity { margin: 0; }
  body.woocommerce-cart.sbfit-shop table.cart td.product-quantity .qty { min-height: 34px; padding: 4px 8px; width: 56px; }
  body.woocommerce-cart.sbfit-shop table.cart td.product-quantity::before {
    display: inline !important; content: attr(data-title) ":"; float: none; font-weight: 500;
  }
  body.woocommerce-cart.sbfit-shop table.cart td.product-subtotal { grid-column: 2; grid-row: 3; }
  body.woocommerce-cart.sbfit-shop table.cart tr:not(.cart_item) td.actions { display: block; padding: 0; }
  body.woocommerce-cart.sbfit-shop table.cart td.actions .coupon { float: none; margin-bottom: 10px; }
  body.woocommerce-cart.sbfit-shop table.cart td.actions .coupon { padding: 0; }
  body.woocommerce-cart.sbfit-shop table.cart td.actions .coupon .input-text,
  body.woocommerce-cart.sbfit-shop table.cart td.actions .coupon .button {
    flex: 1 1 100%; width: 100% !important; float: none !important; margin: 0 !important;
  }
  body.woocommerce-cart.sbfit-shop table.cart td.actions > .button { width: 100%; }
  body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table tr { display: flex; justify-content: space-between; border-bottom: 1px solid var(--sbc-line); }
  body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table tr.order-total { border-bottom: 0; }
  body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table th,
  body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table td { display: block; border: 0; }
  body.woocommerce-cart.sbfit-shop .cart_totals table.shop_table td::before { display: none; }
  body.woocommerce-cart.sbfit-shop .cross-sells ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
