/* ============================================
   GoSpree Pro Filter - Professional Sidebar Filter
   ============================================ */

.gospree-filter-wrap {
    font-family: inherit;
    color: #1a1a1a;
}

/* ---- Active Filters ---- */
.gf-active-filters {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.gf-active-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gf-clear-all {
    font-size: 12px;
    color: #e53935;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}
.gf-clear-all:hover { opacity: 0.7; }

.gf-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gf-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 4px 10px 4px 12px;
    font-size: 12px;
    color: #333;
}

.gf-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #999;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}
.gf-tag-remove:hover { color: #e53935; }

/* ---- Section ---- */
.gf-section {
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 0;
}

.gf-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #1a1a1a;
    transition: color 0.2s;
}
.gf-section-header:hover { color: #555; }

.gf-toggle-icon {
    font-size: 18px;
    font-weight: 300;
    color: #888;
    transition: transform 0.25s ease;
    line-height: 1;
}

.gf-section.collapsed .gf-toggle-icon {
    transform: rotate(0deg);
}

.gf-section-body {
    padding-bottom: 16px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.gf-section.collapsed .gf-section-body {
    display: none;
}

/* ---- Search Box ---- */
.gf-search-box {
    margin-bottom: 10px;
}

.gf-brand-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.gf-brand-search:focus { border-color: #1a1a1a; }

/* ---- Checkbox List ---- */
.gf-cat-list,
.gf-brand-list,
.gf-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gf-cat-item,
.gf-brand-item {
    margin: 0;
    padding: 0;
}

.gf-cat-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 0;
}

.gf-accordion-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s, transform 0.25s ease;
    border-radius: 3px;
}
.gf-accordion-btn:hover { color: #1a1a1a; background: #f0f0f0; }

.gf-cat-item.open > .gf-cat-row > .gf-accordion-btn {
    transform: rotate(180deg);
    color: #1a1a1a;
}

/* ---- Checkbox ---- */
.gf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.gf-checkbox-label input[type="checkbox"] {
    display: none;
}

.gf-checkmark {
    width: 16px;
    height: 16px;
    border: 1.5px solid #ccc;
    border-radius: 3px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
}

.gf-checkbox-label input:checked ~ .gf-checkmark {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.gf-checkbox-label input:checked ~ .gf-checkmark::after {
    content: '';
    display: block;
    width: 4px;
    height: 7px;
    border: 1.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.gf-label-text {
    font-size: 13.5px;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.gf-checkbox-label:hover .gf-label-text { color: #000; }
.gf-checkbox-label input:checked ~ .gf-checkmark + .gf-label-text { color: #1a1a1a; font-weight: 500; }

.gf-count {
    font-size: 11.5px;
    color: #aaa;
    flex-shrink: 0;
}

/* ---- Accordion Children ---- */
.gf-children {
    display: none;
    padding-left: 22px;
    border-left: 2px solid #f0f0f0;
    margin-left: 6px;
    margin-bottom: 4px;
}

.gf-children.open { display: block; }

.gf-children .gf-children {
    padding-left: 16px;
}

/* ---- Price Filter ---- */
.gf-price-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}

.gf-price-min,
.gf-price-max {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 70px;
    text-align: center;
}

.gf-currency { font-size: 12px; }
.gf-price-sep { color: #aaa; font-weight: 300; }

.gf-range-wrap {
    position: relative;
    height: 36px;
    margin-bottom: 14px;
}

.gf-range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    border-radius: 4px;
    transform: translateY(-50%);
}

.gf-range-fill {
    position: absolute;
    height: 100%;
    background: #1a1a1a;
    border-radius: 4px;
}

.gf-range {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.gf-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #1a1a1a;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: transform 0.15s;
}

.gf-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.gf-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #1a1a1a;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.gf-price-apply {
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-transform: uppercase;
}
.gf-price-apply:hover { background: #333; }
.gf-price-apply:active { transform: scale(0.98); }

/* ---- Show More ---- */
.gf-show-more {
    display: block;
    background: none;
    border: none;
    color: #888;
    font-size: 12.5px;
    cursor: pointer;
    padding: 6px 0 0;
    text-decoration: underline;
    transition: color 0.2s;
}
.gf-show-more:hover { color: #1a1a1a; }

/* ---- Loading Overlay ---- */
.gf-loading {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.gf-loading.active { display: flex; }

.gf-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: gf-spin 0.7s linear infinite;
}

@keyframes gf-spin { to { transform: rotate(360deg); } }

/* ---- Show More / Hidden Categories ---- */
.gf-hidden-cat {
    display: none;
}

#gf-cat-show-more {
    display: block;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #555;
    font-size: 12.5px;
    cursor: pointer;
    padding: 7px 14px;
    margin-top: 10px;
    width: 100%;
    text-align: center;
    transition: all 0.2s;
    font-weight: 500;
}
#gf-cat-show-more:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #1a1a1a;
}

/* Arrow right side fix */
.gf-cat-row {
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.gf-accordion-btn { margin-left: auto; }
.gf-checkbox-label { flex: 1; }
