/**
 * ============================================================
 * MODALES COMPLETAMENTE NUEVOS - VERSIÓN 2
 * Diseño moderno, limpio y profesional
 * ============================================================
 */

/* Fondo del modal */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

/* Contenedor principal del modal */
.modal-dialog {
  max-width: 500px;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-dialog.modal-lg {
  max-width: 600px;
}

@keyframes modalSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Contenido del modal */
.modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  background: white;
}

/* Header del modal - COMPLETAMENTE NUEVO */
.modal-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  padding: 24px;
  border-bottom: none;
  position: relative;
}

.modal-header::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.modal-header .modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
}

.modal-header .modal-title i {
  font-size: 1.6rem;
}

/* Botón cerrar mejorado */
.modal-header .btn-close {
  background: #ff3333 !important;
  opacity: 1 !important;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: all 0.3s ease;
  filter: invert(1) !important;
}

.modal-header .btn-close::after {
  content: '✕';
  color: white;
  font-size: 1.5rem;
}

.modal-header .btn-close:hover,
.modal-header .btn-close:focus {
  background: #cc0000 !important;
  transform: rotate(90deg);
}

/* Body del modal */
.modal-body {
  padding: 28px;
  background: #fafbfc;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

/* Contenedor de imagen en modal */
.modal-body .img-container {
  width: 100%;
  height: 350px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Imagen en modal */
.modal-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
  animation: imageSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.modal-body img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   Catalogo inline styles moved from catalogo.html
   ============================================================ */

/* Counter animations */
.trust-badge-number {
  transition: transform 0.2s ease;
  display: inline-block;
  will-change: transform;
}

.trust-badges {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.trust-badges.animated {
  opacity: 1;
  transform: translateY(0);
}

.trust-badge {
  animation: fadeInUp 0.6s ease backwards;
}

.trust-badge:nth-child(1) {
  animation-delay: 0.1s;
}

.trust-badge:nth-child(2) {
  animation-delay: 0.2s;
}

.trust-badge:nth-child(3) {
  animation-delay: 0.3s;
}

.trust-badge:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Countdown timer */
.countdown-wrapper {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.countdown-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e72 100%);
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  animation: pulse-countdown 2s infinite;
  flex-wrap: wrap;
  justify-content: center;
}

@keyframes pulse-countdown {
  0%,
  100% {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  }
  50% {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
  }
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.countdown-number {
  font-size: 22px;
  font-weight: bold;
  color: white;
  min-width: 40px;
  text-align: center;
  line-height: 1;
}

.countdown-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.countdown-separator {
  font-size: 20px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 4px;
}

@media (max-width: 768px) {
  .countdown-timer {
    padding: 12px 14px;
    gap: 4px;
  }

  .countdown-number {
    font-size: 18px;
    min-width: 32px;
  }

  .countdown-label {
    font-size: 8px;
  }

  .countdown-separator {
    font-size: 14px;
    margin: 0 2px;
  }
}

@media (max-width: 576px) {
  .countdown-timer {
    padding: 10px 10px;
    gap: 3px;
  }

  .countdown-number {
    font-size: 16px;
    min-width: 28px;
  }

  .countdown-label {
    font-size: 7px;
  }

  .countdown-separator {
    font-size: 12px;
    margin: 0 1px;
  }
}

/* Promo modal UI */
.modal-promo-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.badge-limited {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b, #ff8e72);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.modal-price-section {
  background: linear-gradient(
    135deg,
    rgba(0, 167, 225, 0.08),
    rgba(0, 132, 209, 0.08)
  );
  border-left: 4px solid #00a7e1;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
}

.price-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.price-display {
  font-size: 2rem;
  font-weight: 800;
  color: green;
  margin: 8px 0 0 0;
  line-height: 1;
}

.price-description {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 8px 0 0 0;
  font-style: italic;
}

.modal-description {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
  margin: 16px 0;
}

.modal-features {
  background: #f9fafb;
  padding: 16px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #e5e7eb;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.5;
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-item i {
  color: #10b981;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-item strong {
  color: #1f2937;
  display: inline;
}

.btn-promo-cta {
  background: linear-gradient(135deg, #00a7e1, #0084d1);
  color: white;
  border: none;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 167, 225, 0.3);
}

.btn-promo-cta:hover {
  background: linear-gradient(135deg, #0091c4, #006fb8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 167, 225, 0.4);
  color: white;
}

.btn-promo-cta i {
  font-size: 1.3rem;
}

@keyframes imageSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Título del producto */
.modal-product-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 16px 0 8px 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.modal-body > p:not(.opciones-titulo) {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

/* ============================================================
   OPCIONES SIN SELECT - NUEVO SISTEMA
   ============================================================ */

.opciones-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin: 16px 0;
  border: 1px solid var(--border-color);
  animation: optionsSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes optionsSlideIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.opciones-titulo {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.opciones-titulo i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* Grid de opciones */
.opciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
}

/* Opción individual */
.opcion-item {
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.opcion-item:hover {
  border-color: var(--primary-color);
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.opcion-item.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.opcion-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 0.3s ease;
}

.opcion-item:hover::before {
  left: 100%;
}

/* Contenido de la opción */
.opcion-label {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.opcion-precio {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  position: relative;
  z-index: 1;
}

.opcion-item.active .opcion-precio {
  color: white;
}

/* Previsualización de imagen */
.opcion-preview {
  width: 100%;
  height: 80px;
  background: var(--bg-light);
  border-radius: 6px;
  margin: 8px 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.opcion-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  padding: 0;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.opcion-item:hover .opcion-preview img {
  transform: scale(1.1);
}

.opcion-item.active .opcion-preview {
  border-color: rgba(255, 255, 255, 0.3);
}

.opcion-size-preview {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  margin: 8px 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
  border: 1px dashed rgba(102, 126, 234, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.opcion-size-icon {
  font-size: 1.1rem;
  color: var(--primary-color);
}

.opcion-size-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.opcion-item.active .opcion-size-preview {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.opcion-item.active .opcion-size-icon,
.opcion-item.active .opcion-size-text {
  color: white;
}

/* ============================================================
   INFO DEL PRODUCTO
   ============================================================ */

.producto-info-box {
  background: rgba(102, 126, 234, 0.05);
  padding: 14px;
  border-radius: 10px;
  border-left: 3px solid var(--primary-color);
  margin: 16px 0;
  animation: infoSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes infoSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.producto-info-box strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.producto-info-box strong i {
  font-size: 1.1rem;
}

.producto-info-box ul {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.producto-info-box li {
  margin: 4px 0;
  line-height: 1.4;
}

/* Divider */
.modal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 16px 0;
}

/* ============================================================
   BOTONES DEL MODAL
   ============================================================ */

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.btn-cotizar {
  flex: 1;
  background: linear-gradient(135deg, #25d366, #1fbb58);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 20px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  min-width: 200px;
}

.btn-cotizar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

.btn-cotizar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.btn-cotizar:active {
  transform: translateY(0);
}

.btn-cotizar i {
  font-size: 1.1rem;
}

/* Info de seguridad */
.seguridad-info {
  text-align: center;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.seguridad-info i {
  color: #25d366;
  font-size: 0.95rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .modal-dialog {
    margin: 20px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-header .modal-title {
    font-size: 1.2rem;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-product-title {
    font-size: 1.3rem;
  }

  .opciones-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
  }

  .opcion-item {
    padding: 10px;
  }

  .opcion-label {
    font-size: 0.8rem;
  }

  .opcion-precio {
    font-size: 0.85rem;
  }

  .opcion-preview {
    height: 70px;
  }

  .btn-cotizar {
    min-width: auto;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-cotizar {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    margin: 10px;
    max-width: 100% !important;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-header .modal-title {
    font-size: 1.1rem;
  }

  .modal-header .btn-close {
    width: 36px;
    height: 36px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-product-title {
    font-size: 1.2rem;
  }

  .modal-body > p {
    font-size: 0.9rem;
  }

  .opciones-container {
    padding: 16px;
  }

  .opciones-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .opcion-item {
    padding: 8px;
  }

  .opcion-preview {
    height: 60px;
    margin: 6px 0;
  }

  .producto-info-box {
    padding: 12px;
    border-left-width: 2px;
  }

  .producto-info-box strong {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }

  .producto-info-box ul {
    font-size: 0.8rem;
  }

  .btn-cotizar {
    padding: 11px 14px;
    font-size: 0.85rem;
  }

  .seguridad-info {
    font-size: 0.75rem;
  }
}
