/* ── WOA Product Gallery ──────────────────────────────────────────────────── */

.woa-product-gallery {
    position: relative;
    width: 100%;
}

/* ── Main display slot ────────────────────────────────────────────────────── */

.woa-product-gallery__main {
    position: relative;
    width: 100%;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    line-height: 0; /* remove phantom gap below inline elements */
}

.woa-product-gallery__main img.woa-product-image,
.woa-product-gallery__main video.woa-product-video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 620px;
    object-fit: contain;
}


/* ── Thumbnail strip ──────────────────────────────────────────────────────── */

.woa-product-gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.woa-product-gallery__thumb {
    position: relative;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    padding: 0;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.woa-product-gallery__thumb img {
    /* Absolute fill — WP core sets img{height:auto} at high specificity,
       so !important is required here to enforce the square crop. */
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.woa-product-gallery__thumb.active {
    border-color: #1a1a1a;
}

.woa-product-gallery__thumb:hover:not(.active) {
    border-color: #aaa;
}

.woa-product-gallery__thumb:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

/* ── Video thumbnail — play icon overlay ─────────────────────────────────── */

.woa-thumb__video-placeholder {
    width: 100%;
    height: 100%;
    background: #2a2a2a;
}

.woa-thumb__play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.38);
    color: #fff;
    pointer-events: none;
    transition: background 0.15s ease;
}

.woa-product-gallery__thumb:hover .woa-thumb__play-icon {
    background: rgba(0, 0, 0, 0.58);
}

.woa-thumb__play-icon svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .woa-product-gallery__thumb {
        width: 62px;
        height: 62px;
    }
}
