.wootify-matrix-selector {
    margin: 20px 0;
}

.wootify-variant-price-top {
    margin: 8px 0 14px;
}

.wootify-variant-price-top__value {
    font-size: 20px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.5;
}

.matrix-option-row {
    margin-bottom: 20px;
}

.matrix-option-row:last-child {
    margin-bottom: 0;
}

.option-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.option-label--with-helptext {
    gap: 0;
}

.option-helptext {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    text-transform: none;
    letter-spacing: normal;
}

.option-values {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.value-chip {
    position: relative;
    overflow: hidden;
    padding: 0px 10px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #747474;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none !important;
    min-width: 50px;
    min-height: 40px;
    line-height: 40px;
    margin: 0;
    box-shadow: 0 0px 0px 1px rgba(193, 193, 193, 0.75);
	border: 0 !important;
}

.value-chip.chip-image-swatch {
    width: 85px;
    min-width: 85px;
    height: 85px;
    padding: 3px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.chip-image-wrap {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.chip-image-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chip-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
}

.value-chip.chip-color-swatch {
    width: 45px;
    min-width: 45px;
    height: 45px;
    padding: 3px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.chip-color-dot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    position: relative;
}

.chip-color-dot::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.value-chip.chip-color-swatch.active {
    background: #fff;
    /* border: 2px solid #f4b400;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f4b400; */
}

.value-chip.chip-color-swatch.active .chip-color-dot::after {
    display: flex;
}

.value-chip.chip-image-swatch.active {
    background: #fff;
    /* border: 2px solid #f4b400;
     box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f4b400; */
}

.value-chip.chip-color-swatch.disabled,
.value-chip.chip-image-swatch.disabled {
    background: #fff;
    opacity: 1;
    transform: none;
    text-decoration: none;
}

.value-chip.chip-color-swatch.disabled .chip-color-dot,
.value-chip.chip-image-swatch.disabled .chip-image-wrap {
    opacity: 0.38;
}

.value-chip.active {
    background: #fff;
    color: #222;
    box-shadow: 0 0px 0px 2px rgba(0, 0, 0, 0.744);
}

.value-chip.disabled {
    opacity: 1;
    cursor: not-allowed;
    background: #f3f4f6;
    color: #9ca3af;
    text-decoration: none;
}

.value-chip.disabled::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(
            135deg,
            transparent calc(50% - 1px),
            rgba(17, 24, 39, 0.72) calc(50% - 1px),
            rgba(17, 24, 39, 0.72) calc(50% + 1px),
            transparent calc(50% + 1px)
        );
}

.value-chip.disabled::after {
    content: '×';
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

.value-chip.chip-color-swatch.disabled::after,
.value-chip.chip-image-swatch.disabled::after {
    top: 5px;
    right: 5px;
}

/* Customizer fields */
.wootify-customizer-fields {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wootify-customizer-fields .customizer-field-row {
    margin: 0;
}

.wootify-customizer-fields .field-label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.wootify-customizer-fields .customizer-required-indicator {
    color: #dc2626;
    font-weight: 700;
}

.wootify-customizer-fields .input-full {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    color: #111827;
    font-size: 14px;
    line-height: 1.45;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.wootify-customizer-fields textarea.input-full {
    min-height: 96px;
    resize: vertical;
}

.wootify-customizer-fields .input-full::placeholder {
    color: #9ca3af;
}

.wootify-customizer-fields .input-full:hover {
    border-color: #9ca3af;
}

.wootify-customizer-fields .input-full:focus {
    border-color: #111827;
    outline: none;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.12);
}

.wootify-customizer-fields .customizer-choice-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 16px;
}

.wootify-customizer-fields .customizer-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 0;
    color: #374151;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.wootify-customizer-fields .customizer-choice-input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    accent-color: #111827;
}

.wootify-customizer-fields .customizer-choice-input:disabled {
    cursor: not-allowed;
}

.wootify-customizer-fields .customizer-choice-input:disabled + span {
    color: #9ca3af;
    text-decoration: line-through;
}

.wootify-customizer-fields .customizer-limit-text {
    flex: 0 0 100%;
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

.wootify-customizer-fields .swatch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wootify-customizer-fields .swatch-btn {
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.wootify-customizer-fields .swatch-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.wootify-customizer-fields .swatch-btn.active {
    border-color: #111827;
    background: #f9fafb;
    color: #111827;
    box-shadow: 0 0 0 1px #111827;
}

.wootify-customizer-fields .upload-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.wootify-customizer-fields .upload-input {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #374151;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    box-sizing: border-box;
}

.wootify-customizer-fields .upload-input:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.wootify-customizer-fields .upload-input::file-selector-button {
    margin-right: 10px;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.wootify-customizer-fields .customizer-upload-preview {
    display: inline-flex;
    margin: 0;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
}

.wootify-customizer-fields .customizer-upload-preview img {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 4px;
    object-fit: cover;
}

@media (max-width: 767px) {
    .wootify-customizer-fields {
        margin-top: 20px;
        padding-top: 18px;
        gap: 16px;
    }

    .wootify-customizer-fields .customizer-choice-group,
    .wootify-customizer-fields .swatch-grid {
        gap: 8px 12px;
    }

    .wootify-customizer-fields .swatch-btn {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

.selected-variant-info {
    padding-top: 10px;
}

.variant-price {
    font-size: 24px;
    font-weight: 700;
    color: #1e1e1e;
    margin-bottom: 4px;
}

.variant-sku {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.single_add_to_cart_button[data-wootify-state="missing-selection"],
.single_add_to_cart_button.wootify-state-missing-selection {
    opacity: 0.75;
}

.single_add_to_cart_button[data-wootify-state="out-of-stock"],
.single_add_to_cart_button.wootify-state-out-of-stock {
    background: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #ffffff !important;
    cursor: not-allowed;
}

/* ── Slick Carousel Gallery ── */
.woocommerce-product-gallery.wootify-slick-gallery {
    display: block !important;
    opacity: 1 !important;
}

.wslk-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #eee;
    user-select: none;
    -webkit-user-select: none;
}

.wslk-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.wslk-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
}

.wslk-slide img {
    display: block;
    width: 100%;
    height: auto;
    /* aspect-ratio: 1; 
    object-fit: none; */
    background: #f9fafb;
}

/* Arrows */
.wslk-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #1e1e1e;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: background 0.15s ease, opacity 0.15s ease;
    opacity: 0;
    pointer-events: none;
    padding: 0;
    line-height: 1;
}

.wslk-viewport:hover .wslk-arrow {
    opacity: 1;
    pointer-events: auto;
}

.wslk-arrow:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.wslk-arrow-prev {
    left: 10px;
}

.wslk-arrow-next {
    right: 10px;
}

/* Counter */
.wslk-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 5;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    pointer-events: none;
}

/* Thumbnail strip */
.wslk-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    padding-bottom: 4px;
}

.wslk-thumbs::-webkit-scrollbar {
    height: 4px;
}

.wslk-thumbs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.wslk-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease;
}

.wslk-thumb:hover {
    border-color: #9ca3af;
}

.wslk-thumb.active {
    border-color: #1e1e1e;
}

.wslk-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile */
@media (max-width: 767px) {
    .wslk-arrow {
        width: 30px;
        height: 30px;
        opacity: 1;
        pointer-events: auto;
    }

    .wslk-arrow-prev {
        left: 6px;
    }

    .wslk-arrow-next {
        right: 6px;
    }

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

    .wslk-thumb {
        width: 56px;
        height: 56px;
    }

    .wslk-thumbs {
        gap: 6px;
        margin-top: 8px;
    }
}

/* Native Woo/theme thumbnail rows: keep a single horizontal strip */
.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs,
.woocommerce-product-gallery .thumbnails {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 8px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap;
    scrollbar-width: thin;
}

.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar,
.woocommerce-product-gallery .thumbnails::-webkit-scrollbar {
    height: 4px;
}

.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li,
.woocommerce-product-gallery .thumbnails > * {
    flex: 0 0 auto !important;
}

.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs li {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

.woocommerce-product-gallery .flex-control-nav.flex-control-thumbs img,
.woocommerce-product-gallery .thumbnails img {
    display: block;
    width: 72px;
    height: 72px;
    max-width: none;
    object-fit: cover;
}

@media (max-width: 767px) {
    .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs img,
    .woocommerce-product-gallery .thumbnails img {
        width: 56px;
        height: 56px;
    }
}

.woocommerce-product-gallery.wootify-native-variant-gallery-host {
    display: block !important;
}

.woocommerce-product-gallery.wootify-native-variant-gallery-host .flex-control-nav.flex-control-thumbs,
.woocommerce-product-gallery.wootify-native-variant-gallery-host .thumbnails {
    display: none !important;
}

.wootify-native-variant-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.wootify-native-variant-gallery .wnvg-main {
    aspect-ratio: 1;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wootify-native-variant-gallery .wnvg-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wootify-native-variant-gallery .wnvg-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.wootify-native-variant-gallery .wnvg-thumbs::-webkit-scrollbar {
    height: 4px;
}

.wootify-native-variant-gallery .wnvg-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    margin: 0;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
}

.wootify-native-variant-gallery .wnvg-thumb.active {
    border-color: #1e1e1e;
}

.wootify-native-variant-gallery .wnvg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 767px) {
    .wootify-native-variant-gallery .wnvg-thumb {
        width: 56px;
        height: 56px;
    }
}

.woocommerce-product-gallery.wootify-custom-gallery {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    align-items: flex-start !important;
    opacity: 1 !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.woocommerce-product-gallery.wootify-custom-gallery .flex-control-nav.flex-control-thumbs,
.woocommerce-product-gallery.wootify-custom-gallery .thumbnails,
.woocommerce-product-gallery.wootify-swiper-gallery .flex-control-nav.flex-control-thumbs,
.woocommerce-product-gallery.wootify-swiper-gallery .thumbnails,
.woocommerce-product-gallery.wootify-slick-gallery .flex-control-nav.flex-control-thumbs,
.woocommerce-product-gallery.wootify-slick-gallery .thumbnails {
    display: none !important;
}

.wootify-custom-gallery .wcg-thumbs-col {
    flex: 0 0 var(--wcg-thumb-width, 100px);
    width: var(--wcg-thumb-width, 100px);
    min-width: var(--wcg-thumb-width, 100px);
    max-width: var(--wcg-thumb-width, 100px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.wootify-custom-gallery .wcg-thumbs-col::-webkit-scrollbar {
    width: 4px;
}

.wootify-custom-gallery .wcg-thumbs-col::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.wootify-custom-gallery .wcg-thumb {
    display: block;
    width: var(--wcg-thumb-width, 100px);
    aspect-ratio: var(--wcg-thumb-ratio, 1);
    height: auto;
    flex-shrink: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #f9fafb;
    transition: border-color 0.2s;
    margin-bottom: 0;
}

.wootify-custom-gallery .wcg-thumb:hover {
    border-color: #9ca3af;
}

.wootify-custom-gallery .wcg-thumb.active {
    border: 1px solid #868686;
}

.wootify-custom-gallery .wcg-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wootify-custom-gallery .wcg-main-col {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    border: 1px solid #eee;
}

.wootify-custom-gallery .wcg-main-image {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.15s ease;
}

.wootify-custom-gallery.wootify-custom-gallery-ratio-1 .wcg-main-col {
    aspect-ratio: 1;
}

.wootify-custom-gallery.wootify-custom-gallery-ratio-1 {
    --wcg-thumb-width: 100px;
    --wcg-thumb-ratio: 1;
}

.wootify-custom-gallery.wootify-custom-gallery-ratio-3-4 .wcg-main-col {
    flex: 1 1 0;
    width: auto;
    max-width: min(720px, calc(100% - var(--wcg-thumb-width, 84px) - 12px));
    aspect-ratio: 3 / 4;
    margin-right: auto;
    background: transparent;
}

.wootify-custom-gallery.wootify-custom-gallery-ratio-3-4 {
    --wcg-thumb-width: 84px;
    --wcg-thumb-ratio: 3 / 4;
}

.wootify-custom-gallery.wootify-custom-gallery-ratio-4-3 .wcg-main-col {
    aspect-ratio: 4 / 3;
}

.wootify-custom-gallery.wootify-custom-gallery-ratio-4-3 {
    --wcg-thumb-width: 112px;
    --wcg-thumb-ratio: 4 / 3;
}

.wootify-custom-gallery.wootify-custom-gallery-ratio-1 .wcg-main-image,
.wootify-custom-gallery.wootify-custom-gallery-ratio-3-4 .wcg-main-image,
.wootify-custom-gallery.wootify-custom-gallery-ratio-4-3 .wcg-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 767px) {
    .woocommerce-product-gallery.wootify-custom-gallery {
        flex-direction: column-reverse !important;
    }

    .wootify-custom-gallery .wcg-main-col,
    .wootify-custom-gallery.wootify-custom-gallery-ratio-1 .wcg-main-col,
    .wootify-custom-gallery.wootify-custom-gallery-ratio-3-4 .wcg-main-col,
    .wootify-custom-gallery.wootify-custom-gallery-ratio-4-3 .wcg-main-col {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        aspect-ratio: auto;
        margin-right: 0;
        background: transparent;
    }

    .wootify-custom-gallery .wcg-main-image,
    .wootify-custom-gallery.wootify-custom-gallery-ratio-1 .wcg-main-image,
    .wootify-custom-gallery.wootify-custom-gallery-ratio-3-4 .wcg-main-image,
    .wootify-custom-gallery.wootify-custom-gallery-ratio-4-3 .wcg-main-image {
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .wootify-custom-gallery .wcg-thumbs-col {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        max-height: none !important;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .wootify-custom-gallery .wcg-thumb {
        width: 64px;
        min-width: 64px;
        aspect-ratio: 1;
    }
}

/* ── Swiper Gallery Layout Modes ── */
.woocommerce-product-gallery.wootify-swiper-gallery {
    display: block !important;
    opacity: 1 !important;
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    overflow: visible !important;
}

.wootify-swiper-gallery .wsg-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.wootify-swiper-gallery .wsg-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

.wootify-swiper-gallery .wsg-grid,
.wootify-swiper-gallery .wsg-row,
.wootify-swiper-gallery .wsg-thumb-layout,
.wootify-swiper-gallery .wsg-main,
.wootify-swiper-gallery .wsg-thumbs,
.wootify-swiper-gallery .wsg-item,
.wootify-swiper-gallery .wsg-thumb {
    box-sizing: border-box;
}

.wootify-swiper-gallery .wsg-thumb-layout,
.wootify-swiper-gallery .wsg-main,
.wootify-swiper-gallery .wsg-thumbs {
    min-width: 0;
}

.wootify-swiper-gallery .wsg-row-full {
    flex-direction: row;
}

.wootify-swiper-gallery .wsg-row-full .wsg-item {
    width: 100%;
}

.wootify-swiper-gallery .wsg-row-half .wsg-item {
    width: 50%;
}

.wootify-swiper-gallery .wsg-row-third .wsg-item {
    width: 33.333%;
}

.wootify-swiper-gallery .wsg-item,
.wootify-swiper-gallery .wsg-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #f3f4f6;
    cursor: pointer;
    transition: border-color 0.15s ease, outline-color 0.15s ease;
    outline-offset: -2px;
    margin: 0;
    min-width: 0;
    min-height: 0;
    line-height: 0;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.wootify-swiper-gallery .wsg-item:hover,
.wootify-swiper-gallery .wsg-thumb:hover {
    outline-color: #9ca3af;
}

.wootify-swiper-gallery .wsg-item.active,
.wootify-swiper-gallery .wsg-thumb.active {
    outline: 2px solid #1e1e1e;
}

.wootify-swiper-gallery .wsg-item img,
.wootify-swiper-gallery .wsg-thumb img,
.wootify-swiper-gallery .wsg-main-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wootify-swiper-gallery .wsg-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
    border: 1px solid #eee;
}

.wootify-swiper-gallery .wsg-main-image {
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.wootify-swiper-gallery.wsg-layout-vertical .wsg-thumb-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.wootify-swiper-gallery.wsg-layout-vertical .wsg-thumbs {
    flex: 0 0 92px;
    width: 92px;
    max-width: 92px;
    min-width: 92px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: min(720px, 80vh);
    padding: 0 2px 2px 0;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.wootify-swiper-gallery.wsg-layout-vertical .wsg-thumbs::-webkit-scrollbar {
    width: 4px;
}

.wootify-swiper-gallery.wsg-layout-vertical .wsg-thumbs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.wootify-swiper-gallery.wsg-layout-vertical .wsg-thumb {
    flex: 0 0 auto;
    width: 92px;
    height: 92px;
    aspect-ratio: 1;
    padding: 0;
    border: 2px solid transparent;
}

.wootify-swiper-gallery.wsg-layout-vertical .wsg-main {
    flex: 1 1 auto;
}

.wootify-swiper-gallery.wsg-layout-vertical .wsg-main-image {
    width: 100%;
}

.wootify-swiper-gallery.wsg-layout-horizontal .wsg-thumb-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.wootify-swiper-gallery.wsg-layout-horizontal .wsg-thumbs {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding: 0 0 4px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.wootify-swiper-gallery.wsg-layout-horizontal .wsg-thumbs::-webkit-scrollbar {
    height: 4px;
}

.wootify-swiper-gallery.wsg-layout-horizontal .wsg-thumbs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.wootify-swiper-gallery.wsg-layout-horizontal .wsg-thumb {
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    padding: 0;
    border: 2px solid transparent;
}

.wootify-swiper-gallery.wsg-layout-horizontal .wsg-main,
.wootify-swiper-gallery.wsg-layout-horizontal .wsg-main-image {
    width: 100%;
}
/*
.wsg-row-full .wsg-item img {
    aspect-ratio: 4 / 3;
}

.wsg-row-half .wsg-item img {
    aspect-ratio: 1;
}

.wsg-row-third .wsg-item img {
    aspect-ratio: 3 / 4;
}
*/
@media (max-width: 767px) {
    .wootify-swiper-gallery.wsg-layout-collage .wsg-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .wootify-swiper-gallery.wsg-layout-collage .wsg-row {
        display: contents;
    }

    .wootify-swiper-gallery.wsg-layout-collage .wsg-grid::-webkit-scrollbar {
        height: 6px;
    }

    .wootify-swiper-gallery.wsg-layout-collage .wsg-item {
        flex: 0 0 min(72vw, 280px);
        width: min(72vw, 280px) !important;
        scroll-snap-align: start;
    }

    .wootify-swiper-gallery.wsg-layout-collage .wsg-row-full .wsg-item img,
    .wootify-swiper-gallery.wsg-layout-collage .wsg-row-half .wsg-item img {
        aspect-ratio: 4 / 5;
    }

    .wootify-swiper-gallery.wsg-layout-collage .wsg-row-third .wsg-item img {
        aspect-ratio: 4 / 5;
    }

    .wootify-swiper-gallery.wsg-layout-vertical .wsg-thumb-layout {
        flex-direction: column;
    }

    .wootify-swiper-gallery.wsg-layout-vertical .wsg-main {
        order: 1;
        width: 100%;
    }

    .wootify-swiper-gallery.wsg-layout-vertical .wsg-thumbs {
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        max-height: none;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
    }

    .wootify-swiper-gallery.wsg-layout-vertical .wsg-thumbs::-webkit-scrollbar {
        height: 4px;
    }

    .wootify-swiper-gallery.wsg-layout-vertical .wsg-thumb,
    .wootify-swiper-gallery.wsg-layout-horizontal .wsg-thumb {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }
}
