/* ===== CATEGORY MENU (text bar + inline slider panel below) ===== */

.cat-menu {
    background: var(--white, #ffffff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cat-menu .container {
    /* max-width: 1100px; */
    margin: 0 auto;
}

/* ===== TEXT MENU BAR ===== */
.cat-menu-bar {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.cat-menu-item {
    background: none;
    border: none;
    padding: 16px 18px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--primary, #212121);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    font-family: inherit;
}

.cat-menu-link {
    text-decoration: none;
}

.cat-menu-item .arrow {
    font-size: 10px;
    color: var(--muted, #878787);
    transition: transform 0.2s;
}

.cat-menu-item:hover {
    color: var(--accent, #2874f0);
}

/* Selected menu item = highlighted block, not just a color change */
.cat-menu-item.active {
    color: var(--accent, #2874f0);
    background: var(--bg-active, #eef4ff);
    border-bottom-color: var(--accent, #2874f0);
}

.cat-menu-item.active .arrow {
    transform: rotate(180deg);
}

/* ===== SUBMENU PANEL (inline, collapses/expands in normal flow) ===== */
.cat-slider-panel {
    max-height: 0;
    overflow: hidden;
    background: var(--bg, #fafbff);
    border-top: 1px solid transparent;
    transition: max-height 0.25s ease;
}

.cat-slider-panel.open {
    max-height: 260px;
    border-top: 1px solid var(--border, #e8ecf3);
}

/* ===== SLIDER CONTAINER (unchanged behaviour, just nested in the panel now) ===== */
.cat-slider-container {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 900px;
    margin: 0;
    padding: 24px 30px;
    gap: 10px;
}

/* ===== TRACK ===== */
.cat-slider-track {
    display: flex;
    gap: 1.5rem;
    overflow: hidden;
    flex: 1;
    scroll-behavior: smooth;
    cursor: grab;
    padding: 4px 0;
}

.cat-slider-track.dragging {
    cursor: grabbing;
}

/* ===== ITEM ===== */
.cat-slider-item {
    flex: 0 0 calc(20% - 1.2rem); /* 5 items visible */
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== IMAGE (circular icons, matching the menu design) ===== */
.cat-slider-img {
    width: 74px;
    height: 74px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    border: 1px solid var(--border, #eee);
    background: var(--white, #ffffff);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cat-slider-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== TEXT ===== */
.cat-slider-item p {
    margin-top: 0.25rem;
    font-size: 12.5px;
    line-height: 1.3;
    color: var(--primary, #333333);
}

/* ===== HOVER EFFECT ===== */
.cat-slider-item:hover .cat-slider-img {
    border-color: var(--accent, #2874f0);
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.cat-slider-item:hover p {
    color: var(--accent, #2874f0);
}

/* Persistently highlighted subcategory (the one matching the current page) */
.cat-slider-item.active .cat-slider-img {
    border-color: var(--accent, #2874f0);
    box-shadow: 0 0 0 2px rgba(40, 116, 240, 0.15);
}

.cat-slider-item.active p {
    color: var(--accent, #2874f0);
    font-weight: 600;
}

/* ===== ARROWS ===== */
.cat-slider-arrow {
    background: var(--white, #ffffff);
    border: 1px solid var(--border, #e8ecf3);
    color: var(--primary, #333333);
    cursor: pointer;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cat-slider-arrow:hover {
    background: var(--accent, #2874f0);
    border-color: var(--accent, #2874f0);
    color: var(--white, #ffffff);
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 992px) {
    .cat-slider-item {
        flex: 0 0 calc(33.33% - 1rem);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .cat-menu-item {
        padding: 12px 12px;
        font-size: 13px;
    }

    .cat-slider-container {
        padding: 20px 14px;
    }

    .cat-slider-item {
        flex: 0 0 calc(50% - 0.8rem);
    }

    .cat-slider-img {
        width: 64px;
        height: 64px;
    }

    .cat-slider-panel.open {
        max-height: 420px;
    }

    .cat-slider-arrow {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 1.1rem;
    }
}