/**
 * Product detail: Slick uses height:100% on .slick-list/.slick-track — combined with
 * tall slide wrappers this can stretch the slider column and push H1/price far below the fold.
 * Scoped to .product-view only. 2026-04-22
 * H1 + price are rendered above the slider in view.php (2026-04-22) — keep spacing predictable.
 */
.product-view .product-view-wrapper > h1 {
    margin-top: 0;
    margin-bottom: 12px;
}

.product-view .product-view-wrapper > .product-price-block {
    margin-bottom: 28px;
}

/* Top cover strip: legacy sets .product-view-img img { width:100%; max-width:400px } → block sits on the left edge */
.product-view .product-view-img {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
}

.product-view .product-view-img img {
    display: block !important;
    width: auto !important;
    max-width: min(420px, 92vw) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    height: auto;
}

.product-view .product-slider .slick-list,
.product-view .product-slider .slick-track {
    height: auto !important;
    max-height: none !important;
}

.product-view .product-slider-item {
    height: auto !important;
}

.product-view .product-slider-item-wrapper {
    height: auto !important;
    min-height: 280px;
    max-height: 600px;
    width: min(400px, 92vw) !important;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .product-view .product-slider-item-wrapper {
        min-height: 240px;
        max-height: 480px;
    }
}

.product-view .product-view-wrapper {
    overflow: visible;
}

/* Fallback before Slick runs: do not stack all slides (pushes H1 below fold)
 * legacy-*.css has .product-slider-item{display:flex!important} — must override with !important */
.product-view .product-slider:not(.slick-initialized) > .product-slider-item {
    display: none !important;
}
.product-view .product-slider:not(.slick-initialized) > .product-slider-item:first-child {
    display: flex !important;
    justify-content: center;
    align-items: center;
}
.product-view .product-slider-nav:not(.slick-initialized) {
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}
.product-view .product-slider-nav:not(.slick-initialized) .product-slider-nav__item {
    flex: 0 0 auto !important;
    width: 88px;
    max-width: 23%;
}
.product-view .product-slider-nav:not(.slick-initialized) .product-slider-nav__item img {
    width: 100%;
    height: auto;
    display: block;
}
