/* ================================================================
   PANDALYS — Category drawer & breadcrumb
   Palette : bg #102f3b | surface #182d38 | gold #d5a53a | text #e8dcc8
   ================================================================ */

/* ── Trigger button ──────────────────────────────────────────── */
.category-menu-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.category-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 20px;
    background: transparent;
    border: 1px solid #d5a53a;
    color: #d5a53a;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background .18s, color .18s;
}

.category-toggle:hover,
.category-toggle[aria-expanded="true"] {
    background: #d5a53a;
    color: #102f3b;
}

.category-toggle svg {
    flex-shrink: 0;
    transition: transform .2s;
}

.category-toggle[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

/* ── Backdrop ────────────────────────────────────────────────── */
.category-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(2px);
    z-index: 1040;
    cursor: pointer;
}

.category-backdrop.open {
    display: block;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Drawer ──────────────────────────────────────────────────── */
.category-drawer {
    position: fixed;
    top: 0;
    left: -360px;
    width: 320px;
    max-width: 88vw;
    height: 100vh;
    background: #0d2530;
    color: #e8dcc8;
    z-index: 1050;
    transition: left .26s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 6px 0 32px rgba(0, 0, 0, .6);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d5a53a33 transparent;
    display: flex;
    flex-direction: column;
}

.category-drawer.open {
    left: 0;
}

/* header */
.drawer-header {
    padding: 24px 22px 20px;
    background: #071820;
    border-bottom: 2px solid #d5a53a;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-header-title {
    font-size: .72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #9ab;
    margin-bottom: 3px;
}

.drawer-header-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #d5a53a;
    letter-spacing: 1px;
    line-height: 1;
}

.drawer-close {
    background: none;
    border: 1px solid #d5a53a44;
    color: #d5a53a;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 2px;
    flex-shrink: 0;
    transition: background .15s;
}
.drawer-close:hover {
    background: #d5a53a22;
}

/* sections */
.drawer-section {
    padding: 10px 0;
    border-bottom: 1px solid #ffffff0f;
}

.drawer-section:first-of-type {
    padding-top: 16px;
}

.drawer-section:last-child {
    border-bottom: none;
}

/* home link */
.drawer-home {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    margin-top: 6px;
    color: #c8bfae;
    font-size: .83rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color .15s, background .15s;
}
.drawer-home:hover {
    color: #d5a53a;
    background: #d5a53a0d;
}

/* section heading */
.drawer-section-title {
    padding: 6px 22px 8px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #d5a53a88;
    margin: 0;
}

/* ── Category group (recursive) ─────────────────────────────── */
.category-group {
    width: 100%;
}

/* row shared by both leaf links and toggle buttons */
.category-row,
.category-title {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 22px;
    background: transparent;
    border: none;
    color: #c8bfae;
    text-decoration: none;
    font-size: .83rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    cursor: pointer;
    text-align: left;
    transition: color .15s, background .15s;
    box-sizing: border-box;
    gap: 10px;
}

.category-row:hover,
.category-title:hover {
    color: #d5a53a;
    background: #d5a53a0d;
}

/* active state */
.category-row.active,
.category-title.active {
    color: #d5a53a;
    font-weight: 700;
    background: #d5a53a15;
    border-left: 3px solid #d5a53a;
    padding-left: 19px; /* compensate border */
}

/* indent per depth level */
.category-row[data-depth="1"],
.category-title[data-depth="1"] { padding-left: 36px; }
.category-row[data-depth="2"],
.category-title[data-depth="2"] { padding-left: 50px; }
.category-row[data-depth="3"],
.category-title[data-depth="3"] { padding-left: 64px; }

.category-row.active[data-depth="1"] { padding-left: 33px; }
.category-row.active[data-depth="2"] { padding-left: 47px; }
.category-row.active[data-depth="3"] { padding-left: 61px; }

/* chevron icon */
.category-chevron {
    margin-left: auto;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: #d5a53a88;
    transition: transform .2s;
}

.category-group.open > .category-title .category-chevron {
    transform: rotate(90deg);
    color: #d5a53a;
}

/* depth dash for leaf nodes */
.category-dash {
    flex-shrink: 0;
    width: 10px;
    height: 1px;
    background: #d5a53a55;
    border-radius: 1px;
}

/* children container */
.category-actions {
    display: none;
    border-left: 1px solid #d5a53a22;
    margin-left: 28px;
}

.category-group.open > .category-actions {
    display: block;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.category-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    font-size: .75rem;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-top: 5px;
}

.category-breadcrumb a {
    color: #9ab;
    text-decoration: none;
    transition: color .15s;
}

.category-breadcrumb a:hover {
    color: #d5a53a;
}

.category-breadcrumb a.current {
    color: #d5a53a;
    font-weight: 700;
}

.separator {
    color: #d5a53a55;
}
