/**
 * ATON LEATHER GOODS — CART DRAWER, CART & CHECKOUT STYLES
 */

/* ============================================================
   1. SLIDE-OUT CART DRAWER
   ============================================================ */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.7);
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.cart-drawer-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

body[dir="rtl"] .cart-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--border-subtle);
  transform: translateX(-100%);
}

.cart-drawer-overlay.is-active .cart-drawer {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xl);
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  font-weight: 600;
}

.drawer-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.drawer-close-btn:hover {
  color: var(--accent-gold);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-xl);
}

.cart-item-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: var(--space-md);
  align-items: center;
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.cart-item-img {
  width: 80px;
  height: 80px;
  background: #ffffff;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  padding: 6px;
  object-fit: contain;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

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

.cart-item-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.cart-item-remove-btn {
  color: var(--text-muted);
  font-size: 1rem;
  transition: color var(--transition-fast);
}

.cart-item-remove-btn:hover {
  color: #ff4d4f;
}

.drawer-footer {
  padding: var(--space-xl);
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
}

.drawer-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  font-size: 1.125rem;
  font-weight: 600;
}

.drawer-subtotal-amount {
  color: var(--accent-gold);
  font-size: 1.25rem;
}

/* ============================================================
   2. CHECKOUT STYLES (DISTRACTION FREE)
   ============================================================ */
.checkout-page {
  padding-top: 120px;
  padding-bottom: var(--space-section);
  min-height: 100vh;
  background-color: var(--bg-primary);
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-4xl);
  align-items: start;
}

.checkout-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
}

.checkout-section-title {
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.order-summary-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: var(--space-2xl);
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.summary-row.total-row {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.summary-row.total-row .amount {
  color: var(--accent-gold);
}

@media (max-width: 1024px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}
