/* --- Scrollbars --- */

.css-mega-body::-webkit-scrollbar,
.css-cat-l1::-webkit-scrollbar,
.css-cat-l2-grid::-webkit-scrollbar,
.css-mega-search-results::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.css-mega-body::-webkit-scrollbar-track,
.css-cat-l1::-webkit-scrollbar-track,
.css-cat-l2-grid::-webkit-scrollbar-track,
.css-mega-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.css-mega-body::-webkit-scrollbar-thumb,
.css-cat-l1::-webkit-scrollbar-thumb,
.css-cat-l2-grid::-webkit-scrollbar-thumb,
.css-mega-search-results::-webkit-scrollbar-thumb {
    background: #dcdfe4;
    border-radius: 3px;
}

.css-mega-body::-webkit-scrollbar-thumb:hover,
.css-cat-l1::-webkit-scrollbar-thumb:hover,
.css-cat-l2-grid::-webkit-scrollbar-thumb:hover,
.css-mega-search-results::-webkit-scrollbar-thumb:hover {
    background: #bcc0c6;
}

/* --- Trigger --- */

.section2 .container {
    position: relative;
}

.section2.css-mega-open {
    z-index: 1050;
}

.css-mega {
    position: static;
}

.css-mega-toggle {
    text-transform: uppercase;
}

.css-mega-caret {
    font-size: 11px;
    transition: transform 0.25s ease;
}

.css-mega.css-open .css-mega-caret {
    transform: rotate(180deg);
}

.css-mega.css-open .css-mega-toggle {
    display: none !important;
}

html.css-mega-lock {
    overflow: hidden;
}

.css-mega-backdrop {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: transparent;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.css-mega.css-open .css-mega-backdrop {
    display: block;
}

/* --- Panel --- */

.css-mega-panel[hidden],
.css-mega-backdrop[hidden] {
    display: none !important;
}

.css-mega-panel {
    position: absolute;
    top: 100%;
    left: 24px;
    right: 24px;
    z-index: 1050;
    display: none;
    flex-direction: column;
    margin-top: 0;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: 0 18px 36px rgba(25, 31, 38, 0.13);
    overflow: hidden;
}

.css-mega-panel > .container {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
}

.css-mega.css-open .css-mega-panel {
    display: flex;
}

.css-mega-topbar {
    min-height: 60px;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid #edeff2;
}

.css-mega-topbar-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.css-mega-topbar-text strong {
    color: #1b1f24;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.css-mega-topbar-text span {
    color: #868d96;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
}

.css-mega-search {
    width: 360px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 0 14px;
    background: #f4f6f8;
    border: 1px solid #f4f6f8;
    border-radius: 20px;
    color: #9298a0;
    font-size: 13px;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.css-mega-search:focus-within {
    background: #ffffff;
    border-color: #ee1a19;
    box-shadow: 0 0 0 3px rgba(238, 26, 25, 0.1);
    color: #ee1a19;
}

.css-mega-search input {
    width: 100%;
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    color: #1b1f24;
    font-size: 13px;
    outline: 0;
}

.css-mega-search input::placeholder {
    color: #9ba2aa;
}

.css-mega-close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #f4f6f8;
    border: 0;
    border-radius: 50%;
    color: #6f767f;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.25s ease;
}

.css-mega-close:hover {
    background: #ee1a19;
    color: #ffffff;
    transform: rotate(90deg);
}

/* --- Body --- */

.css-cat-drill {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
}

.css-mega-body {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: 0;
    padding: 16px 0 24px;
    overflow: visible;
    overscroll-behavior: contain;
}

.css-mega-panel-scroll > .container {
    height: 100%;
    flex: 1 1 auto;
}

.css-mega-panel-scroll .css-cat-drill {
    flex: 1 1 auto;
    min-height: 0;
}

.css-mega-panel-scroll .css-mega-body,
.css-mega-panel-scroll .css-mega-search-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.css-mega.css-open .css-mega-body,
.css-mega.css-open .css-mega-search-results {
    animation: cssMegaFadeUp 0.22s ease both;
}

@keyframes cssMegaFadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Level 1 --- */

.css-cat-l1-head {
    margin-bottom: 10px;
    color: #1b1f24;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    line-height: 1.25;
}

.css-cat-l1-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 400;
}

.css-cat-l1-head-label {
    color: #8b929a;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.css-cat-l1-head-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ee1a19;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.css-cat-l1-head-all i {
    font-size: 11px;
}

.css-cat-l1-head-all:hover {
    color: #c41716;
    text-decoration: none;
}

.css-level-2 .css-cat-l1-head,
.css-level-3 .css-cat-l1-head,
.css-cat-drill.css-searching .css-cat-l1-head {
    display: none;
}

.css-cat-l1,
.css-cat-l2-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.css-cat-l1-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.css-cat-l1-card:hover {
    border-color: #d5d9de;
    color: inherit;
    text-decoration: none;
}

