/**
 * ATON LEATHER GOODS — CART DRAWER, CART & CHECKOUT STYLES
 * Fixed top padding, perfect scroll alignment & full RTL support
 */

/* ============================================================
   1. SLIDE-OUT CART DRAWER
   ============================================================ */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 8, 0.6);
  backdrop-filter: blur(6px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.cart-drawer {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface, #FFFFFF);
  border-left: 1px solid var(--border-subtle, #E2E8F0);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
}

body[dir="rtl"] .cart-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--border-subtle, #E2E8F0);
  transform: translateX(-100%);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.25);
}

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

/* Drawer Header with proper 24px top padding */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border-subtle, #E2E8F0);
  background: var(--bg-surface, #FFFFFF);
  flex-shrink: 0;
}

.drawer-title {
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-main, #1E293B);
  font-weight: 700;
}

.drawer-close-btn {
  font-size: 1.35rem;
  color: var(--text-muted, #64748B);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.drawer-close-btn:hover {
  color: var(--accent-color, #dfbc6b);
  transform: scale(1.1);
}

/* Scrollable Body */
.drawer-body, .cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

/* Drawer Footer */
.drawer-footer, .cart-footer {
  padding: 20px;
  border-top: 1px solid var(--border-subtle, #E2E8F0);
  background: var(--bg-surface, #FFFFFF);
  flex-shrink: 0;
}

.drawer-subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main, #1E293B);
  margin-bottom: 8px;
}

.drawer-subtotal-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-color, #dfbc6b);
}

/* Cart Items in Drawer */
.cart-item-card {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 14px;
  align-items: center;
  padding-block: 14px;
  border-bottom: 1px solid var(--border-subtle, #E2E8F0);
}

.cart-item-card:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 70px;
  height: 70px;
  background: #F8F9FA;
  border-radius: 6px;
  border: 1px solid var(--border-subtle, #E2E8F0);
  padding: 6px;
  object-fit: contain;
}

.cart-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main, #1E293B);
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-color, #dfbc6b);
}

.cart-item-remove-btn {
  color: var(--text-muted, #94A3B8);
  font-size: 1.125rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

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

/* Empty Cart View in Drawer */
.drawer-empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 40px 20px;
}

.drawer-empty-icon {
  font-size: 2.5rem;
  color: var(--text-muted, #94A3B8);
  margin-bottom: 16px;
}

.drawer-empty-text {
  font-size: 0.9375rem;
  color: var(--text-secondary, #64748B);
  margin-bottom: 24px;
}
