.ka-woo-gallery {
    display: grid;
    gap: 12px;
}

.ka-woo-gallery__main {
    position: relative;
    overflow: hidden;
}

.ka-woo-gallery__slider {
    display: flex;
    transition: transform 0.3s ease;
}

.ka-woo-gallery__slide {
    min-width: 100%;
    cursor: default;
    position: relative;
}

.ka-woo-gallery--lightbox .ka-woo-gallery__slide,
.ka-woo-gallery--zoom .ka-woo-gallery__slide {
    cursor: zoom-in;
}

.ka-woo-gallery__slide img {
    width: 100%;
    height: auto;
    display: block;
}

.ka-woo-gallery__main[data-aspect] .ka-woo-gallery__slide {
    overflow: hidden;
}

.ka-woo-gallery__main[data-aspect] .ka-woo-gallery__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ka-woo-gallery__main[data-aspect="1:1"] .ka-woo-gallery__slide {
    aspect-ratio: 1 / 1;
}

.ka-woo-gallery__main[data-aspect="4:3"] .ka-woo-gallery__slide {
    aspect-ratio: 4 / 3;
}

.ka-woo-gallery__main[data-aspect="3:4"] .ka-woo-gallery__slide {
    aspect-ratio: 3 / 4;
}

.ka-woo-gallery__main[data-aspect="16:9"] .ka-woo-gallery__slide {
    aspect-ratio: 16 / 9;
}

.ka-woo-gallery__main[data-aspect="9:16"] .ka-woo-gallery__slide {
    aspect-ratio: 9 / 16;
}

.ka-woo-gallery--grid .ka-woo-gallery__slider {
    display: grid;
    grid-template-columns: repeat(var(--ka-gallery-grid-cols, 3), minmax(0, 1fr));
    gap: var(--ka-gallery-gap, 12px);
}

.ka-woo-gallery--grid .ka-woo-gallery__slide {
    min-width: 0;
}

.ka-woo-gallery--masonry .ka-woo-gallery__slider {
    display: block;
    column-count: var(--ka-gallery-grid-cols, 2);
    column-gap: var(--ka-gallery-gap, 8px);
}

.ka-woo-gallery--masonry .ka-woo-gallery__slide {
    break-inside: avoid;
    margin: 0 0 var(--ka-gallery-gap, 8px);
    width: 100%;
    min-width: 0;
}

.ka-woo-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.ka-woo-gallery__thumb {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ka-woo-gallery__thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.ka-woo-gallery__thumb.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.ka-woo-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ka-woo-gallery__arrow:hover {
    background: rgba(0, 0, 0, 0.65);
}

.ka-woo-gallery__arrow--prev { left: 8px; }
.ka-woo-gallery__arrow--next { right: 8px; }

.ka-woo-gallery__dots {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.ka-woo-gallery__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid #999;
    background: #fff;
    padding: 0;
    cursor: pointer;
}

.ka-woo-gallery__dot.is-active {
    background: #111;
    border-color: #111;
}

.ka-woo-gallery__lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.ka-woo-gallery__lightbox.is-open {
    display: flex;
}

.ka-woo-gallery__lightbox-body {
    position: relative;
    background: #0f172a;
    border-radius: 12px;
    padding: 16px;
    max-width: 90vw;
    max-height: 90vh;
    display: grid;
    gap: 12px;
    color: #fff;
}

.ka-woo-gallery__lightbox-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ka-woo-gallery__lightbox-counter {
    font-size: 14px;
    opacity: 0.85;
}

.ka-woo-gallery__lightbox-media {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.ka-woo-gallery__lightbox img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.ka-woo-gallery__lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
}

.ka-woo-gallery__lightbox-nav {
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
}

.ka-woo-gallery__lb-prev,
.ka-woo-gallery__lb-next {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.ka-woo-gallery__lightbox--light .ka-woo-gallery__lightbox-body {
    background: #fff;
    color: #0f172a;
}

.ka-woo-gallery__lightbox--light .ka-woo-gallery__lightbox-close,
.ka-woo-gallery__lightbox--light .ka-woo-gallery__lb-prev,
.ka-woo-gallery__lightbox--light .ka-woo-gallery__lb-next {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.ka-woo-gallery__lightbox-thumbs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 64px;
    gap: 8px;
    overflow-x: auto;
    padding: 4px;
}

.ka-woo-gallery__lightbox-thumb {
    border: none;
    padding: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ka-woo-gallery__lightbox-thumb span {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.ka-woo-gallery__lightbox-thumb.is-active {
    box-shadow: 0 0 0 2px #2563eb, 0 8px 18px rgba(37, 99, 235, 0.25);
    transform: translateY(-2px);
}

.ka-woo-gallery--lightbox-light .ka-woo-gallery__lightbox-body {
    background: #fff;
    color: #0f172a;
}

.ka-woo-gallery--lightbox-light .ka-woo-gallery__lightbox-close,
.ka-woo-gallery--lightbox-light .ka-woo-gallery__lb-prev,
.ka-woo-gallery--lightbox-light .ka-woo-gallery__lb-next {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.ka-woo-gallery--thumbs-left,
.ka-woo-gallery--thumbs-right {
    display: grid;
    gap: 12px;
    align-items: start;
}

.ka-woo-gallery--thumbs-left {
    grid-template-columns: 110px 1fr;
}

.ka-woo-gallery--thumbs-right {
    grid-template-columns: 1fr 110px;
}

.ka-woo-gallery--thumbs-left .ka-woo-gallery__thumbs,
.ka-woo-gallery--thumbs-right .ka-woo-gallery__thumbs {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 90px;
    gap: 8px;
    position: sticky;
    top: 20px;
}

.ka-woo-gallery--thumbs-left .ka-woo-gallery__thumb,
.ka-woo-gallery--thumbs-right .ka-woo-gallery__thumb {
    height: 100%;
}

.ka-woo-gallery__zoom-lens {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(37, 99, 235, 0.6);
    border-radius: 6px;
    background-repeat: no-repeat;
    background-size: 200% 200%;
    display: none;
    pointer-events: none;
}

.ka-woo-gallery--zoom .ka-woo-gallery__slide:hover .ka-woo-gallery__zoom-lens {
    display: block;
}

@media (max-width: 767px) {
    .ka-woo-gallery--thumbs-left,
    .ka-woo-gallery--thumbs-right {
        grid-template-columns: 1fr;
    }
    .ka-woo-gallery--thumbs-left .ka-woo-gallery__thumbs,
    .ka-woo-gallery--thumbs-right .ka-woo-gallery__thumbs {
        position: relative;
        grid-auto-rows: auto;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
}


