/* ═══════════════════════════════════════════════════════════════════════════ */
/* CARRITO Y MODAL — DISEÑO MODERNO Y ATRACTIVO */
/* ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --navy: #0c1a4b;
  --navy-light: #1a2d5f;
  --navy-lighter: #2a3f7f;
  --cream: #fff7ed;
  --cream-dark: rgba(255, 247, 237, 0.6);
  --orange: #f97316;
  --orange-dark: #ea580c;
  --gray-light: #e2e8f0;
  --gray-medium: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BOTÓN FLOTANTE DE CARRITO */
/* ═══════════════════════════════════════════════════════════════════════════ */

.carrito-flotante {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
  z-index: 100;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carrito-flotante:hover {
  transform: translateY(-8px) scale(1.08);
  box-shadow: 0 12px 35px rgba(249, 115, 22, 0.5);
}

.carrito-flotante:active {
  transform: translateY(-4px) scale(1.04);
}

.carrito-badge {
  background: var(--navy);
  color: var(--orange);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* MODALES */
/* ═══════════════════════════════════════════════════════════════════════════ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 12, 36, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: linear-gradient(180deg, var(--navy-light) 0%, var(--navy) 100%);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(249, 115, 22, 0.2);
  position: relative;
  border: 1px solid rgba(249, 115, 22, 0.3);
  animation: slideUp 0.4s ease;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(249, 115, 22, 0.1);
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--cream);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(249, 115, 22, 0.2);
  color: var(--orange);
}

.modal-body {
  padding: 32px 24px;
}

.modal-body h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 24px;
  color: var(--orange);
  letter-spacing: -0.5px;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(249, 115, 22, 0.2);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 12px 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* GRID DE PRODUCTOS */
/* ═══════════════════════════════════════════════════════════════════════════ */

.filter-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  animation: slideDown 0.6s ease;
}

.filter-tab {
  padding: 10px 20px;
  border: 2px solid #f97316;
  background: transparent;
  cursor: pointer;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  color: #f97316;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-tab:hover {
  border-color: var(--orange);
  color: white;
  background: #f97316;
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
  animation: fadeIn 0.6s ease;
}

.producto-card {
  background: linear-gradient(135deg, var(--navy-light) 0%, var(--navy-lighter) 100%);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.producto-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 12px 35px rgba(249, 115, 22, 0.3);
  border-color: var(--orange);
}

.producto-imagen {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, rgba(5, 12, 36, 0.5) 0%, rgba(42, 63, 127, 0.5) 100%);
  position: relative;
  overflow: hidden;
}

.producto-imagen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.producto-imagen .back {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.producto-card:hover .producto-imagen img {
  transform: scale(1.1);
}

.producto-card:hover .producto-imagen .back {
  opacity: 1;
}

.producto-card h3 {
  margin: 16px 12px 6px;
  font-size: 15px;
  color: var(--cream);
  font-weight: 700;
  line-height: 1.3;
}

.precio-base {
  margin: 0 12px 12px;
  font-size: 14px;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.btn-personalizar {
  width: calc(100% - 24px);
  margin: 12px;
  padding: 12px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.btn-personalizar:hover {
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
  transform: translateY(-2px);
}

.btn-personalizar:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* PANEL DE CARRITO (LATERAL) */
/* ═══════════════════════════════════════════════════════════════════════════ */

.carrito-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: 420px;
  height: 100%;
  background: linear-gradient(180deg, var(--navy-light) 0%, var(--navy) 100%);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: slideIn 0.4s ease;
  border-left: 1px solid rgba(249, 115, 22, 0.3);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.carrito-panel.hidden {
  display: none;
}

.carrito-header {
  padding: 20px 24px;
  border-bottom: 2px solid var(--orange);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(249, 115, 22, 0.05);
}

.carrito-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--cream);
  font-weight: 900;
}

.btn-close {
  background: rgba(249, 115, 22, 0.1);
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--cream);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: rgba(249, 115, 22, 0.2);
  color: var(--orange);
}

