/* ========= Carrito - Estilo renovado festivo 🛒🎉 ========= */

:root {
  --fuente-titulos: 'Fredoka', 'Comic Sans MS', cursive, sans-serif;
  --fuente-cuerpo: 'Nunito', 'Segoe UI', Tahoma, sans-serif;
  --transicion-rebote: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body.page-cart {
  padding-top: 0;
  font-family: var(--fuente-cuerpo);
}

/* Ocultar solo los enlaces de navegación en la página del carrito */
.page-cart .nav-links {
  display: none !important;
}

/* Asegurar que el header se muestre pero sin los links */
.page-cart header {
  display: block !important;
}

/* Panel de título del carrito */
.cart-header-panel {
  background: linear-gradient(135deg, var(--azul-electrico) 0%, #1976d2 100%);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(20, 67, 136, 0.3);
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}

.cart-header-panel::before {
  content: '🛒 🎁 🎉';
  position: absolute;
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  opacity: 0.15;
  letter-spacing: 1rem;
  animation: float 4s ease-in-out infinite;
}

.cart-header-panel::after {
  content: '🎈 ⭐ 🎊';
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  opacity: 0.15;
  letter-spacing: 1rem;
  animation: float 4s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 15px)); }
}

.cart-header-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cart-header-title {
  font-family: var(--fuente-titulos);
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.cart-header-title i {
  font-size: 2.2rem;
  color: var(--amarillo);
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.cart-header-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  font-weight: 500;
}

.cart-section {
  margin: 0 auto 3rem;
  max-width: 1800px;
  /* Aumentado para pantallas grandes */
  width: 95%;
  /* Ocupa casi todo el ancho */
  padding: 3.5rem 1.2rem 3rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(34, 197, 94, 0.10), transparent 32%),
    radial-gradient(circle at 75% 10%, rgba(59, 130, 246, 0.12), transparent 30%),
    #f5f7fb;
  scroll-margin-top: 120px;
}

.cart-card {
  background: linear-gradient(145deg, #ffffff 0%, #f9fbff 60%, #f3f6fb 100%);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(20, 67, 136, 0.1);
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
  transition: var(--transicion-rebote);
}

.cart-card:hover {
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 25px 60px rgba(20, 67, 136, 0.15);
}

.cart-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.cart-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(14, 34, 64, 0.04);
  pointer-events: none;
}

/* Header */
.cart-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid #e6ecf4;
  padding-bottom: 0.7rem;
}

.cart-card__header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f2a4d;
  letter-spacing: 0.01em;
}

.cart-card__header p {
  margin-top: 0.18rem;
  font-size: 0.95rem;
  color: #5b6c85;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #facc15, #f59e0b);
  color: #0f2a4d;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(250, 204, 21, 0.28);
}

/* Body */
.cart-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.cart-empty {
  font-size: 0.95rem;
  color: #6c7a92;
  font-style: italic;
}

/* Item */
.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.1fr);
  gap: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc, #f4f7fb);
  border: 1px solid #e5ecf5;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.cart-item__main {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.cart-item__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #0f2a4d;
  background: linear-gradient(120deg, #22c55e, #86efac);
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.25);
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cart-item__name {
  font-size: 1rem;
  font-weight: 700;
  color: #0f2a4d;
}

.cart-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.cart-item__detail {
  font-size: 0.85rem;
  color: #6c7a92;
}

.cart-item__note {
  font-size: 0.82rem;
  color: #7a8aa6;
}

/* Chips */
.chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #e8f0fb;
  color: #1d4ed8;
}

.chip--inflable {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.chip--sillas {
  background: rgba(14, 165, 233, 0.18);
  color: #0369a1;
}

/* Lado derecho: cantidad y precio */
.cart-item__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.15rem 0.35rem;
  border: 1px solid #dce4ef;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: #eef2f7;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f2a4d;
  transition: background 0.15s ease, transform 0.1s ease;
}

.qty-btn:hover {
  background: rgba(34, 197, 94, 0.18);
  transform: translateY(-1px);
}

.qty-value {
  min-width: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f2a4d;
}

.cart-item__price {
  text-align: right;
  font-size: 0.82rem;
  color: #6c7a92;
}

.cart-item__total {
  font-size: 1rem;
  font-weight: 700;
  color: #0f2a4d;
}

.cart-item__remove {
  margin-top: 0.1rem;
  font-size: 0.75rem;
  color: #d94c4c;
  cursor: pointer;
  background: none;
  border: none;
}

