/* Fix para imagen hero que no carga */
.product-hero-section .hero-background-image {
  background-size: cover !important;
  background-position: center !important;
}

/* Fallback si no hay imagen */
.product-hero-section {
  min-height: 400px;
}

/* Links en descripción de producto */
.product-description-text a {
  color: #0066cc !important;
  text-decoration: underline !important;
  font-weight: 500;
  transition: color 0.2s ease;
}

.product-description-text a:hover {
  color: #004499 !important;
}

/* Fix scroll horizontal en related products */
.related-products-wrapper {
  min-width: 0;
  max-width: 100%;
}

.related-products-grid {
  min-width: 0;
  max-width: 100%;
}

.related-product-card {
  min-width: 0;
}

/* Fix galería mobile overflow - v3 */
@media (max-width: 767px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }
  
  .product-detail-section {
    overflow-x: hidden !important;
    width: 100% !important;
  }
  
  .product-detail-grid {
    display: block !important;
    width: 100% !important;
  }
  
  .product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .product-main-image {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    padding: 1rem !important;
    overflow: hidden !important;
  }
  
  .product-main-image img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    max-height: 350px !important;
    margin: 0 auto !important;
    display: block !important;
  }
}

/* Fix video tamaño CT - v1.0.4 */
.product-detail-video {
  width: 100% !important;
}

.product-detail-video video {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 300px;
  border-radius: 8px;
}

/* Ajuste grid descripción producto para videos más grandes */
.product-description-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--spacing-xl);
  align-items: start;
}

/* Texto descripción justificado */
.product-description-text {
  text-align: justify;
}

.product-description-text p {
  text-align: justify;
}

@media (min-width: 992px) {
  .product-detail-video video {
    min-height: 400px;
  }
}

@media (max-width: 991px) {
  .product-description-grid {
    grid-template-columns: 1fr;
  }
  
  .product-detail-video video {
    min-height: 250px;
  }
}

/* Fix imagen hero cortada - v1.0.5 */
.product-detail-hero {
  height: auto;
  max-height: 500px;
}

.product-detail-hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 500px;
}

.product-detail-hero-image img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 500px !important;
  object-fit: contain !important;
  object-position: center !important;
}
