/* --- Estilos Unificados del Carrito --- */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.cart-overlay.open {
  display: block;
  opacity: 1;
}

.cart-sidebar {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 95%;
  max-width: 480px;
  background: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  border-radius: 20px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.cart-sidebar.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.cart-header {
  padding: 1rem 1.5rem;
  background: var(--primary-color);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.close-cart {
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.2rem;
  max-height: 40vh;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
}

.cart-item img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.cart-item-price {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.95rem;
}

.delivery-section {
  padding: 1.2rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  overflow-y: auto;
}

.delivery-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dark-color);
}

.delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}

.delivery-card {
  padding: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  text-align: center;
  background: white;
  cursor: pointer;
  transition: 0.2s;
}

.delivery-option input:checked + .delivery-card {
  border-color: var(--primary-color);
  background: #f5f3ff;
  color: var(--primary-color);
}

.delivery-details-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.pickup-info-box {
  background: #ecfdf5;
  color: #065f46;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  display: flex;
  gap: 8px;
  align-items: center;
}

.cart-footer {
  padding: 1.2rem 1.5rem;
  background: white;
  border-top: 1px solid #eee;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.25);
}