/* ==========================================================
 * COMTRANS / Autofurnitura main header + mega menu
 * Isolated namespace: af-main-header*, af-main-nav*,
 * af-catalog-mega*, af-brands-menu*, af-mobile-*
 * Brandbook only:
 *   COMTRANS Blue #14326e
 *   Graphite      #262523
 *   White         #fefefe
 *   Light Gray    #909091
 *   Light Blue    #96afd7
 *   Blue          #47639a
 *   Gray          #515151
 * ========================================================== */

.af-main-header,
.af-main-header * {
    box-sizing: border-box;
}

.af-main-header {
    --af-blue: #14326e;
    --af-graphite: #262523;
    --af-white: #fefefe;
    --af-light-gray: #909091;
    --af-light-blue: #96afd7;
    --af-mid-blue: #47639a;
    --af-gray: #515151;

    position: sticky;
    top: 58px;
    z-index: 1090;
    width: 100%;
    background: var(--af-white);
    border-bottom: 1px solid rgba(144, 144, 145, .18);
    box-shadow: 0 8px 24px rgba(38, 37, 35, .04);
    font-family: 'Montserrat', Arial, sans-serif;
    color: var(--af-graphite);
}

.af-main-header a,
.af-main-header button,
.af-main-header input {
    font: inherit;
}

.af-main-header a {
    text-decoration: none;
}

.af-main-header__bar {
    position: relative;
    width: 100%;
    max-width: 1920px;
    min-height: 82px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.af-main-header__logo {
    flex: 0 0 auto;
    width: clamp(178px, 14vw, 235px);
    display: inline-flex;
    align-items: center;
}

.af-main-header__logo img {
    display: block;
    width: 100% !important;
    height: auto;
    object-fit: contain;
}

.af-main-nav {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: clamp(6px, .7vw, 16px);
    align-self: stretch;
}

.af-main-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 82px;
    padding: 0 clamp(5px, .45vw, 10px);
    border: 0;
    background: transparent;
    color: var(--af-graphite);
    font-size: clamp(11px, .72vw, 14px);
    font-weight: 650;
    line-height: 1.15;
    white-space: nowrap;
    cursor: pointer;
    transition: color .18s ease;
}

.af-main-nav__link:hover,
.af-main-nav__link:focus,
.af-main-nav__link.is-active,
.af-main-nav__dropdown.is-open > .af-main-nav__link {
    color: var(--af-blue);
    text-decoration: none;
    outline: none;
}

.af-main-nav__link::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
    transition: background .18s ease;
}

.af-main-nav__link.is-active::after,
.af-main-nav__dropdown.is-open > .af-main-nav__link::after,
.af-main-nav__dropdown:hover > .af-main-nav__link::after {
    background: var(--af-blue);
}

.af-main-nav__link--dropdown i {
    font-size: 9px;
    transition: transform .18s ease;
}

.af-main-nav__dropdown.is-open > .af-main-nav__link--dropdown i,
.af-main-nav__dropdown:hover > .af-main-nav__link--dropdown i {
    transform: rotate(180deg);
}

.af-main-nav__link--button {
    appearance: none;
}

.af-main-nav__link--sale {
    color: var(--af-mid-blue);
}

.af-main-nav__link--sale:hover,
.af-main-nav__link--sale:focus,
.af-main-nav__link--sale.is-active {
    color: var(--af-blue);
}

.af-main-nav__dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
}

.af-main-nav__panel {
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    z-index: 50;
    display: none;
    background: var(--af-white);
    border: 1px solid rgba(144, 144, 145, .20);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 20px 50px rgba(38, 37, 35, .14);
}

.af-main-nav__dropdown:hover > .af-main-nav__panel,
.af-main-nav__dropdown:focus-within > .af-main-nav__panel,
.af-main-nav__dropdown.is-open > .af-main-nav__panel {
    display: block;
}

.af-main-nav__panel--catalog {
    left: 50%;
    width: min(1560px, calc(100vw - 28px));
    transform: translateX(-42%);
    padding: 18px;
}

.af-main-nav__panel--brands {
    width: min(1260px, calc(100vw - 48px));
    transform: translateX(-52%);
    padding: 24px;
}

.af-main-nav__panel--simple {
    min-width: 260px;
    transform: translateX(-50%);
    padding: 12px;
}

/* Desktop catalog mega menu */
.af-catalog-mega {
    position: relative;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 28px;
    min-height: 520px;
}

.af-catalog-mega__regular {
    min-width: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-right: 14px;
    border-right: 1px solid rgba(144, 144, 145, .18);
}

.af-catalog-mega__section-title {
    margin: 0 0 16px;
    color: var(--af-blue);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.2;
    text-transform: uppercase;
}

.af-catalog-mega__regular-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding-right: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 99, 154, .48) transparent;
}

.af-catalog-mega__regular-scroll::-webkit-scrollbar {
    width: 5px;
}

.af-catalog-mega__regular-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.af-catalog-mega__regular-scroll::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(71, 99, 154, .45);
}

.af-catalog-mega__regular-row {
    min-height: 42px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(144, 144, 145, .14);
    transition: background .16s ease, color .16s ease;
}

.af-catalog-mega__regular-row:hover,
.af-catalog-mega__regular-row.is-active {
    background: rgba(150, 175, 215, .16);
}

