@media (min-width:641px) {
    html body:not(.admin) .product-detail-gallery[data-gallery-count="1"] .product-detail-gallery-thumbs { display:none!important; }
    html body:not(.admin) .rr-pd-mobile-gallery-arrow,
    html body:not(.admin) .rr-pd-mobile-thumb-nav { display:none!important; }
}

@media (max-width:640px) {
    html body:not(.admin) .rr-pd-page .rr-pd-gallery-card {
        padding:0!important;
        background:transparent!important;
        border:0!important;
        box-shadow:none!important;
        overflow:visible!important;
    }

    html body:not(.admin) .rr-pd-page .product-detail-gallery {
        display:grid!important;
        grid-template-columns:minmax(0,1fr)!important;
        grid-template-areas:"main" "thumbs"!important;
        gap:10px!important;
        align-items:start!important;
        position:relative!important;
        width:100%!important;
        max-width:100%!important;
        margin:0!important;
        overflow:visible!important;
    }

    html body:not(.admin) .rr-pd-page .product-detail-main-image-wrap {
        grid-area:main!important;
        width:100%!important;
        aspect-ratio:1/1!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        padding:6px!important;
        border-radius:12px!important;
        background:#fff!important;
        overflow:hidden!important;
        position:relative!important;
        display:flex!important;
        align-items:center!important;
        justify-content:center!important;
        box-shadow:none!important;
    }

    html body:not(.admin) .rr-pd-page .product-detail-main-image {
        width:100%!important;
        height:100%!important;
        max-height:none!important;
        object-fit:contain!important;
        object-position:center!important;
        border-radius:9px!important;
        background:#fff!important;
        display:block!important;
        transform:none!important;
    }

    html body:not(.admin) .rr-pd-page .product-detail-main-image-wrap:hover .product-detail-main-image { transform:none!important; }

    html body:not(.admin) .rr-pd-page .product-detail-gallery-thumbs {
        grid-area:thumbs!important;
        display:flex!important;
        flex-direction:row!important;
        flex-wrap:nowrap!important;
        gap:8px!important;
        align-items:center!important;
        justify-content:flex-start!important;
        width:100%!important;
        max-width:100%!important;
        max-height:none!important;
        overflow-x:auto!important;
        overflow-y:hidden!important;
        padding:2px 2px 6px!important;
        margin:0!important;
        background:transparent!important;
        scrollbar-width:none!important;
        overscroll-behavior-inline:contain!important;
        -webkit-overflow-scrolling:touch!important;
    }

    html body:not(.admin) .rr-pd-page .product-detail-gallery-thumbs::-webkit-scrollbar { display:none!important; }

    html body:not(.admin) .rr-pd-page .product-detail-gallery-thumb {
        flex:0 0 54px!important;
        min-width:54px!important;
        width:54px!important;
        height:54px!important;
        border-radius:8px!important;
        padding:3px!important;
        background:#fff!important;
        border:1px solid #e5e7eb!important;
        box-shadow:0 5px 14px rgba(15,23,42,.06)!important;
        transform:none!important;
    }

    html body:not(.admin) .rr-pd-page .product-detail-gallery-thumb img {
        width:100%!important;
        height:100%!important;
        object-fit:contain!important;
        object-position:center!important;
        border-radius:6px!important;
        background:#fff!important;
    }

    html body:not(.admin) .rr-pd-page .product-detail-gallery-thumb.active,
    html body:not(.admin) .rr-pd-page .product-detail-gallery-thumb.is-active,
    html body:not(.admin) .rr-pd-page .product-detail-gallery-thumb[aria-current="true"],
    html body:not(.admin) .rr-pd-page .product-detail-gallery-thumb[aria-selected="true"] {
        border:1.5px solid var(--rr-pd-accent,var(--product-detail-accent,#f97316))!important;
        box-shadow:0 0 0 2px color-mix(in srgb,var(--rr-pd-accent,var(--product-detail-accent,#f97316)) 14%,transparent)!important;
        transform:none!important;
    }

    html body:not(.admin) .rr-pd-page .rr-pd-mobile-gallery-arrow { display:none!important; }
    html body:not(.admin) .rr-pd-page .product-detail-gallery:not([data-gallery-count="0"]):not([data-gallery-count="1"]) .rr-pd-mobile-gallery-arrow {
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        position:absolute!important;
        top:50%!important;
        z-index:8!important;
        width:30px!important;
        height:30px!important;
        border:0!important;
        border-radius:999px!important;
        background:rgba(255,255,255,.88)!important;
        color:var(--rr-pd-accent,var(--product-detail-accent,#2563eb))!important;
        font-size:24px!important;
        line-height:1!important;
        cursor:pointer!important;
        box-shadow:0 8px 20px rgba(15,23,42,.14)!important;
        transform:translateY(-50%)!important;
    }

    html body:not(.admin) .rr-pd-page .rr-pd-mobile-gallery-prev { left:9px!important; }
    html body:not(.admin) .rr-pd-page .rr-pd-mobile-gallery-next { right:9px!important; }
    html body:not(.admin) .rr-pd-page .rr-pd-mobile-thumb-nav { display:none!important; }

    @media (max-width:360px) {
        html body:not(.admin) .rr-pd-page .product-detail-gallery { gap:8px!important; }
        html body:not(.admin) .rr-pd-page .product-detail-gallery-thumb { flex-basis:50px!important;min-width:50px!important;width:50px!important;height:50px!important; }
        html body:not(.admin) .rr-pd-page .product-detail-main-image-wrap { padding:5px!important; }
    }
}
