/* =====================================================================
   Bag / cart drawer — design 7A
   Restyles Flatsome's off-canvas mini-cart (#cart-popup → .off-canvas-cart)
   into the 7A slide-over. Desktop: 440px full-height right drawer.
   Mobile (≤549px): bottom sheet with drag handle. Behaviour (open/close,
   ajax qty, cross-sells, sticky footer) is stock Flatsome — this is styling
   only, plus the injected .bsx-cart-head (functions.php) for title + close.

   Selectors are deliberately scoped under .off-canvas / .off-canvas-cart and
   carry enough specificity to win over flatsome-shop.css regardless of the
   stylesheet load order.
   ===================================================================== */

/* ---- overlay (dim page behind) ----
   Flatsome puts the drawer's data-class (off-canvas-cart) on .mfp-content only;
   the backdrop is .mfp-bg.off-canvas-right, so target that. */
.mfp-bg.off-canvas.off-canvas-right { background-color: var(--bsx-ink); }
.mfp-bg.off-canvas.off-canvas-right.mfp-ready { opacity: 0.32; }

/* Magnific Popup adds its own corner close button; hide it only for the cart
   wrap (keep the in-header .bsx-cart-close, and don't touch other popups). */
.mfp-wrap:has(.off-canvas-cart) > .mfp-close { display: none !important; }

/* ---- drawer panel ---- */
.off-canvas .mfp-content.off-canvas-cart {
  background-color: #fff;
  box-shadow: -24px 0 50px -20px rgba(40, 32, 20, 0.35);
}

/* inner column: drop Flatsome's 30px inner-padding; each section pads itself */
.off-canvas-cart .cart-popup-inner { padding: 0; }
.off-canvas-cart .cart-popup-inner > :last-child { margin-bottom: 0; }
.off-canvas-cart .cart-popup-title { display: none; }
.off-canvas-cart .widget_shopping_cart,
.off-canvas-cart .widget_shopping_cart_content { margin: 0; }
.off-canvas-cart .woocommerce-mini-cart { margin: 0; }

/* let the panel own the scroll instead of the nested product list */
.off-canvas-cart .product_list_widget { max-height: none; overflow: visible; }

/* ---- header (Кошик (n) + close) — sticky at top ---- */
.off-canvas-cart .bsx-cart-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  padding: 26px 30px 20px;
  border-bottom: 1px solid var(--bsx-border);
}
.off-canvas-cart .bsx-cart-head__title {
  margin: 0;
  font-family: var(--bsx-font-heading);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.1;
  color: var(--bsx-ink);
}
.off-canvas-cart .bsx-cart-head__count { color: var(--bsx-mauve); }
.off-canvas-cart .bsx-cart-close {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: static;
  top: auto;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: #241e18;
  cursor: pointer;
  mix-blend-mode: normal;
  opacity: 1;
}
.off-canvas-cart .bsx-cart-close svg { display: block; }