.af-catalog-mega__regular-link {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 8px;
    color: var(--af-graphite);
    font-size: 13px;
    font-weight: 560;
    line-height: 1.28;
}

.af-catalog-mega__regular-link:hover,
.af-catalog-mega__regular-link:focus {
    color: var(--af-blue);
    text-decoration: none;
    outline: none;
}

.af-catalog-mega__regular-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--af-blue);
}

.af-catalog-mega__regular-icon img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
}

.af-catalog-mega__regular-icon i {
    font-size: 15px;
}

.af-catalog-mega__regular-name {
    min-width: 0;
}

.af-catalog-mega__regular-chevron {
    flex: 0 0 28px;
    width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--af-blue);
    font-size: 10px;
}

.af-catalog-mega__content {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.af-catalog-mega__tiles {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.af-catalog-mega__tile {
    min-height: 154px;
    padding: 16px 10px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    border: 1px solid rgba(144, 144, 145, .22);
    border-radius: 8px;
    background: var(--af-white);
    color: var(--af-graphite);
    text-align: center;
    box-shadow: 0 3px 10px rgba(38, 37, 35, .02);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.af-catalog-mega__tile:hover,
.af-catalog-mega__tile:focus {
    color: var(--af-blue);
    border-color: rgba(20, 50, 110, .48);
    box-shadow: 0 10px 26px rgba(20, 50, 110, .10);
    transform: translateY(-2px);
    text-decoration: none;
    outline: none;
}

.af-catalog-mega__tile-icon {
   
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--af-blue);
}

.af-catalog-mega__tile-icon img {
    display: block;

    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.af-catalog-mega__tile-icon i {
    font-size: 42px;
}

.af-catalog-mega__tile-name {
    max-width: 150px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

/* Hover subcategory overlay: overlays right section, never shifts it. */
.af-catalog-mega__subpanels {
    pointer-events: none;
}

.af-catalog-mega__subpanel {
    position: absolute;
    top: 4px;
    left: 318px;
    z-index: 80;
    width: 360px;
    max-height: calc(100% - 8px);
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: auto;
    padding: 20px;
    border: 1px solid rgba(144, 144, 145, .20);
    border-radius: 10px;
    background: var(--af-white);
    box-shadow: 0 22px 52px rgba(38, 37, 35, .18);
}

.af-catalog-mega__subpanel[hidden] {
    display: none !important;
}

.af-catalog-mega__subpanel::before {
    content: '';
    position: absolute;
    left: -8px;
    top: var(--af-subpanel-arrow-top, 32px);
    width: 16px;
    height: 16px;
    background: var(--af-white);
    border-left: 1px solid rgba(144, 144, 145, .20);
    border-bottom: 1px solid rgba(144, 144, 145, .20);
    transform: rotate(45deg);
}

.af-catalog-mega__subpanel-title {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(144, 144, 145, .18);
    color: var(--af-blue);
    font-size: 15px;
    font-weight: 750;
    text-transform: uppercase;
}

.af-catalog-mega__subpanel-list {
    position: relative;
    z-index: 1;
}

.af-catalog-mega__subpanel-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 6px;
    border-bottom: 1px solid rgba(144, 144, 145, .14);
    color: var(--af-graphite);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.3;
}

.af-catalog-mega__subpanel-link:last-child {
    border-bottom: 0;
}

.af-catalog-mega__subpanel-link i {
    color: var(--af-blue);
    font-size: 9px;
}

.af-catalog-mega__subpanel-link:hover,
.af-catalog-mega__subpanel-link:focus {
    color: var(--af-blue);
    text-decoration: none;
    outline: none;
}

/* Brands desktop menu */
.af-brands-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.af-brands-menu__title {
    color: var(--af-blue);
    font-size: 17px;
    font-weight: 750;
    text-transform: uppercase;
}

.af-brands-menu__all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(150, 175, 215, .22);
    color: var(--af-blue);
    font-size: 13px;
    font-weight: 650;
}

.af-brands-menu__all:hover,
.af-brands-menu__all:focus {
    color: var(--af-blue);
    background: rgba(150, 175, 215, .34);
    text-decoration: none;
}

.af-brands-menu__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.af-brands-menu__card {
    min-height: 112px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(144, 144, 145, .22);
    border-radius: 9px;
    background: var(--af-white);
    box-shadow: 0 4px 14px rgba(38, 37, 35, .03);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.af-brands-menu__card:hover,
.af-brands-menu__card:focus {
    transform: translateY(-2px);
    border-color: rgba(20, 50, 110, .42);
    box-shadow: 0 10px 24px rgba(20, 50, 110, .09);
    outline: none;
}

.af-brands-menu__card img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 68px !important;
    object-fit: contain;
}

.af-simple-menu {
    display: flex;
    flex-direction: column;
}

.af-simple-menu__link {
    padding: 11px 12px;
    border-radius: 6px;
    color: var(--af-graphite);
    font-size: 13px;
    font-weight: 550;
}

.af-simple-menu__link:hover,
.af-simple-menu__link:focus {
    color: var(--af-blue);
    background: rgba(150, 175, 215, .15);
    text-decoration: none;
    outline: none;
}

/* Desktop search */
.af-main-header__desktop-search {
    flex: 0 0 auto;
    width: clamp(250px, 22vw, 370px);
    display: flex;
    align-items: stretch;
}

.af-main-header__search-input {
    min-width: 0;
    flex: 1 1 auto;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(144, 144, 145, .45);
    border-right: 0;
    border-radius: 7px 0 0 7px;
    background: var(--af-white);
    color: var(--af-graphite);
    font-size: 12px;
    outline: none;
}

.af-main-header__search-input:focus {
    border-color: var(--af-blue);
    box-shadow: inset 0 0 0 1px var(--af-blue);
}

.af-main-header__search-button {
    height: 38px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--af-blue);
    border-radius: 0 7px 7px 0;
    background: var(--af-blue);
    color: var(--af-white);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}

.af-main-header__search-button:hover,
.af-main-header__search-button:focus {
    background: var(--af-mid-blue);
    border-color: var(--af-mid-blue);
    outline: none;
}

/* Mobile controls are hidden on desktop */
.af-main-header__mobile-actions,
.af-main-header__mobile-search,
.af-mobile-menu {
    display: none;
}

body.af-mobile-menu-lock {
    overflow: hidden;
}

@media (max-width: 1500px) {
    .af-main-header__bar {
        padding-left: 20px;
        padding-right: 20px;
        gap: 14px;
    }

    .af-main-header__logo {
        width: 180px;
    }

    .af-main-nav {
        gap: 3px;
    }

    .af-main-nav__link {
        font-size: 11px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .af-main-header__desktop-search {
        width: 285px;
    }
}

@media (max-width: 1199px) {
    .af-main-nav,
    .af-main-header__desktop-search {
        display: none;
    }

    .af-main-header__bar {
        justify-content: space-between;
        min-height: 72px;
    }

    .af-main-header__logo {
        width: 205px;
    }

    .af-main-header__mobile-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .af-main-header__mobile-toggle,
    .af-main-header__mobile-search-toggle {
        width: 44px;
        height: 44px;
        border: 1px solid rgba(144, 144, 145, .18);
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(150, 175, 215, .10);
        color: var(--af-blue);
        font-size: 18px;
        cursor: pointer;
        transition: background .18s ease, color .18s ease, border-color .18s ease;
    }

    .af-main-header__mobile-toggle.is-open {
        background: var(--af-blue);
        border-color: var(--af-blue);
        color: var(--af-white);
    }

    .af-main-header__mobile-toggle:hover,
    .af-main-header__mobile-search-toggle:hover,
    .af-main-header__mobile-toggle:focus,
    .af-main-header__mobile-search-toggle:focus {
        border-color: rgba(20, 50, 110, .38);
        outline: none;
    }

    .af-main-header__mobile-search {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 80;
        padding: 12px 18px;
        border-top: 1px solid rgba(144, 144, 145, .16);
        background: var(--af-white);
        box-shadow: 0 12px 28px rgba(38, 37, 35, .10);
    }

    .af-main-header__mobile-search:not([hidden]) {
        display: block;
    }

    .af-main-header__mobile-search-inner {
        display: flex;
        max-width: 760px;
        margin: 0 auto;
    }

    .af-main-header__mobile-search-input {
        flex: 1 1 auto;
        min-width: 0;
        height: 44px;
        padding: 0 14px;
        border: 1px solid rgba(144, 144, 145, .42);
        border-right: 0;
        border-radius: 8px 0 0 8px;
        color: var(--af-graphite);
        outline: none;
    }

    .af-main-header__mobile-search-input:focus {
        border-color: var(--af-blue);
    }

    .af-main-header__mobile-search-button {
        min-width: 112px;
        height: 44px;
        border: 1px solid var(--af-blue);
        border-radius: 0 8px 8px 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: var(--af-blue);
        color: var(--af-white);
        font-size: 12px;
        font-weight: 650;
    }

    .af-mobile-menu {
        position: fixed;
        top: 130px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1085;
        background: var(--af-white);
    }

    .af-mobile-menu:not([hidden]) {
        display: block;
    }

    .af-mobile-menu__scroll {
        width: min(100%, 760px);
        height: 100%;
        margin: 0 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--af-white);
        box-shadow: 0 12px 30px rgba(38, 37, 35, .06);
    }

    .af-mobile-menu__section,
    .af-mobile-menu__main-link {
        border-bottom: 1px solid rgba(144, 144, 145, .16);
    }

    .af-mobile-menu__section-toggle,
    .af-mobile-menu__main-link {
        width: 100%;
        min-height: 58px;
        padding: 0 20px;
        display: grid;
        grid-template-columns: 25px minmax(0, 1fr) 20px;
        align-items: center;
        gap: 12px;
        border: 0;
        background: var(--af-white);
        color: var(--af-graphite);
        font-size: 14px;
        font-weight: 600;
        text-align: left;
    }

    .af-mobile-menu__section-toggle {
        cursor: pointer;
    }

    .af-mobile-menu__main-link {
        grid-template-columns: 25px minmax(0, 1fr);
    }

    .af-mobile-menu__section-toggle:hover,
    .af-mobile-menu__section-toggle:focus,
    .af-mobile-menu__main-link:hover,
    .af-mobile-menu__main-link:focus,
    .af-mobile-menu__section.is-open > .af-mobile-menu__section-toggle {
        color: var(--af-blue);
        text-decoration: none;
        outline: none;
    }

    .af-mobile-menu__section-icon {
        width: 24px;
        color: var(--af-blue);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .af-mobile-menu__section-chevron {
        justify-self: end;
        color: var(--af-blue);
        font-size: 10px;
    }

    .af-mobile-menu__section-body {
        padding: 4px 20px 18px;
    }

    .af-mobile-menu__section-body[hidden] {
        display: none !important;
    }

    .af-mobile-catalog__group {
        border-bottom: 1px solid rgba(144, 144, 145, .16);
    }

    .af-mobile-catalog__group-toggle {
        width: 100%;
        min-height: 44px;
        padding: 12px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border: 0;
        background: transparent;
        color: var(--af-blue);
        font-size: 11px;
        font-weight: 750;
        line-height: 1.25;
        text-align: left;
        text-transform: uppercase;
        cursor: pointer;
    }

    .af-mobile-catalog__group-toggle i {
        flex: 0 0 auto;
        font-size: 10px;
        transition: transform .2s ease;
    }

    .af-mobile-catalog__group.is-open > .af-mobile-catalog__group-toggle i {
        transform: rotate(180deg);
    }

    .af-mobile-catalog__group-body {
        padding: 0 0 12px;
    }

    .af-mobile-catalog__group-body[hidden] {
        display: none !important;
    }

    .af-mobile-catalog__tiles {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .af-mobile-catalog__tile {
        min-height: 148px;
        padding: 12px 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border: 1px solid rgba(144, 144, 145, .20);
        border-radius: 7px;
        background: var(--af-white);
        color: var(--af-graphite);
        text-align: center;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.25;
    }

    .af-mobile-catalog__tile:hover,
    .af-mobile-catalog__tile:focus {
        color: var(--af-blue);
        border-color: rgba(20, 50, 110, .38);
        text-decoration: none;
        outline: none;
    }

    .af-mobile-catalog__tile-icon {

        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--af-blue);
    }

    .af-mobile-catalog__tile-icon img {
        width: auto !important;
        height: auto !important;

        object-fit: contain;
    }

    .af-mobile-catalog__tile-icon i {
        font-size: 36px;
    }

    .af-mobile-catalog__regular-list {
        margin-top: 14px;
        border-top: 1px solid rgba(144, 144, 145, .18);
    }

    .af-mobile-category {
        border-bottom: 1px solid rgba(144, 144, 145, .16);
    }

    .af-mobile-category__row {
        min-height: 56px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .af-mobile-category__link {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 56px;
        padding: 8px 0;
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--af-graphite);
        font-size: 12px;
        font-weight: 570;
        line-height: 1.25;
    }

    .af-mobile-category__link:hover,
    .af-mobile-category__link:focus {
        color: var(--af-blue);
        text-decoration: none;
        outline: none;
    }

    .af-mobile-category__icon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--af-blue);
    }

    .af-mobile-category__icon img {
        width: 22px !important;
        height: 22px !important;
        object-fit: contain;
    }

    .af-mobile-category__toggle {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        margin-left: auto;
        padding: 0;
        border: 1px solid rgba(20, 50, 110, .36);
        border-radius: 7px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--af-white);
        color: var(--af-blue);
        font-size: 25px;
        font-weight: 300;
        line-height: 1;
        cursor: pointer;
        transition: background .16s ease, color .16s ease, border-color .16s ease;
    }

    .af-mobile-category__toggle:hover,
    .af-mobile-category__toggle:focus,
    .af-mobile-category__toggle[aria-expanded="true"] {
        background: rgba(150, 175, 215, .18);
        border-color: var(--af-blue);
        outline: none;
    }

    .af-mobile-category__subcategories {
        padding: 0 0 8px 32px;
    }

    .af-mobile-category__subcategories[hidden] {
        display: none !important;
    }

    .af-mobile-category__subcategory-link {
        min-height: 44px;
        padding: 10px 8px;
        display: flex;
        align-items: center;
        gap: 10px;
        border-top: 1px solid rgba(144, 144, 145, .12);
        color: var(--af-gray);
        font-size: 12px;
        font-weight: 520;
        line-height: 1.3;
    }

    .af-mobile-category__subcategory-link::before {
        content: '';
        flex: 0 0 6px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(20, 50, 110, .72);
    }

    .af-mobile-category__subcategory-link:hover,
    .af-mobile-category__subcategory-link:focus {
        color: var(--af-blue);
        text-decoration: none;
        outline: none;
    }

    .af-mobile-brands {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .af-mobile-brands__item {
        min-height: 86px;
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(144, 144, 145, .18);
        border-radius: 7px;
    }

    .af-mobile-brands__item img {
        width: auto !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: 54px !important;
        object-fit: contain;
    }

    .af-mobile-menu__all-link {
        min-height: 48px;
        margin-top: 10px;
        padding: 0 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border: 1px solid rgba(20, 50, 110, .30);
        border-radius: 7px;
        color: var(--af-blue);
        font-size: 12px;
        font-weight: 650;
    }

    .af-mobile-menu__plain-links {
        display: flex;
        flex-direction: column;
    }

    .af-mobile-menu__plain-links a {
        min-height: 46px;
        padding: 10px 8px;
        display: flex;
        align-items: center;
        border-top: 1px solid rgba(144, 144, 145, .14);
        color: var(--af-graphite);
        font-size: 12px;
        font-weight: 530;
    }

    .af-mobile-menu__plain-links a:hover,
    .af-mobile-menu__plain-links a:focus {
        color: var(--af-blue);
        text-decoration: none;
    }

    .af-mobile-menu__main-link--sale {
        color: var(--af-mid-blue);
    }

    .af-mobile-menu__extra {
        padding: 18px 20px 22px;
    }

    .af-mobile-menu__info-list,
    .af-mobile-menu__utility-list {
        display: flex;
        flex-direction: column;
        background: var(--af-white);
    }

    .af-mobile-menu__utility-list {
        margin-top: 16px;
        padding-top: 8px;
    }

    .af-mobile-menu__info-item,
    .af-mobile-menu__utility-link {
        width: 100%;
        min-height: 54px;
        padding: 12px 0;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid rgba(144, 144, 145, .16);
        background: transparent;
        color: var(--af-graphite);
        text-align: left;
    }

    .af-mobile-menu__utility-link {
        align-items: center;
        border: 0;
        border-bottom: 1px solid rgba(144, 144, 145, .16);
        cursor: pointer;
    }

    .af-mobile-menu__info-item:hover,
    .af-mobile-menu__info-item:focus,
    .af-mobile-menu__utility-link:hover,
    .af-mobile-menu__utility-link:focus {
        color: var(--af-blue);
        text-decoration: none;
        outline: none;
    }

    .af-mobile-menu__info-item--phones {
        align-items: flex-start;
    }

    .af-mobile-menu__info-icon,
    .af-mobile-menu__utility-icon {
        flex: 0 0 24px;
        width: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--af-blue);
        font-size: 18px;
    }

    .af-mobile-menu__info-content {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        color: var(--af-graphite);
        font-size: 12px;
        font-weight: 570;
        line-height: 1.45;
    }

    .af-mobile-menu__info-content a {
        color: inherit;
    }

    .af-mobile-menu__utility-main {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }

    .af-mobile-menu__utility-text {
        color: var(--af-graphite);
        font-size: 13px;
        font-weight: 600;
        line-height: 1.3;
    }

    .af-mobile-menu__utility-link:hover .af-mobile-menu__utility-text,
    .af-mobile-menu__utility-link:focus .af-mobile-menu__utility-text {
        color: var(--af-blue);
    }

    .af-mobile-menu__utility-badge {
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--af-blue);
        color: var(--af-white);
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
    }

    .af-mobile-menu__utility-link--button {
        padding-left: 0;
        padding-right: 0;
    }

    .af-mobile-menu__section--language {
        position: relative;
        margin-top: 16px;
        overflow: visible;
    }

    .af-mobile-menu__section--language .af-mobile-menu__section-toggle {
        min-height: 56px;
        padding-left: 0;
        padding-right: 0;
        position: relative;
        z-index: 2;
    }

    .af-mobile-menu__section--language .af-mobile-menu__section-body {
        position: absolute;
        left: 0;
        right: 0;
        bottom: calc(100% + 6px);
        z-index: 40;
        padding: 6px 12px;
        border: 1px solid rgba(20, 50, 110, .16);
        border-radius: 10px;
        background: var(--af-white);
        box-shadow: 0 14px 34px rgba(38, 37, 35, .16);
    }

    .af-mobile-menu__section--language .af-mobile-menu__section-body[hidden] {
        display: none !important;
    }

    .af-mobile-menu__language-current {
        color: var(--af-gray);
        font-weight: 500;
        margin-left: 8px;
    }

    .af-mobile-menu__language-links {
        display: flex;
        flex-direction: column;
    }

    .af-mobile-menu__language-link {
        min-height: 46px;
        padding: 10px 0;
        display: flex;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid rgba(144, 144, 145, .14);
        color: var(--af-graphite);
    }

    .af-mobile-menu__language-link:hover,
    .af-mobile-menu__language-link:focus,
    .af-mobile-menu__language-link.is-active {
        color: var(--af-blue);
        text-decoration: none;
        outline: none;
    }

    .af-mobile-menu__language-code {
        min-width: 28px;
        color: var(--af-blue);
        font-size: 12px;
        font-weight: 700;
    }

}

