.middle_inner:has(.rs-brands-directory),
.middle_inner.rs-brands-wide-page {
    box-sizing: border-box;
    max-width: 1600px;
    padding-left: 32px;
    padding-right: 32px;
}

.rs-brands-directory {
    --rs-blue: #456f98;
    --rs-blue-dark: #315a7c;
    --rs-coral: #ff9a6c;
    --rs-border: #dce3e8;
    --rs-muted: #6d7984;
    color: #1d2730;
    padding-bottom: 48px;
}

.rs-brands-directory [hidden] {
    display: none !important;
}

.rs-brands-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 2px 0 22px;
}

.rs-brands-kicker {
    color: var(--rs-blue);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
}

.rs-brands-lead {
    max-width: 760px;
    margin: 7px 0 0;
    color: #52606b;
    font-size: 16px;
    line-height: 1.55;
}

.rs-brands-total {
    display: flex;
    align-items: baseline;
    gap: 7px;
    white-space: nowrap;
    color: var(--rs-muted);
    font-size: 14px;
}

.rs-brands-total strong {
    color: #1d2730;
    font-size: 28px;
    font-weight: 600;
}

.rs-brands-controls {
    position: relative;
    z-index: 20;
    box-sizing: border-box;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid var(--rs-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 8px 26px rgba(35, 52, 67, .08);
    backdrop-filter: blur(12px);
}

.rs-brands-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.rs-brands-search {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    border: 1px solid #cbd5dd;
    border-radius: 7px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.rs-brands-search:focus-within {
    border-color: var(--rs-blue);
    box-shadow: 0 0 0 3px rgba(69, 111, 152, .13);
}

.rs-brands-search-icon {
    flex: 0 0 auto;
    margin-left: 14px;
    color: #75828d;
}

.rs-brands-search input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 42px 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1d2730;
    font: inherit;
    font-size: 15px;
}

.rs-brands-search input::placeholder {
    color: #8a959e;
}

.rs-brands-search-clear {
    position: absolute;
    right: 6px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #687580;
    font-size: 25px;
    line-height: 1;
    place-items: center;
    cursor: pointer;
}

.rs-brands-segment {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    padding: 3px;
    border: 1px solid var(--rs-border);
    border-radius: 7px;
    background: #eef2f5;
}

.rs-brands-segment button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #52606b;
    font-size: 14px;
    cursor: pointer;
}

.rs-brands-segment button span {
    margin-left: 5px;
    color: #83909a;
    font-size: 12px;
}

.rs-brands-segment button.is-active {
    background: #fff;
    box-shadow: 0 2px 7px rgba(33, 51, 66, .12);
    color: var(--rs-blue-dark);
    font-weight: 600;
}

.rs-brands-filter-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-top: 15px;
}

.rs-brands-filter-row + .rs-brands-filter-row {
    padding-top: 13px;
    border-top: 1px solid #edf0f2;
}

.rs-brands-filter-label {
    padding-top: 8px;
    color: #6a7782;
    font-size: 13px;
    font-weight: 600;
}

.rs-brands-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.rs-brands-chip,
.rs-brands-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #d3dce3;
    border-radius: 6px;
    background: #fff;
    color: #46535e;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.rs-brands-chip img {
    width: 20px;
    height: 15px;
    margin-right: 6px;
    object-fit: cover;
}

.rs-brands-letter {
    min-width: 34px;
    padding: 0 8px;
    font-weight: 600;
}

.rs-brands-chip:hover,
.rs-brands-letter:hover {
    border-color: #94abc0;
    color: var(--rs-blue-dark);
}

.rs-brands-chip.is-active,
.rs-brands-letter.is-active {
    border-color: var(--rs-blue);
    background: var(--rs-blue);
    color: #fff;
}

.rs-brands-reset {
    margin-top: 14px;
    padding: 0;
    border: 0;
    border-bottom: 1px dashed currentColor;
    background: transparent;
    color: var(--rs-blue-dark);
    font-size: 13px;
    cursor: pointer;
}

.rs-brands-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rs-brand-card {
    min-width: 0;
}

