/* ═══════════════════════════════════════════════════════════════
   ME MERACLE — Cart & Checkout Styles
   ═══════════════════════════════════════════════════════════════ */

/* ─── Cart Page Layout ─────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
  padding: 48px 0 80px;
}

/* ─── Cart Table ───────────────────────────────────────────────── */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.cart-table th:last-child,
.cart-table td:last-child { text-align: right; }

.cart-table td {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.cart-product-cell { display: flex; align-items: center; gap: 16px; }

.cart-product-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.cart-product-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-decoration: none;
}

.cart-product-name:hover { color: var(--gold); }

.cart-price     { color: var(--text-secondary); font-size: 0.9rem; }
.cart-subtotal  { color: var(--gold); font-weight: 600; }

.cart-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.cart-remove-btn:hover { color: #e74c3c; background: rgba(231,76,60,0.08); }

.cart-empty-state {
  text-align: center;
  padding: 80px 40px;
}

.cart-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.cart-empty-state h2 { margin-bottom: 8px; }
.cart-empty-state p  { margin-bottom: 24px; }

/* ─── Order Summary Box ────────────────────────────────────────── */
.order-summary {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 96px;
}

.order-summary h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 0.9rem;
}

.summary-row span:first-child { color: var(--text-secondary); }
.summary-row span:last-child  { font-weight: 600; }
.summary-row.total {
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 1.05rem;
}

.summary-row.total span:last-child { color: var(--gold); font-size: 1.3rem; }

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

/* ─── Checkout Layout ──────────────────────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
  padding: 48px 0 80px;
}

.checkout-main h2 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 28px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-main h2:first-child { margin-top: 0; }

.checkout-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Shipping Method Select */
.shipping-options { display: flex; flex-direction: column; gap: 10px; }

.shipping-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shipping-option:hover { border-color: var(--gold-border); }
.shipping-option.selected { border-color: var(--gold); background: var(--gold-subtle); }

.shipping-option input[type="radio"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.shipping-option-info { flex: 1; }
.shipping-option-name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.shipping-option-days { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.shipping-option-price { font-weight: 700; color: var(--gold); font-size: 0.95rem; }

/* Stripe Payment Section */
.stripe-payment-box {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.stripe-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
  justify-content: center;
}

/* Checkout Summary */
.checkout-summary {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 96px;
}

.checkout-summary h3 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.checkout-summary-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.checkout-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.checkout-item-img {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.checkout-item-img img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-tertiary);
}

.checkout-item-qty {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--text-muted);
  color: var(--bg-primary);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-item-info { flex: 1; min-width: 0; }
.checkout-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.checkout-item-price { font-size: 0.82rem; color: var(--text-secondary); margin-top: 2px; }

/* ─── Order Confirmation ──────────────────────────────────────── */
.confirm-layout {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 0 80px;
  text-align: center;
}

.confirm-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.confirm-layout h1 { margin-bottom: 12px; }
.confirm-layout > p { margin-bottom: 32px; }

.confirm-details {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: left;
  margin-bottom: 28px;
}

.confirm-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}

.confirm-detail-row:last-child { border-bottom: none; }
.confirm-detail-row span:first-child { color: var(--text-muted); }
.confirm-detail-row span:last-child  { font-weight: 600; }

.confirm-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cart-layout, .checkout-layout {
    grid-template-columns: 1fr;
  }

  .order-summary, .checkout-summary {
    position: static;
  }

  .cart-table .cart-price { display: none; }
}

@media (max-width: 600px) {
  .cart-table th:nth-child(2),
  .cart-table td:nth-child(2) { display: none; }

  .cart-product-img { width: 56px; height: 56px; }
}