@media (max-width: 767px) {
    .af-main-header {
        top: 50px;
    }

    .af-main-header__bar {
        min-height: 60px;
        padding: 0 16px;
    }

    .af-main-header__logo {
        width: 178px;
    }

    .af-main-header__mobile-toggle,
    .af-main-header__mobile-search-toggle {
        width: 42px;
        height: 42px;
    }

    .af-mobile-menu {
        top: 110px;
    }

    .af-mobile-menu__scroll {
        width: 100%;
    }

    .af-mobile-menu__section-toggle,
    .af-mobile-menu__main-link {
        padding-left: 18px;
        padding-right: 18px;
    }

    .af-mobile-menu__section-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .af-mobile-menu__extra {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 420px) {
    .af-main-header__bar {
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px;
    }

    .af-main-header__logo {
        width: 155px;
    }

    .af-main-header__mobile-actions {
        gap: 7px;
    }

    .af-main-header__mobile-toggle,
    .af-main-header__mobile-search-toggle {
        width: 40px;
        height: 40px;
    }

    .af-main-header__mobile-search {
        padding-left: 12px;
        padding-right: 12px;
    }

    .af-main-header__mobile-search-button {
        min-width: 52px;
        padding: 0 14px;
    }

    .af-main-header__mobile-search-button span {
        display: none;
    }

    .af-mobile-menu__section-toggle,
    .af-mobile-menu__main-link {
        padding-left: 14px;
        padding-right: 14px;
        font-size: 13px;
    }

    .af-mobile-menu__section-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .af-mobile-menu__extra {
        padding-left: 14px;
        padding-right: 14px;
    }

    .af-mobile-catalog__tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .af-mobile-catalog__tile {
        min-height: 138px;
        font-size: 10px;
    }

    .af-mobile-category__toggle {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }
}

/* Desktop catalog: align mega menu to the full content width of the main header */
@media (min-width: 1200px) {
    .af-main-nav__dropdown--catalog {
        position: static;
    }

    .af-main-nav__panel--catalog {
        left: 28px;
        right: 28px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 160px);
        overflow: hidden;
        overscroll-behavior: contain;
        box-sizing: border-box;
        transform: none;
    }

    .af-main-nav__panel--catalog .af-catalog-mega {
        position: relative;
        display: block;
        height: auto;
        min-height: 0;
        max-height: calc(100vh - 198px);
    }

    /* The right column defines the natural height of the mega menu.
       It scrolls only when its own content really exceeds the viewport. */
    .af-main-nav__panel--catalog .af-catalog-mega__content {
        margin-left: 358px;
        overflow-y: auto;
        max-height: calc(100vh - 198px);
    }

    /* The left category column must never increase the height of the menu.
       It occupies exactly the same visible height as the right column,
       while its category list gets its own independent scrollbar. */
    .af-main-nav__panel--catalog .af-catalog-mega__regular {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 330px;
        min-height: 0;
        max-height: 100%;
        overflow: hidden;
    }

    .af-main-nav__panel--catalog .af-catalog-mega__regular-scroll {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
    }

    .af-main-nav__dropdown--brands {
        position: static;
    }

    .af-main-nav__panel--brands {
        left: 28px;
        right: 28px;
        width: auto;
        max-width: none;
        transform: none;
    }
}

