/* =====================================================================
   Página producto — solo móvil (max-width: 768px)
   Cargado vía header con media="(max-width: 768px)"; no afecta otras rutas.
   Flex en columna evita compartir fila con la info (bug del grid: align-items
   stretch igualaba altura de ambas columnas y dejaba un bloque vacío bajo la galería).
   ===================================================================== */

.product-detail {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 0;
}

.product-gallery,
.product-info {
    min-width: 0;
    max-width: 100%;
    flex: 0 0 auto;
    width: 100%;
}

.gallery-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 1rem;
}

.gallery-main img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: min(360px, 55vh);
}

.gallery-thumbs {
    width: 100%;
    max-width: 100%;
}

.product-info h1 {
    font-size: 1.5rem;
}

.product-meta {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.product-price-box {
    flex-wrap: wrap;
    gap: 1rem;
}

.product-price-large {
    font-size: 2rem;
}

.detail-item {
    flex-wrap: wrap;
}

.detail-item strong {
    min-width: 0;
}

/* Contenedor de la página de producto dentro del layout principal */
main.content.product-page {
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.related-products .products-grid {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 480px) {
    .related-products .products-grid {
        grid-template-columns: 1fr;
    }
}
