.citystar-managed-homepage {
    display: flex;
    flex-direction: column;
}

.citystar-brand-carousel {
    position: relative;
}

.citystar-brand-carousel__viewport {
    overflow: hidden;
    padding: 4px 2px 18px;
    scroll-behavior: smooth;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
}

.citystar-brand-carousel__track {
    display: flex;
    gap: 18px;
    width: max-content;
}

.citystar-brand-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 20px;
    box-shadow: 0 8px 22px rgba(18, 32, 64, .06);
    box-sizing: border-box;
    color: #122040;
    display: flex;
    flex: 0 0 180px;
    flex-direction: column;
    height: 180px;
    justify-content: center;
    padding: 18px;
    text-align: center;
    text-decoration: none;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.citystar-brand-card:hover,
.citystar-brand-card:focus {
    border-color: #d71920;
    box-shadow: 0 12px 28px rgba(18, 32, 64, .12);
    color: #122040;
    text-decoration: none;
    transform: translateY(-3px);
}

.citystar-brand-card__logo {
    align-items: center;
    display: flex;
    height: 100px;
    justify-content: center;
    width: 100%;
}

.citystar-brand-card__logo img {
    display: block;
    max-height: 88px;
    max-width: 100%;
    object-fit: contain;
}

.citystar-brand-card__name {
    display: block;
    font-size: 15px;
    line-height: 1.25;
    margin-top: 12px;
}

.citystar-brand-carousel__arrow {
    align-items: center;
    background: #fff;
    border: 1px solid #d6d9df;
    border-radius: 50%;
    box-shadow: 0 8px 22px rgba(18, 32, 64, .12);
    color: #122040;
    cursor: pointer;
    display: flex;
    height: 44px;
    justify-content: center;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    z-index: 4;
}

.citystar-brand-carousel__arrow::before {
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    box-sizing: border-box;
    content: "";
    display: block;
    height: 9px;
    width: 9px;
}

.citystar-brand-carousel__arrow:hover,
.citystar-brand-carousel__arrow:focus {
    background: #d71920;
    border-color: #d71920;
    color: #fff;
}

.citystar-brand-carousel__arrow:disabled {
    cursor: default;
    opacity: .3;
}

.citystar-brand-carousel__arrow--prev {
    left: -18px;
}

.citystar-brand-carousel__arrow--prev::before {
    transform: rotate(45deg);
}

.citystar-brand-carousel__arrow--next {
    right: -18px;
}

.citystar-brand-carousel__arrow--next::before {
    transform: rotate(225deg);
}

/* Brand landing page */
.citystar-brand-page {
    padding: 20px 0 60px;
}

.citystar-brand-page__hero {
    align-items: center;
    background: #f7f8fa;
    border-radius: 26px;
    display: flex;
    gap: 30px;
    margin-bottom: 36px;
    padding: 34px;
}

.citystar-brand-page__logo {
    align-items: center;
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 20px;
    display: flex;
    flex: 0 0 220px;
    height: 150px;
    justify-content: center;
    padding: 18px;
}

.citystar-brand-page__logo img {
    display: block;
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
}

.citystar-brand-page__content {
    flex: 1 1 auto;
    min-width: 0;
}

.citystar-brand-page__content h1 {
    color: #122040;
    font-size: 38px;
    margin: 0 0 12px;
}

.citystar-brand-page__description {
    color: #5f6675;
    font-size: 15px;
    line-height: 1.65;
    max-width: 760px;
}

.citystar-brand-page__products-title {
    color: #122040;
    font-size: 28px;
    margin: 0 0 24px;
}

.citystar-brand-product-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.citystar-brand-product {
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 18px;
    box-sizing: border-box;
    overflow: hidden;
    padding: 16px;
}

.citystar-brand-product__image {
    display: block;
    margin-bottom: 14px;
}

.citystar-brand-product__image img {
    display: block;
    height: 220px;
    object-fit: contain;
    width: 100%;
}

.citystar-brand-product__name {
    color: #122040;
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 42px;
    text-decoration: none;
}

