/* ───────────────────────────────────────────────
   MUNRO Product Categories Accordion
   Readable style — larger text, guide-line nesting, highlighted current category
   ─────────────────────────────────────────────── */

.munro-cat-accordion {
    --nav-text: #1f2937;
    --nav-muted: #6b7280;
    --nav-hover: #f3f4f6;
    --nav-line: #e5e7eb;
    --nav-accent: #1d4ed8;
    --nav-accent-bg: #eff6ff;

    list-style: none;
    margin: 0;
    padding: 4px 8px 0 0;
    font-size: 14px;
    line-height: 1.35;
}

/* Sub-categories: indented under a guide line */
.munro-cat-accordion ul.sub-categories {
    list-style: none;
    margin: 2px 0 8px 14px;
    padding: 0 0 0 8px;
    border-left: 2px solid var(--nav-line);
}

/* ── Category item: no divider lines, spacing does the separating ── */
.munro-cat-accordion .munro-cat-item {
    border: 0;
    margin: 0;
}

/* ── Header row (link + toggle) ── */
.munro-cat-item .cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.munro-cat-item .cat-header:hover {
    background: var(--nav-hover);
}

/* ── Category link ──
   Colors use !important because the inline CSS in functions.php
   (.munro-cae-side a { color:#000!important }) would otherwise win. */
.munro-cat-item .cat-link {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--nav-text) !important;
    text-decoration: none;
}

/* Top-level categories */
.munro-cat-accordion > .munro-cat-item > .cat-header > .cat-link {
    font-size: 15px;
    font-weight: 600;
    padding: 9px 10px;
}

/* Current category */
.munro-cat-item.current-cat > .cat-header {
    background: var(--nav-accent-bg);
    box-shadow: inset 3px 0 0 var(--nav-accent);
    border-radius: 0 6px 6px 0;
}

.munro-cat-item.current-cat > .cat-header > .cat-link,
.munro-cat-item.current-cat > .cat-header > .cat-link .cat-count {
    color: var(--nav-accent) !important;
    font-weight: 600;
}

/* Product count */
.munro-cat-item .cat-count {
    flex-shrink: 0;
    margin-left: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--nav-muted) !important;
    font-variant-numeric: tabular-nums;
}

/* ── Toggle button ── */
.munro-cat-item .cat-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--nav-muted) !important;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.munro-cat-item .cat-toggle:hover {
    background: var(--nav-line);
    color: var(--nav-text) !important;
}

/* ── Chevron icon rotation ── */
.munro-cat-item .chevron-icon {
    transition: transform 0.25s ease;
    transform: rotate(0deg);
}

.munro-cat-item.is-open > .cat-header > .cat-toggle .chevron-icon {
    transform: rotate(180deg);
}

/* ── Depth-based sizing ── */
.sub-categories .cat-link {
    font-size: 14px;
}

.sub-categories .sub-categories .cat-link {
    font-size: 13px;
}

/* Keep the bottom of the list clear of the chat bubble */
#munro-cae-side {
    padding-bottom: 96px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .munro-cat-accordion {
        font-size: 15px;
    }

    .munro-cat-item .cat-link {
        padding: 11px 10px;
    }

    .munro-cat-item .cat-toggle {
        width: 40px;
        height: 40px;
    }
}
