/* Shop Image Modal */

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    animation: imageZoomIn 0.3s ease;
    user-select: none;
    cursor: grab;
}

.image-modal-img:active {
    cursor: grabbing;
}

@keyframes imageZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 36px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.image-modal-prev,
.image-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 40px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-prev {
    left: 30px;
}

.image-modal-next {
    right: 30px;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.image-modal-prev:disabled,
.image-modal-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.image-modal-number {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Mobile */
@media (max-width: 768px) {
    .image-modal-close {
        width: 45px;
        height: 45px;
        font-size: 32px;
        top: 15px;
        right: 15px;
    }
    
    .image-modal-prev,
    .image-modal-next {
        width: 45px;
        height: 45px;
        font-size: 32px;
    }
    
    .image-modal-prev {
        left: 15px;
    }
    
    .image-modal-next {
        right: 15px;
    }
    
    .image-modal-number {
        bottom: 20px;
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Touch feedback */
@media (hover: none) {
    .image-modal-prev:active,
    .image-modal-next:active {
        transform: translateY(-50%) scale(0.95);
    }
    
    .image-modal-close:active {
        transform: scale(0.95);
    }
}
