.page-home .catalog-categories.home-categories {
    margin-top: 0;
    margin-bottom: 24px;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.home-categories__title {
    margin: 0 0 24px;
    font-family: Gilroy, sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 26px;
    text-transform: none;
    letter-spacing: normal;
}

.home-categories__slider {
    overflow: hidden;
}

.home-categories__slider:not(.swiper-initialized) {
    overflow-x: auto;
}

.home-categories__slider:not(.swiper-initialized) .swiper-wrapper {
    gap: 48px;
}

.home-categories__slider .home-categories__card {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    width: 116px;
    height: auto;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}

.home-categories__card:hover,
.home-categories__card:focus,
.home-categories__card:active {
    color: inherit;
    text-decoration: none;
}

.home-categories__card:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.home-categories__image {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 116px;
    height: 116px;
    overflow: hidden;
    border-radius: 80px;
    background: #F7F8FA;
}

.home-categories__image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 97px;
    max-height: 97px;
    border-radius: 40px;
    object-fit: contain;
}

.home-categories__name {
    display: block;
    width: 100%;
    font-family: Gilroy, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    overflow-wrap: anywhere;
}

.home-categories--occasions .home-categories__image {
    width: 84px;
    height: 84px;
    border-radius: 20px;
}

.home-categories--occasions .home-categories__image img {
    width: 78px;
    height: 78px;
    max-width: 78px;
    max-height: 78px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .home-categories__title {
        margin-bottom: 16px;
        font-size: 18px;
        line-height: 24px;
    }

    .home-categories__slider .home-categories__card,
    .home-categories__image {
        width: 72px;
    }

    .home-categories__image {
        height: 72px;
    }

    .home-categories__image img {
        width: 60px;
        height: 60px;
        max-width: 60px;
        max-height: 60px;
    }

    .home-categories__name {
        font-size: 14px;
        line-height: 16px;
    }

    .home-categories--occasions .home-categories__card {
        width: 96px;
    }

    .home-categories--occasions .home-categories__image {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }

    .home-categories--occasions .home-categories__image img {
        width: 48px;
        height: 48px;
        max-width: 48px;
        max-height: 48px;
    }

    .home-categories__slider:not(.swiper-initialized) .swiper-wrapper {
        gap: 30px;
    }
}

.home-services {
    width: 100%;
    margin-bottom: 24px;
}

.home-services__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-services__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    min-width: 0;
    height: 120px;
    overflow: hidden;
    border-radius: 20px;
    background: #F7F8FA;
}

.home-services__name {
    min-width: 0;
    max-width: 150px;
    margin-left: 24px;
    font-family: Gilroy, sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 26px;
}

.home-services__image {
    display: block;
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .home-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .home-services__card {
        height: 60px;
        border-radius: 16px;
    }

    .home-services__name {
        margin-left: 14px;
        font-size: 14px;
        line-height: 16px;
    }

    .home-services__image {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
    }
}


.page-home .catalog-categories.home-categories:not(.home-categories--occasions) {
    margin-top: 20px;
}

.home-categories--occasions .home-categories__slider {
    overflow-x: auto;
}

.home-categories--occasions .home-categories__slider .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, 116px);
    grid-auto-flow: row;
    justify-content: start;
    gap: 24px 48px;
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .home-categories--occasions .home-categories__slider .swiper-wrapper {
        grid-template-columns: repeat(auto-fill, 96px);
        gap: 16px 30px;
    }
}

/* Shared spacing between home-page sections. */
.page-home {
    --home-section-gap: 64px;
}

.page-home .container :is(.catalog-categories.home-categories, .home-services, .popular-products, .gift-help-banner, .product-faq.product-about) {
    margin-top: 0;
    margin-bottom: var(--home-section-gap);
}

.page-home .container .catalog-categories.home-categories:not(.home-categories--occasions) {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .page-home {
        --home-section-gap: 32px;
    }
}

@media only screen and (max-width: 768px) {
    .page-home .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.home-services button.home-services__card { padding: 0; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.home-services button.home-services__card:focus-visible { outline: 2px solid #181B1E; outline-offset: 3px; }

@media (max-width: 1334px) {
    .home-services__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 581px) {
    .home-services__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
