/* ==========================================================================
   Shop filter — category tree (resources/views/front/shop/_category_filter.blade.php)
   ========================================================================== */

.nk-cat-filter {
    margin-bottom: 24px;
}

.nk-cat-tree {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nk-cat-tree--sub {
    margin-left: 12px;
    padding-left: 10px;
    border-left: 1px solid #ececf0;
}

.nk-cat-tree--leaf {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px dashed #ececf0;
}

.nk-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.nk-cat-row:hover {
    background: #FAFAF8;
}

.nk-cat-link {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    color: #4a4a55;
    font-size: 14px;
    text-decoration: none;
}

.nk-cat-link:hover,
.nk-cat-row.is-active > .nk-cat-link {
    color: #1C1C2E;
}

.nk-cat-row.is-active > .nk-cat-link {
    font-weight: 600;
}

/* the level whose products are showing right now */
.nk-cat-row.is-current {
    background: #F7F1E9;
}

.nk-cat-row.is-current > .nk-cat-link {
    color: #1C1C2E;
    font-weight: 600;
}

.nk-cat-row.is-current > .nk-cat-link::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: #C89B65;
    vertical-align: middle;
}

.nk-cat-toggle {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8a8a96;
    font-size: 12px;
}

.nk-cat-toggle:hover {
    background: #ececf0;
    color: #1C1C2E;
}

.nk-cat-toggle i {
    transition: transform 0.25s ease;
}

.nk-cat-toggle:not(.collapsed) i {
    transform: rotate(180deg);
}

/* ==========================================================================
   Shop filter — gemstone multi-select dropdown (front/shop.blade.php)
   ========================================================================== */

.stone-dropdown {
    position: relative;
}

.stone-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    color: #777;
    font-size: 0.82rem;
    text-align: left;
    transition: border-color 0.2s ease;
}

.stone-dropdown-toggle:hover,
.stone-dropdown-toggle[aria-expanded="true"] {
    border-color: var(--main);
}

.stone-dropdown-toggle.has-value {
    color: #222;
    font-weight: 500;
}

.stone-dropdown-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stone-dropdown-toggle .bi {
    flex-shrink: 0;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.stone-dropdown-toggle[aria-expanded="true"] .bi {
    transform: rotate(180deg);
}

/* opens in place, pushing Apply Filters down instead of covering it */
.stone-dropdown .stone-dropdown-menu[data-bs-popper] {
    position: static;
    margin-top: 6px;
}

.stone-dropdown-menu {
    width: 100%;
    min-width: 220px;
    padding: 8px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.2);
}

.stone-search-input {
    width: 100%;
    margin-bottom: 6px;
    padding: 6px 10px 6px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    outline: none;
    background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 9px center;
    color: #444;
    font-size: 0.78rem;
    transition: border-color 0.2s ease;
}

.stone-search-input:focus {
    border-color: var(--main);
}

.stone-options {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-color: #bbb transparent;
    scrollbar-width: thin;
}

.stone-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 6px 5px 30px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.stone-option:hover {
    background: #f6f6f4;
}

.stone-option[hidden] {
    display: none;
}

.stone-option .form-check-input {
    margin-top: 0;
    cursor: pointer;
}

.stone-option .form-check-input:checked {
    border-color: var(--main);
    background-color: var(--main);
}

.stone-option .form-check-label {
    flex: 1;
    color: #444;
    cursor: pointer;
}

.stone-no-match {
    margin: 0;
    padding: 6px 2px;
    color: #aaa;
    font-size: 0.75rem;
}

.stone-no-match[hidden] {
    display: none;
}

.stone-dropdown-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
    color: #888;
    font-size: 0.75rem;
}

.stone-clear {
    padding: 2px 6px;
    border: 0;
    background: transparent;
    color: var(--main);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: underline;
}