.css-cat-img {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

.css-cat-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.css-cat-img i {
    color: #c3c8cf;
    font-size: 44px;
}

.css-cat-l1-img {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    max-width: 120px;
    max-height: 120px;
    padding: 14px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.css-cat-l1-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.css-cat-l1-name {
    color: #1b1f24;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.css-cat-l1-desc {
    display: -webkit-box;
    overflow: hidden;
    color: #6f767f;
    font-size: 13px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.css-cat-l1-count {
    color: #8b929a;
    font-size: 12px;
    font-weight: 600;
}

/* --- Desktop overlay — compact cards --- */

#headerCategories .css-cat-l1,
#headerCategories .css-cat-l2-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    gap: 8px;
}

#headerCategories .js-cat-l1 .css-cat-l1-card {
    flex-direction: row;
    align-items: center;
    height: 100%;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
}

#headerCategories .js-cat-l1 .css-cat-img i {
    font-size: 36px;
}

#headerCategories .js-cat-l1 .css-cat-l1-img {
    width: 112px;
    height: 112px;
    min-width: 112px;
    min-height: 112px;
    max-width: 112px;
    max-height: 112px;
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    border-radius: 4px;
}

#headerCategories .js-cat-l1 .css-cat-l1-info {
    align-items: flex-start;
    flex: 1 1 auto;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

#headerCategories .js-cat-l1 .css-cat-l1-name {
    display: -webkit-box;
    overflow: hidden;
    width: 100%;
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#headerCategories .js-cat-l1 .css-cat-l1-count {
    width: 100%;
    font-size: 11px;
    font-weight: 500;
    text-align: left;
}

#headerCategories .css-cat-l2-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

#headerCategories .css-cat-sub-card {
    flex-direction: row;
    align-items: center;
    height: 100%;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
}

#headerCategories .css-cat-sub-img {
    width: 45%;
    height: 140px;
    min-width: 0;
    min-height: 140px;
    max-width: 45%;
    max-height: 140px;
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    border-radius: 4px;
}

#headerCategories .css-cat-sub-card .css-cat-img i {
    font-size: 32px;
}

#headerCategories .css-cat-sub-card .css-cat-l1-info {
    align-items: flex-start;
    justify-content: center;
    flex: 1 1 auto;
    gap: 5px;
    min-width: 0;
    padding-right: 4px;
    text-align: left;
}

#headerCategories .css-cat-sub-card .css-cat-l1-name {
    display: -webkit-box;
    overflow: hidden;
    width: 100%;
    color: #1b1f24;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.15px;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#headerCategories .css-cat-sub-card .css-cat-l1-count {
    width: 100%;
    color: #6f767f;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
}

#headerCategories .css-mega-body {
    padding: 12px 0 16px;
}

#headerCategories .css-cat-l1-head-row {
    margin-bottom: 8px;
}

#headerCategories .css-cat-l2-head {
    gap: 10px;
    margin-bottom: 10px;
}

#headerCategories .css-cat-back {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

#headerCategories .css-cat-back i {
    font-size: 15px;
}

#headerCategories .css-cat-l2-title {
    font-size: 16px;
}

#headerCategories .css-cat-see-all {
    gap: 6px;
    font-size: 12px;
}

#headerCategories .css-cat-see-all i {
    font-size: 12px;
}

@media (min-width: 1200px) {
    #headerCategories .css-cat-l1 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Level 2 --- */

.css-cat-l2 {
    display: none;
}

.css-level-2 .css-cat-l1 {
    display: none;
}

.css-level-2 .css-cat-l2 {
    display: block;
}

.css-cat-panel {
    display: none;
}

.css-cat-panel.css-active {
    display: block;
}

.css-cat-l3 {
    display: none;
}

.css-level-3 .js-cat-l2 > .js-cat-panel.css-active > .css-cat-l2-grid {
    display: none;
}

.css-level-3 .js-cat-l2 > .js-cat-panel.css-active > .css-cat-l2-head {
    display: none;
}

.css-level-3 .js-cat-l2 > .js-cat-panel.css-active > .js-cat-l3 {
    display: block;
}

.css-cat-l3 > .js-cat-panel.css-active {
    display: block;
}

.css-cat-l2-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.css-cat-back {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f8;
    border: 0;
    border-radius: 8px;
    color: #2b3037;
    cursor: pointer;
}

.css-cat-back i {
    font-size: 18px;
}

.css-cat-l2-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.css-cat-see-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: #ee1a19;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.css-cat-see-all i {
    font-size: 14px;
}

.css-cat-see-all:hover {
    color: #c41716;
    text-decoration: none;
}

/* --- Search --- */

.css-mega-search-results {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    align-content: start;
    gap: 10px;
    padding: 18px 0 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.css-mega.css-searching .css-mega-body,
.css-cat-drill.css-searching .css-mega-body {
    display: none;
}

.css-mega.css-searching .css-mega-search-results,
.css-cat-drill.css-searching .css-mega-search-results {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
}

.css-mega-search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    background: #fcfcfd;
    border: 1px solid #e9ecf0;
    border-radius: 8px;
    color: #2b3037;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.css-mega-search-result:hover {
    background: #ffffff;
    border-color: #ee1a19;
    color: #ee1a19;
    text-decoration: none;
}

.css-mega-search-result-text {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
}

.css-mega-search-result-text strong {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.css-mega-search-result-text small {
    color: #949ba3;
    font-size: 11px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.css-mega-search-result-count {
    flex-shrink: 0;
    color: #949ba3;
    font-size: 11px;
    font-weight: 500;
}

.css-mega-search-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    color: #949ba3;
    font-size: 13px;
    text-align: center;
}

.css-mega-search-empty--icon i {
    color: #c8ccd2;
    font-size: 28px;
}
