/**
 * Inkeria Product Gallery Styles
 */

.inkeria-product-gallery {
    width: 100%;
    max-width: 100%;
    outline: none;
}

/* Main gallery area */
.inkeria-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f5f5f5;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.inkeria-gallery-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.inkeria-gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inkeria-gallery-slide.active {
    opacity: 1;
    visibility: visible;
}

.inkeria-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

/* Navigation arrows */
.inkeria-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.inkeria-gallery-arrow:hover {
    background: #fff;
}

.inkeria-gallery-arrow:focus {
    outline: 2px solid var(--bricks-color-qwekjg);
    outline-offset: 2px;
}

.inkeria-gallery-arrow svg {
    width: 20px;
    height: 20px;
    color: #333;
}

.inkeria-gallery-prev {
    left: 12px;
}

.inkeria-gallery-next {
    right: 12px;
}

.inkeria-gallery-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Video container */
.inkeria-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inkeria-video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inkeria-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    padding: 0;
}

.inkeria-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.inkeria-play-button:focus {
    outline: 2px solid var(--bricks-color-qwekjg);
    outline-offset: 4px;
}

.inkeria-play-button svg {
    width: 100%;
    height: 100%;
}

.inkeria-video-container.playing .inkeria-video-thumbnail,
.inkeria-video-container.playing .inkeria-play-button {
    display: none;
}

.inkeria-video-player {
    display: none;
    width: 100%;
    height: 100%;
}

.inkeria-video-container.playing .inkeria-video-player {
    display: block;
}

.inkeria-video-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Thumbnail slider */
.inkeria-gallery-thumbs {
    position: relative;
    margin-top: 12px;
}

.inkeria-thumb-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.inkeria-thumb-track {
    display: flex;
    gap: 8px;
    transition: transform 0.3s ease;
}

.inkeria-thumb {
    flex-shrink: 0;
    width: calc((100% - 32px) / 4.5);
    aspect-ratio: 1 / 1;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
    padding: 0;
    position: relative;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.5;
}

.inkeria-thumb:hover {
    border-color: var(--bricks-color-ketrbf);
    opacity: 0.8;
}

.inkeria-thumb:focus {
    outline: none;
}

.inkeria-thumb.active {
    opacity: 1;
}

.inkeria-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Video thumbnail indicator */
.inkeria-thumb-video {
    position: relative;
}

.inkeria-thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
}

.inkeria-thumb-play svg {
    width: 10px;
    height: 10px;
    margin-left: 2px;
}

/* Thumbnail navigation arrows */
.inkeria-thumb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.inkeria-thumb-arrow:hover {
    background: #fff;
}

.inkeria-thumb-arrow:focus {
    outline: 2px solid var(--bricks-color-qwekjg);
    outline-offset: 2px;
}

.inkeria-thumb-arrow svg {
    width: 14px;
    height: 14px;
    color: #333;
}

.inkeria-thumb-prev {
    left: 4px;
}

.inkeria-thumb-next {
    right: 4px;
}

.inkeria-thumb-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .inkeria-gallery-arrow {
        width: 32px;
        height: 32px;
    }

    .inkeria-gallery-arrow svg {
        width: 16px;
        height: 16px;
    }

    .inkeria-gallery-prev {
        left: 8px;
    }

    .inkeria-gallery-next {
        right: 8px;
    }

    .inkeria-thumb {
        width: calc((100% - 24px) / 4);
    }
}

@media (max-width: 480px) {
    .inkeria-gallery-arrow {
        width: 28px;
        height: 28px;
    }

    .inkeria-gallery-arrow svg {
        width: 14px;
        height: 14px;
    }

    .inkeria-thumb {
        width: calc((100% - 16px) / 3.5);
    }
}
