/* ══ CART PAGE ══════════════════════════════════════════════ */
.cart-page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.cart-header { margin-bottom: 28px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.cart-header h1 { font-family: var(--font-display); font-size: 2rem; color: var(--ink); }
.cart-header p { color: var(--muted); font-size: 14px; margin-top: 4px; }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.item-image {
  width: 88px;
  height: 88px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: block;
}
.item-image img { width:100%; height:100%; object-fit:cover; }

.item-meta { min-width: 0; }
.item-name { font-weight: 600; font-size: 15px; margin-bottom: 3px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-variant { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.item-price { font-size: 13px; color: var(--primary); font-weight: 600; }

.item-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
  min-width: 120px;
}
.item-subtotal { font-weight: 700; font-size: 15px; color: var(--ink); white-space: nowrap; }

.qty-control-sm {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn-sm { width: 30px; height: 30px; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.qty-btn-sm:hover { background: var(--surface-2); }
.qty-val { width: 38px; height: 30px; border: none; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); text-align: center; font-size: 13px; outline: none; background: var(--surface); }

.remove-btn { font-size: 12px; color: var(--muted); padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); transition: all .2s; cursor: pointer; }
.remove-btn:hover { color: var(--danger); border-color: var(--danger); }

/* Cart Summary */
.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-main-h) + 16px);
}
.summary-title { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.summary-row.total { font-weight: 700; font-size: 16px; border-bottom: none; padding-top: 14px; }
.summary-note { font-size: 12px; color: var(--muted); margin: 12px 0 18px; line-height: 1.6; }

.empty-cart { text-align: center; padding: 80px 20px; }
.empty-cart h2 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 8px; }
.empty-cart p { color: var(--muted); margin-bottom: 24px; }

@media (max-width: 768px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-item { grid-template-columns: 72px 1fr; gap: 12px; }
  .item-controls { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; min-width: unset; }
}
@media (max-width: 480px) {
  .cart-page-wrap { padding: 20px 14px 60px; }
  .item-name { font-size: 14px; }
}