/*
 * Cart page (resources/views/cart/view.blade.php + cart/items.blade.php): item cards with
 * steppers and an order-summary card, in the same style as checkout-modern.css.
 * Scoped to .cart-page; loaded through @stack('after_styles').
 */
.cart-page {
  --cm-border: #e2e8f0;
  --cm-text: #0f172a;
  --cm-muted: #64748b;
  --cm-soft: #f8fafc;
  --cm-radius: 16px;
  --cm-accent: var(--storecolor, #e53e3e);
  background: var(--cm-soft);
  padding-bottom: 32px;
}

/* sticky needs overflow-x: clip, not hidden (custom.css sets hidden on body) */
body {
  overflow-x: clip;
}

.cart-page .cart-content {
  align-items: flex-start;
}

.cart-page .cart_page_sec_title {
  font-family: inherit !important;
  margin: 6px 0 14px !important;
  padding: 0 15px !important;
  background: transparent !important;
  color: var(--cm-text) !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

/* the two columns become cards */
.cart-page .cm-left,
.cart-page .cm-right {
  background: transparent !important;
  border: none !important;
  padding-top: 0 !important;
}

.cart-page .cm-items {
  padding: 4px 18px;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius);
  background: #ffffff;
}

/* ---- item rows ---- */
.cart-page .cm-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--cm-border);
}

.cart-page .cm-row:last-child {
  border-bottom: none;
}

.cart-page .cm-info {
  flex: 1 1 auto;
  min-width: 0;
}

.cart-page .cm-name {
  color: var(--cm-text);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
}

.cart-page .cm-meta {
  margin-top: 3px;
  color: var(--cm-muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.cart-page .cm-meta-line {
  display: block;
}

.cart-page .cm-meta-label {
  font-weight: 600;
}

.cart-page .cm-meta-value .notranslate {
  white-space: nowrap;
}

.cart-page .cm-meta-value + .cm-meta-value::before {
  content: ", ";
}

.cart-page .cm-note {
  font-style: italic;
}

.cart-page .cm-discount {
  color: #16a34a;
  font-weight: 600;
}

.cart-page .cm-unit {
  margin-top: 6px;
  color: var(--cm-muted);
  font-size: 13px;
}

.cart-page .cm-was {
  margin-right: 4px;
  text-decoration: line-through;
  opacity: 0.7;
}

.cart-page .cm-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.cart-page .cm-line {
  color: var(--cm-text);
  font-size: 16px;
  font-weight: 800;
}

.cart-page .cm-row-free .cm-line {
  color: #16a34a;
}

.cart-page .cm-qty-fixed {
  color: var(--cm-muted);
  font-size: 13px;
  font-weight: 600;
}

.cart-page .cm-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--cm-border);
  border-radius: 999px;
  background: #ffffff;
}

.cart-page .cm-step {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cm-accent) 10%, #ffffff);
  color: var(--cm-accent);
  font-size: 15px;
  cursor: pointer;
}

/* a legacy rule paints these icons white */
.cart-page .cm-step i,
.cart-page .cm-btn i {
  color: inherit !important;
}

.cart-page .cm-step-trash {
  background: #fef2f2;
  color: #dc2626;
}

.cart-page .cm-qty {
  min-width: 24px;
  color: var(--cm-text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.cart-page .cm-empty {
  padding: 28px 0;
  color: var(--cm-muted);
  text-align: center;
}

/* under the list: Continue shopping + a quiet Clear cart */
.cart-page .cm-list-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px -18px 0;
  padding: 14px 18px;
  border-top: 1px solid var(--cm-border);
}

.cart-page .cm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}

.cart-page .cm-btn-ghost,
.cart-page .cm-btn-ghost:hover {
  border: 1px solid var(--cm-border);
  background: #ffffff;
  color: var(--cm-text) !important;
}

.cart-page .cm-clear,
.cart-page .cm-clear:hover {
  color: var(--cm-muted) !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
  background: transparent !important;
}

@media (hover: hover) {
  .cart-page .cm-btn-ghost:hover {
    background: var(--cm-soft);
  }

  .cart-page .cm-clear:hover {
    color: #dc2626 !important;
  }
}

/* ---- order summary card ---- */
.cart-page .total_sec_border-tble {
  padding: 16px 18px 18px;
  border: 1px solid var(--cm-border) !important;
  border-radius: var(--cm-radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

@media (min-width: 992px) {
  .cart-page .total_sec_border-tble {
    position: sticky;
    top: 90px;
  }
}

.cart-page .crt_total_border {
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.cart-page .sec-header-title {
  padding: 0 !important;
  background: transparent !important;
}

.cart-page .cart_ttal_sec_title {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--cm-text) !important;
  font-family: inherit !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.cart-page #totalPrices {
  margin-top: 0 !important;
}

.cart-page #totalPrices .card {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.cart-page #totalPrices .row.mx-0 > div {
  padding-top: 6px;
  padding-bottom: 6px;
}

.cart-page #totalPrices .border_bottom_dashed {
  border-bottom: 1px dashed var(--cm-border) !important;
}

.cart-page #totalPrices .payment_title_text,
.cart-page #totalPrices .payment_title_textinside,
.cart-page #totalPrices .ammount {
  color: #334155 !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
}

.cart-page #totalPrices .total_price_main_sec {
  margin-top: 4px;
  padding-top: 6px;
}

.cart-page #totalPrices .total_price,
.cart-page #totalPrices .total_price .payment_title_text,
.cart-page #totalPrices .ammount.total_price {
  color: var(--cm-text) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}

/* "Edit / Add More" links point back at this page: not needed here */
.cart-page .continue-shopping-button {
  display: none !important;
}

/* Proceed to checkout: store colour, full width */
.cart-page .cm-checkout {
  margin-top: 14px !important;
}

body .cart-page .cm-checkout .btn.paymentbuttonbtn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  margin: 0 !important;
  border: none !important;
  border-radius: 14px !important;
  background: var(--cm-accent) !important;
  background-color: var(--cm-accent) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 16.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: 0 8px 22px -8px rgba(15, 23, 42, 0.35) !important;
  animation: none !important;
}

@media (max-width: 991px) {
  .cart-page .cm-right {
    margin-top: 16px;
  }
}

/* phones: the checkout button stays in reach at the bottom of the screen */
@media (max-width: 767px) {
  .cart-page .cart_page_sec_title {
    font-size: 21px !important;
  }

  .cart-page .cm-items {
    padding: 2px 14px;
  }

  .cart-page .cm-list-actions {
    margin: 4px -14px 0;
    padding: 12px 14px;
  }

  .cart-page {
    padding-bottom: 96px;
  }

  .cart-page .cm-checkout {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    margin: 0 !important;
  }
}
