/* Carrito mejorado */
#carrito {
  position: fixed;
  top: 0; 
  right: -100%;
  width: 450px;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  padding: 2rem;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  z-index: 2000;
  backdrop-filter: blur(15px);
  border-left: 4px solid #DAA520;
}

#carrito.active { 
  right: 0; 
}

#carritoOverlay {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1500;
  backdrop-filter: blur(5px);
}

#carritoOverlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Lista del carrito mejorada */
#listaCarrito {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

#listaCarrito li.carrito-vacio {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 237, 78, 0.05));
  border-radius: 20px;
  border: 2px dashed #DAA520;
}

.carrito-vacio .empty-cart-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.carrito-vacio p {
  font-size: 1.2rem;
  font-weight: 600;
  color: #231a11;
  margin-bottom: 0.5rem;
}

.carrito-vacio small {
  color: #666;
  font-size: 0.9rem;
}

/* Items del carrito mejorados */
.carrito-item {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(247,243,239,0.9));
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: 20px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.carrito-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #231a11, #DAA520, #231a11);
  border-radius: 20px 20px 0 0;
}

.carrito-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  border-color: #DAA520;
}

.carrito-item-info {
  margin-bottom: 1rem;
}

.carrito-item-nombre {
  font-size: 1.1rem;
  font-weight: 700;
  color: #231a11;
  margin: 0 0 0.5rem 0;
}

.carrito-item-precio {
  font-size: 0.9rem;
  color: #666;
  opacity: 0.8;
}

.carrito-item-controles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.controles-cantidad {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.8);
  padding: 0.5rem;
  border-radius: 15px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.btn-cantidad {
  background: linear-gradient(135deg, #231a11, #2e2113);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cantidad:hover {
  background: linear-gradient(135deg, #2e2113, #3d2f1e);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cantidad {
  font-weight: bold;
  color: #231a11;
  min-width: 45px;
  text-align: center;
  font-size: 1rem;
  background: rgba(255, 215, 0, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
}

.carrito-item-subtotal {
  font-weight: bold;
  color: #22c55e;
  font-size: 1.1rem;
}

.btn-eliminar {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-eliminar:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Total del carrito mejorado */
#totalCarrito {
  font-size: 1.5rem;
  font-weight: bold;
  color: #231a11;
  text-align: center;
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.1));
  border-radius: 20px;
  border: 3px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.total-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  color: #231a11;
  font-weight: 600;
}

.total-amount {
  color: #22c55e;
  font-size: 1.8rem;
  font-weight: 800;
}

/* Botones del carrito mejorados */
.btn-confirmar {
  width: 100%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  padding: 1.25rem;
  border-radius: 20px;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-confirmar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-confirmar:hover::before {
  left: 100%;
}

.btn-confirmar:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

.btn-vaciar {
  width: 100%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-vaciar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-vaciar:hover::before {
  left: 100%;
}

.btn-vaciar:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Notificaciones mejoradas */
.notificacion {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
  z-index: 10000;
  font-weight: 600;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.2);
  max-width: 350px;
  animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInBounce {
  0% { 
    transform: translateX(400px) scale(0.8); 
    opacity: 0; 
  }
  60% { 
    transform: translateX(-20px) scale(1.05); 
    opacity: 1; 
  }
  100% { 
    transform: translateX(0) scale(1); 
  }
}

@keyframes slideOutBounce {
  0% { 
    transform: translateX(0) scale(1); 
    opacity: 1; 
  }
  100% { 
    transform: translateX(400px) scale(0.8); 
    opacity: 0; 
  }
}

.notif-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notif-text {
  flex: 1;
}

/* Responsive para carrito */
@media (max-width: 768px) {
  #carrito {
    width: 100vw;
    right: -100vw;
    padding: 1.5rem;
  }

  .carrito-item {
    padding: 1.25rem;
  }

  .carrito-item-controles {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .controles-cantidad {
    justify-content: center;
  }

  .total-info {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .productos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .producto {
    padding: 2rem;
  }

  main {
    padding: 1rem;
  }

  .presentacion {
    padding: 2rem 1rem;
  }

  .presentacion h2 {
    font-size: 2rem;
  }
}