.citystar-brand-product__price {
    margin-top: 12px;
}

.citystar-brand-product__action {
    margin-top: 16px;
}

.citystar-brand-product__action .action.primary {
    box-sizing: border-box;
    text-align: center;
    width: 100%;
}

.citystar-brand-page__empty {
    background: #f7f8fa;
    border-radius: 16px;
    color: #5f6675;
    padding: 26px;
    text-align: center;
}

.citystar-brand-page__pager {
    margin-top: 30px;
}

@media only screen and (max-width: 1100px) {
    .citystar-brand-card {
        flex-basis: 165px;
        height: 165px;
    }

    .citystar-brand-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 767px) {
    .citystar-brand-carousel__viewport {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .citystar-brand-carousel__viewport::-webkit-scrollbar {
        display: none;
    }

    .citystar-brand-carousel__track {
        gap: 14px;
    }

    .citystar-brand-card {
        border-radius: 16px;
        flex-basis: 145px;
        height: 150px;
        padding: 14px;
    }

    .citystar-brand-card__logo {
        height: 82px;
    }

    .citystar-brand-card__logo img {
        max-height: 72px;
    }

    .citystar-brand-carousel__arrow {
        display: none;
    }

    .citystar-brand-page__hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px;
    }

    .citystar-brand-page__logo {
        box-sizing: border-box;
        flex-basis: auto;
        height: 130px;
        width: 100%;
    }

    .citystar-brand-page__content h1 {
        font-size: 30px;
    }

    .citystar-brand-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .citystar-brand-product__image img {
        height: 160px;
    }
}

/* Compact Brand landing page */
.citystar-brand-page {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 1240px;
    padding: 28px 24px 60px;
}

.citystar-brand-page__hero {
    align-items: center;
    background: #f7f8fa;
    border: 1px solid #e7e9ee;
    border-radius: 24px;
    box-sizing: border-box;
    display: flex;
    gap: 30px;
    margin: 0 0 34px;
    padding: 28px 32px;
}

.citystar-brand-page__logo {
    align-items: center;
    background: #fff;
    border: 1px solid #e1e4ea;
    border-radius: 18px;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 190px;
    height: 130px;
    justify-content: center;
    padding: 20px;
}

.citystar-brand-page__logo img {
    display: block;
    max-height: 92px;
    max-width: 100%;
    object-fit: contain;
}

.citystar-brand-page__content h1 {
    color: #122040;
    font-size: 38px;
    font-weight: 600;
    line-height: 1.15;
    margin: 4px 0 10px;
}

.citystar-brand-page__eyebrow {
    color: #d71920;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin: 0;
    text-transform: uppercase;
}

.citystar-brand-page__description {
    color: #626979;
    font-size: 15px;
    line-height: 1.65;
    margin-top: 12px;
    max-width: 720px;
}

