/* ══════════════════════════════════════════
   ElektroGH.wien – Cart Page Styles
   ══════════════════════════════════════════ */

.cart-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}

.cart-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 32px 0;
}
.cart-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-header h1 .lucide { width: 28px; height: 28px; }
.cart-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 8px;
}

/* ──────────── CART ITEMS ──────────── */
.cart-items { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.cart-item:hover { box-shadow: var(--shadow); }

.cart-item-img {
  width: 100px; height: 100px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cart-item-img .lucide { width: 40px; height: 40px; color: var(--muted); }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; border-radius: var(--radius-sm); }
.cart-item-img.has-img { background: #fff; }

.cart-item-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cart-item-brand { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.cart-item-name { font-size: 0.95rem; font-weight: 700; color: var(--black); }
.cart-item-meta { font-size: 0.78rem; color: var(--muted); font-family: 'DM Mono', monospace; }
.cart-stock-badge { font-size: 0.72rem; display: flex; align-items: center; gap: 3px; margin-top: 4px; }
.cart-stock-badge svg { width: 12px; height: 12px; }
.cart-stock-badge.in-stock { color: #16a34a; }
.cart-stock-badge.low-stock { color: #d97706; }
.cart-stock-badge.out-of-stock { color: #dc2626; }

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
}

.cart-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.cart-qty-btn {
  width: 34px; height: 34px;
  border: none;
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  transition: background 0.15s;
}
.cart-qty-btn:hover { background: var(--border); }
.cart-qty-btn .lucide { width: 14px; height: 14px; }
.cart-qty-val {
  width: 40px; height: 34px;
  border: none;
  text-align: center;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black);
  outline: none;
  background: var(--white);
}

.cart-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-light);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-family: inherit;
  transition: color 0.15s;
}
.cart-remove-btn:hover { color: var(--red); }
.cart-remove-btn .lucide { width: 16px; height: 16px; }

.cart-item-price {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}
.cart-item-unit { font-size: 0.78rem; color: var(--muted); }
.cart-item-total { font-size: 1.15rem; font-weight: 800; color: var(--black); }

/* ──────────── CART SUMMARY ──────────── */
.cart-summary {
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: var(--nav-offset);
  height: fit-content;
}
.cart-summary-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 8px 0;
}
.summary-row .label { color: var(--muted); }
.summary-row .value { font-weight: 600; color: var(--text); }
.summary-row.total {
  border-top: 2px solid var(--border);
  margin-top: 12px;
  padding-top: 14px;
  font-size: 1.05rem;
}
.summary-row.total .label { font-weight: 700; color: var(--black); }
.summary-row.total .value { font-weight: 800; color: var(--black); font-size: 1.3rem; }

.summary-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.btn-checkout {
  width: 100%;
  height: 50px;
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  transition: all 0.2s;
}
.btn-checkout .lucide { width: 18px; height: 18px; }
.btn-checkout:hover { background: #f5c020; transform: translateY(-1px); }

.btn-continue-shopping {
  width: 100%;
  height: 44px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  transition: all 0.15s;
}
.btn-continue-shopping:hover { background: var(--border); }
.btn-continue-shopping .lucide { width: 16px; height: 16px; }

/* ──────────── EMPTY CART ──────────── */
.cart-empty {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}
.cart-empty > .lucide { width: 64px; height: 64px; color: var(--muted-light); margin-bottom: 20px; }
.cart-empty h2 { font-size: 1.3rem; font-weight: 800; color: var(--black); margin-bottom: 8px; }
.cart-empty p { font-size: 0.9rem; color: var(--muted); margin-bottom: 24px; }

/* ──────────── COUPON ──────────── */
.coupon-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.coupon-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.coupon-row .form-input { flex: 1; height: 40px; font-size: 0.85rem; }
.btn-coupon {
  height: 40px;
  padding: 0 16px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-coupon:hover { background: var(--dark); }
.coupon-msg {
  font-size: 0.78rem;
  margin-top: 6px;
  font-weight: 500;
}
.coupon-msg.success { color: var(--green); }
.coupon-msg.error { color: var(--red); }

@media (max-width: 768px) {
  .cart-layout { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .cart-header { padding: 20px 16px 0; }
  .cart-header h1 { font-size: 1.4rem; }
  .cart-item { flex-direction: column; gap: 12px; padding: 16px; }
  .cart-item-img { width: 100%; height: 100px; }
  .cart-item-name { font-size: 0.88rem; }
  .cart-item-actions { flex-wrap: wrap; gap: 12px; }
  .cart-item-price {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
  }
  .cart-item-total { font-size: 1.05rem; }
  .cart-summary { position: static; padding: 24px; }
  .summary-row.total .value { font-size: 1.15rem; }
  .btn-checkout { height: 48px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  .cart-layout { padding: 12px; }
  .cart-header { padding: 16px 12px 0; }
  .cart-item { padding: 14px; }
  .cart-summary { padding: 20px; }
}

/* ──────────── BACKORDER BANNER ──────────── */
.backorder-banner {
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.6;
}
.backorder-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.backorder-banner-header .lucide {
  width: 18px;
  height: 18px;
  color: #f59e0b;
}
.backorder-banner p {
  margin: 0 0 8px;
}
.backorder-banner ul {
  margin: 0;
  padding-left: 20px;
}
.backorder-banner li {
  margin-bottom: 4px;
}
