﻿/* =====================================================
   52. PRODUCT GALLERY CAROUSEL WITH VERTICAL THUMBNAILS
   Style dla karuzeli Bootstrapa z pionowymi miniaturami
===================================================== */

/* ===================================
   MAIN CONTAINER WITH THUMBNAILS
   =================================== */
.product-gallery-with-thumbs {
    display: flex;
    gap: 16px;
    width: 100%;
}

/* ===================================
   VERTICAL THUMBNAILS CAROUSEL
   =================================== */
.product-thumbs-carousel {
    --thumb-size: 88px;
    --thumb-gap: 12px;
    --visible-thumbs: 4;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100px;
    flex-shrink: 0;
}

.product-thumbs-viewport {
    width: 100%;
    height: calc(var(--visible-thumbs) * var(--thumb-size) + (var(--visible-thumbs) - 1) * var(--thumb-gap) + 4px);
    overflow: hidden;
}

.product-thumbs-track {
    display: flex;
    flex-direction: column;
    gap: var(--thumb-gap);
    padding: 2px 0;
    transform: translateY(0);
    transition: transform 0.35s ease;
    will-change: transform;
}

.thumbs-nav {
    width: 90%;
    height: 32px;
    border: 1px solid #999999;
    color: #7a5b35;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
    line-height: 1;
    background: transparent;
}

.thumbs-nav span {
    font-size: 13px;
}

.thumbs-nav:hover {
    background: #f7a736;
    border-color: #f7a736;
    color: #fff;
}

.thumbs-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Individual Thumbnail */
.product-thumb {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
    width: var(--thumb-size);
    height: var(--thumb-size);
}

.product-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1;
}

.product-thumb:hover {
    border-color: #e8c293;
    transform: scale(1.02);
}

.product-thumb.active {
    border-color: #f7a736;
    box-shadow: 0 0 12px rgba(247, 167, 54, 0.4);
}

/* ===================================
   MAIN CAROUSEL CONTAINER
   =================================== */
.product-main-carousel {
    flex: 1;
    min-width: 0;
}

.product-main-carousel .carousel {
    overflow: hidden;
}

.product-main-carousel .carousel-inner {
    padding: 30px;
}

.product-main-carousel .carousel-item {
    transition: transform 0.6s ease-in-out;
}

.product-main-carousel .carousel-item img {
    border-radius: 10px;
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    background: transparent;
    display: block;
    margin: 0 auto;
    transition: transform 0.5s ease;
}

.product-main-carousel .carousel-item:hover img {
    transform: scale(1.03);
}

/* ===================================
   CAROUSEL CONTROLS
   =================================== */
.product-main-carousel .carousel-control-prev,
.product-main-carousel .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(232, 194, 147, 0.9);
    border-radius: 10px;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-main-carousel:hover .carousel-control-prev,
.product-main-carousel:hover .carousel-control-next {
    opacity: 1;
}

.product-main-carousel .carousel-control-prev {
    left: 20px;
}

.product-main-carousel .carousel-control-next {
    right: 20px;
}

.product-main-carousel .carousel-control-prev-icon,
.product-main-carousel .carousel-control-next-icon {
    filter: brightness(0) invert(0.3);
    width: 24px;
    height: 24px;
}

.product-main-carousel .carousel-control-prev:hover,
.product-main-carousel .carousel-control-next:hover {
    background: rgba(247, 167, 54, 0.95);
}

/* ===================================
   TRANSPARENCY BACKGROUND
   =================================== */
.product-main-carousel .carousel-item img.has-transparency {
    background: linear-gradient(135deg, #f7e9d3 0%, #ffffff 100%);
    padding: 20px;
}

/* ===================================
   SHIMMER LOADING EFFECT
   =================================== */
.product-main-carousel .carousel-item.loading {
    background: linear-gradient(90deg, #f5f5f5 25%, #e0e0e0 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===================================
   RESPONSIVE - TABLET
   =================================== */
@media (max-width: 992px) {
    .product-main-carousel .carousel-inner {
        padding: 20px;
    }

    .product-main-carousel .carousel-item img {
        max-height: 400px;
    }

    .product-thumbs-carousel {
        --thumb-size: 80px;
        --thumb-gap: 10px;
        width: 90px;
    }
}

/* ===================================
   RESPONSIVE - MOBILE
   =================================== */
@media (max-width: 767px) {

    /* Switch to horizontal layout on mobile */
    .product-gallery-with-thumbs {
        flex-direction: column-reverse;
    }

    .product-thumbs-carousel {
        width: 100%;
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }

    .product-thumbs-viewport {
        width: 100%;
        height: var(--thumb-size);
        overflow: hidden;
    }

    .product-thumbs-track {
        flex-direction: row;
        gap: var(--thumb-gap);
        padding: 0 2px;
        transform: translateX(0);
        transition: transform 0.35s ease;
    }

    .thumbs-nav {
        width: 32px;
        height: var(--thumb-size);
        border-radius: 10px;
    }

    .thumbs-nav span {
        font-size: 11px;
    }

    .thumbs-nav-up span {
        transform: rotate(-90deg);
    }

    .thumbs-nav-down span {
        transform: rotate(-90deg);
    }

    .product-thumb {
        min-width: var(--thumb-size);
    }

    .product-main-carousel .carousel-inner {
        padding: 16px;
    }

    .product-main-carousel .carousel-item img {
        max-height: 300px;
    }

    .product-main-carousel .carousel-control-prev,
    .product-main-carousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .product-main-carousel .carousel-control-prev {
        left: 10px;
    }

    .product-main-carousel .carousel-control-next {
        right: 10px;
    }
}

/* ===================================
   RESPONSIVE - SMALL MOBILE
   =================================== */
@media (max-width: 576px) {
    .product-main-carousel .carousel-item img {
        max-height: 250px;
    }

    .product-thumbs-carousel {
        --thumb-size: 70px;
        --thumb-gap: 8px;
    }
}
