/* Product Gallery Styles */

.product-gallery {
    margin-bottom: 30px;
}

.gallery-top {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-top .owl-carousel {
    border-radius: 8px;
}

.gallery-top .item {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-top .item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-bottom {
    margin-bottom: 20px;
}

.gallery-bottom .owl-carousel {
    margin: 0 -5px;
}

.gallery-bottom .item {
    padding: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    overflow: hidden;
}

.gallery-bottom .item:hover {
    transform: translateY(-2px);
}

.gallery-bottom .item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.gallery-bottom .item.active img,
.gallery-bottom .item:hover img {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Owl Carousel Navigation */
.owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
}

.owl-prev,
.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.owl-prev {
    left: 15px;
}

.owl-next {
    right: 15px;
}

.owl-prev:hover,
.owl-next:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.owl-prev i,
.owl-next i {
    color: #333;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-top .item img {
        height: 300px;
    }
    
    .gallery-bottom .item img {
        height: 60px;
    }
    
    .owl-prev,
    .owl-next {
        width: 35px;
        height: 35px;
    }
    
    .owl-prev {
        left: 10px;
    }
    
    .owl-next {
        right: 10px;
    }
    
    /* Touch-friendly navigation for mobile */
    .owl-prev,
    .owl-next {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 576px) {
    .gallery-top .item img {
        height: 250px;
    }
    
    .gallery-bottom .item img {
        height: 50px;
    }
    
    .owl-prev,
    .owl-next {
        width: 30px;
        height: 30px;
    }
    
    .owl-prev i,
    .owl-next i {
        font-size: 14px;
    }
}

/* Loading state */
.gallery-top .item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Active thumbnail indicator */
.gallery-bottom .owl-item.active .item {
    position: relative;
}

.gallery-bottom .owl-item.active .item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #007bff;
    border-radius: 2px;
}

/* No gallery fallback */
.no-gallery {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.placeholder-image {
    color: #6c757d;
}

.placeholder-image i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.placeholder-image p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}
