/* ============================================================
   CART PAGE SECTION
============================================================ */
.cart-page-section {
  background: var(--light-bg);
  min-height: 70vh;
  padding: 40px 0 64px;
}

.cart-page-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 28px;
}

/* ============================================================
   CART ITEM CARD
============================================================ */
.cart-item-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  transition: box-shadow var(--transition);
}

.cart-item-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.cart-item-img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--light-bg);
  flex-shrink: 0;
}

.cart-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.cart-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 4px;
  text-decoration: none;
  display: inline-block;
  transition: color var(--transition);
}

a.cart-item-name:hover { color: var(--accent); }

.cart-item-img-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.cart-item-img-link .cart-item-img {
  transition: opacity var(--transition);
}

.cart-item-img-link:hover .cart-item-img { opacity: 0.85; }

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cart-item-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cart-item-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--light-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
}

.cart-item-option.is-missing {
  border-color: var(--accent);
  background: #fff0f1;
}

.cart-item-option.is-missing .cart-option-label,
.cart-item-option.is-missing .cart-option-select {
  color: var(--accent);
}

.cart-item-card--invalid {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
}

.cart-option-label {
  font-weight: 600;
  color: var(--text-muted);
}

.cart-option-select {
  border: none;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  padding: 2px 4px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.cart-option-select:disabled {
  cursor: not-allowed;
  color: var(--text-muted);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.cart-item-remove:hover {
  color: var(--accent);
  background: #fff0f1;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ============================================================
   QTY STEPPER (cart page)
============================================================ */
.cart-qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.cart-qty-btn {
  background: var(--light-bg);
  border: none;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.cart-qty-btn:hover {
  background: var(--primary);
  color: white;
}

.cart-qty-num {
  width: 42px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  background: white;
  user-select: none;
}

.cart-item-subtotal {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cart-item-subtotal-original,
.cart-item-price-original {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
}

.cart-item-save-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: #fff0f1;
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.summary-shipping-note {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

.cart-item-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  background: #fff0f1;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}

.btn-proceed-checkout.disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: auto;
}

.btn-proceed-checkout.disabled:hover { background: var(--border); }

/* ============================================================
   CONTINUE SHOPPING LINK
============================================================ */
.cart-continue-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 10px;
  transition: color var(--transition);
}

.cart-continue-link:hover { color: var(--primary); }

/* ============================================================
   EMPTY STATE
============================================================ */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}

.cart-empty-state i {
  font-size: 3.5rem;
  color: var(--border);
  margin-bottom: 16px;
}

.cart-empty-state h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.cart-empty-state p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.cart-empty-btn {
  display: inline-flex;
  align-items: center;
  background: var(--primary);
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background var(--transition);
}

.cart-empty-btn:hover { background: #333; color: white; }

/* ============================================================
   ORDER SUMMARY PANEL
============================================================ */
.order-summary-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: 80px;
}

.order-summary-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.summary-shipping-free {
  color: #2a9d8f;
  font-weight: 700;
}

.summary-shipping-cost {
  font-weight: 600;
  color: var(--primary);
}

.order-summary-divider {
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.order-summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}

.btn-proceed-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 10px;
}

.btn-proceed-checkout:hover { background: #333; }

.btn-proceed-checkout:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}

.order-summary-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 991px) {
  .order-summary-panel { position: static; }
}

@media (max-width: 575px) {
  .cart-item-card { padding: 14px; gap: 12px; }
  .cart-item-img  { width: 70px; height: 70px; }
  .cart-item-name { font-size: 0.88rem; }
}
