/* Sahtain cart — professional layout aligned with brand */

.sahtain-cart {
  --sc-brand: var(--sahtain-brand, #0756a8);
  --sc-blue: var(--sahtain-blue, #3f9ae5);
  --sc-text: var(--sahtain-text, #0b2340);
  --sc-muted: var(--sahtain-muted, #6c8198);
  --sc-line: rgba(7, 86, 168, 0.12);
  --sc-soft: rgba(7, 86, 168, 0.06);
  --sc-radius: 18px;
  padding-bottom: 2rem;
}

.sahtain-cart .section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sc-text);
  margin: 0 0 1rem;
  line-height: 1.3;
}

.sahtain-cart .section-cart-products,
.sahtain-cart .col-lg-4 > .section-title {
  position: relative;
}

.sahtain-cart .section-cart-products {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: 1.25rem 1.35rem 1.1rem;
  box-shadow: 0 10px 28px rgba(3, 32, 70, 0.04);
}

.sahtain-cart .col-lg-4 {
  position: relative;
}

.sahtain-cart .col-lg-4 > .section-title {
  margin-bottom: 0.85rem;
}

/* Summary column as a sticky card shell */
.sahtain-cart .sahtain-cart-summary {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: 1.25rem 1.2rem 1.35rem;
  box-shadow: 0 14px 34px rgba(3, 32, 70, 0.06);
}

@media (min-width: 992px) {
  .sahtain-cart .sahtain-cart-summary {
    position: sticky;
    top: calc(var(--sahtain-header-top, 18px) + var(--sahtain-header-h, 72px) + 18px);
  }
}

/* Hide useless name/value header in summary */
.sahtain-cart .sahtain-cart-summary > .header-wrapper {
  display: none !important;
}

/* Products table header */
.sahtain-cart .section-cart-products > .header-wrapper {
  background: linear-gradient(180deg, rgba(7, 86, 168, 0.08), rgba(7, 86, 168, 0.04));
  border: 1px solid var(--sc-line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--sc-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sahtain-cart .section-cart-products-row {
  margin: 0;
  align-items: center;
}

.sahtain-cart .section-cart-products-col-1,
.sahtain-cart .section-cart-products-col-2,
.sahtain-cart .section-cart-products-col-3,
.sahtain-cart .section-cart-products-col-4 {
  padding-left: 6px;
  padding-right: 6px;
}

/* Product rows */
.sahtain-cart .cart-product-row-wrapper {
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  margin-top: 0.65rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.sahtain-cart .cart-product-row-wrapper:hover {
  border-color: rgba(7, 86, 168, 0.22);
  box-shadow: 0 8px 22px rgba(3, 32, 70, 0.05);
}

.sahtain-cart .cart-product-row {
  align-items: center;
  margin: 0;
  padding: 0.85rem 0.65rem;
  gap: 0;
}

.sahtain-cart .cart-product-delete,
.sahtain-cart .cart-products-action,
.sahtain-cart .cart-product-prices,
.sahtain-cart .cart-product-col-details,
.sahtain-cart .cart-product-col-img {
  padding-top: 0;
  padding-bottom: 0;
}

.sahtain-cart .cart-product-col-img {
  width: 96px;
  flex-shrink: 0;
}

.sahtain-cart .cart-product-col-img img,
.sahtain-cart .cart-product-image {
  width: 88px;
  height: 88px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #f4f8fc, #eef4fa);
  padding: 0;
  display: block;
}

.sahtain-cart .cart-product-col-details {
  padding-top: 0;
  min-width: 0;
}

.sahtain-cart .cart-product-col-details h1 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
  color: var(--sc-text);
}

.sahtain-cart .cart-product-col-details h1 a {
  color: inherit;
  text-decoration: none;
}

.sahtain-cart .cart-product-col-details h1 a:hover {
  color: var(--sc-brand);
}

.sahtain-cart .cart-product-delete {
  width: 44px;
  text-align: center;
  padding-top: 0;
}

.sahtain-cart .cart-product-delete a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--sc-line);
  background: #fff;
  color: var(--sc-muted);
  transition: 0.2s ease;
}

.sahtain-cart .cart-product-delete a:hover {
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.28);
  background: rgba(192, 57, 43, 0.06);
}

.sahtain-cart .icon-delete:before {
  font-size: 14px;
}

/* Quantity column + stepper */
.sahtain-cart .cart-products-action {
  width: 150px;
  flex-shrink: 0;
  padding-top: 0;
  display: flex;
  align-items: center;
}

.sahtain-cart .cart-product-quantity-dropdown {
  margin: 0;
  width: 100%;
  position: relative;
}

.sahtain-cart .cart-product-quantity-dropdown > div {
  position: relative;
}

.sahtain-cart .cart-product-quantity-dropdown select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.sahtain-qty {
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  min-width: 118px;
  height: 40px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--sc-line);
  background: linear-gradient(180deg, #fff, #f7fbff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  user-select: none;
}

.sahtain-qty__btn {
  width: 34px;
  height: 34px;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 999px;
  background: transparent;
  color: var(--sc-brand);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.sahtain-qty__btn:hover:not(:disabled) {
  background: rgba(7, 86, 168, 0.1);
  transform: translateY(-1px);
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.sahtain-qty__btn:focus,
.sahtain-qty__btn:focus-visible,
.sahtain-qty__btn:active:not(:disabled) {
  transform: translateY(0);
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.sahtain-qty__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sahtain-qty__value {
  min-width: 1.6rem;
  text-align: center;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--sc-text);
  font-variant-numeric: tabular-nums;
}

.sahtain-qty.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

/* Prices */
.sahtain-cart .cart-product-prices {
  width: 24%;
  flex-shrink: 0;
  padding-top: 0;
}

.sahtain-cart .cart-product-prices .totals,
.sahtain-cart .cart-product-total-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--sc-brand);
  line-height: 1.25;
}

/* Always show unit price (hidden by platform when qty = 1) */
.sahtain-cart .cart-product-price-each,
.sahtain-cart .cart-product-price-each.d-none {
  display: block !important;
  margin-top: 0.28rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--sc-muted);
  line-height: 1.35;
}

