.embroidery-page .emb-catalog,
.embroidery-page .emb-catalog * {
    box-sizing: border-box;
}

.embroidery-page .emb-catalog {
    margin-top: 60px;
    padding: 70px 0 60px;
    color: #49389a;
    background-color: #ecfaff;
    font-family: Roboto, Arial, sans-serif;
}

.embroidery-page .emb-catalog__inner {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.embroidery-page .emb-catalog__heading {
    display: grid;
    grid-template-columns: 400px 1.5px 312px;
    align-items: center;
    column-gap: 24px;
    min-height: 80px;
    margin-bottom: 32px;
}

.embroidery-page .emb-catalog__heading h2 {
    margin: 0;
    color: #49389a;
    font-size: 39px;
    font-weight: 300;
    line-height: 40px;
}

.embroidery-page .emb-catalog__heading p {
    margin: 0;
    color: #49389a;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.embroidery-page .emb-catalog__divider {
    position: relative;
    display: block;
    width: 1.5px;
    height: 80px;
}

.embroidery-page .emb-catalog__divider img {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: 80px;
    height: 1.5px;
    max-width: none;
    transform: translate(-50%, -50%) rotate(90deg);
}

.embroidery-page .emb-catalog__stage {
    position: relative;
}

.embroidery-page .emb-catalog__track {
    display: flex;
    gap: 16px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.embroidery-page .emb-catalog__track::-webkit-scrollbar {
    display: none;
}

.embroidery-page .emb-catalog__track:focus-visible {
    outline: 3px solid #ff6b1a;
    outline-offset: 3px;
}

.embroidery-page .emb-catalog__card {
    position: relative;
    display: block;
    flex: 0 0 calc((100% - 80px) / 6);
    height: 240px;
    overflow: hidden;
    border: 1px solid #c9c9df;
    border-radius: 4px;
    background: linear-gradient(140deg, #c9d3d9, #eef3f5);
    color: #49389a;
    text-decoration: none;
    scroll-snap-align: start;
}

.embroidery-page .emb-catalog__card:hover,
.embroidery-page .emb-catalog__card:focus-visible {
    border-color: #49389a;
}

.embroidery-page .emb-catalog__photo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.embroidery-page .emb-catalog__footer {
    position: absolute;
    right: -1px;
    bottom: -1px;
    left: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 68px;
    padding: 24px 8px 8px 12px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .9) 55%);
}

.embroidery-page .emb-catalog__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: #49389a;
    font-size: 16px;
    font-weight: 700;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.embroidery-page .emb-catalog__card--extra .emb-catalog__name {
    font-size: 14px;
    line-height: 16px;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.embroidery-page .emb-catalog__action {
    display: flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 4px 4px rgba(0, 0, 0, .05);
}

.embroidery-page .emb-catalog__action img {
    display: block;
    width: 14px;
    height: 14px;
}

.embroidery-page .emb-catalog__controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.embroidery-page .emb-catalog__nav {
    position: absolute;
    top: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 4px;
    border: 0;
    border-radius: 50%;
    background: #49389a;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color .2s ease;
}

.embroidery-page .emb-catalog__nav:hover {
    background: #352277;
}

.embroidery-page .emb-catalog__nav:focus-visible {
    outline: 3px solid #ff6b1a;
    outline-offset: 3px;
}

.embroidery-page .emb-catalog__nav img {
    display: block;
    width: 40px;
    height: 40px;
}

.embroidery-page .emb-catalog__nav--prev { left: 12px; }
.embroidery-page .emb-catalog__nav--next { right: 12px; }

@media (max-width: 1199px) and (min-width: 769px) {
    .embroidery-page .emb-catalog__heading {
        grid-template-columns: minmax(270px, 400px) 1.5px minmax(220px, 312px);
    }
    .embroidery-page .emb-catalog__heading h2 { font-size: 34px; }
    .embroidery-page .emb-catalog__card { flex-basis: calc((100% - 48px) / 4); }
}

@media (max-width: 768px) {
    .embroidery-page .emb-catalog {
        margin-top: 40px;
        padding: 59px 0 49px;
    }
    .embroidery-page .emb-catalog__inner { width: calc(100% - 30px); }
    .embroidery-page .emb-catalog__heading {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        min-height: 0;
        margin-bottom: 20px;
    }
    .embroidery-page .emb-catalog__heading h2 {
        font-size: 28px;
        line-height: 32px;
    }
    .embroidery-page .emb-catalog__divider {
        width: 158px;
        height: 1px;
        background: rgba(73, 56, 154, .3);
    }
    .embroidery-page .emb-catalog__divider img { display: none; }
    .embroidery-page .emb-catalog__track {
        gap: 12px;
        height: 420px;
    }
    .embroidery-page .emb-catalog__page {
        display: grid;
        flex: 0 0 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, 204px);
        gap: 12px;
        scroll-snap-align: start;
    }
    .embroidery-page .emb-catalog__card {
        flex: 0 0 calc((100% - 12px) / 2);
        width: 100%;
        height: 204px;
    }
    .embroidery-page .emb-catalog__footer {
        min-height: 64px;
        gap: 4px;
        padding-left: 10px;
    }
    .embroidery-page .emb-catalog__action {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }
    .embroidery-page .emb-catalog__controls {
        position: static;
        display: flex;
        justify-content: flex-end;
        gap: 12px;
        margin-top: 16px;
    }
    .embroidery-page .emb-catalog__nav {
        position: static;
    }
}
