/* ILE mobile product gallery */

.ile-mobile-product-tab {
    display: none;
}

@media (max-width: 820px) {
    .woocommerce div.product .woocommerce-tabs > .beleco-mobile-product-description {
        margin-bottom: 32px;
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .woocommerce-tabs {
        border-bottom: 1px solid rgba(34, 34, 34, 0.14);
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .woocommerce-tabs > ul.tabs.wc-tabs {
        display: none !important;
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .ile-mobile-product-tab {
        -webkit-appearance: none;
        align-items: center;
        appearance: none;
        background: transparent;
        border: 0;
        border-radius: 0;
        border-top: 1px solid rgba(34, 34, 34, 0.14);
        color: #222;
        cursor: pointer;
        display: flex;
        font: inherit;
        font-size: 18px;
        font-weight: 400;
        justify-content: space-between;
        line-height: 1.35;
        margin: 0;
        min-height: 72px;
        padding: 22px 6px 22px 0;
        text-align: left;
        width: 100%;
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .ile-mobile-product-tab::after {
        border-bottom: 2px solid currentColor;
        border-right: 2px solid currentColor;
        content: "";
        flex: 0 0 10px;
        height: 10px;
        margin: -5px 3px 0 24px;
        transform: rotate(45deg);
        transition: transform 0.2s ease;
        width: 10px;
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .ile-mobile-product-tab[aria-expanded="true"]::after {
        margin-top: 5px;
        transform: rotate(225deg);
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .ile-mobile-product-tab:focus-visible {
        outline: 2px solid #222;
        outline-offset: 3px;
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .ile-mobile-product-tab + .woocommerce-Tabs-panel {
        display: none !important;
        margin: 0 !important;
        padding: 0 0 28px !important;
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .ile-mobile-product-tab[aria-expanded="true"] + .woocommerce-Tabs-panel {
        display: block !important;
    }

    body.woocommerce.single-product.ile-mobile-product-tabs-ready .woocommerce-Tabs-panel > .yikes-custom-woo-tab-title:first-child {
        display: none;
    }

    .woocommerce div.product div.images {
        background: #fff;
        margin-bottom: 24px !important;
    }

    .woocommerce div.product div.images .flex-viewport {
        --ile-product-gallery-progress-width: 26px;
        background: #fff;
    }

    .woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
        backface-visibility: hidden;
        will-change: transform;
    }

    .woocommerce div.product div.images .woocommerce-product-gallery__image,
    .woocommerce div.product div.images .woocommerce-product-gallery__image a,
    .woocommerce div.product div.images .woocommerce-product-gallery__image picture {
        background: #fff;
    }

    .woocommerce div.product div.images .flex-viewport::before,
    .woocommerce div.product div.images .flex-viewport::after {
        bottom: 18px;
        content: "";
        height: 2px;
        left: 0;
        margin-left: calc(50% - 65px);
        pointer-events: none;
        position: absolute;
        z-index: 5;
    }

    .woocommerce div.product div.images .flex-viewport::before {
        background: #acb2b4;
        width: 130px;
    }

    .woocommerce div.product div.images .flex-viewport::after {
        background: #33383c;
        transition: width 0.18s cubic-bezier(0, 0, 0.2, 1);
        width: var(--ile-product-gallery-progress-width);
    }

    .woocommerce div.product div.images .flex-control-thumbs {
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px !important;
        margin: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        position: absolute !important;
        white-space: nowrap;
        width: 1px !important;
    }

    .woocommerce div.product div.images .flex-control-thumbs li {
        display: none !important;
    }

    @supports selector(:has(*)) {
        .woocommerce div.product div.images:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2)) {
            min-height: calc(125vw - 75px);
        }

        .woocommerce div.product div.images:not(:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2))) .flex-viewport::before,
        .woocommerce div.product div.images:not(:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2))) .flex-viewport::after {
            content: none;
        }
    }

    body.woocommerce.single-product.ile-product-gallery-open form.cart button.single_add_to_cart_button.beleco-mobile-sticky-cart__action--fixed,
    body.ile-product-gallery-open #ile-help-button-container,
    body.ile-product-gallery-open .beleco-mobile-sticky-cart,
    body.ile-product-gallery-open .cky-btn-revisit-wrapper {
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    body.ile-product-gallery-open .pswp__bg,
    body.ile-product-gallery-open .pswp__scroll-wrap,
    body.ile-product-gallery-open .pswp__item {
        background: #f2f1ef;
    }

    body.ile-product-gallery-open .pswp__top-bar {
        background: #f2f1ef;
    }

    body.ile-product-gallery-open .pswp__counter {
        color: #222;
        opacity: 0.78;
    }

    body.ile-product-gallery-open .pswp__button {
        filter: invert(1);
        opacity: 0.72;
    }

    body.ile-product-gallery-open .pswp__preloader {
        filter: invert(1);
        left: 50%;
        margin-left: -22px;
        position: absolute;
        top: 0;
    }

    body.ile-product-gallery-open .pswp__button--arrow--left,
    body.ile-product-gallery-open .pswp__button--arrow--right {
        background-image: none;
        filter: none;
        opacity: 0.9;
    }

    body.ile-product-gallery-open .pswp__ui--idle .pswp__button--arrow--left,
    body.ile-product-gallery-open .pswp__ui--idle .pswp__button--arrow--right,
    body.ile-product-gallery-open .pswp__ui--hidden .pswp__button--arrow--left,
    body.ile-product-gallery-open .pswp__ui--hidden .pswp__button--arrow--right {
        opacity: 0;
    }

    body.ile-product-gallery-open .pswp__button--arrow--left::before,
    body.ile-product-gallery-open .pswp__button--arrow--right::before {
        background: none !important;
        border-bottom: 2px solid rgba(0, 0, 0, 0.9);
        border-right: 2px solid rgba(0, 0, 0, 0.9);
        content: "";
        height: 14px;
        left: 50%;
        margin-left: -6px;
        margin-top: -6px;
        position: absolute;
        top: 50%;
        width: 14px;
    }

    body.ile-product-gallery-open .pswp__button--arrow--left::after,
    body.ile-product-gallery-open .pswp__button--arrow--right::after {
        border-bottom: 2px solid #fff;
        border-right: 2px solid #fff;
        content: "";
        height: 14px;
        left: 50%;
        margin-left: -7px;
        margin-top: -7px;
        mix-blend-mode: difference;
        position: absolute;
        top: 50%;
        width: 14px;
    }

    body.ile-product-gallery-open .pswp__button--arrow--left::before,
    body.ile-product-gallery-open .pswp__button--arrow--left::after {
        transform: rotate(135deg);
    }

    body.ile-product-gallery-open .pswp__button--arrow--right::before,
    body.ile-product-gallery-open .pswp__button--arrow--right::after {
        transform: rotate(-45deg);
    }

    .ile-pswp-thumbnails {
        -webkit-overflow-scrolling: touch;
        -webkit-backdrop-filter: blur(12px);
        align-items: stretch;
        backdrop-filter: blur(12px);
        background: rgba(255, 255, 255, 0.72);
        border: 1px solid rgba(34, 34, 34, 0.12);
        bottom: max(16px, env(safe-area-inset-bottom));
        box-sizing: border-box;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        display: none;
        gap: 4px;
        left: 50%;
        max-width: calc(100vw - 32px);
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding: 5px;
        pointer-events: auto;
        position: absolute;
        scrollbar-width: none;
        touch-action: pan-x;
        transform: translateX(-50%);
        width: max-content;
        z-index: 1550;
    }

    .ile-pswp-thumbnails::-webkit-scrollbar {
        display: none;
    }

    .pswp--open .ile-pswp-thumbnails:not(:empty) {
        display: flex;
    }

    .ile-pswp-thumbnail {
        all: unset;
        background: #f5f5f5;
        border: 1px solid transparent;
        box-sizing: border-box;
        cursor: pointer;
        flex: 0 0 58px;
        height: 72px;
        opacity: 0.48;
        overflow: hidden;
        position: relative;
        transition: border-color 0.2s ease, opacity 0.2s ease;
        width: 58px;
    }

    .ile-pswp-thumbnail[aria-current="true"] {
        border-color: #33383c;
        opacity: 1;
    }

    .ile-pswp-thumbnail:focus-visible {
        outline: 2px solid #33383c;
        outline-offset: 2px;
    }

    .ile-pswp-thumbnail img {
        display: block;
        height: 100%;
        object-fit: cover;
        width: 100%;
    }
}

@media (min-width: 601px) and (max-width: 820px) {
    @supports selector(:has(*)) {
        .woocommerce div.product div.images:has(.woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(2)) {
            min-height: 112.5vw;
        }
    }
}

@media (max-width: 820px) and (prefers-reduced-motion: reduce) {
    .woocommerce div.product div.images .flex-viewport::after,
    .ile-pswp-thumbnail {
        transition: none;
    }
}
