/**
 * Custom Image Zoom & Pan Styles
 */

.zoom-container {
    position: relative;
    overflow: hidden;
}

/* Only show pointer cursor on screens < 1000px */
@media (max-width: 999px) {
    .zoom-container {
        cursor: pointer;
    }
}

.zoom-container.zoom-active {
    overflow: visible;
    z-index: 1000;
}

.zoom-container img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.zoom-container img.zoomed {
    cursor: move;
    cursor: -webkit-grab;
    cursor: grab;
    transform: scale(2);
    position: relative;
    z-index: 1001;
}

.zoom-container img.dragging {
    cursor: -webkit-grabbing;
    cursor: grabbing;
    transition: none;
}

/* Close button */
.zoom-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 33px;
    line-height: 1;
    line-height: 0;
    cursor: pointer;
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    padding-bottom: 4px;
}

.zoom-close.visible {
    opacity: 1;
    visibility: visible;
}

.zoom-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.zoom-close:active {
    transform: scale(0.95);
}

/* Prevent text selection during drag */
.zoom-container img.dragging,
.zoom-container.zoom-active {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
