/* container */
.csw-image-carousel-wrap {
    margin-top: 12px;
}

/* Swiper */
.csw-image-carousel-wrap .swiper {
    width: 100%;
}

.csw-image-carousel-wrap .swiper-slide {
    width: 92px;
    height: 92px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.csw-image-carousel-wrap .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.csw-image-carousel-wrap .swiper-slide.is-active {
    border-color: #111;
    box-shadow: 0 0 0 2px rgba(0,0,0,.15);
}

/* lightbox */
.csw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.csw-lightbox.is-open {
    display: block;
}

.csw-lightbox__backdrop {
    position:absolute;
    inset:0;
    background: rgba(0,0,0,.72);
}

.csw-lightbox__panel {
    position:absolute;
    inset: 24px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    pointer-events:none;
}

.csw-lightbox__topbar {
    width: 100%;
    max-width: 1200px;
    display:flex;
    justify-content:flex-end;
    margin-bottom: 10px;
    pointer-events:auto;
}

.csw-lightbox__btn {
    appearance:none;
    border:0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255,255,255,.92);
    cursor:pointer;
}

.csw-lightbox__stage {
    width: 100%;
    max-width: 1200px;
    flex: 1 1 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    background: rgba(255,255,255,.98);
    border-radius: 14px;
    overflow:hidden;
    box-shadow: 0 14px 60px rgba(0,0,0,.35);
    pointer-events:auto;
}

.csw-lightbox__img {
    display:block;
    max-width: min(1100px, 92vw);
    max-height: min(78vh, 820px);
    width:auto;
    height:auto;
    object-fit: contain;
}

.csw-lightbox__nav {
    position:absolute;
    top:0;
    width:64px;
    height:100%;
    border:0;
    padding:0;
    background: transparent;
    cursor:pointer;
    opacity: 1;
}

/* gradient hint on hover */
.csw-lightbox__nav--prev:hover{
    background: linear-gradient(to right, rgba(0,0,0,.10), rgba(0,0,0,0));
}
.csw-lightbox__nav--next:hover{
    background: linear-gradient(to left, rgba(0,0,0,.10), rgba(0,0,0,0));
}

/* chevrons */
.csw-lightbox__nav::after{
    content:"";
    position:absolute;
    top:50%;
    left:50%;
    transform: translate(-50%, -50%);
    width:12px;
    height:12px;
    border-right: 3px solid rgba(0,0,0,.55);
    border-bottom: 3px solid rgba(0,0,0,.55);
}

.csw-lightbox__nav--prev::after{ transform: translate(-50%, -50%) rotate(135deg); }
.csw-lightbox__nav--next::after{ transform: translate(-50%, -50%) rotate(-45deg); }

.csw-lightbox__nav--prev { left: 0; }
.csw-lightbox__nav--next { right: 0; }

.csw-lightbox__caption {
    width: 100%;
    max-width: 1200px;
    margin-top: 10px;
    color:#fff;
    text-align:center;
    font-size:14px;
    pointer-events:auto;
}

