.hjwoo-category-browser-dropdown {
    --cb-offset-y: 14px;
    --cb-offset-x: -12px;
    --cb-shadow-soft: 0 16px 42px rgba(15, 34, 25, 0.13);
    --cb-shadow-edge: 0 2px 0 rgba(255, 255, 255, 0.38) inset;
    position: relative;
    display: inline-flex;
    align-items: stretch;
    height: 100%;
    transform: translateX(var(--cb-offset-x));
}

.hjwoo-category-browser-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: min(1100px, calc(100vw - 32px));
    height: var(--cb-offset-y);
    z-index: 998;
}

.hjwoo-category-browser-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 14px;
    padding-left: 12px;
}

.hjwoo-category-browser-dropdown__trigger:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.hjwoo-category-browser-dropdown__chevron {
    display: inline-flex;
    align-items: center;
    transition: transform 0.18s ease;
}

.hjwoo-category-browser-dropdown:hover .hjwoo-category-browser-dropdown__chevron,
.hjwoo-category-browser-dropdown:focus-within .hjwoo-category-browser-dropdown__chevron {
    transform: rotate(180deg);
}

.hjwoo-category-browser {
    --cb-bg: #f8faf9;
    --cb-panel: #ffffff;
    --cb-border: #dbe3dd;
    --cb-text: #1f2a24;
    --cb-muted: #63756a;
    --cb-accent: #1f6b47;
    --cb-accent-soft: #e4f4eb;

    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    transform: translateY(var(--cb-offset-y));
    align-items: stretch;
    gap: 0;
    min-width: 320px;
    width: max-content;
    max-width: min(1100px, calc(100vw - 32px));
    border: 1px solid var(--cb-border);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--cb-bg) 0%, #f2f6f3 100%);
    color: var(--cb-text);
    box-shadow: var(--cb-shadow-soft), var(--cb-shadow-edge);
    z-index: 999;
}

.hjwoo-category-browser-dropdown:hover .hjwoo-category-browser,
.hjwoo-category-browser-dropdown:focus-within .hjwoo-category-browser {
    display: flex;
    animation: cb-panel-in 210ms cubic-bezier(0.2, 0.65, 0.24, 1);
}

.hjwoo-category-browser__column {
    box-sizing: border-box;
    width: 320px;
    min-width: 320px;
    position: relative;
    background: var(--cb-panel);
    border-right: 1px solid var(--cb-border);
}

.hjwoo-category-browser__column[data-visible="false"] {
    display: none;
}

.hjwoo-category-browser__column[data-visible="true"] {
    display: block;
}

.hjwoo-category-browser-dropdown:hover .hjwoo-category-browser__column[data-visible="true"],
.hjwoo-category-browser-dropdown:focus-within .hjwoo-category-browser__column[data-visible="true"] {
    animation: cb-column-in 280ms cubic-bezier(0.2, 0.65, 0.24, 1) both;
}

.hjwoo-category-browser-dropdown:hover .hjwoo-category-browser__column:nth-child(1),
.hjwoo-category-browser-dropdown:focus-within .hjwoo-category-browser__column:nth-child(1) {
    z-index: 3;
    --cb-entry-from-x: 0px;
    animation-delay: 0ms;
}

.hjwoo-category-browser-dropdown:hover .hjwoo-category-browser__column:nth-child(2),
.hjwoo-category-browser-dropdown:focus-within .hjwoo-category-browser__column:nth-child(2) {
    z-index: 2;
    --cb-entry-from-x: -46px;
    animation-delay: 60ms;
}

.hjwoo-category-browser-dropdown:hover .hjwoo-category-browser__column:nth-child(3),
.hjwoo-category-browser-dropdown:focus-within .hjwoo-category-browser__column:nth-child(3) {
    z-index: 1;
    --cb-entry-from-x: -46px;
    animation-delay: 110ms;
}

.hjwoo-category-browser__column:last-child {
    border-right: 0;
}

.hjwoo-category-browser__title {
    margin: 0;
    padding: 14px 16px;
    font-size: 16px !important;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--cb-muted);
    background: none;
}

.hjwoo-category-browser__list {
    list-style: none;
    margin: 0;
    padding: 8px;
    max-height: 420px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.hjwoo-category-browser__list::-webkit-scrollbar {
    width: 8px;
}

.hjwoo-category-browser__list::-webkit-scrollbar-thumb {
    background: #cdcdcd;
    border-radius: 8px;
}

.hjwoo-category-browser__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 1px 0;
    padding: 10px 11px;
    border-radius: 5px;
    color: var(--cb-text);
    text-decoration: none;
    line-height: 1.25;
    transition: background-color 0.15s ease, color 0.15s ease;
    color: black!important;
    min-width: 0;
}

.hjwoo-category-browser__item > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.hjwoo-category-browser__item:hover {
    background: #f3f3f3 !important;
    color: #173628;
}