.rs-brand-card-link {
    display: flex;
    overflow: hidden;
    min-height: 210px;
    height: 100%;
    flex-direction: column;
    border: 1px solid var(--rs-border);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.rs-brand-card-link:hover,
.rs-brand-card-link:focus-visible {
    border-color: #aebfcd;
    box-shadow: 0 10px 25px rgba(42, 62, 79, .11);
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
}

.rs-brand-card-logo {
    position: relative;
    display: grid;
    min-height: 140px;
    padding: 16px;
    border-bottom: 1px solid #edf0f2;
    background: #fff;
    place-items: center;
}

.rs-brand-card-logo img {
    display: block;
    width: 100%;
    height: 108px;
    object-fit: contain;
}

.rs-brand-card-badge {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    padding: 4px 7px;
    border-radius: 4px;
    background: var(--rs-coral);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.rs-brand-card-monogram {
    display: grid;
    width: 72px;
    height: 72px;
    border: 1px solid #d8e0e6;
    border-radius: 50%;
    background: #f2f5f7;
    color: var(--rs-blue);
    font-size: 28px;
    font-weight: 600;
    place-items: center;
}

.rs-brand-card-body {
    display: flex;
    min-height: 69px;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px 13px;
}

.rs-brand-card-name {
    overflow: hidden;
    color: #315f87;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rs-brand-card-country {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #687580;
    font-size: 13px;
}

.rs-brand-card-country img {
    width: 20px;
    height: 15px;
    flex: 0 0 auto;
    object-fit: cover;
}

.rs-brands-empty {
    padding: 56px 20px;
    border: 1px solid var(--rs-border);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.rs-brands-empty-title {
    margin-bottom: 14px;
    color: #26333d;
    font-size: 20px;
    font-weight: 600;
}

.rs-brands-empty button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    background: var(--rs-blue);
    color: #fff;
    cursor: pointer;
}

@media (max-width: 1399px) {
    .rs-brands-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1099px) {
    .rs-brands-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .rs-brands-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rs-brands-toolbar {
        grid-template-columns: 1fr;
    }

    .rs-brands-segment {
        width: 100%;
    }
}

@media (max-width: 639px) {
    .middle_inner:has(.rs-brands-directory),
    .middle_inner.rs-brands-wide-page {
        padding-left: 15px;
        padding-right: 15px;
    }

    .rs-brands-directory {
        padding-bottom: 32px;
    }

    .rs-brands-heading {
        align-items: flex-start;
        margin-bottom: 17px;
    }

    .rs-brands-kicker {
        font-size: 12px;
    }

    .rs-brands-lead {
        font-size: 14px;
    }

    .rs-brands-total {
        flex-direction: column;
        align-items: flex-end;
        gap: 0;
    }

    .rs-brands-total strong {
        font-size: 24px;
    }

    .rs-brands-controls {
        margin-right: -15px;
        margin-bottom: 16px;
        margin-left: -15px;
        padding: 15px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: 0 5px 18px rgba(35, 52, 67, .06);
    }

    .rs-brands-filter-row {
        display: block;
    }

    .rs-brands-filter-label {
        margin-bottom: 8px;
        padding-top: 0;
    }

    .rs-brands-scroll {
        overflow-x: auto;
        flex-wrap: nowrap;
        margin-right: -15px;
        margin-left: -15px;
        padding: 0 15px 5px;
        scrollbar-width: none;
    }

    .rs-brands-scroll::-webkit-scrollbar {
        display: none;
    }

    .rs-brands-chip,
    .rs-brands-letter {
        flex: 0 0 auto;
    }

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

    .rs-brand-card-link {
        min-height: 174px;
    }

    .rs-brand-card-logo {
        min-height: 108px;
        padding: 12px;
    }

    .rs-brand-card-logo img {
        height: 82px;
    }

    .rs-brand-card-badge {
        top: 7px;
        right: 7px;
        padding: 3px 5px;
        font-size: 9px;
    }

    .rs-brand-card-body {
        min-height: 66px;
        padding: 10px;
    }

    .rs-brand-card-name {
        font-size: 14px;
    }

    .rs-brand-card-country {
        font-size: 12px;
    }
}

@media (max-width: 369px) {
    .rs-brands-heading {
        display: block;
    }

    .rs-brands-total {
        flex-direction: row;
        align-items: baseline;
        justify-content: flex-start;
        gap: 7px;
        margin-top: 10px;
    }

    .rs-brands-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rs-brand-card-link,
    .rs-brands-search,
    .rs-brands-chip,
    .rs-brands-letter {
        transition: none;
    }
}