.citystar-brand-page__heading {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.citystar-brand-page__products-title {
    color: #122040;
    font-size: 30px;
    margin: 5px 0 0;
}

.citystar-brand-page__product-count {
    color: #707786;
    font-size: 13px;
    white-space: nowrap;
}

.citystar-brand-page__empty {
    align-items: center;
    background: #f7f8fa;
    border: 1px dashed #d4d8e1;
    border-radius: 20px;
    box-sizing: border-box;
    color: #626979;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 230px;
    padding: 34px 24px;
    text-align: center;
}

.citystar-brand-page__empty-icon {
    align-items: center;
    background: #fff;
    border: 1px solid #e1e4ea;
    border-radius: 50%;
    color: #d71920;
    display: flex;
    font-size: 25px;
    height: 54px;
    justify-content: center;
    margin-bottom: 15px;
    width: 54px;
}

.citystar-brand-page__empty h2 {
    color: #122040;
    font-size: 24px;
    margin: 0 0 8px;
}

.citystar-brand-page__empty p {
    line-height: 1.55;
    margin: 0 0 20px;
    max-width: 520px;
}

.citystar-brand-page__empty .action.primary {
    min-width: 170px;
    text-align: center;
}

@media only screen and (max-width: 767px) {
    .citystar-brand-page {
        padding: 20px 16px 45px;
    }

    .citystar-brand-page__hero {
        align-items: stretch;
        flex-direction: column;
        gap: 20px;
        padding: 22px;
    }

    .citystar-brand-page__logo {
        flex-basis: auto;
        height: 120px;
        width: 100%;
    }

    .citystar-brand-page__content {
        text-align: center;
    }

    .citystar-brand-page__content h1 {
        font-size: 30px;
    }

    .citystar-brand-page__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .citystar-brand-page__products-title {
        font-size: 25px;
    }

    .citystar-brand-page__empty {
        min-height: 210px;
    }
}

/* All Brands directory */
.citystar-brands-index {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 1240px;
    padding: 40px 24px 70px;
}

.citystar-brands-index__header {
    margin: 0 auto 40px;
    max-width: 720px;
    text-align: center;
}

.citystar-brands-index__header h1 {
    color: #122040;
    font-size: 40px;
    line-height: 1.2;
    margin: 0 0 12px;
}

.citystar-brands-index__header p {
    color: #626979;
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
}

.citystar-brands-grid {
    display: grid;
    gap: 22px;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
}

.citystar-brand-directory-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 20px;
    box-shadow: 0 8px 22px rgba(18, 32, 64, .06);
    box-sizing: border-box;
    color: #122040;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 210px;
    padding: 22px;
    text-align: center;
    text-decoration: none;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.citystar-brand-directory-card:hover,
.citystar-brand-directory-card:focus {
    border-color: #d71920;
    box-shadow: 0 14px 30px rgba(18, 32, 64, .12);
    color: #122040;
    text-decoration: none;
    transform: translateY(-4px);
}

.citystar-brand-directory-card__logo {
    align-items: center;
    display: flex;
    height: 125px;
    justify-content: center;
    width: 100%;
}

.citystar-brand-directory-card__logo img {
    display: block;
    max-height: 110px;
    max-width: 100%;
    object-fit: contain;
}

.citystar-brand-directory-card__name {
    display: block;
    font-size: 16px;
    line-height: 1.3;
    margin-top: 15px;
}

/* Centered individual Brand page */
.citystar-brand-page__hero {
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.citystar-brand-page__logo {
    flex: 0 0 auto;
    height: 165px;
    margin: 0 auto;
    width: 270px;
}

.citystar-brand-page__logo img {
    max-height: 130px;
}

.citystar-brand-page__content {
    align-items: center;
    display: flex;
    flex-direction: column;
    max-width: 780px;
    text-align: center;
}

.citystar-brand-page__content h1 {
    order: 1;
    margin: 8px 0 10px;
}

.citystar-brand-page__content
.citystar-brand-page__eyebrow {
    order: 2;
    margin: 2px 0 0;
}

.citystar-brand-page__content
.citystar-brand-page__description {
    margin-left: auto;
    margin-right: auto;
    order: 3;
    text-align: center;
}

@media only screen and (max-width: 1100px) {
    .citystar-brands-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 767px) {
    .citystar-brands-index {
        padding: 28px 16px 50px;
    }

    .citystar-brands-index__header {
        margin-bottom: 28px;
    }

    .citystar-brands-index__header h1 {
        font-size: 31px;
    }

    .citystar-brands-grid {
        gap: 14px;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .citystar-brand-directory-card {
        min-height: 170px;
        padding: 15px;
    }

    .citystar-brand-directory-card__logo {
        height: 95px;
    }

    .citystar-brand-directory-card__logo img {
        max-height: 85px;
    }

    .citystar-brand-page__logo {
        height: 140px;
        width: 100%;
    }
}

/* Homepage Brand heading and Show All link */
.citystar-brand-heading-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.citystar-brand-heading-row h2 {
    margin: 0;
}

.citystar-brand-show-all {
    color: #d71920;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.citystar-brand-show-all:hover,
.citystar-brand-show-all:focus {
    color: #122040;
    text-decoration: underline;
}