.sahtain-cart .cart-product-price-each > span {
  display: inline;
  font-size: inherit;
  color: inherit;
}

.sahtain-cart .cart-product-price-each .riyal-svg {
  width: 11px;
  height: 12px;
}

.sahtain-cart .cart-product-prices .totals .riyal-svg,
.sahtain-cart .cart-product-total-price .riyal-svg {
  width: 14px;
  height: 15px;
}

.sahtain-cart .cart-product-total-before-price {
  color: #a0aec0;
  text-decoration: line-through;
  margin-inline-end: 0.35rem;
}

/* Totals */
.sahtain-cart .loyalty-points-section {
  border: 1px solid var(--sc-line) !important;
  border-radius: 12px !important;
  background: var(--sc-soft);
  margin-top: 0 !important;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem !important;
}

.sahtain-cart .cart-totals-div {
  font-size: 0.95rem;
  color: var(--sc-text);
}

.sahtain-cart .cart-totals-row-wrapper {
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0.7rem 0.15rem !important;
  border-bottom: 1px dashed rgba(7, 86, 168, 0.12) !important;
  align-items: center;
}

.sahtain-cart .cart-totals-row-wrapper:last-child {
  border-bottom: 0 !important;
  margin-top: 0.25rem !important;
  padding-top: 0.9rem !important;
  font-size: 1.08rem;
}

/* Coupon */
.sahtain-cart .coupon-form {
  margin-top: 1.15rem !important;
}

.sahtain-cart .coupon-form h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sc-text);
  margin-bottom: 0.55rem;
}

.sahtain-cart .coupon-form .d-flex {
  gap: 0.5rem;
}

.sahtain-cart .coupon-form input.form-control {
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--sc-line);
  background: #f8fbfe;
  box-shadow: none;
  font-size: 0.92rem;
}

