@import 'variables.css';

.product-gallery {
    width: 100%;
    max-width: 600px;
}

@media (max-width: 1200px) {
    .product-gallery {
        max-width: 50vw;
    }
}

@media (max-width: 992px) {
    .product-gallery {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .product-gallery {
        max-width: 100%;
    }
}

.product-gallery__main {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background-color: #F8F9FA;
    margin-bottom: var(--spacing-md);
}

.product-gallery__main-splide {
    width: 100%;
    height: 400px;
}

.product-gallery__main-splide .splide__track {
    height: 100%;
}

.product-gallery__main-splide .splide__list {
    height: 100%;
}

.product-gallery__main-splide .splide__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F8F9FA;
    height: 100% !important;
}

.product-gallery__main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.product-gallery__thumbs {
    width: 100%;
}

.product-gallery__thumbs-splide {
    width: 100%;
}

.product-gallery__thumbs-splide .splide__track {
    padding: 0;
    overflow: hidden;
}

.product-gallery__thumbs-splide .splide__list {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.product-gallery__thumbs-splide .splide__slide {
    width: 80px !important;
    height: 80px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F8F9FA;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 !important;
}

.product-gallery__thumb-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-gallery__thumb-image:hover {
    border-color: var(--primary-color);
}

.product-gallery__thumb-image.is-active {
    border-color: var(--primary-color);
}

.product-gallery__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background-color: #F8F9FA;
    color: #666;
    font-size: var(--font-size-lg);
}

/* Кастомизация стрелок Splide */
.product-gallery__main-splide .splide__arrow {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-gallery__main-splide .splide__arrow:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.product-gallery__main-splide .splide__arrow:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.product-gallery__main-splide .splide__arrow svg {
    width: 24px;
    height: 24px;
}

/* Responsive */
@media (max-width: 992px) {
    .product-gallery__main-splide {
        height: 350px;
    }

    .product-gallery__placeholder {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .product-gallery__main-splide {
        height: 300px;
    }

    .product-gallery__placeholder {
        height: 300px;
    }

    .product-gallery__thumbs-splide .splide__slide {
        width: 60px !important;
        height: 60px !important;
    }

    .product-gallery__thumbs-splide .splide__list {
        gap: 8px;
    }

    .product-gallery__main-splide .splide__arrow {
        width: 32px;
        height: 32px;
    }

    .product-gallery__main-splide .splide__arrow svg {
        width: 20px;
        height: 20px;
    }
}