/* ---- line items ---- */
.off-canvas-cart .woocommerce-mini-cart { padding: 22px 30px; }
.off-canvas-cart .woocommerce-mini-cart-item {
  position: relative;
  padding: 0 0 22px 94px;
  margin-bottom: 22px;
  min-height: 96px;
  border-top: 0;
  border-bottom: 1px solid #f1ece3;
}
.off-canvas-cart .woocommerce-mini-cart-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.off-canvas-cart .woocommerce-mini-cart-item img {
  top: 0;
  left: 0;
  width: 78px;
  height: 96px;
  margin: 0;
  border-radius: 8px;
  object-fit: cover;
  background: #f2ede5;
}
.off-canvas-cart .woocommerce-mini-cart-item a:not(.remove) {
  margin: 0 0 4px;
  padding: 0;
  font-family: var(--bsx-font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  color: var(--bsx-ink);
}
/* variation → "value · value" (hide the dt labels, join dd values) */
.off-canvas-cart .woocommerce-mini-cart-item .variation {
  margin: 0;
  font-family: var(--bsx-font-body);
  font-size: 12px;
  color: #8a8578;
}
.off-canvas-cart .woocommerce-mini-cart-item .variation dt { display: none; }
.off-canvas-cart .woocommerce-mini-cart-item .variation dd {
  display: inline;
  margin: 0;
  font-weight: 400;
}
.off-canvas-cart .woocommerce-mini-cart-item .variation dd::after { content: " · "; }
.off-canvas-cart .woocommerce-mini-cart-item .variation dd:last-of-type::after { content: none; }

/* remove ✕ (top-right, thin) */
.off-canvas-cart .woocommerce-mini-cart-item a.remove {
  top: 2px;
  right: 0;
  width: 15px;
  height: 15px;
  color: transparent;
  font-size: 0;
  line-height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23b3ab9c' stroke-width='1.6'%3E%3Cline x1='5' y1='5' x2='19' y2='19'/%3E%3Cline x1='19' y1='5' x2='5' y2='19'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.off-canvas-cart .woocommerce-mini-cart-item a.remove:hover { background-color: transparent; }

/* qty stepper + price row */
.off-canvas-cart .woocommerce-mini-cart-item .ux-mini-cart-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 0;
}
.off-canvas-cart .ux-mini-cart-qty .quantity {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--bsx-border-input);
  border-radius: 8px;
  opacity: 1;
  margin: 0 !important;
}
.off-canvas-cart .ux-mini-cart-qty .quantity .button,
.off-canvas-cart .ux-mini-cart-qty .quantity .minus,
.off-canvas-cart .ux-mini-cart-qty .quantity .plus,
.off-canvas-cart .ux-mini-cart-qty .quantity input[type="number"] {
  width: 28px;
  height: 28px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: var(--bsx-font-body);
  font-size: 15px;
  /* −/+ are <input type=button>: their glyph centres via line-height, not flex */
  line-height: 28px;
  text-align: center;
  color: var(--bsx-text);
}
.off-canvas-cart .ux-mini-cart-qty .quantity input[type="number"] {
  width: 30px;
  max-width: 30px;
  font-size: 13px;
  color: var(--bsx-ink);
  text-align: center;
  border-left: 1px solid var(--bsx-border-input);
  border-right: 1px solid var(--bsx-border-input);
}
.off-canvas-cart .cart-popup-inner .ux-mini-cart-qty .price-wrapper,
.off-canvas-cart .cart-popup-inner .ux-mini-cart-qty .product-subtotal {
  margin: 0;
  font-family: var(--bsx-font-body);
  font-size: 14px;
  color: var(--bsx-ink);
  opacity: 1;
}

/* ---- cross-sell ("often bought together") ---- */
.off-canvas-cart .ux-mini-cart-cross-sells {
  display: block;
  margin: 0;
  padding: 0 30px 22px;
}
.off-canvas-cart .ux-mini-cart-cross-sells__title {
  margin: 0 0 14px;
  font-family: var(--bsx-font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bsx-muted);
  text-align: left;
}
.off-canvas-cart .ux-mini-cart-cross-sells__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.off-canvas-cart .ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item {
  position: relative;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: 0;
}
.off-canvas-cart .ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item a:not(.remove):not(.button) {
  display: block;
  margin: 0;
}
.off-canvas-cart .ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item img {
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  margin: 0 0 8px;
  border-radius: 8px;
  object-fit: cover;
  background: #efe9df;
}
.off-canvas-cart .ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item .product-title {
  display: block;
  margin-bottom: 2px;
  font-family: var(--bsx-font-body);
  font-size: 12px;
  color: var(--bsx-ink);
}
.off-canvas-cart .ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item .price-wrapper {
  opacity: 1;
  font-family: var(--bsx-font-body);
  font-size: 12px;
  color: #8a8578;
}
.off-canvas-cart .ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item .price-wrapper .price {
  margin: 0;
}
/* the mini quick-add button isn't part of the 7A card */
.off-canvas-cart .ux-mini-cart-cross-sells__list li.ux-mini-cart-cross-sells__list-item .button.add_to_cart_button {
  display: none;
}

