/* ═══════════════════════════════════════════════════
   옷결 OTT_GYEOL — Cart Drawer Styles
   ═══════════════════════════════════════════════════ */

/* ─── OVERLAY ─── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cart-overlay.active { opacity: 1; visibility: visible; }

/* ─── DRAWER ─── */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 420px;
  max-width: 100vw;
  background: var(--white);
  z-index: 1501;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 48px rgba(26, 23, 20, 0.14);
}
.cart-drawer.active { transform: translateX(0); }

/* ─── HEADER ─── */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--beige);
  flex-shrink: 0;
}
.cart-header h2 {
  font-family: var(--font-serif-kr);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: 0.06em;
}
.cart-header-count {
  font-size: 0.7rem;
  color: var(--taupe);
  letter-spacing: 0.04em;
  margin-top: 3px;
}
.cart-close-btn {
  background: none; border: none;
  font-size: 1.6rem;
  color: var(--taupe);
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.2s;
}
.cart-close-btn:hover { color: var(--charcoal); }

/* ─── ITEMS ─── */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}
.cart-items::-webkit-scrollbar { width: 3px; }
.cart-items::-webkit-scrollbar-thumb { background: var(--beige-dark); border-radius: 2px; }

/* ─── ITEM ROW ─── */
.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(200, 185, 165, 0.3);
  animation: fadeUp 0.2s ease-out both;
}
.cart-item-img {
  width: 72px; height: 90px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--cream);
  flex-shrink: 0;
}
.cart-item-img-placeholder {
  width: 72px; height: 90px;
  background: var(--cream);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--sand);
}
.cart-item-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  justify-content: space-between;
}
.cart-item-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 8px;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-category {
  font-size: 0.62rem; color: var(--taupe);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 3px;
}
.cart-item-name {
  font-family: var(--font-serif-kr);
  font-size: 0.82rem; font-weight: 500;
  color: var(--charcoal); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-remove {
  background: none; border: none;
  color: var(--sand); cursor: pointer;
  padding: 2px; flex-shrink: 0;
  transition: color 0.2s; line-height: 1;
}
.cart-item-remove:hover { color: var(--rose); }

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

/* ─── QTY CONTROLS ─── */
.cart-qty {
  display: flex; align-items: center;
  border: 1px solid var(--beige); border-radius: 3px;
  overflow: hidden;
}
.cart-qty-btn {
  width: 28px; height: 28px;
  background: none; border: none;
  cursor: pointer; color: var(--charcoal);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.cart-qty-btn:hover { background: var(--cream); color: var(--gold); }
.cart-qty-num {
  min-width: 28px; text-align: center;
  font-size: 0.78rem; color: var(--charcoal);
}

/* ─── ITEM PRICE ─── */
.cart-item-price { font-size: 0.82rem; color: var(--charcoal); }
.cart-item-original { font-size: 0.7rem; color: var(--sand); text-decoration: line-through; margin-right: 4px; }

/* ─── EMPTY STATE ─── */
.cart-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  height: 100%; padding: 40px 24px;
}
.cart-empty svg { opacity: 0.25; margin-bottom: 20px; }
.cart-empty-title { font-family: var(--font-serif-kr); font-size: 0.92rem; font-weight: 500; color: var(--charcoal); margin-bottom: 8px; }
.cart-empty-desc { font-size: 0.76rem; font-weight: 300; color: var(--taupe); margin-bottom: 24px; }
.cart-empty-link { font-size: 0.76rem; color: var(--gold); letter-spacing: 0.04em; text-decoration: underline; text-underline-offset: 2px; }

/* ─── FOOTER ─── */
.cart-footer {
  padding: 20px 24px 28px;
  border-top: 1px solid var(--beige);
  flex-shrink: 0;
}
.cart-summary-row {
  display: flex; justify-content: space-between;
  margin-bottom: 8px;
}
.cart-summary-label { font-size: 0.75rem; color: var(--taupe); letter-spacing: 0.04em; }
.cart-summary-value { font-size: 0.8rem; color: var(--charcoal); }
.cart-total-row {
  display: flex; justify-content: space-between;
  align-items: center;
  padding-top: 12px; margin-top: 4px;
  border-top: 1px solid var(--beige);
}
.cart-total-label { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--charcoal); }
.cart-total-value { font-family: var(--font-serif); font-size: 1.1rem; color: var(--charcoal); }
.cart-free-shipping { font-size: 0.68rem; color: var(--gold-dark); text-align: center; margin-top: 10px; }
.cart-checkout-btn { width: 100%; padding: 14px; text-align: center; font-size: 0.82rem; letter-spacing: 0.08em; margin-top: 14px; }
.cart-continue {
  display: block; text-align: center;
  margin-top: 12px; font-size: 0.72rem;
  color: var(--taupe); letter-spacing: 0.04em;
  transition: color 0.2s;
}
.cart-continue:hover { color: var(--gold); }

/* ─── ADD TO CART BUTTON ─── */
.add-to-cart-btn.added {
  background: var(--gold) !important;
  color: var(--white) !important;
}

/* ─── TOAST ─── */
.cart-toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--charcoal);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.76rem; letter-spacing: 0.03em;
  font-family: var(--font-sans);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.cart-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 480px) {
  .cart-drawer { width: 100vw; }
  .cart-header, .cart-items, .cart-footer { padding-left: 20px; padding-right: 20px; }
}
