/* ===================================
   PRODUCTOS.CSS - Layout Z-Pattern
   =================================== */

/* Espaciado para Header Fijo - Más Pequeño */
.main-content {
  margin-top: 80px;
}

/* Contenedor de Productos */
.products-section {
  padding: var(--spacing-lg) 0;
}

/* Layout Base para Productos */
.product-wrap {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  gap: var(--spacing-md);
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-smooth);
}

.product-wrap.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Producto 1: Imagen Izquierda, Texto Derecha */
.product-1 {
  flex-direction: row;
}

.product-1 .product-image {
  flex: 0 0 45%;
}

.product-1 .product-info {
  flex: 0 0 45%;
  text-align: right;
}

/* Producto 2: Imagen Derecha, Texto Izquierda */
.product-2 {
  flex-direction: row-reverse;
}

.product-2 .product-image {
  flex: 0 0 45%;
}

.product-2 .product-image img {
  width: 100%;
  height: auto;
}

.product-2 .product-info {
  flex: 0 0 45%;
  text-align: left;
  max-width: none;
  margin: 0;
}

/* Producto 3: Imagen Izquierda, Texto Derecha */
.product-3 {
  flex-direction: row;
}

.product-3 .product-image {
  flex: 0 0 45%;
}

.product-3 .product-info {
  flex: 0 0 45%;
  text-align: right;
}
/* Producto 4: Imagen centrada arriba, texto debajo */
.product-4 {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Producto 4: imagen centrada, tamaño controlado */
.product-4 .product-image {
  width: 100%;
  max-width: 800px;   /* ⬅️ tamaño equilibrado */
  margin-bottom: 1rem;
}

.product-4 .product-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Texto debajo */
.product-4 .product-info {
  width: 100%;
  max-width: 600px;
  text-align: center;
}
.product-4 .product-badge.coming-soon {
  position: static;
  margin-top: 0.75rem;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #000;
  color: #fff;
}
/* Imágenes de Producto */
.product-image {
  position: relative;
  overflow: hidden;
  background-color: var(--color-white);
}

.product-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition-smooth);
}

.product-image:hover img {
  transform: scale(1.02);
  opacity: 0.95;
}

/* Efecto Flotante */
.product-image::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, transparent, rgba(27, 27, 27, 0.03), transparent);
  z-index: -1;
  opacity: 0;
  transition: var(--transition-smooth);
}

.product-wrap:hover .product-image::before {
  opacity: 1;
}

/* Información del Producto */
.product-info {
  padding: var(--spacing-sm);
}

.product-title {
  font-family: var(--font-family);
  font-size: var(--font-size-3xl);
  font-weight: 300;
  color: var(--color-black);
  margin-bottom: var(--spacing-xs);
  line-height: 1.2;
}

.product-description {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 300;
  color: var(--color-black);
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
  opacity: 0.8;
}

.product-price {
  font-family: var(--font-family);
  font-size: var(--font-size-xl);
  font-weight: 500;
  color: var(--color-black);
  margin-bottom: var(--spacing-sm);
}

/* Wrapper de precios */
.product-price-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

/* Precio tachado (oferta) */
.precio-tachado {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--color-gray);
  text-decoration: line-through;
  opacity: 0.7;
}

/* Precio en oferta */
.precio-oferta {
  font-family: var(--font-family);
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: #e74c3c;
}

/* Badge de descuento */
.discount-badge {
  display: inline-block;
  background-color: #e74c3c;
  color: white;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Badge de stock - Agotado */
.stock-badge.agotado {
  display: inline-block;
  background-color: var(--color-black);
  color: white;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  text-transform: uppercase;
}

/* Badge de producto general */
.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
}

/* Badge de próximamente */
.product-badge.proximamente {
  background-color: var(--color-black);
  color: var(--color-white);
}

/* Badge de agotado */
.product-badge.agotado {
  background-color: var(--color-black);
  color: var(--color-white);
}

/* Badge de oferta */
.product-badge.oferta {
  background-color: #e74c3c;
  color: white;
}

/* Coming Soon Badge (legacy) */
.coming-soon-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
}

/* Coming Soon Price */
.price-coming-soon {
  opacity: 0.6;
  font-style: italic;
}

/* Coming Soon Image Overlay */
.product-image.coming-soon {
  position: relative;
}

.product-image.coming-soon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(27, 27, 27, 0.7);
  z-index: 5;
}

/* Botón Ver Más - Animación Fade-In */
.product-cta {
  display: inline-block;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 400;
  color: var(--color-black);
  text-decoration: none;
  padding: 0.75rem 2rem;
  border: 1px solid var(--color-black);
  background-color: transparent;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.product-cta:hover:not(:disabled) {
  background-color: var(--color-black);
  color: var(--color-white);
  transform: scale(1.05);
}

.product-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgba(27, 27, 27, 0.1);
}

/* Responsive Productos */
@media (max-width: 1024px) {
  .product-1, .product-2, .product-3 {
    flex-direction: column;
    text-align: center;
  }
  
  .product-1 .product-image,
  .product-2 .product-image,
  .product-3 .product-image,
  .product-1 .product-info,
  .product-2 .product-info,
  .product-3 .product-info {
    flex: none;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .product-1 .product-info,
  .product-2 .product-info,
  .product-3 .product-info {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .main-content {
    margin-top: 80px;
  }
  
  .products-section {
    padding: var(--spacing-md) 0;
  }
  
  .product-wrap {
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-sm);
  }
  
  .product-title {
    font-size: var(--font-size-2xl);
  }
  
  .product-description {
    font-size: var(--font-size-sm);
  }
  
  .product-price {
    font-size: var(--font-size-lg);
  }
}

@media (max-width: 480px) {
  .main-content {
    margin-top: 70px;
  }
  
  .products-section {
    padding: var(--spacing-sm) 0;
  }
  
  .product-wrap {
    margin-bottom: var(--spacing-md);
  }
  
  .product-title {
    font-size: var(--font-size-xl);
  }
  
  .product-cta {
    padding: 0.5rem 1.5rem;
    font-size: var(--font-size-xs);
  }
}

/* Animación de Scroll */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-wrap.visible {
  animation: fadeInUp 0.8s ease-out;
}
