/* ============================================
   CART PAGE — OLD GOOD compact layout
   (also used on Checkout + My Order details)
   ============================================ */

.cart-page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.cart-title-icon {
  font-size: 16px;
  color: var(--primary);
}

.cart-count-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.cart-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-clear-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  color: var(--primary);
  background: #fff1ee;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.2s, background 0.2s;
}

.cart-clear-btn:hover {
  transform: scale(1.06);
  background: #ffe4df;
}

.cart-main {
  background: var(--bg-light);
  padding: 0 0 calc(var(--nav-h) + 36px);
  width: 100%;
}

.cart-toolbar {
  padding: 16px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Full-bleed section with side padding like wishlist */
.cart-section {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 16px 8px;
  box-sizing: border-box;
}

/* Shared white card — OLD GOOD style */
.cart-card {
  background: var(--bg);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Compact row: image | info | qty — no wide middle gap */
.cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 30px;
  column-gap: 8px;
  align-items: start;
  padding: 12px 12px 10px;
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-img a {
  display: block;
  width: 100%;
  height: 100%;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  min-width: 0;
  max-width: 100%;
  padding-top: 1px;
  margin: 0;
  text-align: left;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.35;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin-bottom: 3px;
  font-family: var(--font);
}

.ci-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.ci-original {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.ci-off {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

.cart-item-total-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.ci-total-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
}

.ci-total-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
}

.cart-item-info .product-seller,
.ci-seller {
  font-size: 10px;
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}

/* Qty sits tight on the right — no extra spacing */
.cart-item-qty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 30px;
  padding-top: 0;
  margin: 0;
  justify-self: end;
}

.cqty-btn {
  width: 28px;
  height: 28px;
  border-radius: 20px !important;
  border: none !important;
  background: #D6E9D8 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #030619 !important;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  overflow: hidden;
}

.cqty-btn:hover {
  background: #c3e0c6 !important;
  color: #030619 !important;
  border-color: transparent !important;
}

.cqty-btn:active {
  background: #EF7F1B !important;
  color: #fff !important;
}

.cqty-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  min-width: 18px;
  text-align: center;
}

.cart-divider {
  border: none;
  border-top: 1.5px dashed var(--border);
  margin: 0 12px;
}

.cart-summary {
  padding: 12px 14px 8px;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.cs-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

.cs-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.grand-row {
  margin-top: 4px;
  margin-bottom: 0;
}

.cs-grand-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cs-grand-val {
  font-size: 14px;
  font-weight: 800;
  color: #b8860b;
  background: #fff3cd;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid #f0d060;
  white-space: nowrap;
}

.cart-actions {
  display: flex;
  gap: 10px;
  padding: 10px 14px 14px;
}

.btn-view-cart,
.btn-checkout {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-view-cart {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-view-cart:hover {
  background: #fff1ee;
}

.btn-checkout {
  flex: 1.4;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 96, 64, 0.28);
}

.btn-checkout:hover {
  background: var(--primary-dk);
  transform: translateY(-1px);
}

.nj-cart-empty {
  padding: 40px 20px;
  text-align: center;
}

.nj-cart-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff1ee;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.nj-cart-empty p {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.nj-cart-empty-sub {
  margin: 0 0 16px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--text-muted) !important;
}

.nj-cart-empty .btn-view-cart {
  display: inline-flex;
  width: auto;
  min-width: 150px;
  margin: 0 auto;
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.nj-cart-empty .btn-view-cart:hover {
  background: var(--primary-dk);
}

@media (min-width: 768px) {
  .cart-toolbar {
    padding: 24px 16px 8px;
  }

  .cart-section {
    padding: 0 16px 16px;
  }
}

@media (max-width: 380px) {
  .cart-actions {
    flex-direction: column;
  }

  .btn-view-cart,
  .btn-checkout {
    flex: 1 1 auto;
    width: 100%;
  }
}
