
/* PDE MOBILE GALLERY V2 - Native Hyva thumbnails */

@media screen and (max-width: 1023px) {

    html body.catalog-product-view #gallery:not(.fixed) [data-pager] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 5px 3px 10px !important;
        margin-top: 10px !important;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    /* Initial product images AND configurable images */

    html body.catalog-product-view #gallery:not(.fixed)
    [data-pager] > :is(a, button):has(img) {
        box-sizing: border-box !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 64px !important;
        width: 64px !important;
        height: 64px !important;
        min-width: 64px !important;
        min-height: 64px !important;
        max-width: 64px !important;
        max-height: 64px !important;
        aspect-ratio: 1 / 1 !important;
        padding: 4px !important;
        margin: 0 !important;
        border: 1px solid #d9dde2 !important;
        border-radius: 6px !important;
        background: #ffffff !important;
        box-shadow: none !important;
        overflow: hidden !important;
        opacity: 1 !important;
    }

    html body.catalog-product-view #gallery:not(.fixed)
    [data-pager] > :is(a, button):has(img):not([style*="display: none"]):not([hidden]) {
        display: inline-flex !important;
    }

    /* Override native hidden lg:block image styling */

    html body.catalog-product-view #gallery:not(.fixed)
    [data-pager] > :is(a, button) img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        aspect-ratio: auto !important;
    }

    /* Remove native dot/pill decoration */

    html body.catalog-product-view #gallery:not(.fixed)
    [data-pager] > :is(a, button):has(img)::before,
    html body.catalog-product-view #gallery:not(.fixed)
    [data-pager] > :is(a, button):has(img)::after {
        content: none !important;
        display: none !important;
    }

    /* Highlight selected thumbnail */

    html body.catalog-product-view #gallery:not(.fixed)
    [data-pager] > :is(a, button)[aria-current="true"]:has(img),
    html body.catalog-product-view #gallery:not(.fixed)
    [data-pager] > :is(a, button)[aria-selected="true"]:has(img) {
        border: 2px solid var(--pde-button-primary, #333333) !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }
}
