/* XiaomiGlobal: product images only. No global layout changes. */
.hsp-loop-product-card .hsp-loop-thumb-wrap {
    position: relative !important;
    overflow: hidden !important;
}
.hsp-loop-product-card .hsp-loop-thumb-link {
    position: relative !important;
    display: block !important;
    overflow: hidden !important;
    background: #fff !important;
}
.hsp-loop-product-card .hsp-loop-product-slide {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: none !important;
    transition: opacity .25s ease !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}
.hsp-loop-product-card .hsp-loop-product-slide.is-active {
    opacity: 1 !important;
    visibility: visible !important;
}
.hsp-loop-product-card:not(.hsp-has-card-slider) .hsp-loop-thumb-link > img:first-child {
    position: relative !important;
}
.hsp-card-slide-nav {
    position: absolute !important;
    top: 50% !important;
    z-index: 8 !important;
    width: 32px !important;
    height: 32px !important;
    border: 1px solid rgba(15,23,42,.12) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.94) !important;
    color: #0f172a !important;
    display: grid !important;
    place-items: center !important;
    font-size: 22px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    opacity: 0 !important;
    transform: translateY(-50%) !important;
    transition: opacity .2s ease !important;
}
.hsp-card-slide-prev { right: 9px !important; }
.hsp-card-slide-next { left: 9px !important; }
.hsp-loop-thumb-wrap:hover .hsp-card-slide-nav,
.hsp-loop-thumb-wrap:focus-within .hsp-card-slide-nav { opacity: 1 !important; }
.hsp-card-slide-dots {
    position: absolute !important;
    z-index: 8 !important;
    bottom: 9px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 5px !important;
    pointer-events: none !important;
}
.hsp-card-slide-dots span {
    width: 6px !important;
    height: 6px !important;
    border-radius: 99px !important;
    background: rgba(15,23,42,.25) !important;
}
.hsp-card-slide-dots span.is-active { background: #0f172a !important; }

/* Archive, related products, home product loops */
.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img,
.hsp-loop-product-card img,
.hsp-product-card img,
.hsp-product-media img {
    object-fit: contain !important;
    object-position: center !important;
}

/* Single product and Quick View */
body.single-product .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery__image a,
body.single-product .woocommerce-product-gallery__image img,
.hsp-qv-gallery,
.hsp-qv-gallery-slide,
.hsp-qv-gallery-slide img,
.hsp-qv-media img,
.hsp-quick-view img {
    overflow: hidden !important;
    object-fit: contain !important;
    object-position: center !important;
}
body.single-product .woocommerce-product-gallery__image img,
.hsp-qv-gallery-slide img,
.hsp-qv-media img,
.hsp-quick-view img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}
