/* ==========================================================================
   SaharShop Cart V2 — pixel-close to sahar-cart-v2/reference.png
   Loads LAST. Beats sahar-pages / sahar-inner cart rules via #main specificity.
   Preserves PrestaShop AJAX qty/remove/voucher classes.
   ========================================================================== */

body.lang-rtl#cart {
  --sc-ink: #10182f;
  --sc-muted: #606476;
  --sc-pink: #f00868;
  --sc-pink-deep: #bd004b;
  --sc-pink-soft: #faeaf3;
  --sc-badge-bg: #f9d2e5;
  --sc-badge-ink: #a70848;
  --sc-bg: #f5f4fc;
  --sc-surface: #ffffff;
  --sc-radius: 27px;
  --sc-shadow: 0 14px 34px rgba(32, 44, 82, 0.06);
  --sc-gap: 24px;
  --ss-money: #f00868;
  --si-price: #f00868;
  color: var(--sc-ink) !important;
  background:
    radial-gradient(ellipse at 50% 40%, #fff 0%, #f5f3fa 65%, #fceaf5 100%) !important;
}

body.lang-rtl#cart #wrapper,
body.lang-rtl#cart #content-wrapper,
body.lang-rtl#cart #main {
  background: transparent !important;
}

body.lang-rtl#cart #main.l-wrapper,
body.lang-rtl#cart #main.sc-cart {
  width: 90% !important;
  max-width: var(--ss-shell, 1500px) !important;
  margin-inline: auto !important;
  padding: 32px 0 40px !important;
  box-sizing: border-box !important;
}

/* SVG icons */
body.lang-rtl#cart .sc-svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  vertical-align: middle;
}

/* Title */
body.lang-rtl#cart .sc-cart__title {
  display: flex !important;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  font-size: clamp(26px, 2.25vw, 38px) !important;
  font-weight: 900 !important;
  color: var(--sc-ink) !important;
  line-height: 1.3;
}

body.lang-rtl#cart .sc-cart__title .sc-svg {
  width: 40px;
  height: 40px;
  color: var(--sc-pink-deep);
}

/* Layout 68 / 32 ≈ 2.12fr / 1fr */
body.lang-rtl#cart #main .sc-layout.cart-grid.row,
body.lang-rtl#cart #main .cart-grid.sc-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 2.12fr) minmax(0, 1fr) !important;
  gap: var(--sc-gap) !important;
  align-items: start !important;
  margin: 0 !important;
  width: 100% !important;
}

body.lang-rtl#cart #main .sc-layout > [class*="col-"],
body.lang-rtl#cart #main .sc-layout > .cart-grid-body,
body.lang-rtl#cart #main .sc-layout > .cart-grid-right {
  width: 100% !important;
  max-width: 100% !important;
  flex: unset !important;
  padding: 0 !important;
  float: none !important;
  margin: 0 !important;
}

body.lang-rtl#cart #main .sc-items {
  display: grid !important;
  gap: 28px !important;
}

/* Kill nested card chrome around product list */
body.lang-rtl#cart #main .sc-products.cart-container,
body.lang-rtl#cart #main .sc-products.ss-cart-panel,
body.lang-rtl#cart #main .sc-products .card-body,
body.lang-rtl#cart #main .sc-products .cart__card-body {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

body.lang-rtl#cart #main .sc-products .card-header,
body.lang-rtl#cart #main .sc-products .cart__card-loader {
  display: none !important;
}

body.lang-rtl#cart #main .cart-items {
  display: grid !important;
  gap: 18px !important;
}

body.lang-rtl#cart #main .cart-item {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* —— Product card —— */
body.lang-rtl#cart #main .sc-product.product-line-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 20px 24px !important;
  align-items: center !important;
  padding: 24px 28px !important;
  margin: 0 !important;
  background: linear-gradient(145deg, #fff, #faf9fd) !important;
  border: 1px solid #fff !important;
  border-radius: var(--sc-radius) !important;
  box-shadow: var(--sc-shadow) !important;
  min-height: 0 !important;
}

body.lang-rtl#cart #main .sc-info {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  min-width: 0 !important;
}

body.lang-rtl#cart #main .sc-info__media {
  flex: none;
  display: block;
}

body.lang-rtl#cart #main .sc-info__media img,
body.lang-rtl#cart #main .sc-product .product-line__img {
  width: 140px !important;
  height: 140px !important;
  object-fit: contain !important;
  background: #fff !important;
  border: 3px solid #fff !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 10px rgba(24, 37, 59, 0.09) !important;
  padding: 0 !important;
  mix-blend-mode: normal !important;
}