.sahtain-cart .coupon-form input.form-control:focus {
  border-color: rgba(63, 154, 229, 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(63, 154, 229, 0.15);
}

.sahtain-cart .coupon-form button.btn {
  height: 44px;
  min-width: 92px;
  margin: 0 !important;
  border-radius: 12px;
  font-weight: 600;
  border: 0;
  background: var(--sc-brand);
  padding-inline: 1rem;
}

.sahtain-cart .coupon-form button.btn:hover {
  filter: brightness(1.06);
}

.sahtain-cart .message-coupon {
  margin-top: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(7, 86, 168, 0.18);
  background: rgba(7, 86, 168, 0.06);
}

/* Checkout actions */
.sahtain-cart .sahtain-cart-summary .btn-primary.btn-lg.btn-block,
.sahtain-cart .sahtain-cart-summary a.btn-primary.btn-lg {
  height: 50px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, #0756a8 0%, #0a6bc7 55%, #3f9ae5 100%);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(7, 86, 168, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sahtain-cart .sahtain-cart-summary .btn-primary.btn-lg.btn-block:hover,
.sahtain-cart .sahtain-cart-summary a.btn-primary.btn-lg:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(7, 86, 168, 0.28);
  color: #fff;
}

.sahtain-cart .sahtain-cart-summary .btn-outline-primary.btn-lg {
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(7, 86, 168, 0.28);
  color: var(--sc-brand);
  background: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.18s ease;
}

.sahtain-cart .sahtain-cart-summary .btn-outline-primary.btn-lg:hover {
  background: rgba(7, 86, 168, 0.06);
  border-color: var(--sc-brand);
  color: var(--sc-brand);
}

.sahtain-cart .cart-discount-rule-wrapper {
  border: 1px solid var(--sc-line);
  border-radius: 12px;
  background: var(--sc-soft);
  padding: 0.85rem;
}

.sahtain-cart .gift-card-toggle-btn {
  border-radius: 14px !important;
  border-color: rgba(7, 86, 168, 0.28) !important;
}

/* Empty cart */
.sahtain-cart .cart-empty {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  padding: 3rem 1.5rem !important;
  box-shadow: 0 10px 28px rgba(3, 32, 70, 0.04);
}

.sahtain-cart .cart-empty h2 {
  color: var(--sc-text);
  font-size: 1.35rem;
  font-weight: 700;
}

.sahtain-cart .cart-gift-card {
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  margin-top: 0.85rem;
}

@media (max-width: 991.98px) {
  .sahtain-cart .section-cart-products,
  .sahtain-cart .sahtain-cart-summary {
    padding: 1rem;
  }

  .sahtain-cart .col-lg-4 {
    margin-top: 1.25rem;
  }
}

@media (max-width: 768px) {
  .sahtain-cart .cart-product-row {
    padding: 0.9rem 0.55rem 0.75rem;
  }

  .sahtain-cart .cart-product-delete {
    width: 12%;
  }

  .sahtain-cart .cart-products-action {
    width: 100%;
    padding-top: 0.65rem;
    padding-bottom: 0.15rem;
    padding-inline-start: 12%;
  }

  .sahtain-cart .cart-products-action .form-group {
    margin-right: 0;
    margin-left: 0;
  }

  .sahtain-cart .cart-product-prices {
    width: 100%;
    padding-inline-start: 12%;
    padding-bottom: 0.25rem;
  }

  .sahtain-cart .cart-product-prices > div {
    margin-right: 0;
    margin-left: 0;
  }

  .sahtain-cart .cart-product-col-details {
    max-width: calc(88% - 96px);
  }

  .sahtain-cart .section-title {
    font-size: 1.2rem;
  }
}

/* Related products on cart page */
.sahtain-cart-related {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1px solid rgba(7, 86, 168, 0.12);
  border-radius: 18px;
  padding: 1.25rem 1.35rem 0.85rem;
  box-shadow: 0 10px 28px rgba(3, 32, 70, 0.04);
}

.sahtain-cart-related__title {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--sahtain-brand, var(--primary-color, #0756a8));
  letter-spacing: -0.01em;
}

.sahtain-cart-related__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sahtain-cart-related__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(7, 86, 168, 0.1);
}

.sahtain-cart-related__item:first-child {
  border-top: 0;
  padding-top: 0.25rem;
}

.sahtain-cart-related__media {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f4f8fc, #eef4fa);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
}

.sahtain-cart-related__media img,
.sahtain-cart-related__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
  display: block;
}

.sahtain-cart-related__img[hidden],
.sahtain-cart-related__img.is-empty:not([src]),
.sahtain-cart-related__img.is-empty[src=""] {
  display: none;
}

.sahtain-cart-related__info {
  flex: 1 1 auto;
  min-width: 0;
}

.sahtain-cart-related__name {
  display: block;
  color: var(--sahtain-text, #0b2340);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  margin-bottom: 0.2rem;
}

.sahtain-cart-related__name:hover {
  color: var(--sahtain-brand, #0756a8);
}

.sahtain-cart-related__price {
  color: var(--sahtain-brand, var(--primary-color, #0756a8));
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.sahtain-cart-related__price .riyal-svg {
  width: 13px;
  height: 14px;
}

.sahtain-cart-related__action {
  flex-shrink: 0;
}

.sahtain-cart-related__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(7, 86, 168, 0.35);
  background: #fff;
  color: var(--sahtain-brand, #0756a8);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: 0.18s ease;
  white-space: nowrap;
}

.sahtain-cart-related__btn:hover {
  background: rgba(7, 86, 168, 0.06);
  border-color: var(--sahtain-brand, #0756a8);
  color: var(--sahtain-brand, #0756a8);
  text-decoration: none;
}

.sahtain-cart-related__btn.is-disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  white-space: normal;
  max-width: 140px;
  text-align: center;
  font-size: 0.78rem;
}

@media (max-width: 576px) {
  .sahtain-cart-related {
    padding: 1rem;
  }

  .sahtain-cart-related__item {
    flex-wrap: wrap;
  }

  .sahtain-cart-related__action {
    width: 100%;
    padding-inline-start: calc(72px + 0.85rem);
  }

  .sahtain-cart-related__btn {
    width: 100%;
  }
}