/* Footer */
.cart-card__footer {
  border-top: 1px solid #e6ecf4;
  padding-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: transparent;
  /* Mantener transparente para heredar el fondo claro del card */
}

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: linear-gradient(135deg, #ffffff, #f9fbff);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #dfe6f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #20365a;
}

.cart-summary__row--strong {
  font-weight: 700;
  color: #0f2a4d;
}

.cart-summary__note {
  font-size: 0.82rem;
  color: #73829c;
}

/* Botones */
.cart-actions-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.4rem;
  background: transparent;
  /* Asegurar fondo transparente */
}

.cart-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.2rem;
  background: transparent;
  /* Asegurar fondo transparente */
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-volver-inicio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--azul-electrico) 0%, #1976d2 100%);
  color: #ffffff;
  font-family: var(--fuente-cuerpo);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(20, 67, 136, 0.25);
  transition: var(--transicion-rebote);
  position: relative;
  overflow: hidden;
}

.btn-volver-inicio::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 ease;
}

.btn-volver-inicio:hover::before {
  left: 100%;
}

.btn-volver-inicio:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(20, 67, 136, 0.35);
}

.btn--ghost {
  background: #ffffff;
  border: 1px solid #d0d9e6;
  color: #0f2a4d;
}

.btn--ghost:hover {
  background: #f5f7fb;
  transform: translateY(-1px);
}

.btn--accent {
  background: linear-gradient(120deg, #fb923c, #f97316);
  color: #0f2a4d;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.24);
}

.btn--accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.30);
}

.btn--primary {
  background: linear-gradient(135deg, #FFD700 0%, #FF6B35 100%);
  color: #1a1a2e;
  font-family: var(--fuente-cuerpo);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn--primary:hover::before {
  left: 100%;
}

.btn--primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

@media (max-width: 700px) {
  body.page-cart {
    padding-top: 0;
  }

  .cart-header-panel {
    padding: 2rem 1rem 1.5rem;
    margin-top: 70px;
  }

  .cart-header-title {
    font-size: 1.6rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .cart-header-title i {
    font-size: 1.5rem;
  }

  .cart-header-subtitle {
    font-size: 0.95rem;
  }

  .cart-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    scroll-margin-top: 140px;
  }

  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-card {
    padding: 1.2rem 1.1rem;
  }

  .cart-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-actions-wrapper {
    align-items: stretch;
  }

  .btn-volver-inicio {
    width: 100%;
    text-align: center;
  }

  .cart-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Detalles de evento para solicitud de renta */
.cart-event-details {
  margin-top: 2rem;
  padding: 2rem;
  border: none;
  border-radius: 20px;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.cart-event-details::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--azul-electrico), var(--amarillo));
}

.event-details-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.event-details-header i {
  font-size: 1.5rem;
  color: var(--azul-electrico);
  background: rgba(15, 42, 77, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-details-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #0f2a4d;
  font-weight: 800;
}

.event-details-header .required-notice {
  margin-left: auto;
  font-size: 0.8rem;
  color: #dc2626;
  background: #fee2e2;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* Campo con error */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

.cart-event-details .event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #334155;
  font-size: 0.9rem;
  margin-left: 0.2rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.cart-event-details input,
.cart-event-details select,
.cart-event-details textarea {
  width: 100%;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  /* Espacio para el icono */
  font-size: 0.95rem;
  background: #ffffff;
  color: #0f2a4d;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cart-event-details textarea {
  resize: vertical;
  padding-left: 2.8rem;
  min-height: 80px;
}

/* Focus states */
.cart-event-details input:focus,
.cart-event-details select:focus,
.cart-event-details textarea:focus {
  border-color: var(--azul-electrico);
  box-shadow: 0 0 0 4px rgba(15, 42, 77, 0.1);
  outline: none;
}

.input-wrapper:focus-within i {
  color: var(--azul-electrico);
}

.cart-event-details .cart-summary__note {
  margin-top: 1.5rem;
  padding: 0.8rem 1rem;
  background: #fffbeb;
  border-radius: 8px;
  color: #92400e;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #fcd34d;
}

.cart-event-details .cart-summary__note i {
  color: #f59e0b;
}

/* Hover effects for inputs */
.cart-event-details input:hover,
.cart-event-details select:hover,
.cart-event-details textarea:hover {
  border-color: #cbd5e1;
}

@media (max-width: 600px) {
  .cart-event-details {
    padding: 1.5rem 1rem;
  }

  .cart-event-details .event-grid {
    grid-template-columns: 1fr;
  }
}