/* ---- sticky footer (total + actions) ---- */
.off-canvas-cart .cart-popup-inner .ux-mini-cart-footer {
  position: sticky;
  bottom: 0;
  margin: 0;
  padding: 22px 30px 26px;
  background: #fff;
  border-top: 1px solid var(--bsx-border);
}
.off-canvas-cart .widget_shopping_cart p.woocommerce-mini-cart__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  text-align: left;
}
.off-canvas-cart .widget_shopping_cart p.woocommerce-mini-cart__total strong {
  font-family: var(--bsx-font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--bsx-text-soft);
}
.off-canvas-cart .widget_shopping_cart p.woocommerce-mini-cart__total .woocommerce-Price-amount,
.off-canvas-cart .widget_shopping_cart p.woocommerce-mini-cart__total .amount {
  font-family: var(--bsx-font-body); /* match the drawer's other labels */
  font-weight: 600;
  font-size: 18px;
  color: var(--bsx-ink);
}
.off-canvas-cart .woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.off-canvas-cart .widget_shopping_cart .woocommerce-mini-cart__buttons .button {
  width: 100%;
  margin: 0;
}
/* primary checkout CTA */
.off-canvas-cart .widget_shopping_cart .woocommerce-mini-cart__buttons .button.checkout {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0;
  background: var(--bsx-ink);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-family: var(--bsx-font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
}
.off-canvas-cart .widget_shopping_cart .woocommerce-mini-cart__buttons .button.checkout:hover {
  background: #2b2723;
}
/* secondary "view cart" as a quiet link */
.off-canvas-cart .widget_shopping_cart .woocommerce-mini-cart__buttons .button:not(.checkout) {
  order: 2;
  height: auto;
  min-height: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--bsx-mauve);
  font-family: var(--bsx-font-body);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-align: center;
}
.off-canvas-cart .widget_shopping_cart .woocommerce-mini-cart__buttons .button:not(.checkout)::after {
  content: " →";
}

/* ---- empty state ---- */
.off-canvas-cart .ux-mini-cart-empty {
  padding: 40px 30px;
  font-family: var(--bsx-font-body);
}

/* =====================================================================
   Mobile bottom sheet — design 7A mobile · 390px
   Breakpoint matches Flatsome's mobile header (≤849px): whenever the mobile
   bag icon is shown, the drawer must be a bottom sheet — otherwise the mobile
   icon would open the desktop right-side slide-over on 550–849px screens.
   ===================================================================== */
@media only screen and (max-width: 849px) {
  .off-canvas .mfp-content.off-canvas-cart {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: auto;
    max-height: 82%;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 50px -20px rgba(40, 32, 20, 0.4);
    transform: translateY(100%);
    transition: transform 0.32s ease, opacity 0.2s ease;
  }
  .off-canvas-right.mfp-ready .mfp-content.off-canvas-cart {
    transform: translateY(0);
  }

  /* drag handle above the title */
  .off-canvas-cart .bsx-cart-head {
    padding: 22px 22px 16px;
  }
  .off-canvas-cart .bsx-cart-head::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--bsx-border-input);
  }
  .off-canvas-cart .bsx-cart-head__title { font-size: 20px; }

  .off-canvas-cart .woocommerce-mini-cart { padding: 18px 22px; }
  .off-canvas-cart .woocommerce-mini-cart-item {
    padding-left: 78px;
    min-height: 80px;
  }
  .off-canvas-cart .woocommerce-mini-cart-item img {
    width: 64px;
    height: 80px;
    border-radius: 7px;
  }

  /* mobile sheet drops the cross-sell block (per 7A mobile) */
  .off-canvas-cart .ux-mini-cart-cross-sells { display: none; }

  .off-canvas-cart .cart-popup-inner .ux-mini-cart-footer { padding: 18px 22px 26px; }
  .off-canvas-cart .widget_shopping_cart p.woocommerce-mini-cart__total .woocommerce-Price-amount,
  .off-canvas-cart .widget_shopping_cart p.woocommerce-mini-cart__total .amount { font-size: 17px; }
  .off-canvas-cart .widget_shopping_cart .woocommerce-mini-cart__buttons .button.checkout {
    height: 48px;
    font-size: 13px;
  }
}

/* =====================================================================
   Cart page — design 8A
   The full /cart/ page (Flatsome cart.php inside a UX-Builder section):
   items table left, summary sidebar right; two columns on desktop, stacked
   cards on mobile. Everything is scoped under body.woocommerce-cart so it
   can't reach the 7A drawer above. The sidebar order (heading -> coupon ->
   totals -> checkout) is set up in functions.php (bsx_cart_summary_head +
   the cart_coupon_position/cart_auto_refresh mods); the rules here are visual.
   ===================================================================== */

