/* Product detail gallery — Swiper based (replaces menucool ninja-slider / thumbnail-slider) */

.pdp-gallery {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* ---------------- thumbnails (vertical column) ---------------- */

.pdp-gallery__thumbs {
    position: relative;
    width: 86px;
    flex: 0 0 86px;
    padding: 22px 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
}

.pdp-thumbs {
    height: 386px;
}

.pdp-thumb {
    height: 78px !important;
    box-sizing: border-box;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .75;
    transition: opacity .25s, border-color .25s;
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdp-thumb:hover {
    opacity: 1;
}

.pdp-thumb.swiper-slide-thumb-active {
    border-color: #ff795e;
    opacity: 1;
}

.pdp-thumb--video {
    background: #f4f4f4;
}

.pdp-thumb--video .fa {
    font-size: 40px;
    color: #006d8e;
}

/* thumb column arrows */
.pdp-thumbs-nav {
    position: absolute;
    left: 0;
    width: 100%;
    height: 20px;
    cursor: pointer;
    z-index: 2;
    transition: opacity .4s;
}

.pdp-thumbs-prev { top: 0; }
.pdp-thumbs-next { bottom: 0; }

.pdp-thumbs-nav::before {
    position: absolute;
    left: 50%;
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-left: 2px solid #353535;
    border-top: 2px solid #353535;
}

.pdp-thumbs-prev::before {
    top: 6px;
    transform: rotate(45deg);
}

.pdp-thumbs-next::before {
    bottom: 6px;
    transform: rotate(-135deg);
}

.pdp-thumbs-nav.swiper-button-disabled {
    opacity: .15;
    cursor: default;
}

/* ---------------- main stage ---------------- */

.pdp-gallery__main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.pdp-main {
    width: 100%;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.pdp-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    aspect-ratio: 1 / 1;
}

.pdp-slide .swiper-zoom-container {
    width: 100%;
    height: 100%;
}

.pdp-img,
.pdp-video-poster {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* arrows / pagination */
.pdp-main .pdp-nav {
    width: 42px;
    height: 56px;
    margin-top: -28px;
    background: rgba(0, 0, 0, .4);
    color: #fff;
    border-radius: 2px;
    opacity: .3;
    transition: opacity .4s;
}

.pdp-main .pdp-nav::after {
    font-size: 18px;
    font-weight: bold;
}

.pdp-main:hover .pdp-nav,
.pdp-gallery--fs .pdp-nav {
    opacity: 1;
}

.pdp-main .pdp-nav.swiper-button-disabled {
    opacity: .1;
}

.pdp-main .pdp-pagination {
    display: none;
}

/* expand / close button */
.pdp-fs-toggle {
    position: absolute;
    top: 10px;
    right: 6px;
    width: 60px;
    height: 26px;
    padding: 0;
    z-index: 3;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 2px;
    color: #fff;
    font: bold 11px/24px arial;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .5s;
}

.pdp-main:hover .pdp-fs-toggle,
.pdp-gallery--fs .pdp-fs-toggle {
    opacity: 1;
}

/* ---------------- fullscreen ---------------- */

.pdp-gallery--fs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
    background: #000;
    padding: 20px;
    gap: 16px;
    align-items: center;
}

.pdp-gallery--fs .pdp-gallery__main {
    height: 100%;
    display: flex;
    align-items: center;
}

.pdp-gallery--fs .pdp-main {
    background: transparent;
    max-height: 100%;
}

.pdp-gallery--fs .pdp-slide {
    background: transparent;
    aspect-ratio: auto;
    height: calc(100vh - 40px);
}

.pdp-gallery--fs .pdp-thumbs {
    height: calc(100vh - 84px);
}

.pdp-gallery--fs .pdp-thumbs-nav::before {
    border-color: #fff;
}

.pdp-gallery--fs .cardItem__video_div {
    display: none !important;
}

/* ---------------- video slide ---------------- */

.pdp-slide--video {
    position: relative;
    background: #000;
}

.pdp-slide--video .pdp-video-poster {
    opacity: .55;
}

.pdp-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 74px;
    height: 74px;
    margin: -37px 0 0 -37px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 109, 142, .9);
    color: #fff;
    font-size: 28px;
    line-height: 74px;
    cursor: pointer;
    transition: transform .2s;
}

.pdp-video-play:hover {
    transform: scale(1.08);
}

.pdp-slide--video iframe,
.pdp-slide--video video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ---------------- mobile: thumbs below, horizontal ---------------- */

@media only screen and (max-width: 600px) {
    /* stretch, not flex-start: in a column flex the main stage must take the row width,
       otherwise Swiper measures a shrink-to-fit container and blows the slide width up. */
    .pdp-gallery {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
    }

    .pdp-gallery__main {
        width: 100%;
    }

    .pdp-gallery__thumbs {
        width: 100%;
        flex: 0 0 auto;
        padding: 0 22px;
    }

    .pdp-thumbs {
        height: auto;
    }

    .pdp-thumb {
        width: 70px;
        height: 70px !important;
    }

    .pdp-thumbs-nav {
        top: 0;
        bottom: 0;
        left: auto;
        width: 20px;
        height: 100%;
    }

    .pdp-thumbs-prev { left: 0; }
    .pdp-thumbs-next { right: 0; }

    .pdp-thumbs-nav::before {
        top: 50%;
        margin-top: -5px;
    }

    .pdp-thumbs-prev::before { left: 8px; transform: rotate(-45deg); }
    .pdp-thumbs-next::before { left: 2px; transform: rotate(135deg); }

    .pdp-main .pdp-nav {
        display: none;
    }

    .pdp-main .pdp-pagination {
        display: block;
    }

    .pdp-fs-toggle {
        display: none;
    }
}
