/* Lighthouse and Core Web Vitals fixes: CLS guard, image sizing, and light paint optimization. */
img {
    max-width: 100%;
    height: auto;
}

.advanced-banner-card,
.advanced-banner-card picture,
.advanced-banner-card img {
    display: block;
    width: 100%;
}

.advanced-banner-card img {
    aspect-ratio: 1200 / 420;
    object-fit: cover;
    background: #f8fafc;
}

.wn-product-card__media,
.cat_img {
    background: #f8fafc;
    overflow: hidden;
}

.wn-product-card__media img,
.cat_img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wn-product-card__media {
    aspect-ratio: var(--wn-card-ratio, 1 / 1);
}

.cat_img {
    aspect-ratio: 1 / 1;
}

.footer_nav,
.scrolltop,
.wn-chat-widget,
.frontend-pwa-install {
    contain: layout paint;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
 /* CLS fix: PWA install bar must not push page layout */
.frontend-pwa-install {
    position: fixed !important;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    width: calc(100% - 24px);
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, .15);
    padding: 12px 14px;
    contain: layout paint;
}

.frontend-pwa-install__inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.frontend-pwa-install__icon {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
    flex: 0 0 auto;
}

/* CLS fix: reserve hero/banner space before slider/image loads */

.sc-home-hero__box img {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 420;
    object-fit: cover;
}

/* Review media CLS fix */
.sc-review-card__media {
    aspect-ratio: 16 / 10;
}

.sc-review-card__media img,
.sc-review-card__media video,
.sc-review-card__media iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*@media (max-width: 575px) {*/
/*    .sc-home-hero__box,*/
/*    .sc-home-hero__box .advanced-banner-slider,*/
/*    .sc-home-hero__box .advanced-banner-card,*/
/*    .sc-home-hero__box picture {*/
/*        min-height: clamp(130px, 48vw, 220px);*/
/*    }*/
/*}*/