/* ---- page title ("Кошик") — the section-title becomes a left editorial H1 ---- */
.woocommerce-cart .section-title-container { max-width: none; margin-bottom: 0; }
.woocommerce-cart .section-title {
  display: block;
  margin: 0 0 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--bsx-border);
  text-align: left;
}
.woocommerce-cart .section-title b { display: none; } /* drop the decorative side rules */
.woocommerce-cart .section-title .section-title-main {
  margin: 0;
  padding: 0;
  font-family: var(--bsx-font-heading);
  font-weight: 500;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--bsx-ink);
}

/* ---- two-column shell ----
   8A is a 1180px canvas with a `1fr / 380px` grid and a 56px gap. The site's
   default row caps at 930/960px, which squeezes the summary to ~340px and
   makes it read as cramped, so widen the cart page and rebuild the split as a
   real grid pinned to the design's 380px summary column. */
.woocommerce-cart #content .row { max-width: 1180px; }
.woocommerce-cart .woocommerce.row.row-divided {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 56px;
  align-items: start;
  margin: 0;                 /* drop Flatsome's negative row gutter so the grid
                                aligns with the page title instead of bleeding
                                left (which also clipped the mobile × badge) */
}
.woocommerce-cart .woocommerce.row.row-divided > .col.large-7,
.woocommerce-cart .woocommerce.row.row-divided > .cart-collaterals.large-5 {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
  border-left: 0;
}
.woocommerce-cart .cart-collaterals .cart-sidebar.col-inner { padding: 0; }
.woocommerce-cart .cart-collaterals .cart-sidebar { border: 0; }

/* ---- items table ---- */
.woocommerce-cart .woocommerce-cart-form .shop_table.cart {
  border: 0;
  border-collapse: collapse;
  margin: 0;
}
.woocommerce-cart .shop_table.cart thead th {
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--bsx-ink);
  background: none;
  text-align: left;
  font-family: var(--bsx-font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bsx-text);
}
.woocommerce-cart .shop_table.cart tbody td {
  padding: 26px 0;
  border: 0;
  border-bottom: 1px solid #f1ece3;
  background: none;
  vertical-align: middle;
}

/* remove × -> thin circle at the row start */
.woocommerce-cart .shop_table.cart td.product-remove { width: 44px; padding-right: 16px; }
.woocommerce-cart .shop_table.cart td.product-remove a.remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #ddd6ca;
  border-radius: 50%;
  color: #8a8578;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
}
.woocommerce-cart .shop_table.cart td.product-remove a.remove:hover {
  background: var(--bsx-ink);
  border-color: var(--bsx-ink);
  color: #fff;
}

/* thumbnail */
.woocommerce-cart .shop_table.cart td.product-thumbnail { width: 86px; padding-right: 16px; }
.woocommerce-cart .shop_table.cart td.product-thumbnail img {
  width: 70px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  background: #f2ede5;
}

