/* Extracted from index.html inline styles */

/* CSS temporal hasta que creemos los archivos */
/* --- PREMIUM SHIMMER EFFECT --- */
.skeleton-premium {
  background: #f1f5f9;
  background: linear-gradient(
    90deg,
    #f1f5f9 25%,
    #e2e8f0 50%,
    #f1f5f9 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-products,
.empty-cart {
  text-align: center;
  padding: 60px 40px;
  color: #94a3b8;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.carousel-slide {
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.slide-content h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.slide-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checkout modal needs higher z-index to appear above everything */
#checkout-modal {
  z-index: 9999 !important;
}

#checkout-modal.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.modal-content {
  background: white;

  padding: 1rem;
  border-radius: 10px;
  max-width: 500px;
  width: 99%;
  max-height: 90vh;
  overflow-y: auto;
}

.close-modal {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

/* Responsive básico */
/* Responsive logic moved to style.css for centralization */
/* Responsive logic moved to style.css for centralization */

/* Estilos del Modal de Producto (Mobile First) */
.product-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto; /* Permitir scroll en el overlay */
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  padding: 10px; /* Espacio seguro en móviles */
}

.product-modal.active {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Alinear al top en mobile para hacer scroll */
}

.product-modal-content {
  background-color: #fefefe;
  margin: 20px auto; /* Margen vertical para no pegar al borde */
  border-radius: 12px;
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column; /* Mobile: Columna */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden; /* Mantener bordes redondeados */
  height: auto; /* Altura automática en mobile */
  max-height: none; /* Permitir crecer en mobile */
}

.product-modal-image {
  width: 100%;
  height: 300px; /* Altura fija en mobile */
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.product-modal-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-modal-info {
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

/* Desktop Responsiveness */
@media (min-width: 768px) {
  .product-modal.active {
    align-items: center; /* Centrar verticalmente en desktop */
  }

  .product-modal-content {
    flex-direction: row; /* Desktop: Fila */
    height: 600px; /* Altura fija en desktop */
    max-height: 90vh;
    margin: auto;
    overflow: hidden;
  }

  .product-modal-image {
    width: 50%;
    height: 100%; /* Llenar altura en desktop */
  }

  .product-modal-info {
    width: 50%;
    height: 100%;
    overflow-y: auto; /* Scroll interno solo para info en desktop */
    padding: 40px;
  }
}

.product-modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.product-modal-close:hover {
  color: #000;
}

.modal-product-category {
  color: #667eea;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.modal-product-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #2d3748;
}

.modal-product-price {
  font-size: 1.8rem;
  color: #2d3748;
  font-weight: bold;
  margin-bottom: 20px;
}

.modal-product-description {
  color: #718096;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* Sección de Tallas */
.size-selector {
  margin-bottom: 30px;
}

.size-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #4a5568;
}

.sizes-container {
  display: flex;
  gap: 10px;
}

.size-btn {
  width: 45px;
  height: 45px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.size-btn:hover {
  border-color: #667eea;
}

.size-btn.selected {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Sección de Reseñas */
.reviews-section {
  margin-top: 40px;
  border-top: 1px solid #e2e8f0;
  padding-top: 30px;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.reviews-title {
  font-size: 1.5rem;
  color: #2d3748;
}

.avg-rating {
  color: #f6ad55;
  font-size: 1.2rem;
}

.reviews-list {
  margin-bottom: 30px;
  max-height: 300px;
  overflow-y: auto;
}

.review-card {
  background: #f7fafc;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 600;
  color: #2d3748;
}

.review-date {
  color: #a0aec0;
  font-size: 0.85rem;
}

.review-stars {
  color: #f6ad55;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.review-text {
  color: #4a5568;
  font-size: 0.95rem;
}

/* Formulario de Reseña */
.add-review-form {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 20px;
  border-radius: 8px;
}

.rating-input {
  display: flex;
  flex-direction: row-reverse; /* Para que el hover funcione bien */
  justify-content: flex-end;
  gap: 5px;
  margin-bottom: 15px;
}

.rating-input input {
  display: none;
}

.rating-input label {
  cursor: pointer;
  color: #cbd5e0;
  font-size: 1.5rem;
  transition: color 0.2s;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
  color: #f6ad55;
}

/* --- MOTOR DE RECOMENDACIONES --- */
.related-products-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f1f5f9;
}

.related-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
}

.related-item {
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-item:hover {
  transform: translateY(-5px);
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.related-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.related-info h6 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-info p {
  font-size: 0.9rem;
  font-weight: 700;
  color: #667eea;
  margin: 0;
}

@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