/* ==========================================================
 * Compact desktop catalog menu.
 * Used only when there are no public category_type = 1 items.
 * Kept fully isolated from the existing .af-catalog-mega layout.
 * ========================================================== */
.af-catalog-compact {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 198px);
    overflow: hidden;
}

.af-catalog-compact__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 18px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 99, 154, .48) transparent;
}

.af-catalog-compact__scroll::-webkit-scrollbar {
    width: 5px;
}

.af-catalog-compact__scroll::-webkit-scrollbar-track {
    background: transparent;
}

.af-catalog-compact__scroll::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: rgba(71, 99, 154, .45);
}

.af-catalog-compact__section + .af-catalog-compact__section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(144, 144, 145, .18);
}

.af-catalog-compact__section-title {
    margin: 0 0 14px;
    color: var(--af-blue);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.2;
    text-transform: uppercase;
}

.af-catalog-compact__row + .af-catalog-compact__row {
    margin-top: 10px;
}

.af-catalog-compact__grid,
.af-catalog-compact__task-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.af-catalog-compact__category {
    min-width: 0;
    min-height: 58px;
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(144, 144, 145, .20);
    border-radius: 8px;
    background: var(--af-white);
    box-shadow: 0 2px 8px rgba(38, 37, 35, .02);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.af-catalog-compact__category:hover,
.af-catalog-compact__category.is-active {
    border-color: rgba(20, 50, 110, .42);
    background: rgba(150, 175, 215, .10);
    box-shadow: 0 6px 18px rgba(20, 50, 110, .07);
}

.af-catalog-compact__category-link {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    color: var(--af-graphite);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.af-catalog-compact__category-link:hover,
.af-catalog-compact__category-link:focus {
    color: var(--af-blue);
    text-decoration: none;
    outline: none;
}

.af-catalog-compact__category-icon,
.af-catalog-compact__task-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--af-blue);
}

