.shop-home-categories {
    --home-section-accent: #96273d;
    --home-section-line: #eee5e8;
    --home-section-text: #29252a;
    --home-section-bkg: #fff4f6;
    padding-top: 18px;
    color: var(--home-section-text);
}

.shop-home-category {
    margin: 0 0 24px;
    border: 1px solid var(--home-section-line);
    border-radius: 12px;
    background: #fff;
}

.shop-home-category__bar {
    display: grid;
    grid-template-columns: 199px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 63px;
    border-bottom: 1px solid var(--home-section-line);
}

.shop-home-category__bar > h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 28px;
    margin: 0;
    padding: 0 12px 0 18px;
    border-right: 1px solid var(--home-section-line);
    color: var(--home-section-accent);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.25;
}

.shop-home-category__bar > h2 .shop-header__icon {
    width: 23px;
    height: 23px;
}

.shop-home-category__tabs {
    display: flex;
    align-self: end;
    gap: 3px;
    padding: 0 0 0 21px;
}

.shop-home-category__tabs > button {
    position: relative;
    min-width: 92px;
    min-height: 48px;
    margin: 0;
    padding: 9px 13px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: #615860;
    font: inherit;
    font-size: 15px;
    text-transform: none;
    cursor: pointer;
}

.shop-home-category__tabs > button[aria-selected="true"] {
    border-bottom-color: var(--home-section-accent);
    background: var(--home-section-bkg);
    color: var(--home-section-accent);
}

.shop-home-category__tabs > button:hover {
    color: var(--home-section-accent);
}

.shop-home-category__bar > .shop-home-category__all {
    margin: 0 22px 0 14px;
    padding: 9px 0;
    color: var(--home-section-accent);
    font-size: 15px;
    white-space: nowrap;
}

.shop-home-category__all:hover {
    text-decoration: underline;
}

.shop-home-category :is(a, button, [role="tabpanel"]):focus-visible {
    outline: 2px solid var(--home-section-accent);
    outline-offset: 2px;
}

.shop-home-category__body {
    display: grid;
    grid-template-columns: 199px minmax(0, 1fr);
    align-items: stretch;
}

.shop-home-category__body--wide {
    grid-template-columns: minmax(0, 1fr);
}

.shop-home-category__sidebar {
    box-sizing: border-box;
    min-width: 0;
    padding: 12px 9px;
    border-right: 1px solid var(--home-section-line);
}

.shop-home-category__sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-home-category__sidebar a {
    display: block;
    padding: 7px 9px;
    border-radius: 5px;
    color: var(--home-section-text);
    font-size: 14px;
    line-height: 1.4;
}

.shop-home-category__sidebar a:hover {
    background: var(--home-section-bkg);
    color: var(--home-section-accent);
}

.shop-home-category__content {
    min-width: 0;
    padding: 16px 19px 18px 21px;
}

.shop-home-category__panel[hidden] {
    display: none;
}

#main_content .shop-home-category .shop-home-category__products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: auto;
    margin: 0;
}

#main_content .shop-home-category .shop-home-category__products::before,
#main_content .shop-home-category .shop-home-category__products::after {
    display: none;
}

#main_content .shop-home-category .shop-home-category__products > .block-sp {
    box-sizing: border-box;
    float: none;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
}

#main_content .shop-home-category .shop-home-category__products > .block-sp > .item-sp {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--home-section-line);
    border-radius: 10px;
    background: #fff;
}

#main_content .shop-home-category .shop-card-image {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 100%;
    height: 160px;
    margin: 0;
    padding: 8px 0;
    overflow: hidden;
}

#main_content .shop-home-category .shop-card-image > a {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

#main_content .shop-home-category .shop-card-image img {
    display: block;
    width: 100%;
    height: 142px;
    object-fit: contain;
}

.shop-home-category .shop-card-image .shop-card-discount {
    top: 10px;
    right: 10px;
    border-radius: 6px;
    background: #f6e3e8;
    color: var(--home-section-accent);
    font-weight: 400;
}

#main_content .shop-home-category .item-sp .nd-sp {
    box-sizing: border-box;
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 8px 12px 12px;
}

#main_content .shop-home-category .ten-sp {
    min-height: 43px;
    margin: 0 0 12px;
    padding: 0;
    text-align: left;
}

#main_content .shop-home-category .ten-sp a {
    color: var(--home-section-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

#main_content .shop-home-category .ten-sp a:hover {
    color: var(--home-section-accent);
}

#main_content .shop-home-category .shop-card-prices {
    min-height: 50px;
    padding: 0;
}

.shop-home-category .shop-card-prices__amounts {
    display: grid;
    align-content: center;
    gap: 2px;
}

.shop-home-category .shop-card-price {
    color: var(--home-section-accent);
}

.shop-home-category .shop-card-cart {
    justify-self: end;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 9px;
}

.shop-home-category__panel .mypaging:empty {
    display: none;
}

.shop-home-category__empty {
    margin: 8px 0;
    color: #615860;
}

@media (max-width: 1050px) {
    #main_content .shop-home-category .shop-home-category__products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .shop-home-category__bar,
    .shop-home-category__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .shop-home-category__bar {
        grid-template-columns: minmax(0, 1fr) auto;
        align-content: center;
        gap: 6px;
        min-height: 0;
        padding: 12px 0 0;
    }

    .shop-home-category__bar > h2 {
        border: 0;
    }

    .shop-home-category__bar > .shop-home-category__all {
        grid-column: 2;
        grid-row: 1;
    }

    .shop-home-category__tabs {
        grid-column: 1 / -1;
        padding-left: 12px;
    }

    .shop-home-category__sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--home-section-line);
    }

    .shop-home-category__sidebar ul {
        display: flex;
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    #main_content .shop-home-category .shop-home-category__products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
