.etap40-part-card {
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr) !important;
    align-items: start !important;
}

.catalog-product-gallery {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
}

.catalog-product-gallery.is-single,
.catalog-product-gallery.is-empty {
    grid-template-columns: minmax(0, 1fr);
}

.catalog-product-gallery.is-single .catalog-product-thumbnails {
    display: none;
}

.catalog-product-thumbnails {
    display: grid;
    align-content: start;
    gap: 8px;
    max-height: 390px;
    overflow-y: auto;
    padding-right: 3px;
}

.catalog-product-thumb {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    padding: 5px;
    border: 1px solid #c8d9ed;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.catalog-product-thumb:hover,
.catalog-product-thumb.is-active {
    border-color: #176df2;
    box-shadow: 0 0 0 2px rgba(23, 109, 242, .14);
}

.catalog-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.etap40-part-card .catalog-product-main-image,
.catalog-gallery-host .catalog-product-main-image {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 340px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid #d0dfef;
    border-radius: 14px;
    background: #f7f9fc;
    appearance: none;
    cursor: zoom-in;
}

.etap40-part-card .catalog-product-main-image > img,
.catalog-gallery-host .catalog-product-main-image > img {
    width: 100%;
    height: 310px;
    object-fit: contain;
    transition: transform .2s ease;
}

.etap40-part-card .catalog-product-main-image:hover > img,
.catalog-gallery-host .catalog-product-main-image:hover > img {
    transform: scale(1.025);
}

.catalog-gallery-host {
    padding: 0;
}

.catalog-gallery-host .catalog-product-gallery,
.catalog-gallery-host .catalog-gallery-placeholder {
    width: 100%;
    min-width: 0;
}

.catalog-gallery-host .catalog-gallery-placeholder {
    display: grid;
    place-items: center;
    min-height: inherit;
    padding: 18px;
}

.catalog-product-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 9px;
    background: rgba(4, 43, 93, .9);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.catalog-lightbox {
    width: min(1280px, calc(100vw - 32px));
    height: min(920px, calc(100vh - 32px));
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #06182e;
    color: #fff;
}

.catalog-lightbox::backdrop {
    background: rgba(1, 8, 18, .9);
    backdrop-filter: blur(3px);
}

.catalog-lightbox-toolbar {
    position: absolute;
    z-index: 2;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .65), transparent);
}

.catalog-lightbox-toolbar button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: #082c5d;
    font-size: 28px;
    cursor: pointer;
}

.catalog-lightbox-stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 64px 74px 62px;
    box-sizing: border-box;
}

.catalog-lightbox-stage > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.catalog-lightbox-nav {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 64px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    color: #082c5d;
    font-size: 42px;
    cursor: pointer;
    transform: translateY(-50%);
}

.catalog-lightbox-nav.previous { left: 14px; }
.catalog-lightbox-nav.next { right: 14px; }

.catalog-lightbox-caption {
    position: absolute;
    right: 70px;
    bottom: 15px;
    left: 70px;
    color: #eaf2ff;
    text-align: center;
}

@media (max-width: 820px) {
    .etap40-part-card {
        grid-template-columns: 1fr !important;
    }
    .catalog-product-gallery {
        grid-template-columns: 1fr;
    }
    .catalog-product-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
        grid-row: 2;
        max-height: none;
        overflow-x: auto;
    }
    .catalog-product-thumb {
        width: 100%;
        min-width: 58px;
    }
}

@media (max-width: 520px) {
    .etap40-part-card .catalog-product-main-image,
    .catalog-gallery-host .catalog-product-main-image {
        min-height: 280px;
    }
    .etap40-part-card .catalog-product-main-image > img,
    .catalog-gallery-host .catalog-product-main-image > img {
        height: 250px;
    }
    .catalog-lightbox-stage {
        padding: 58px 48px 70px;
    }
    .catalog-lightbox-nav {
        width: 38px;
        height: 54px;
    }
    .catalog-lightbox-nav.previous { left: 5px; }
    .catalog-lightbox-nav.next { right: 5px; }
}