body.lang-rtl#cart #main .sc-info__title,
body.lang-rtl#cart #main .sc-product .product-line__title {
  display: block;
  font-size: clamp(17px, 1.4vw, 22px) !important;
  font-weight: 850 !important;
  color: var(--sc-ink) !important;
  margin: 0 0 10px !important;
  line-height: 1.45 !important;
  text-decoration: none !important;
}

body.lang-rtl#cart #main .sc-badge {
  display: inline-block !important;
  background: var(--sc-badge-bg) !important;
  color: var(--sc-badge-ink) !important;
  border-radius: 7px !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 0 8px !important;
}

body.lang-rtl#cart #main .sc-price-line {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  margin: 8px 0 0 !important;
}

body.lang-rtl#cart #main .sc-price-line del,
body.lang-rtl#cart #main .sc-price-line .regular-price {
  color: var(--sc-muted) !important;
  font-size: 14px !important;
  text-decoration: line-through !important;
  font-weight: 600 !important;
}

body.lang-rtl#cart #main .sc-price-line strong,
body.lang-rtl#cart #main .sc-price-line .current-price,
body.lang-rtl#cart #main .sc-product .product-price,
body.lang-rtl#cart #main .sc-product .product-price strong,
body.lang-rtl#cart #main .sc-line-total strong {
  color: var(--sc-pink-deep) !important;
  font-weight: 900 !important;
  font-size: 18px !important;
}

body.lang-rtl#cart #main .sc-attr {
  color: var(--sc-muted);
  margin-top: 4px;
}

/* Qty — style Bootstrap TouchSpin as reference pill */
body.lang-rtl#cart #main .sc-product.product-line-grid {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

body.lang-rtl#cart #main .sc-actions {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

body.lang-rtl#cart #main .sc-quantity {
  display: flex !important;
  align-items: center;
  position: relative;
  z-index: 4;
}

body.lang-rtl#cart #main .sc-quantity .bootstrap-touchspin,
body.lang-rtl#cart #main .sc-quantity .input-group {
  display: flex !important;
  direction: rtl;
  align-items: stretch !important;
  width: 146px !important;
  height: 48px !important;
  border: 1px solid #c7ccdc !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 3px 7px rgba(17, 26, 56, 0.06) !important;
  background: #fff !important;
  margin: 0 !important;
}

body.lang-rtl#cart #main .sc-quantity .btn,
body.lang-rtl#cart #main .sc-quantity .js-touchspin,
body.lang-rtl#cart #main .sc-quantity .bootstrap-touchspin .btn {
  width: 46px !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f4f5fa !important;
  color: var(--sc-ink) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.lang-rtl#cart #main .sc-quantity .js-cart-line-product-quantity,
body.lang-rtl#cart #main .sc-quantity input.form-control {
  width: 54px !important;
  min-width: 54px !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  text-align: center !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  color: var(--sc-ink) !important;
  padding: 0 !important;
}

body.lang-rtl#cart #main .sc-line-total {
  min-width: 7.5rem;
  justify-content: flex-end;
}

body.lang-rtl#cart #main .sc-remove {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: #c30b50 !important;
  background: none !important;
  border: 0 !important;
  padding: 10px !important;
  text-decoration: none !important;
}

body.lang-rtl#cart #main .sc-remove .material-icons { display: none !important; }
body.lang-rtl#cart #main .sc-remove .sc-svg {
  width: 26px;
  height: 26px;
}

/* Benefits strip */
body.lang-rtl#cart #main .sc-benefits {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  border: 3px solid #fff !important;
  border-radius: 25px !important;
  background: rgba(253, 241, 250, 0.61) !important;
  padding: 18px 10px !important;
  box-shadow: 0 12px 28px rgba(32, 44, 82, 0.04) !important;
  gap: 0 !important;
}

body.lang-rtl#cart #main .sc-benefits > div {
  display: flex !important;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 4px 12px;
}

body.lang-rtl#cart #main .sc-benefits > div + div {
  border-right: 1px solid #eac2d8;
}

body.lang-rtl#cart #main .sc-benefits .sc-svg {
  width: 32px;
  height: 32px;
  color: #c31962;
}

body.lang-rtl#cart #main .sc-benefits b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--sc-ink);
}

