/* Modal de Lujo - Rediseño Completo */

/* Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  will-change: opacity;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Modal Principal */
.modal {
  background: #000;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: stretch;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  will-change: transform;
}

.modal-overlay.visible .modal {
  transform: translateY(0) scale(1);
}

/* Botón Cerrar */
.modal__cerrar {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  width: 32px;
  height: 32px;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal__cerrar:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Imagen - Columna Izquierda */
.modal__imagen-wrap {
  position: relative;
  background: #1a1a18;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  border-radius: 12px 0 0 12px;
  align-self: stretch;
}

.modal__imagen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.modal__imagen--fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.3);
  background: #1a1a18;
}

/* Contenido - Columna Derecha */
.modal__contenido {
  background: #111111;
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100%;
  border-radius: 0 12px 12px 0;
}

/* Scrollbar personalizado */
.modal__contenido::-webkit-scrollbar {
  width: 6px;
}

.modal__contenido::-webkit-scrollbar-track {
  background: transparent;
}

.modal__contenido::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.modal__contenido::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Eyebrow */
.modal__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  font-family: var(--fuente-sans);
  margin-bottom: 0.4rem;
  display: block;
}

/* Nombre */
.modal__nombre {
  font-family: var(--fuente);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.8rem;
  color: white;
}

/* Badge de Disponibilidad */
.modal__disponibilidad {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--fuente-sans);
  letter-spacing: 0.05em;
}

.modal__disponibilidad--stock {
  background: #1a3a1a;
  color: #4caf50;
  border: 1px solid #2d5a2d;
}

.modal__disponibilidad--encargo {
  background: #2a1f0a;
  color: #c9a84c;
  border: 1px solid #4a3a1a;
}

.modal__disponibilidad-nota {
  font-size: 0.65rem;
  opacity: 0.8;
  margin-top: 0.2rem;
}

/* Separador */
.modal__separador {
  border-top: 1px solid #2a2a2a;
  margin: 0.8rem 0;
}

/* Precio */
.modal__precio {
  font-size: 1.3rem;
  color: white;
  font-weight: 500;
  font-family: var(--fuente-sans);
  margin-bottom: 0.8rem;
}

.modal__precios-oferta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.modal__precio-original {
  font-size: 0.9rem;
  color: #666;
  text-decoration: line-through;
  font-weight: 400;
}

.modal__precio-oferta {
  font-size: 1.5rem;
  color: #c9a84c;
  font-weight: 600;
}

.modal__ahorro {
  font-size: 0.78rem;
  color: #4caf50;
  font-weight: 600;
  background: #1a2a1a;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  margin-top: 0.3rem;
}

/* Descripción */
.modal__descripcion {
  font-size: 0.88rem;
  color: #bbb;
  line-height: 1.7;
  margin-bottom: 0.8rem;
  font-family: var(--fuente-sans);
}

.modal__descripcion-texto {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: all 0.3s ease;
}

.modal__descripcion-texto.expanded {
  -webkit-line-clamp: unset;
  max-height: none;
}

.modal__descripcion-link {
  color: #c9a84c;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 0.25rem;
  display: inline-block;
}

/* Títulos de Sección */
.modal__decants-titulo,
.modal__notas-titulo {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #666;
  font-family: var(--fuente-sans);
  margin-bottom: 0.5rem;
}

/* Decants */
.modal__decants {
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #1e1e1e;
}

.modal__decants-opciones {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.modal__decant-btn {
  padding: 0.35rem 0.9rem;
  border: 1px solid #333;
  background: transparent;
  color: #ccc;
  font-size: 0.78rem;
  font-family: var(--fuente-sans);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.modal__decant-btn:hover,
.modal__decant-btn.selected {
  background: #c9a84c;
  border-color: #c9a84c;
  color: #111;
}

/* Notas */
.modal__notas {
  margin-bottom: 0.8rem;
}

.modal__notas-texto {
  font-size: 0.82rem;
  color: #999;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.25rem;
  border-radius: 4px;
}

.modal__notas-texto:hover {
  background: rgba(255, 255, 255, 0.02);
}

.modal__notas-texto.expanded {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

/* Botón WhatsApp */
.modal__boton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  margin-top: 1.2rem;
  padding: 0.9rem;
  background: #25D366;
  color: white;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--fuente-sans);
  transition: all 0.2s ease;
  border-radius: 4px;
}

.modal__boton:hover {
  background: #1ebe5d;
}

/* Responsive Móvil */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    grid-template-columns: 1fr;
    max-height: 95vh;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%) scale(1);
    margin-bottom: 0;
    position: relative;
    height: auto;
    overflow: hidden;
  }

  .modal-overlay.visible .modal {
    transform: translateY(0) scale(1);
  }

  .modal__imagen-wrap {
    height: 280px;
    border-radius: 12px 12px 0 0;
  }

  .modal__imagen {
    object-fit: contain;
  }

  .modal__imagen--fallback {
    height: 280px;
    font-size: 3rem;
  }

  .modal__contenido {
    border-radius: 0 0 12px 12px;
    padding: 1.4rem;
    overflow-y: auto;
    height: auto;
    max-height: calc(95vh - 280px);
  }

  .modal__nombre {
    font-size: 1.3rem;
  }

  .modal__precio {
    font-size: 1.2rem;
  }

  .modal__descripcion {
    font-size: 0.86rem;
  }

  .modal__cerrar {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
}

/* Tablets y celulares grandes */
@media (max-width: 480px) {
  .modal__contenido {
    padding: 1.2rem;
  }
  
  .modal__nombre {
    font-size: 1.2rem;
  }
  
  .modal__precio {
    font-size: 1.1rem;
  }
}

/* Celulares pequeños */
@media (max-width: 390px) {
  .modal__contenido {
    padding: 1rem;
  }
  
  .modal__nombre {
    font-size: 1.1rem;
  }
  
  .modal__precio {
    font-size: 1rem;
  }
  
  .modal__descripcion {
    font-size: 0.84rem;
  }
}
