/* ===== Brand Ratio — Cart drawer (partial chrome toàn site) =====
   Giỏ local-first kiểu Equinox, item = theme. Token --brand-* (KHÔNG hardcode hex trừ #fff trên nền tối).
   Drawer trượt từ phải + overlay tối; mở bằng class .is-open (cart.js). */

.brand-cart-drawer { position: fixed; inset: 0; z-index: 120; visibility: hidden; pointer-events: none; }
.brand-cart-drawer.is-open { visibility: visible; pointer-events: auto; }

.brand-cart-overlay {
  position: absolute; inset: 0; background: rgba(40, 40, 47, 0.42);
  opacity: 0; transition: opacity var(--brand-dur) var(--brand-ease);
}
.brand-cart-drawer.is-open .brand-cart-overlay { opacity: 1; }

.brand-cart-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  /* Owner chốt 2026-06-19: rộng 580px */
  width: min(580px, 94vw); display: flex; flex-direction: column;
  background: var(--brand-surface); box-shadow: -16px 0 50px rgba(40, 40, 47, 0.22);
  transform: translateX(100%); transition: transform var(--brand-dur) var(--brand-ease);
}
.brand-cart-drawer.is-open .brand-cart-panel { transform: none; }

.brand-cart-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 44px; border-bottom: 1px solid rgba(40, 40, 47, 0.12); flex: none;
}
.brand-cart-title { font-family: var(--brand-font-display); font-size: 17px; font-weight: 750; letter-spacing: -0.01em; color: var(--brand-ink); }
.brand-cart-head-count { color: var(--brand-muted); font-weight: 600; margin-left: 6px; }
.brand-cart-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent; cursor: pointer;
  color: var(--brand-ink); transition: background var(--brand-dur-fast);
}
.brand-cart-close:hover { background: var(--brand-strip-2); }
.brand-cart-close svg { width: 18px; height: 18px; display: block; }

.brand-cart-body { flex: 1; overflow-y: auto; padding: 8px 44px; }

/* Empty state */
.brand-cart-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 16px; }
.brand-cart-empty-mark { width: 56px; height: 56px; color: var(--brand-muted); }
.brand-cart-empty-mark svg { width: 100%; height: 100%; display: block; }
.brand-cart-empty h3 { font-size: 17px; font-weight: 700; margin: 4px 0 0; color: var(--brand-ink); }
.brand-cart-empty p { font-size: 13.5px; color: var(--brand-muted); margin: 0; max-width: 240px; }
.brand-cart-empty[hidden] { display: none; }
/* Nút "Chọn theme →" sang Theme Store (đen, hover .btn-sweep) */
.brand-cart-empty-cta { margin-top: 12px; }

/* Line theme — owner chốt 2026-06-19: ảnh 1.5× (60→90), gap cột 2× (14→28), info CĂNG cao = ảnh
   → tên+studio căn ĐỈNH, giá căn ĐÁY (margin-top auto đẩy giá xuống đáy khung) */
.brand-cart-line { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 28px; align-items: stretch; padding: 18px 0; border-bottom: 1px solid rgba(40, 40, 47, 0.1); }
/* "× 01" decor lấp khoảng trống bên phải (số lượng cố định 1/theme) — căn giữa dọc, chữ to mảnh nhạt */
.brand-cart-line-qty { align-self: center; margin-right: 40px; font-size: 30px; font-weight: 300; color: var(--brand-muted); letter-spacing: 0.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.brand-cart-line-thumb { align-self: start; display: block; aspect-ratio: 4/5; border-radius: 8px; overflow: hidden; background: var(--brand-strip); }
.brand-cart-line-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.brand-cart-line-info { min-width: 0; display: flex; flex-direction: column; }
/* Nhóm tên+studio chiếm nửa TRÊN, căn ĐÁY → đáy "designed by Ratio" trùng GIỮA ảnh (owner 2026-06-19) */
.brand-cart-line-top { height: 50%; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.brand-cart-line-name { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; color: var(--brand-ink); text-decoration: none; }
.brand-cart-line-name:hover { text-decoration: underline; text-underline-offset: 2px; }
.brand-cart-line-studio { font-size: 12px; color: var(--brand-muted); margin-top: 1px; }
.brand-cart-line-price { font-size: 13.5px; font-weight: 650; color: var(--brand-ink); margin-top: auto; font-variant-numeric: tabular-nums; }
.brand-cart-line-remove {
  align-self: start; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; border: none; background: transparent; cursor: pointer;
  color: var(--brand-muted); transition: color var(--brand-dur-fast), background var(--brand-dur-fast);
}
.brand-cart-line-remove:hover { color: var(--brand-ink); background: var(--brand-strip-2); }
.brand-cart-line-remove svg { width: 15px; height: 15px; display: block; }

/* Footer */
.brand-cart-foot { flex: none; padding: 18px 44px 22px; border-top: 1px solid rgba(40, 40, 47, 0.12); }
.brand-cart-subtotal { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.brand-cart-subtotal span { font-size: 14px; color: var(--brand-ink-2); }
.brand-cart-subtotal strong { font-family: var(--brand-font-display); font-size: 20px; font-weight: 750; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.brand-cart-note { font-size: 12px; color: var(--brand-muted); margin: 0 0 14px; line-height: 1.5; }
.brand-cart-checkout { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .brand-cart-overlay, .brand-cart-panel { transition: none; }
}