.af-catalog-compact__category-icon img,
.af-catalog-compact__task-icon img {
    display: block;
    max-width: 30px !important;
    max-height: 30px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.af-catalog-compact__category-icon i,
.af-catalog-compact__task-icon i {
    font-size: 18px;
}

.af-catalog-compact__category-name,
.af-catalog-compact__task-name {
    min-width: 0;
}

.af-catalog-compact__category-toggle {
    flex: 0 0 42px;
    width: 42px;
    border: 0;
    border-left: 1px solid rgba(144, 144, 145, .16);
    border-radius: 0 8px 8px 0;
    background: transparent;
    color: var(--af-blue);
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.af-catalog-compact__category-toggle:hover,
.af-catalog-compact__category-toggle:focus {
    background: rgba(150, 175, 215, .16);
    outline: none;
}

.af-catalog-compact__category-toggle i {
    font-size: 11px;
    transition: transform .18s ease;
}

.af-catalog-compact__category-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.af-catalog-compact__row-subpanels {
    margin-top: 0;
}

.af-catalog-compact__subpanel {
    margin-top: 10px;
    padding: 16px 18px;
    border: 1px solid rgba(20, 50, 110, .18);
    border-radius: 8px;
    background: rgba(241, 242, 244, .58);
}

.af-catalog-compact__subpanel[hidden] {
    display: none !important;
}

.af-catalog-compact__subpanel-title {
    margin-bottom: 12px;
    color: var(--af-blue);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.25;
}

.af-catalog-compact__subgrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 16px;
}

.af-catalog-compact__sub-link {
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--af-graphite);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.3;
    transition: background .16s ease, color .16s ease;
}

