/* ---------- RESET & GLOBAL (dentro del main) ---------- */
.cart-page {
  background-color: #f5f5f7;
  padding: 2rem 1.5rem;
  
  min-height: 100vh;
}

.cart-container {
  max-width: 1280px;
  margin: 0 auto;
}

/* Header */
.cart-header {
  margin-bottom: 1.75rem;
}

.cart-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Layout 2 columnas */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.75rem;
  align-items: start;
}

/* Columna izquierda - items */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Seller Card */
.seller-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
}

.seller-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.seller-header {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.seller-label {
  color: #6b7280;
  font-weight: 500;
}

.seller-name {
  color: #2563EB;
  font-weight: 700;
  margin-left: 0.25rem;
}

.seller-products {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Producto individual */
.cart-product {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.cart-product:last-child {
  border-bottom: none;
}

.product-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background-color: #f9fafb;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-info {
  flex: 2;
  min-width: 0;
}

.product-title h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.2rem 0;
  line-height: 1.3;
}

.product-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
}

.btn-remove {
  background: none;
  border: none;
  color: #2563EB;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0;
  margin-top: 0.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-remove:hover {
  color: #2563EB;
  text-decoration: underline;
}

.btn-remove:focus-visible {
  outline: 2px solid #2563EB;
  border-radius: 6px;
}

.product-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f9fafb;
  border-radius: 2rem;
  padding: 0.25rem;
  border: 1px solid #e5e7eb;
}

.qty-btn {
  background: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  color: #4b5563;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background-color: #2563EB;
  color: white;
}

.qty-value {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.price-block {
  text-align: right;
}

.current-price {
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
  white-space: nowrap;
}

/* Resumen de compra (sticky) */
.cart-summary {
  position: sticky;
  top: 2rem;
  align-self: start;
}

.summary-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.summary-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.summary-label {
  color: #6b7280;
  font-weight: 500;
}

.summary-value {
  font-weight: 600;
  color: #111827;
}

.summary-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 1rem 0;
}

.summary-total {
  margin: 1rem 0 1.5rem 0;
}

.total-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

.total-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
}

.btn-checkout {
  width: 100%;
  background-color: #2563EB;
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.75rem;
}

.btn-checkout:hover {
  background-color: #2563EB;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-continue {
  width: 100%;
  background-color: white;
  border: 1px solid #d1d5db;
  padding: 0.8rem;
  border-radius: 0.75rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-continue:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr 300px;
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .cart-page {
    padding: 1.25rem;
  }
  .cart-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .cart-summary {
    position: static;
  }
  .cart-product {
    flex-wrap: wrap;
  }
  .product-image {
    width: 70px;
    height: 70px;
  }
  .product-controls {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.5rem;
  }
  .price-block {
    text-align: left;
  }
  .quantity-control {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .cart-title {
    font-size: 1.6rem;
  }
  .seller-card {
    padding: 1rem;
  }
  .product-title h3 {
    font-size: 0.85rem;
  }
  .current-price {
    font-size: 0.9rem;
  }
  .summary-card {
    padding: 1rem;
  }
  .total-amount {
    font-size: 1.2rem;
  }
}







