/* WooCommerce single product gallery */

.novateplica-product-gallery-card {
    background: var(--pc-card, #fff);
    border: 1px solid var(--pc-line, #e6e8eb);
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    position: relative;
    display: flow-root;
    width: 100%;
    box-sizing: border-box;
}

.novateplica-wc-gallery {
    clear: both;
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.single-product div.product .novateplica-wc-gallery .woocommerce-product-gallery,
.novateplica-wc-gallery .woocommerce-product-gallery {
    clear: both !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    position: relative;
}

.novateplica-product-gallery-card .novateplica-product-gallery-description {
    clear: both;
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 14px 2px 0;
    box-sizing: border-box;
}

.novateplica-product-gallery-card .short-description-content {
    max-width: 100%;
}

.novateplica-wc-gallery .woocommerce-product-gallery__wrapper {
    margin: 0;
    padding: 0;
}

.novateplica-wc-gallery .flex-viewport {
    margin: 0 0 14px;
    border-radius: 8px;
}

.novateplica-wc-gallery .woocommerce-product-gallery__image {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.novateplica-wc-gallery .woocommerce-product-gallery__image a {
    display: block;
    cursor: zoom-in;
}

.novateplica-wc-gallery .zoomImg {
    display: none !important;
}

.novateplica-wc-gallery .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: clamp(320px, 42vw, 620px);
    max-height: 62vh;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--pc-line, #e6e8eb);
    border-radius: 8px;
    margin: 0 auto;
}

.novateplica-wc-gallery .woocommerce-product-gallery__image--placeholder img {
    object-fit: contain;
    padding: 40px;
}

.novateplica-wc-gallery .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 12;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--pc-line, #e6e8eb);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
    color: var(--pc-text, #222);
    text-indent: -9999px;
    overflow: hidden;
}

.novateplica-wc-gallery .woocommerce-product-gallery__trigger {
    opacity: 0 !important;
    pointer-events: none !important;
}

.novateplica-wc-gallery .woocommerce-product-gallery__trigger::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    left: 12px;
    top: 11px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.novateplica-wc-gallery .woocommerce-product-gallery__trigger::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 2px;
    left: 24px;
    top: 27px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(45deg);
}

.novateplica-wc-gallery .woocommerce-product-gallery__trigger:hover,
.novateplica-wc-gallery .woocommerce-product-gallery__trigger:focus-visible {
    color: var(--pc-green, #17a34a);
    border-color: currentColor;
    outline: none;
}

.novateplica-product-gallery-card .novateplica-gallery-sale-icon {
    top: 24px;
    left: 24px;
    z-index: 30;
}

.novateplica-product-gallery-card .novateplica-gallery-sale-icon .sale-tooltip {
    left: 44px;
}

.novateplica-gallery-thumbs-shell {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
}

.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 2px 2px 8px;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(17, 24, 39, .28) transparent;
    cursor: grab;
}

.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs:active {
    cursor: grabbing;
}

.novateplica-gallery-thumb-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--pc-line, #e6e8eb);
    border-radius: 50%;
    background: #fff;
    color: var(--pc-text, #222);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: border-color .18s ease, color .18s ease, opacity .18s ease, visibility .18s ease;
}

.novateplica-wc-gallery.has-overflowing-thumbs .novateplica-gallery-thumb-button {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.novateplica-gallery-thumb-button span {
    width: 11px;
    height: 11px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    display: block;
}

.novateplica-gallery-thumb-button--prev span {
    transform: translateX(2px) rotate(-45deg);
}

.novateplica-gallery-thumb-button--next span {
    transform: translateX(-2px) rotate(135deg);
}

.novateplica-gallery-thumb-button:hover:not(:disabled),
.novateplica-gallery-thumb-button:focus-visible {
    color: var(--pc-green, #17a34a);
    border-color: currentColor;
    outline: none;
}

.novateplica-gallery-thumb-button:disabled {
    opacity: .34;
    cursor: default;
}

.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar {
    height: 6px;
}

.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, .24);
    border-radius: 999px;
}

.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs li {
    flex: 0 0 clamp(64px, 9vw, 86px);
    width: clamp(64px, 9vw, 86px);
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    scroll-snap-align: start;
}

.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 3px;
    border: 2px solid var(--pc-line, #e6e8eb);
    border-radius: 8px;
    background: #fff;
    opacity: .72;
    cursor: pointer;
    transition: border-color .18s ease, opacity .18s ease, box-shadow .18s ease;
    box-sizing: border-box;
}

.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs img:hover,
.novateplica-wc-gallery .flex-control-nav.flex-control-thumbs img.flex-active {
    border-color: var(--pc-green, #17a34a);
    box-shadow: 0 0 0 1px rgba(23, 163, 74, .2);
    opacity: 1;
}

.novateplica-wc-gallery .flex-direction-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.novateplica-wc-gallery .flex-direction-nav a {
    color: var(--pc-text, #222);
}

@media (max-width: 980px) {
    .novateplica-product-gallery-card {
        margin: 0;
    }

    .novateplica-wc-gallery .woocommerce-product-gallery__image img {
        height: clamp(280px, 58vw, 520px);
        max-height: 66vh;
    }
}

@media (max-width: 767px) {
    .novateplica-product-gallery-card {
        border-left: 0;
        border-right: 0;
        border-top: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 10px;
    }

    .novateplica-gallery-thumbs-shell {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
    }

    .novateplica-gallery-thumb-button {
        width: 32px;
        height: 32px;
    }

    .novateplica-wc-gallery .woocommerce-product-gallery__image img {
        height: clamp(260px, 82vw, 520px);
        max-height: 70vh;
        aspect-ratio: 1 / 1;
    }

    .novateplica-wc-gallery .woocommerce-product-gallery__trigger {
        width: 38px;
        height: 38px;
        top: 10px;
        right: 10px;
    }

    .novateplica-wc-gallery .woocommerce-product-gallery__trigger::before {
        left: 10px;
        top: 10px;
    }

    .novateplica-wc-gallery .woocommerce-product-gallery__trigger::after {
        left: 22px;
        top: 25px;
    }

    .novateplica-wc-gallery .flex-control-nav.flex-control-thumbs {
        gap: 8px;
    }

    .novateplica-wc-gallery .flex-control-nav.flex-control-thumbs li {
        flex-basis: 68px;
        width: 68px;
    }
}

@media (max-width: 420px) {
    .novateplica-wc-gallery .woocommerce-product-gallery__image img {
        height: clamp(230px, 82vw, 420px);
    }

    .novateplica-wc-gallery .flex-control-nav.flex-control-thumbs li {
        flex-basis: 62px;
        width: 62px;
    }
}

[data-theme="dark"] .novateplica-product-gallery-card,
[data-theme="dark"] .novateplica-wc-gallery .woocommerce-product-gallery__image,
[data-theme="dark"] .novateplica-wc-gallery .woocommerce-product-gallery__image img,
[data-theme="dark"] .novateplica-wc-gallery .flex-control-nav.flex-control-thumbs img {
    background: var(--pc-card, #1f2937);
    border-color: var(--pc-line, #374151);
}

[data-theme="dark"] .novateplica-wc-gallery .woocommerce-product-gallery__trigger {
    background: var(--pc-card, #1f2937);
    border-color: var(--pc-line, #374151);
    color: var(--pc-text, #f3f4f6);
}

[data-theme="dark"] .novateplica-gallery-thumb-button {
    background: var(--pc-card, #1f2937);
    border-color: var(--pc-line, #374151);
    color: var(--pc-text, #f3f4f6);
}

[data-theme="dark"] .novateplica-wc-gallery .flex-control-nav.flex-control-thumbs {
    scrollbar-color: rgba(255, 255, 255, .28) transparent;
}