body.lang-rtl#cart #main .sc-benefits small {
  display: block;
  color: var(--sc-muted);
  margin-top: 4px;
  font-size: 12px;
}

/* —— Summary —— */
body.lang-rtl#cart #main .sc-summary.cart-summary,
body.lang-rtl#cart #main .sc-summary.ss-order-summary {
  background: linear-gradient(145deg, #fff, #faf9fd) !important;
  border: 1px solid #fff !important;
  border-radius: var(--sc-radius) !important;
  box-shadow: var(--sc-shadow) !important;
  overflow: hidden !important;
  margin: 0 !important;
}

body.lang-rtl#cart #main .sc-summary .card-body--summary {
  padding: 20px 24px 24px !important;
}

body.lang-rtl#cart #main .sc-summary__title {
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px !important;
  padding: 0 0 16px !important;
  border-bottom: 1px solid #dce0ec !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  color: var(--sc-ink) !important;
}

body.lang-rtl#cart #main .sc-summary__title .sc-svg {
  width: 28px;
  height: 28px;
  color: #be175d;
}

body.lang-rtl#cart #main .sc-totals {
  display: grid !important;
  gap: 14px !important;
  padding: 0 0 16px !important;
  border-bottom: 1px solid #dce0ec !important;
  margin-bottom: 0 !important;
}

body.lang-rtl#cart #main .sc-totals .cart-summary-line,
body.lang-rtl#cart #main .cart-summary-line {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin: 0 !important;
  font-size: 15px !important;
}

body.lang-rtl#cart #main .cart-summary-line .label {
  color: var(--sc-ink) !important;
  font-weight: 600 !important;
}

body.lang-rtl#cart #main .cart-summary-line .value,
body.lang-rtl#cart #main .cart-summary-totals .value {
  color: var(--sc-ink) !important;
  font-weight: 800 !important;
}

body.lang-rtl#cart #main .sc-totals__discount .value,
body.lang-rtl#cart #main .sc-accent {
  color: var(--sc-pink-deep) !important;
}

body.lang-rtl#cart #main .sc-shipping-note .value {
  color: var(--sc-muted) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}

body.lang-rtl#cart #main .sc-total.cart-summary-totals {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  background: var(--sc-pink-soft) !important;
  border-radius: 13px !important;
  margin: 12px 0 18px !important;
  padding: 14px !important;
  border: 0 !important;
}

body.lang-rtl#cart #main .sc-total b {
  font-size: 16px;
  font-weight: 800;
  color: var(--sc-ink);
}

body.lang-rtl#cart #main .sc-total strong,
body.lang-rtl#cart #main .sc-total .value {
  color: var(--sc-pink-deep) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
}

body.lang-rtl#cart #main .sc-tax-note {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--sc-muted);
  margin-top: 4px;
}

/* Coupon */
body.lang-rtl#cart #main .sc-coupon-wrap,
body.lang-rtl#cart #main .block-promo {
  margin: 0 0 16px !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

body.lang-rtl#cart #main .promo-code-button,
body.lang-rtl#cart #main .cancel-promo,
body.lang-rtl#cart #main .block-promo .separator,
body.lang-rtl#cart #main .cart-detailed-totals > hr {
  display: none !important;
}

body.lang-rtl#cart #main .promo-code.collapse {
  display: block !important;
  height: auto !important;
}

body.lang-rtl#cart #main .sc-coupon.form__add-voucher,
body.lang-rtl#cart #main .sc-coupon {
  display: flex !important;
  gap: 10px !important;
  margin: 0 0 10px !important;
}

body.lang-rtl#cart #main .sc-coupon .form-control,
body.lang-rtl#cart #main .sc-coupon input[name="discount_name"] {
  flex: 1 !important;
  min-width: 0 !important;
  border: 1px solid #d2d7e5 !important;
  background: #fff !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  height: auto !important;
  box-shadow: none !important;
}

body.lang-rtl#cart #main .sc-coupon .btn-sc-coupon,
body.lang-rtl#cart #main .sc-coupon button[type="submit"] {
  border: 1px solid #c31860 !important;
  background: #fff5fa !important;
  color: #b6074b !important;
  border-radius: 8px !important;
  padding: 8px 18px !important;
  font-weight: 800 !important;
  white-space: nowrap;
  box-shadow: none !important;
}

body.lang-rtl#cart #main .sc-coupon-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}

