.custom-models--pm .custom-models__filter {
    margin-bottom: 0;
}

.custom-model-selection {
    padding-block: 27px 16px;
}

.custom-model-selection__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.custom-models--pm .custom-model-selection__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 27px;
    color: var(--color-text);
}

.custom-model-selection__catalog {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    line-height: 24px;
    color: var(--color-muted);
    text-decoration: none;
    white-space: nowrap;
}

.custom-model-selection__catalog:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.custom-model-selection__catalog img,
.custom-model-selection__arrow img {
    display: block;
    flex: 0 0 auto;
}

.custom-model-selection__note {
    margin: 16px 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 16px;
    color: var(--color-muted);
}

.custom-model-selection__slider {
    position: relative;
    min-width: 0;
}

.custom-model-selection__content {
    min-width: 0;
}

.custom-model-selection .catalog-result-count {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.custom-models--pm .custom-model-selection .catalog-grid {
    display: flex;
    align-items: stretch;
    gap: 24px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 112px;
    margin: -4px -4px -112px;
    max-width: calc(100% + 8px);
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
}

.custom-models--pm .custom-model-selection .catalog-grid > .product-card {
    flex: 0 0 calc((100% - 72px) / 4);
    width: auto;
    min-width: 0;
    min-height: 523px;
    align-self: stretch;
    scroll-snap-align: start;
}

.custom-models--pm .custom-model-selection__slider { isolation: isolate; z-index: 2; }
.custom-models--pm .custom-model-selection .catalog-grid::-webkit-scrollbar { display: none; }

.custom-models--pm .custom-model-selection .product-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    display: block;
    inset: -1px -1px -103px;
    border: 1px solid #eff0f0;
    border-radius: 7px;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.custom-models--pm .custom-model-selection .product-card__actions {
    position: absolute;
    left: 15px;
    right: 15px;
    top: calc(100% + 39px);
    display: none;
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 8px;
    padding-bottom: 16px;
}
.custom-models--pm .custom-model-selection .product-card__size { flex-wrap: nowrap; }
.custom-models--pm .custom-model-selection .product-card__size-caption { white-space: nowrap; }
.custom-models--pm .custom-model-selection .product-card__material {
    position: absolute;
    left: 40px;
    right: 15px;
    bottom: 22px;
    display: none;
    margin: 0;
    color: #7b7b7b;
    font-size: 14px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
    .custom-models--pm .custom-model-selection .product-card:is(:hover, :focus-within) {
        z-index: 30;
        isolation: isolate;
        overflow: visible;
        border-color: transparent;
        background: transparent;
    }
    .custom-models--pm .custom-model-selection .product-card:is(:hover, :focus-within)::before {
        bottom: -103px;
        opacity: 1;
        visibility: visible;
        box-shadow: 0 3px 6.3px rgb(0 0 0 / 25%);
    }
    .custom-models--pm .custom-model-selection .product-card:is(:hover, :focus-within) .product-card__actions {
        display: grid;
    }
    .custom-models--pm .custom-model-selection .product-card:is(:hover, :focus-within) .product-card__material {
        display: block;
        margin: 0;
        color: #7b7b7b;
        font-size: 14px;
        line-height: 20px;
    }
    .custom-models--pm .custom-model-selection .product-card:is(:hover, :focus-within) .product-card__colors {
        margin-top: 8px;
        transform: translateY(24px);
    }
}
.custom-models--pm .custom-model-selection .product-card:focus-within::before { border-color: #242424; }

.custom-models--pm .custom-model-selection .product-card__body {
    padding: 7px 15px 16px;
}

.custom-models--pm .custom-model-selection .product-card__title {
    min-height: 48px;
    margin: 4px 0 8px;
    font-size: 18px;
    line-height: 24px;
}

.custom-model-selection .product-card__colors {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    min-height: 26px;
    margin-top: 8px;
    padding-block: 2px;
}

.custom-model-selection .product-card__color-samples {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.custom-model-selection .product-card__color {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
}

.custom-model-selection .product-card__color--base {
    width: 22px;
    height: 22px;
    padding: 1px;
    border: 1px solid #242424;
}

.custom-model-selection .product-card__color-dot {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--swatch, transparent);
    box-shadow: inset 0 0 0 1px rgb(36 36 36 / 10%);
}

.custom-model-selection .product-card__color-dot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-model-selection .product-card__color-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.custom-model-selection .product-card__more-colors {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding-block: 3px;
    color: #7b7b7b;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
    opacity: .8;
}

.custom-model-selection .product-card__more-colors img {
    display: block;
    flex: 0 0 auto;
}

.custom-model-selection .product-card__more-colors:hover {
    text-decoration: underline;
    opacity: 1;
}

.custom-model-selection .product-card__more-colors:focus-visible {
    outline: 2px solid #242424;
    outline-offset: 3px;
    opacity: 1;
}


.custom-model-selection__arrow {
    position: absolute;
    top: 176px;
    z-index: 6;
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.custom-model-selection__arrow--previous {
    left: -56px;
}

.custom-model-selection__arrow--next {
    right: -54px;
}

.custom-model-selection__arrow[hidden] {
    display: none;
}

.custom-model-selection__arrow:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
}

.custom-model-selection__catalog:focus-visible,
.custom-model-selection .catalog-grid:focus-visible {
    outline: 2px solid #242424;
    outline-offset: 3px;
}

@media (max-width: 1390px) {
    .custom-model-selection__arrow--previous { left: 0; }
    .custom-model-selection__arrow--next { right: 0; }
}

@media (max-width: 1100px) {
    .custom-models--pm .custom-model-selection .catalog-grid > .product-card {
        flex-basis: calc((100% - 48px) / 3);
    }
}

@media (max-width: 760px) {
    .custom-model-selection__header { align-items: flex-start; gap: 16px; }
    .custom-model-selection__catalog { font-size: 14px; }
    .custom-models--pm .custom-model-selection .catalog-grid { gap: 16px; }
    .custom-models--pm .custom-model-selection .catalog-grid > .product-card {
        flex-basis: calc((100% - 16px) / 2);
        min-height: 0;
    }
    .custom-model-selection__arrow { top: 120px; }
}

@media (max-width: 520px) {
    .custom-model-selection__header { flex-direction: column; gap: 8px; }
    .custom-models--pm .custom-model-selection .catalog-grid > .product-card {
        flex-basis: 100%;
    }
    .custom-model-selection__arrow { top: 176px; }
}
