/* ============================================
   CART PAGE — cart.css
   ============================================ */

/* ---- Cart Header ---- */
.cart-header-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.cart-page-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-title-icon {
  font-size: 20px;
  color: var(--dark);
}

.cart-count-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-right: 4px;
}

.cart-clear-btn {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  line-height: 1;
  transition: transform 0.2s;
}

.cart-clear-btn:hover { transform: scale(1.15); }

/* ---- Main ---- */
.cart-main {
  background: var(--bg-light);
  padding: 16px 14px calc(var(--nav-h) + 36px);
}

/* ---- Cart Card (white rounded container) ---- */
.cart-section {
  max-width: 480px;
  margin: 0 auto;
}

.cart-card {
  background: var(--bg);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 0;
}

/* ---- Cart Item ---- */
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 12px;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 5px;
}

/* Price row */
.cart-item-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}

.ci-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

.ci-price sup { font-size: 9px; }

.ci-original {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.ci-original sup { font-size: 8px; }

.ci-off {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

.ci-dv {
  font-size: 11px;
  font-weight: 600;
  color: var(--dark);
}

/* Total row */
.cart-item-total-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.ci-total-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
}

.ci-total-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
}

.ci-seller {
  font-size: 10px;
  font-style: italic;
  color: var(--text-muted);
}

/* ---- Qty column (right) ---- */
.cart-item-qty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  flex-shrink: 0;
  padding-top: 2px;
}

.cqty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s;
}

.cqty-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.cqty-count {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  min-width: 20px;
  text-align: center;
}

/* ---- Dashed Divider ---- */
.cart-divider {
  border: none;
  border-top: 1.5px dashed var(--border);
  margin: 0 14px;
}

/* ---- Price Summary ---- */
.cart-summary {
  padding: 14px 16px 10px;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.cs-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
}

.cs-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
}

/* Grand Total row */
.grand-row {
  margin-top: 4px;
  margin-bottom: 0;
}

.cs-grand-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cs-grand-val {
  font-size: 15px;
  font-weight: 800;
  color: #b8860b;                   /* golden/amber like reference */
  background: #fff3cd;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #f0d060;
}

/* ---- Action Buttons ---- */
.cart-actions {
  display: flex;
  gap: 10px;
  padding: 14px 14px 16px;
}

.btn-view-cart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 10px;
  border-radius: var(--radius-pill);
  background: #fce8e8;
  color: var(--dark);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-view-cart:hover { background: #f8d0d0; }

.btn-checkout {
  flex: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-checkout:hover {
  background: var(--primary-dk);
  transform: scale(1.01);
}