body.lang-rtl#cart #main .promo-code-alert {
  margin-top: 8px;
  font-size: 13px;
}

/* CTAs */
body.lang-rtl#cart #main .sc-primary,
body.lang-rtl#cart #main .sc-checkout-actions .btn-primary,
body.lang-rtl#cart #main .cart-detailed-actions a.btn-primary {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 50px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #fa0879, #bd004b) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 18px rgba(189, 0, 75, 0.2) !important;
  margin: 0 0 12px !important;
  text-decoration: none !important;
}

body.lang-rtl#cart #main .sc-primary:hover,
body.lang-rtl#cart #main .cart-detailed-actions a.btn-primary:hover {
  filter: brightness(1.03);
  color: #fff !important;
}

body.lang-rtl#cart #main .sc-primary:disabled,
body.lang-rtl#cart #main .sc-primary.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body.lang-rtl#cart #main .sc-primary .sc-svg {
  color: #fff;
  width: 22px;
  height: 22px;
}

body.lang-rtl#cart #main .sc-secondary {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 46px !important;
  border: 1px solid #d4d9e7 !important;
  background: #eeeff7 !important;
  border-radius: 12px !important;
  color: var(--sc-ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

body.lang-rtl#cart #main .sc-secondary:hover {
  background: #e6e8f2 !important;
  color: var(--sc-ink) !important;
}

body.lang-rtl#cart #main .s26-cart-cta { display: none !important; }

body.lang-rtl#cart #main .sc-checkout-actions .material-icons,
body.lang-rtl#cart #main .sc-primary .material-icons {
  display: none !important;
}

/* Empty */
body.lang-rtl#cart #main .sc-empty {
  text-align: center;
  padding: 48px 24px;
  background: linear-gradient(145deg, #fff, #faf9fd);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
}

body.lang-rtl#cart #main .sc-empty .sc-svg {
  width: 52px;
  height: 52px;
  color: var(--sc-pink-deep);
  margin-bottom: 12px;
}

body.lang-rtl#cart #main .sc-empty .sc-secondary {
  max-width: 260px;
  margin: 16px auto 0;
}

/* Footer breathing room */
body.lang-rtl#cart #footer {
  margin-top: 28px;
}

/* Responsive */
@media (max-width: 1050px) {
  body.lang-rtl#cart #main .sc-layout.cart-grid.row,
  body.lang-rtl#cart #main .cart-grid.sc-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) !important;
  }

  body.lang-rtl#cart #main .sc-product.product-line-grid {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  body.lang-rtl#cart #main .sc-info {
    grid-column: 1 / -1;
  }

  body.lang-rtl#cart #main .sc-benefits > div {
    flex-direction: column;
    text-align: center;
  }

  body.lang-rtl#cart #main .sc-benefits > div + div {
    border-right: 0;
    border-top: 1px solid #eac2d8;
    padding-top: 12px;
    margin-top: 8px;
  }

  body.lang-rtl#cart #main .sc-benefits {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 991.98px) {
  body.lang-rtl#cart #main .sc-layout.cart-grid.row,
  body.lang-rtl#cart #main .cart-grid.sc-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  body.lang-rtl#cart #main .sc-summary-col {
    order: 2;
  }

  body.lang-rtl#cart #main .sc-items {
    order: 1;
  }
}

@media (max-width: 760px) {
  body.lang-rtl#cart #main.l-wrapper,
  body.lang-rtl#cart #main.sc-cart {
    width: 92% !important;
    padding: 24px 0 30px !important;
  }

  body.lang-rtl#cart #main .sc-product.product-line-grid {
    padding: 16px !important;
    gap: 14px !important;
  }

  body.lang-rtl#cart #main .sc-info__media img,
  body.lang-rtl#cart #main .sc-product .product-line__img {
    width: 96px !important;
    height: 96px !important;
  }

  body.lang-rtl#cart #main .sc-quantity .bootstrap-touchspin,
  body.lang-rtl#cart #main .sc-quantity .input-group {
    width: 128px !important;
    height: 46px !important;
  }

  body.lang-rtl#cart #main .sc-benefits b { font-size: 13px; }
  body.lang-rtl#cart #main .sc-benefits .sc-svg { width: 28px; height: 28px; }
}

@media (max-width: 420px) {
  body.lang-rtl#cart #main .sc-actions {
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
  }

  body.lang-rtl#cart #main .sc-product.product-line-grid {
    grid-template-columns: 1fr !important;
  }
}
