/* ═══════════════════════════════════════════════════════════════════ */
/* cart.css — Cart page styles                                          */
/* ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) { body { padding-top: 64px; } }

/* ─── CART PAGE ───────────────────────────────────────────────── */
.cart-page { max-width: 1100px; margin: 0 auto; }

.cart-header-bar {
  padding: 28px 16px 20px;
  border-bottom: 1px solid var(--beige);
}
@media (min-width: 768px) { .cart-header-bar { padding: 36px 40px 24px; } }

.cart-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300; color: var(--espresso); margin-bottom: 4px;
}
.cart-subtitle { font-size: 13px; color: var(--mocha); }

/* ─── CART LAYOUT ─────────────────────────────────────────────── */
.cart-layout {
  display: block;
  padding-bottom: 170px; /* clears fixed sticky-cta + floating bottom-nav on mobile */
}
@media (min-width: 768px) {
  .cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    align-items: start;
    padding-bottom: 64px;
  }
}

/* ─── CART ITEMS COLUMN ───────────────────────────────────────── */
.cart-items-col { border-right: none; }
@media (min-width: 768px) {
  .cart-items-col { border-right: 1px solid var(--beige); }
}

.cart-loading {
  padding: 64px 16px; text-align: center;
  color: var(--mocha); font-size: 14px; letter-spacing: .05em;
}

.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--beige);
  align-items: start;
}
@media (min-width: 768px) {
  .cart-item { padding: 24px 40px; grid-template-columns: 96px 1fr; gap: 20px; }
}
.cart-item-img {
  aspect-ratio: 3/4; border-radius: 10px; overflow: hidden;
  background: var(--beige); flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-body { display: flex; flex-direction: column; gap: 4px; }
.cart-item-name { font-size: 14px; color: var(--espresso); font-weight: 500; line-height: 1.4; }
.cart-item-variant { font-size: 12px; color: var(--mocha); }
.cart-item-price { font-size: 14px; font-weight: 500; color: var(--ink); margin-top: 4px; }
.cart-item-actions {
  display: flex; align-items: center; justify-content: space-between; margin-top: 10px;
}
.qty-control {
  display: flex; align-items: center;
  border: 1.5px solid var(--beige); border-radius: 999px; overflow: hidden;
}
.qty-btn {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--espresso); transition: background .15s; line-height: 1;
}
.qty-btn:hover { background: var(--beige); }
.qty-btn:disabled { opacity: .35; cursor: default; }
.qty-num { width: 44px; text-align: center; font-size: 13px; font-weight: 500; color: var(--ink); }
.remove-btn {
  font-size: 12px; color: var(--mocha); text-decoration: underline;
  text-underline-offset: 2px; transition: color .2s; background: none;
}
.remove-btn:hover { color: var(--ink); }

/* ─── EMPTY STATE ─────────────────────────────────────────────── */
.cart-empty {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 24px; text-align: center;
}
.cart-empty.visible { display: flex; }
.cart-empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--color-border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-size: 32px;
  color: var(--color-espresso);
}
.cart-empty-title {
  font-family: var(--font-serif); font-size: 22px;
  color: var(--color-espresso); margin-bottom: 8px; font-weight: 300;
}
.cart-empty-text {
  font-size: 13px; color: var(--color-text-muted);
  margin-bottom: 24px; max-width: 280px; line-height: 1.6;
}
.cart-empty-cta {
  padding: 12px 28px; border-radius: 999px;
  background: var(--color-espresso); color: var(--color-surface);
  font-size: 13px; font-weight: 500; cursor: pointer;
  text-decoration: none; transition: all .2s;
}
.cart-empty-cta:hover { background: var(--color-ink); }

/* ─── ORDER SUMMARY COLUMN ────────────────────────────────────── */
.cart-summary-col {
  padding: 24px 16px;
  display: none;
}
@media (min-width: 768px) {
  .cart-summary-col {
    display: block; padding: 32px 40px;
    position: sticky; top: 80px;
  }
}

.summary-label-title {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 20px;
}
.summary-row {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px;
}
.summary-key { font-size: 13px; color: var(--mocha); }
.summary-val { font-size: 13px; color: var(--espresso); font-weight: 500; text-align: right; }
.summary-divider { border: none; border-top: 1px solid var(--beige); margin: 16px 0; }
.summary-total-key { font-size: 14px; color: var(--ink); font-weight: 500; }
.summary-total-val { font-size: 17px; color: var(--ink); font-weight: 500; }
.summary-note {
  font-size: 11px; color: var(--mocha); margin-top: 10px; margin-bottom: 20px; line-height: 1.65;
}
.checkout-cta-btn {
  display: block; width: 100%; padding: 15px; border-radius: 999px;
  background: var(--espresso); color: var(--cream);
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  text-align: center; transition: background .2s;
}
.checkout-cta-btn:hover { background: var(--ink); }
.checkout-cta-btn.disabled { opacity: .45; pointer-events: none; }

/* ─── STICKY BOTTOM CTA (mobile) ─────────────────────────────── */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 98;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(61,43,31,0.1);
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px);
  display: none;
}
@media (max-width: 767px) { .sticky-cta { display: block; } }
.sticky-cta-inner { display: flex; align-items: center; gap: 12px; }
.sticky-total { flex: 1; }
.sticky-total-label { font-size: 11px; color: var(--mocha); }
.sticky-total-value { font-size: 16px; font-weight: 500; color: var(--ink); }
.sticky-cta-btn {
  padding: 14px 24px; border-radius: 999px;
  background: var(--espresso); color: var(--cream);
  font-size: 13px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; transition: background .2s;
  white-space: nowrap; display: block; text-align: center;
}
.sticky-cta-btn:active { background: var(--ink); }