/* nav wrapper */
.csw-swiper-nav{
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* make swiper take remaining width */
.csw-swiper-nav .csw-swiper{
    flex: 1 1 auto;
    min-width: 0; /* important for flex + overflow */
}

/* buttons */
.csw-swiper-btn{
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #e5e5e5;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.csw-swiper-btn span{
    font-size: 22px;
    line-height: 1;
}

.csw-swiper-btn:hover{
    border-color: #111;
}

/* disabled state from Swiper */
.csw-swiper-btn.swiper-button-disabled{
    opacity: .35;
    cursor: default;
}

.csw-swiper-btn.swiper-button-disabled{
    visibility: hidden;
}

/* Wrapper like Magento */
.csw-image-carousel-wrap .csw-carousel{
    position: relative;
}

/* Give internal padding so arrows do NOT cover first/last thumb */
.csw-image-carousel-wrap .csw-swiper{
    padding: 0 34px;
}

/* wrapper */
.csw-image-carousel-wrap .csw-carousel{
    position: relative;
}

.csw-image-carousel-wrap .csw-swiper{
    padding: 0 38px;
}


.csw-image-carousel-wrap .csw-carousel::before,
.csw-image-carousel-wrap .csw-carousel::after{
    content:"";
    position:absolute;
    top:0;
    width:38px;
    height:92px;
    z-index: 2;
    pointer-events:none;
}
.csw-image-carousel-wrap .csw-carousel::before{
    left:0;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}
.csw-image-carousel-wrap .csw-carousel::after{
    right:0;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}


.csw-image-carousel-wrap .csw-nav{
    position:absolute;
    top:0;
    width:38px;
    height:92px;
    border:0;
    padding:0;
    background: transparent;
    z-index: 3;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
}

.csw-image-carousel-wrap .csw-nav--prev{ left:0; }
.csw-image-carousel-wrap .csw-nav--next{ right:0; }


.csw-image-carousel-wrap .csw-nav::after{
    content:"";
    width:10px;
    height:10px;
    border-right:2px solid rgba(0,0,0,.55);
    border-bottom:2px solid rgba(0,0,0,.55);
}

.csw-image-carousel-wrap .csw-nav--prev::after{ transform: rotate(135deg); }
.csw-image-carousel-wrap .csw-nav--next::after{ transform: rotate(-45deg); }


.csw-image-carousel-wrap .csw-nav--prev:hover{
    background: linear-gradient(to right, rgba(0,0,0,.06), rgba(0,0,0,0));
}
.csw-image-carousel-wrap .csw-nav--next:hover{
    background: linear-gradient(to left, rgba(0,0,0,.06), rgba(0,0,0,0));
}


.csw-image-carousel-wrap.csw-nav-hidden .csw-nav,
.csw-image-carousel-wrap.csw-nav-hidden .csw-carousel::before,
.csw-image-carousel-wrap.csw-nav-hidden .csw-carousel::after{
    display:none;
}


.csw-swatches--color .csw-swatch[aria-disabled="true"]{
    opacity: 1;
    filter: none;
}


.csw-swatches--color .csw-swatch.csw-swatch--discontinued{
    position: relative;
    cursor: not-allowed;
}


.csw-swatches--color .csw-swatch.csw-swatch--discontinued::after{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
            linear-gradient(135deg,
            transparent 0%,
            transparent 46%,
            rgba(0,0,0,.45) 48%,
            rgba(0,0,0,.45) 52%,
            transparent 54%,
            transparent 100%
            );
}

.csw-swatches--color .csw-swatch.csw-swatch--discontinued{
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}

.csw-swatches .csw-swatch:focus{
    outline: none;
    box-shadow: none;
}

.csw-swatches .csw-swatch.is-selected{
    box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}

/* enable our zoom only on desktop */
@media (hover:hover) and (pointer:fine) {
    .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image {
        overflow: hidden;
        cursor: zoom-in;
    }

    .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img.wp-post-image {
        transition: transform 120ms ease;
        transform-origin: 50% 50%;
        will-change: transform;
    }

    .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image.is-csw-zoom img.wp-post-image {
        transform: scale(1.8); /* <= zoom power */
    }
}

/* mobile/tablet: no hover zoom */
@media (hover:none), (pointer:coarse) {
    .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image {
        cursor: default;
    }
}

.csw-image-carousel-wrap.csw-nav-hidden .csw-swiper {
    padding-left: 0;
    padding-right: 0;
}

.csw-image-carousel-wrap.csw-nav-hidden .swiper-wrapper {
    justify-content: flex-start;
}

.csw-lightbox__close {
    appearance: none;
    border: 0;
    background: rgba(255,255,255,.96);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    transition: background .15s ease, transform .15s ease;
}

.csw-lightbox__close:hover {
    background: #fff;
    transform: scale(1.05);
}

.csw-lightbox__close:active {
    transform: scale(.95);
}

/* Divi: remove sidebar and create full-width for PDP page only */
body.csw-not-plp #sidebar{
    display:none !important;
}

body.csw-not-plp.et_right_sidebar #left-area,
body.csw-not-plp.et_left_sidebar  #left-area{
    width:100% !important;
    padding-right:0 !important;
    padding-left:0 !important;
}

body.csw-not-plp.et_right_sidebar #main-content .container:before,
body.csw-not-plp.et_left_sidebar  #main-content .container:before{
    display:none !important;
}

body.csw-not-plp.et_right_sidebar #content-area,
body.csw-not-plp.et_left_sidebar  #content-area{
    width:100% !important;
}