.af-catalog-compact__sub-link:hover,
.af-catalog-compact__sub-link:focus {
    background: var(--af-white);
    color: var(--af-blue);
    text-decoration: none;
    outline: none;
}

.af-catalog-compact__sub-link i {
    flex: 0 0 auto;
    color: var(--af-blue);
    font-size: 9px;
}

.af-catalog-compact__task-card {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(144, 144, 145, .20);
    border-radius: 8px;
    background: var(--af-white);
    color: var(--af-graphite);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    transition: border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.af-catalog-compact__task-card:hover,
.af-catalog-compact__task-card:focus {
    border-color: rgba(20, 50, 110, .42);
    box-shadow: 0 6px 18px rgba(20, 50, 110, .07);
    color: var(--af-blue);
    text-decoration: none;
    outline: none;
}

.af-catalog-compact__photo-cta {
    flex: 0 0 auto;
    margin-top: 16px;
    min-height: 128px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
    border-radius: 10px;
    background: rgba(226, 234, 246, .82);
}

.af-catalog-compact__photo-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.af-catalog-compact__photo-visual {
    flex: 0 0 var(--af-photo-cta-width, 128px);
    width: var(--af-photo-cta-width, 128px);
    height: var(--af-photo-cta-height, 128px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.af-catalog-compact__photo-visual img {
    display: block;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.af-catalog-compact__photo-copy-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.af-catalog-compact__photo-copy-text strong {
    color: var(--af-blue);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.2;
    text-transform: uppercase;
}

.af-catalog-compact__photo-copy-text span {
    color: var(--af-graphite);
    font-size: 14px;
    line-height: 1.4;
}

.af-catalog-compact__photo-button {
    flex: 0 0 auto;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 22px;
    border: 0;
    border-radius: 7px;
    background: var(--af-blue);
    color: var(--af-white);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.af-catalog-compact__photo-button:hover,
.af-catalog-compact__photo-button:focus {
    opacity: .94;
    box-shadow: 0 8px 20px rgba(20, 50, 110, .18);
    transform: translateY(-1px);
    outline: none;
}

@media (max-width: 1399px) and (min-width: 1200px) {
    .af-catalog-compact__grid,
    .af-catalog-compact__task-grid,
    .af-catalog-compact__subgrid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .af-catalog-compact__category-link {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 12px;
    }
}

/* =========================================================
 * Compact catalog: dual CTA (part selection + photo selection)
 * ========================================================= */
.af-catalog-compact__photo-cta--dual {
    min-height: 128px;
    gap: 24px;
}

.af-catalog-compact__cta-options {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.af-catalog-compact__cta-option {
    min-width: 0;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.af-catalog-compact__cta-or {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: var(--af-graphite);
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(20, 50, 110, .06);
}

.af-catalog-compact__cta-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.af-catalog-compact__photo-button--part {
    min-width: 220px;
}

.af-catalog-compact__photo-button--photo {
    min-width: 205px;
    border: 1px solid rgba(20, 50, 110, .72);
    background: rgba(255, 255, 255, .72);
    color: var(--af-blue);
}

.af-catalog-compact__photo-button--photo:hover,
.af-catalog-compact__photo-button--photo:focus {
    background: var(--af-white);
    color: var(--af-blue);
}

@media (max-width: 1500px) and (min-width: 1200px) {
    .af-catalog-compact__photo-cta--dual {
        gap: 16px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .af-catalog-compact__cta-options {
        gap: 16px;
    }

    .af-catalog-compact__cta-option {
        gap: 12px;
    }

    .af-catalog-compact__cta-option .af-catalog-compact__photo-copy-text strong {
        font-size: 15px;
    }

    .af-catalog-compact__cta-option .af-catalog-compact__photo-copy-text span {
        font-size: 12px;
    }

    .af-catalog-compact__photo-button--part,
    .af-catalog-compact__photo-button--photo {
        min-width: 0;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 12px;
    }
}

/* =========================================================
 * Mobile catalog: dual CTA (part selection + photo selection)
 * ========================================================= */
@media (max-width: 1199px) {
    .af-mobile-catalog__cta-stack {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin: 12px 0 16px;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-cta {
        min-width: 0;
        min-height: 104px;
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr) 42px;
        align-items: center;
        gap: 12px;
        margin: 0;
        padding: 12px 12px 12px 14px;
        border: 0;
        border-radius: 14px;
        background: rgba(231, 235, 255, .82);
        box-shadow: none;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-image {
        display: block;
        width: 76px !important;
        height: 76px !important;
        max-width: 76px !important;
        max-height: 76px !important;
        object-fit: contain;
        border-radius: 0;
        background: transparent;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-text {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-text strong {
        display: block;
        margin: 0;
        color: var(--af-blue, #14326e);
        font-size: 14px;
        font-weight: 750;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-text span {
        display: block;
        color: #5f6167;
        font-size: 11px;
        font-weight: 400;
        line-height: 1.28;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-button {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 0;
        border-radius: 10px;
        background: var(--af-blue, #14326e);
        color: #fff;
        cursor: pointer;
        box-shadow: none;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-button i {
        margin: 0;
        font-size: 14px;
        line-height: 1;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-button:hover,
    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-button:focus {
        background: #1d3b7b;
        color: #fff;
        outline: none;
    }
}

@media (max-width: 420px) {
    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-cta {
        grid-template-columns: 68px minmax(0, 1fr) 40px;
        gap: 10px;
        min-height: 96px;
        padding: 10px;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-image {
        width: 68px !important;
        height: 68px !important;
        max-width: 68px !important;
        max-height: 68px !important;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-text strong {
        font-size: 13px;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-text span {
        font-size: 10px;
    }

    .af-mobile-catalog__cta-stack .af-mobile-catalog__photo-button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
}

/* =========================================================
 * Catalog tabs: categories / product types
 * ========================================================= */

.af-catalog-tabs {
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-height: calc(100vh - 198px);
}

.af-catalog-tabs__nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 18px;
    padding-top: 16px;
    border-bottom: 1px solid #dfe3eb;
    flex: 0 0 auto;
    display: none;
}

.af-catalog-tabs__button {
    min-width: 220px;
    height: 52px;
    padding: 0 28px;
    border: 1px solid #d9dee8;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: #f8f9fb;
    color: #50545d;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition:
        color .18s ease,
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.af-catalog-tabs__button + .af-catalog-tabs__button {
    margin-left: -1px;
}

.af-catalog-tabs__button:hover,
.af-catalog-tabs__button:focus {
    color: #14326e;
    background: #ffffff;
    outline: none;
}

.af-catalog-tabs__button.is-active {
    position: relative;
    z-index: 1;
    color: #14326e;
    background: #ffffff;
    font-weight: 700;
}

.af-catalog-tabs__button.is-active::after {
    content: '';
    position: absolute;
    left: -1px;
    right: -1px;
    bottom: -2px;
    height: 3px;
    background: #14326e;
}

.af-catalog-tabs__panels {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
}

.af-catalog-tabs__panel {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.af-catalog-tabs__panel[hidden] {
    display: none !important;
}

.af-catalog-tabs .af-catalog-compact,
.af-catalog-tabs .af-catalog-mega,
.af-catalog-tabs .af-catalog-product-types {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

.af-catalog-tabs .af-catalog-compact__scroll,
.af-catalog-tabs .af-catalog-mega__content,
.af-catalog-tabs .af-catalog-mega__regular-scroll,
.af-catalog-tabs .af-catalog-product-types__scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

/* Product types tab */
.af-catalog-product-types {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.af-catalog-product-types__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;

    scrollbar-width: thin;
    scrollbar-color: rgba(20, 50, 110, .38) transparent;
}

.af-catalog-product-types__scroll::-webkit-scrollbar {
    width: 7px;
}

.af-catalog-product-types__scroll::-webkit-scrollbar-track {
    background: transparent;
}

.af-catalog-product-types__scroll::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(20, 50, 110, .38);
}

.af-catalog-product-types__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.af-catalog-product-types__item {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 48px;
    padding: 8px 14px;
    border: 1px solid #e1e4ea;
    border-radius: 7px;
    background: #ffffff;
    color: #555960;
    text-decoration: none;
    transition:
        border-color .18s ease,
        color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.af-catalog-product-types__item:hover,
.af-catalog-product-types__item:focus,
.af-catalog-product-types__item.is-active {
    border-color: rgba(20, 50, 110, .34);
    background: #f7f9ff;
    color: #14326e;
    text-decoration: none;
    outline: none;
}

.af-catalog-product-types__item.is-active {
    box-shadow: inset 3px 0 0 #14326e;
}

.af-catalog-product-types__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    margin-right: 10px;
    color: #14326e;
}

.af-catalog-product-types__icon img {
    display: block;
    max-width: 22px;
    max-height: 22px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.af-catalog-product-types__icon i {
    font-size: 14px;
}

.af-catalog-product-types__name {
    min-width: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.af-catalog-product-types__cta-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border: 2px solid #5533d7;
    color: #5533d7;
    font-size: 30px;
    background: #ffffff;
}

.af-catalog-product-types .af-catalog-compact__photo-cta {
    margin-top: 12px;
    flex: 0 0 auto;
}

@media (max-width: 1280px) {
    .af-catalog-tabs__button {
        min-width: 190px;
        height: 48px;
        padding: 0 22px;
        font-size: 14px;
    }

    .af-catalog-product-types__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


.af-mobile-category__link.is-active {
    color: var(--af-blue, #14326e);
    background: rgba(150, 175, 215, .12);
}


@media (max-width: 767px) {
    .af-mobile-menu__section-body {
        padding-left: 28px;
        padding-right: 18px;
    }
}