.hjwoo-category-browser__item:focus-visible {
    outline: 2px solid var(--cb-accent);
    outline-offset: 1px;
}

.hjwoo-category-browser__item.is-selected {
    background: #f3f3f3 !important;
    color: #0f4730;
    font-weight: 600;
}

.hjwoo-category-browser__item.is-active-trail:not(.is-selected) {
    background: #373737 !important;
    color: white!important;
}

.hjwoo-category-browser__item.is-current-term {
    box-shadow: inset 2px 0 0 var(--cb-accent);
    font-weight: 700;
}

.hjwoo-category-browser__arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    color: #7a8a80;
}

.hjwoo-category-browser__placeholder {
    margin: 0;
    padding: 16px;
    color: var(--cb-muted);
    font-size: 14px;
}

.hjwoo-category-browser__fallback {
    padding: 12px 14px;
    border: 1px solid #e2e8e4;
    border-radius: 10px;
    color: #4f6256;
    background: #f6faf7;
    font-size: 14px;
}

@keyframes cb-panel-in {
    from {
        opacity: 0;
        transform: translateY(calc(var(--cb-offset-y) - 4px));
    }

    to {
        opacity: 1;
        transform: translateY(var(--cb-offset-y));
    }
}

@keyframes cb-column-in {
    from {
        opacity: 0;
        transform: translateX(var(--cb-entry-from-x, -42px)) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hjwoo-category-browser-dropdown:hover .hjwoo-category-browser,
    .hjwoo-category-browser-dropdown:focus-within .hjwoo-category-browser,
    .hjwoo-category-browser-dropdown:hover .hjwoo-category-browser__column[data-visible="true"],
    .hjwoo-category-browser-dropdown:focus-within .hjwoo-category-browser__column[data-visible="true"] {
        animation: none;
    }
}

@media (max-width: 1120px) {
    .hjwoo-category-browser-dropdown {
        position: static;
        display: block;
        width: 100%;
        transform: none;
    }

    .hjwoo-category-browser-dropdown::after {
        display: none;
    }

    .hjwoo-category-browser-dropdown__trigger {
        width: 100%;
        justify-content: space-between;
        min-height: none;
        padding: 0px;
        color: #111111;
        text-transform: none;
        font-weight: 500;
    }

    .hjwoo-category-browser-dropdown__trigger:focus-visible {
        outline-color: #111111;
    }

    .hjwoo-category-browser {
        display: none !important;
    }

    ul.breakdance-menu-list {
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
    }

    ul.breakdance-menu-list.hjwoo-sidebar--out {
        transform: translateX(40px);
        opacity: 0;
        pointer-events: none;
    }

    body.hjwoo-panel-open {
        overflow: hidden;
    }

    .hjwoo-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 99998;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
    }

    .hjwoo-mobile-overlay.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .hjwoo-mobile-panel {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        background: #ffffff;
        z-index: 99999;
        display: flex;
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }

    .hjwoo-mobile-panel.is-open {
        transform: translateX(0);
    }

    .hjwoo-mobile-panel__header {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 0 8px 0 4px;
        height: 56px;
        border-bottom: 1px solid #e5e5e5;
        flex-shrink: 0;
        background: #ffffff;
    }

    .hjwoo-mobile-panel__back,
    .hjwoo-mobile-panel__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
        border-radius: 50%;
        color: #333333;
        padding: 0;
        transition: background 0.15s;
    }

    .hjwoo-mobile-panel__back:hover,
    .hjwoo-mobile-panel__close:hover {
        background: #f0f0f0;
    }

    .hjwoo-mobile-panel__back {
        visibility: hidden;
    }

    .hjwoo-mobile-panel__title {
        flex: 1;
        font-size: 15px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0 4px;
    }

    .hjwoo-mobile-panel__body {
        flex: 1;
        overflow: hidden;
        position: relative;
    }

    .hjwoo-mobile-panel__list {
        position: absolute;
        inset: 0;
        overflow-y: auto;
        overflow-x: hidden;
        list-style: none;
        margin: 0;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }

    .hjwoo-mobile-panel__item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 16px;
        color: #000000!important;
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        border-bottom: 1px solid #f0f0f0;
        gap: 8px;
        min-width: 0;
        transition: background 0.12s;
    }

    .hjwoo-mobile-panel__item > span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .hjwoo-mobile-panel__item:active,
    .hjwoo-mobile-panel__item:hover {
        background: #f8f8f8;
    }

    .hjwoo-mobile-panel__item.is-current-term {
        box-shadow: inset 3px 0 0 #1f6b47;
    }

    .hjwoo-mobile-panel__item.is-active-trail {
        color: #1f6b47;
    }

    .hjwoo-mobile-panel__arrow {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        color: #aaaaaa;
     }
 }

@media (min-width: 769px) and (max-width: 1119px) {
    .hjwoo-mobile-panel {
        width: min(400px, 100vw);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.2);
    }
}