.carrito-items {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carrito-item {
  background: linear-gradient(135deg, rgba(42, 63, 127, 0.4) 0%, rgba(26, 45, 95, 0.4) 100%);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.3s ease;
}

.carrito-item:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.item-info h4 {
  margin: 0;
  font-size: 13px;
  color: var(--cream);
  font-weight: 700;
  line-height: 1.3;
}

.item-config {
  font-size: 11px;
  color: var(--cream-dark);
  margin: 0;
  line-height: 1.4;
}

.item-precio {
  font-size: 12px;
  color: var(--cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-cantidad {
  width: 50px;
  padding: 6px;
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 6px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--cream);
  font-weight: 600;
}

.item-subtotal {
  font-weight: 700;
  color: var(--orange);
  font-size: 12px;
}

.item-acciones {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.item-acciones button {
  padding: 6px 10px;
  font-size: 11px;
  border: 1px solid rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.05);
  color: var(--cream);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 600;
  text-transform: uppercase;
}

.item-acciones button:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: var(--orange);
  color: var(--orange);
}

.carrito-totales {
  padding: 16px 20px;
  border-top: 1px solid rgba(249, 115, 22, 0.2);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0;
}

.carrito-totales p {
  margin: 10px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.carrito-totales strong {
  color: var(--orange);
  font-size: 16px;
}

.carrito-acciones {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* FORMULARIOS */
/* ═══════════════════════════════════════════════════════════════════════════ */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.2);
  color: var(--cream);
  transition: all 0.3s ease;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group textarea::placeholder {
  color: var(--cream-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-group label,
.checkbox-group label {
  display: flex;
  align-items: center;
  font-weight: 500;
  margin-bottom: 0;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--cream);
  transition: color 0.2s ease;
}

.radio-group label:hover,
.checkbox-group label:hover {
  color: var(--orange);
}

.radio-group input[type="radio"],
.radio-group input[type="checkbox"],
.checkbox-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
}

.precio-resumen {
  background: #fef3c7;
  border: 2px solid #f97316;
  border-radius: 10px;
  padding: 16px;
  margin: 20px 0;
  font-size: 14px;
}

.precio-resumen p {
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: #0c1a4b;
}

.precio-resumen strong {
  color: #f97316;
}

.precio-resumen hr {
  border: none;
  border-top: 1px solid rgba(249, 115, 22, 0.2);
  margin: 10px 0;
}

.hidden {
  display: none !important;
}

.ayuda {
  font-size: 12px;
  color: var(--cream-dark);
  margin: 6px 0 0 0;
  font-style: italic;
}

.info-importante {
  background: #fffbeb;
  border-left: 4px solid #f97316;
  padding: 14px;
  margin: 16px 0;
  border-radius: 6px;
  font-size: 13px;
  color: #0c1a4b;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BOTONES */
/* ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(249, 115, 22, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #0c1a4b;
  color: #fff7ed;
  border: 2px solid #0c1a4b;
}

.btn-secondary:hover {
  background: transparent;
  color: #0c1a4b;
  border-color: #0c1a4b;
}

.btn-block {
  width: 100%;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* RESPONSIVE */
/* ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .carrito-panel {
    width: 100%;
  }

  .grid-productos {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }

  .modal-content {
    width: 95%;
  }

  .carrito-flotante {
    bottom: 20px;
    right: 20px;
    padding: 12px 16px;
    font-size: 13px;
  }

  .carrito-acciones {
    flex-direction: column;
  }

  .carrito-acciones button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .carrito-flotante {
    padding: 10px 14px;
    font-size: 12px;
  }

  .grid-productos {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .producto-card h3 {
    font-size: 13px;
  }

  .modal-body {
    padding: 20px 16px;
  }

  .filter-tabs {
    gap: 8px;
  }

  .filter-tab {
    padding: 8px 14px;
    font-size: 12px;
  }
}
