/* Product Slider Styles */
.product-slider {
    position: relative;
}

.slider-main {
    position: relative;
    margin-bottom: 1rem;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--light-bg);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
}

.slide img:hover {
    transform: scale(1.05);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.slider-btn:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 15px;
}

.slider-btn.next {
    right: 15px;
}

.slider-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    opacity: 0.6;
}

.thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
    will-change: transform;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.lightbox-slide {
    display: none;
    max-width: 100%;
    max-height: 90vh;
}

.lightbox-slide.active {
    display: block;
}

.lightbox-slide img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
    transition: opacity 0.3s;
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-btn.prev {
    left: 30px;
}

.lightbox-btn.next {
    right: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .slider-container {
        height: 300px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        padding: 0;
    }

    .slider-btn.prev {
        left: 10px;
    }

    .slider-btn.next {
        right: 10px;
    }

    .thumbnail {
        width: 70px;
        height: 70px;
    }

    .lightbox-btn {
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
        padding: 0;
    }

    .lightbox-btn.prev {
        left: 10px;
    }

    .lightbox-btn.next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 2rem;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 85vh;
    }

    .lightbox-slide img {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .slider-container {
        height: 250px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .slider-btn.prev {
        left: 5px;
    }

    .slider-btn.next {
        right: 5px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-btn.prev {
        left: 5px;
    }

    .lightbox-btn.next {
        right: 5px;
    }

    .lightbox-close {
        top: 5px;
        right: 10px;
        font-size: 1.8rem;
    }

    .lightbox-content {
        max-width: 98%;
        max-height: 90vh;
    }
}