/* name + variation */
.woocommerce-cart .shop_table.cart td.product-name a {
  font-family: var(--bsx-font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  color: var(--bsx-ink);
}
.woocommerce-cart .shop_table.cart td.product-name a:hover { color: var(--bsx-mauve); }
.woocommerce-cart .shop_table.cart td.product-name .variation {
  margin: 6px 0 0;
  font-family: var(--bsx-font-body);
  font-size: 12px;
  color: #8a8578;
}
.woocommerce-cart .shop_table.cart td.product-name .variation dt,
.woocommerce-cart .shop_table.cart td.product-name .variation dd {
  display: inline;
  margin: 0;
  float: none;
  font-weight: 400;
}
.woocommerce-cart .shop_table.cart td.product-name .variation dd::after { content: " · "; }
.woocommerce-cart .shop_table.cart td.product-name .variation dd:last-of-type::after { content: none; }

/* price + subtotal */
.woocommerce-cart .shop_table.cart td.product-price,
.woocommerce-cart .shop_table.cart td.product-subtotal {
  font-family: var(--bsx-font-body);
  font-size: 14px;
  color: var(--bsx-ink);
}
.woocommerce-cart .shop_table.cart td.product-subtotal { font-weight: 500; }

/* qty stepper -> bordered pill (− value +) */
.woocommerce-cart .shop_table.cart td.product-quantity .quantity.ux-quantity {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  overflow: hidden;
  border: 1px solid var(--bsx-border-input);
  border-radius: 8px;
}
.woocommerce-cart .shop_table.cart .quantity.ux-quantity .ux-quantity__button,
.woocommerce-cart .shop_table.cart .quantity.ux-quantity input.qty {
  width: 34px;
  height: 36px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: var(--bsx-font-body);
  font-size: 15px;
  line-height: 36px;
  text-align: center;
  color: var(--bsx-text);
}
.woocommerce-cart .shop_table.cart .quantity.ux-quantity input.qty {
  width: 40px;
  -moz-appearance: textfield;
  font-size: 14px;
  color: var(--bsx-ink);
  border-left: 1px solid var(--bsx-border-input);
  border-right: 1px solid var(--bsx-border-input);
}
.woocommerce-cart .shop_table.cart .quantity.ux-quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart .shop_table.cart .quantity.ux-quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.woocommerce-cart .shop_table.cart .quantity.ux-quantity .ux-quantity__button { cursor: pointer; }
.woocommerce-cart .shop_table.cart .quantity.ux-quantity .ux-quantity__button:hover { color: var(--bsx-ink); }

/* actions row: continue-shopping outline pill, hide the (auto-refreshed) update button */
.woocommerce-cart .shop_table.cart td.actions {
  padding: 32px 0 0;
  border-bottom: 0;
  text-align: left;
}
.woocommerce-cart .shop_table.cart td.actions button[name="update_cart"] { display: none; }
.woocommerce-cart .continue-shopping { float: none; margin: 0; }
.woocommerce-cart .continue-shopping .button-continue-shopping {
  display: inline-flex;      /* centers text + arrow, no inline-block baseline slack */
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid #2b2723;
  border-radius: var(--bsx-radius-pill) !important; /* Flatsome forces the button radius */
  color: #2b2723;
  font-family: var(--bsx-font-body);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;            /* Flatsome's .button line-height is ~28px → too tall */
  letter-spacing: 0.02em;
  min-height: 0;             /* drop Flatsome's .button min-height */
  white-space: nowrap;       /* keep "← Продовжити покупки" on one line */
}
/* the ← arrow span falls back to a font with a taller line box (21px), which
   would set the flex line height — pin it so the pill stays the design height */
.woocommerce-cart .continue-shopping .button-continue-shopping span { line-height: 1; }
.woocommerce-cart .continue-shopping .button-continue-shopping:hover {
  background: var(--bsx-ink);
  border-color: var(--bsx-ink);
  color: #fff;
}

/* ================= summary sidebar ================= */
.woocommerce-cart .cart-sidebar .bsx-summary-title {
  margin: 0 0 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bsx-border);
  font-family: var(--bsx-font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bsx-ink);
}
/* our bsx-summary-title replaces cart-totals' own heading, which Flatsome
   prints twice: as an <h2> and as an empty title-only <table> (thead th). */
.woocommerce-cart .cart_totals > h2 { display: none; }
.woocommerce-cart .cart_totals > table:not(.shop_table) { display: none; }

/* coupon block */
.woocommerce-cart .bsx-cart-coupon { margin: 0 0 24px; padding: 0; border: 0; }
.woocommerce-cart .bsx-cart-coupon .coupon { display: block; }
.woocommerce-cart .bsx-cart-coupon .widget-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-family: var(--bsx-font-heading);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bsx-ink);
}
.woocommerce-cart .bsx-cart-coupon .widget-title svg { color: var(--bsx-muted); }
.woocommerce-cart .bsx-cart-coupon input#coupon_code {
  width: 100%;
  margin: 0 0 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--bsx-border-input);
  border-radius: var(--bsx-radius);
  font-family: var(--bsx-font-body);
  font-size: 14px;
  color: var(--bsx-ink);
  box-shadow: none;
}
.woocommerce-cart .bsx-cart-coupon button[name="apply_coupon"] {
  display: block;
  width: 100%;
  margin: 0;
  padding: 14px 0;
  background: var(--bsx-search-bg);
  border: 1px solid var(--bsx-border-input);
  border-radius: var(--bsx-radius);
  color: #8a8578;
  font-family: var(--bsx-font-body);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;            /* Flatsome's .button line-height balloons the height */
  letter-spacing: 0.02em;
  text-transform: none;
  min-height: 0;
}
.woocommerce-cart .bsx-cart-coupon button[name="apply_coupon"]:hover {
  background: #efe8df;
  color: var(--bsx-text);
}

