/* ==========================================================
   CD Lightbox Zoom - Product Detail Image Zoom
   ========================================================== */

/* Overrides specific to customer SRS */
#cd-image-slider-container.cd-open .cd-image-slider-wrapper #cd-main-slider .slick-slide .cd-product-image {
    max-width: none;
    cursor: default;
}

/* Wrapper: clips the zoomed image to its container */
.cd-zoom-wrapper {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
    -webkit-user-select: none;
}


/* Smooth transform on the image */
.cd-zoom-wrapper > img {
    transition: transform 0.2s ease;
    will-change: transform;
    display: block;
    width: 100%;
    height: auto;
}

/* When actively dragging, disable the transition for instant response */
.cd-zoom-dragging > img {
    transition: none;
}

/* Cursor: grab when zoomed, grabbing when dragging */
.cd-zoom-active {
    cursor: grab;
}

.cd-zoom-dragging {
    cursor: grabbing;
}

/* ---- Zoom Controls (+ / - / reset) ---- */
.cd-zoom-controls {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* Show controls when hovering the wrapper or when zoomed */
.cd-zoom-wrapper:hover .cd-zoom-controls,
.cd-zoom-active .cd-zoom-controls {
    opacity: 1;
    pointer-events: auto;
}

/* Always show on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cd-zoom-controls {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Position variants */
.cd-zoom-pos-bottom-right {
    bottom: 12px;
    right: 12px;
}

.cd-zoom-pos-bottom-left {
    bottom: 12px;
    left: 12px;
}

.cd-zoom-pos-top-right {
    top: 12px;
    right: 12px;
}

.cd-zoom-pos-top-left {
    top: 12px;
    left: 12px;
}

/* Individual button styling */
.cd-zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.cd-zoom-btn:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

.cd-zoom-btn:active {
    background-color: rgba(0, 0, 0, 1);
}

.cd-zoom-btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.cd-zoom-btn .fa {
    font-size: 14px;
}

/* ---- Slick integration ---- */
.slick-slide .cd-zoom-wrapper {
    display: block;
}

/* Prevent slick dots / arrows from overlapping zoom controls */
#image_wrapper.fullscreen .cd-zoom-controls {
    z-index: 25;
}

/* ---- Modal adjustments ---- */
#productImagesModal .cd-zoom-wrapper {
    margin-bottom: 1rem;
}

/* ---- Fullscreen adjustments ---- */
#image_wrapper.fullscreen .cd-zoom-wrapper {
    max-height: 100%;
}
