/* ─── Cart Page Layout ──────────────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
  padding-bottom: 3rem;
}

@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
}

/* ─── Cart Item ─────────────────────────────────────────────────────────── */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 1.25rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: var(--transition);
}

.cart-item:hover { border-color: rgba(116, 24, 32, 0.2); }

.cart-item-image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.cart-item-name:hover { color: var(--wine-gold); }

.cart-item-winery {
  font-size: 0.8rem;
  color: var(--wine-gold);
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Qty Control ───────────────────────────────────────────────────────── */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.qty-btn {
  background: var(--bg-glass);
  border: none;
  color: var(--text-primary);
  width: 32px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.qty-btn:hover { background: rgba(116, 24, 32, 0.15); color: var(--wine-gold); }

.qty-input {
  width: 48px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--border-glass);
  border-right: 1px solid var(--border-glass);
  background: rgba(66, 7, 13, 0.036);
  color: var(--text-primary);
  text-align: center;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ─── Cart Subtotal ─────────────────────────────────────────────────────── */
.cart-subtotal-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wine-gold-light);
  white-space: nowrap;
}

/* ─── Remove Button ─────────────────────────────────────────────────────── */
.btn-remove {
  background: none;
  border: 1px solid rgba(179, 38, 30, 0.2);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover { background: rgba(179, 38, 30, 0.15); color: #B3261E; border-color: rgba(179, 38, 30, 0.4); }

/* ─── Cart Summary ──────────────────────────────────────────────────────── */
.cart-summary { position: sticky; top: 90px; }

.cart-summary-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--wine-gold);
  margin-bottom: 1.5rem;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.cart-summary-divider {
  border: none;
  border-top: 1px solid var(--border-glass);
  margin: 1rem 0;
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cart-summary-total span:last-child { color: var(--wine-gold-light); }

/* ─── Delivery Address + Map ───────────────────────────────────────────── */
.delivery-address-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-glass);
}

.address-input-row {
  display: flex;
  gap: 0.5rem;
}

.address-input-row .form-control {
  flex: 1;
  font-size: 0.85rem;
}

.address-input-row .btn {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
}

.delivery-map {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  margin-top: 0.75rem;
  border: 1px solid var(--border-glass);
  z-index: 1;
}

.map-status {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  line-height: 1.4;
  min-height: 1.2em;
}

/* Leaflet dark theme tweaks */
.delivery-map .leaflet-tile-pane { filter: brightness(0.85) contrast(1.1) saturate(0.9); }
.delivery-map .leaflet-control-attribution { font-size: 0.6rem; opacity: 0.5; }

/* Order address display */
.order-address {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.order-address-icon { flex-shrink: 0; }

.order-mini-map {
  width: 100%;
  height: 150px;
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 1px solid var(--border-glass);
  z-index: 1;
}

.order-mini-map .leaflet-tile-pane { filter: brightness(0.85) contrast(1.1) saturate(0.9); }
.order-mini-map .leaflet-control-attribution { font-size: 0.6rem; opacity: 0.5; }