/* totals table (subtotal / total) */
.woocommerce-cart .cart_totals {
  padding-top: 24px;
  border-top: 1px solid var(--bsx-border);
}
/* direct-child selectors so the nested shipping table isn't caught */
.woocommerce-cart .cart_totals table.shop_table {
  margin: 0;
  border: 0;
}
.woocommerce-cart .cart_totals table.shop_table > tbody > tr { border: 0; }
.woocommerce-cart .cart_totals table.shop_table > tbody > tr > th,
.woocommerce-cart .cart_totals table.shop_table > tbody > tr > td {
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid #f1ece3;
  background: none;
  font-family: var(--bsx-font-body);
  vertical-align: baseline;
}
.woocommerce-cart .cart_totals table.shop_table > tbody > tr > th {
  width: auto;
  font-weight: 400;
  font-size: 14px;
  color: var(--bsx-text-soft);
  text-align: left;
}
.woocommerce-cart .cart_totals table.shop_table > tbody > tr > td {
  font-weight: 600;
  font-size: 16px;
  color: var(--bsx-ink);
  text-align: right;
}

/* shipping row (e.g. Нова Пошта) — full-width, quiet label + method */
.woocommerce-cart .cart_totals .woocommerce-shipping-totals > td.shipping__inner {
  padding: 14px 0;
  text-align: left;
  font-weight: 400;
}
.woocommerce-cart .cart_totals .shipping__table { width: 100%; margin: 0; border: 0; }
.woocommerce-cart .cart_totals .shipping__table th,
.woocommerce-cart .cart_totals .shipping__table td {
  padding: 0;
  border: 0;
  background: none;
  vertical-align: baseline;
  font-family: var(--bsx-font-body);
}
.woocommerce-cart .cart_totals .shipping__table th {
  font-weight: 400;
  font-size: 14px;
  color: var(--bsx-text-soft);
  text-align: left;
}
.woocommerce-cart .cart_totals .shipping__table td {
  font-weight: 500;
  font-size: 13px;
  color: var(--bsx-ink);
  text-align: right;
}
.woocommerce-cart .cart_totals .shipping__list { list-style: none; margin: 0; padding: 0; }
.woocommerce-cart .cart_totals .shipping__list_item { margin: 0; }

/* grand total — larger + bold for emphasis, but same Manrope family as the
   other amounts (not the Playfair serif) */
.woocommerce-cart .cart_totals table.shop_table > tbody > tr.order-total > th,
.woocommerce-cart .cart_totals table.shop_table > tbody > tr.order-total > td {
  padding: 18px 0 0;
  border-bottom: 0;
}
.woocommerce-cart .cart_totals table.shop_table > tbody > tr.order-total > td,
.woocommerce-cart .cart_totals table.shop_table > tbody > tr.order-total > td strong {
  font-family: var(--bsx-font-body);
  font-weight: 700;
  font-size: 20px;
  color: var(--bsx-ink);
}

/* checkout CTA — dark, full width */
.woocommerce-cart .cart_totals .wc-proceed-to-checkout { margin-top: 24px; padding: 0; }
.woocommerce-cart .cart_totals .wc-proceed-to-checkout a.checkout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0;
  background: var(--bsx-ink);
  border: 0;
  border-radius: var(--bsx-radius);
  color: #fff;
  font-family: var(--bsx-font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.woocommerce-cart .cart_totals .wc-proceed-to-checkout a.checkout-button:hover { background: #2b2723; }

/* =====================================================================
   Mobile — design 8A · 390px. Stack the columns and rebuild each table row
   as a card (thumbnail left with × badge, name / price / stepper stacked).
   Breakpoint matches the site's mobile header switch (≤849px).
   ===================================================================== */
@media only screen and (max-width: 849px) {
  .woocommerce-cart .section-title { margin-bottom: 24px; padding-bottom: 16px; }
  .woocommerce-cart .section-title .section-title-main { font-size: 28px; }

  /* stacked single column (undo the desktop 1fr/380 grid) */
  .woocommerce-cart .woocommerce.row.row-divided { display: block; }
  .woocommerce-cart .woocommerce.row.row-divided > .col.large-7,
  .woocommerce-cart .woocommerce.row.row-divided > .cart-collaterals.large-5 { width: 100%; max-width: 100%; }
  .woocommerce-cart .cart-collaterals { margin-top: 8px; }

  /* header row shows only Товар / Кількість */
  .woocommerce-cart .shop_table.cart thead { display: block; border: 0; }
  .woocommerce-cart .shop_table.cart thead tr {
    display: flex;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bsx-ink);
  }
  .woocommerce-cart .shop_table.cart thead th { padding: 0; border: 0; }
  .woocommerce-cart .shop_table.cart thead th.product-price,
  .woocommerce-cart .shop_table.cart thead th.product-subtotal { display: none; }

  /* WooCommerce's woocommerce-smallscreen.css (≤768px) forces td{text-align:
     right!important}, hides .product-thumbnail, adds data-title labels and a
     zebra background — so the card rules below carry !important where they must
     out-rank it. */
  .woocommerce-cart .shop_table.cart tbody { display: block; }
  .woocommerce-cart .shop_table.cart tbody tr.woocommerce-cart-form__cart-item {
    display: grid !important;
    grid-template-columns: 80px 1fr;
    column-gap: 16px;
    row-gap: 4px;
    position: relative;
    padding: 22px 0;
    background: none !important;              /* kill nth-child zebra */
    border-bottom: 1px solid #f1ece3;
  }
  .woocommerce-cart .shop_table.cart tbody tr.woocommerce-cart-form__cart-item td {
    display: block !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    text-align: left !important;              /* beat smallscreen text-align:right!important */
  }
  .woocommerce-cart .shop_table.cart tbody td::before { display: none !important; } /* kill data-title labels */

  .woocommerce-cart .shop_table.cart td.product-thumbnail {
    display: block !important;                /* smallscreen hides it */
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    width: 80px !important;
  }
  .woocommerce-cart .shop_table.cart td.product-thumbnail img { width: 80px; height: 100px; margin: 0; }
  .woocommerce-cart .shop_table.cart td.product-name { grid-column: 2; grid-row: 1; }
  /* Flatsome prints "qty × price" inside the name cell (.mobile-product-price)
     on small screens — that's the design's line, so hide the separate price and
     subtotal columns. Both hides must out-specify the generic cart-item td rule. */
  .woocommerce-cart .shop_table.cart tbody tr.woocommerce-cart-form__cart-item td.product-price,
  .woocommerce-cart .shop_table.cart tbody tr.woocommerce-cart-form__cart-item td.product-subtotal { display: none !important; }
  .woocommerce-cart .shop_table.cart td.product-name .mobile-product-price {
    margin-top: 8px;
    font-family: var(--bsx-font-body);
    font-size: 14px;
    color: var(--bsx-ink);
  }
  .woocommerce-cart .shop_table.cart td.product-name .mobile-product-price__qty { color: var(--bsx-text-soft); }
  .woocommerce-cart .shop_table.cart td.product-quantity { grid-column: 2; grid-row: 2; margin-top: 12px; }

  /* × badge over the thumbnail's top-left corner */
  .woocommerce-cart .shop_table.cart td.product-remove {
    position: absolute;
    top: 14px;
    left: -8px;
    z-index: 2;
    grid-column: 1;
    width: auto !important;
  }
  .woocommerce-cart .shop_table.cart td.product-remove a.remove {
    width: 22px;
    height: 22px;
    background: #fff;
    font-size: 12px;
  }

  /* actions row: keep continue-shopping a left pill (smallscreen makes buttons
     full-width block + right-aligns the cell) */
  .woocommerce-cart .shop_table.cart td.actions { padding-top: 26px; text-align: left !important; }
  .woocommerce-cart .continue-shopping .button-continue-shopping {
    display: inline-block !important;
    width: auto !important;
    padding: 14px 22px;
  }

  /* summary full width below items */
  .woocommerce-cart .cart_totals .wc-proceed-to-checkout a.checkout-button { height: 50px; font-size: 13px; }
}
