/**
 * TechSpace Shop & Filters UX Enhancements
 */

/* 1. Featured Original Products Badge */
.techspace-featured-pill {
    display: inline-flex;
    align-items: center;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 9;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    letter-spacing: 0.2px;
    pointer-events: none;
    text-transform: none;
}

/* 2. Modern Category Tree & Accordion */
.widget_product_categories .product-categories {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.widget_product_categories .product-categories li {
    position: relative;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px;
    line-height: 1.4;
}

.widget_product_categories .product-categories li > a {
    color: #1e293b;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, padding 0.2s ease;
    display: inline-block;
}

.widget_product_categories .product-categories li > a:hover {
    color: #0284c7 !important;
    padding-left: 2px;
}

.widget_product_categories .product-categories li.current-cat > a {
    color: #0284c7 !important;
    font-weight: 700;
}

.widget_product_categories .product-categories .count {
    float: right;
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 600;
}

.widget_product_categories .product-categories li.current-cat > .count {
    background: #e0f2fe;
    color: #0369a1;
}

/* Sub-categories indentation and toggle */
.widget_product_categories .product-categories ul.children {
    list-style: none !important;
    padding-left: 14px !important;
    margin-top: 6px !important;
    border-left: 2px solid #e2e8f0;
    display: none; /* Collapsed by default */
}

.widget_product_categories .product-categories li.cat-parent.expanded > ul.children,
.widget_product_categories .product-categories li.cat-parent.current-cat-parent > ul.children,
.widget_product_categories .product-categories li.cat-parent.current-cat > ul.children {
    display: block; /* Expanded if active or clicked */
}

/* Accordion Toggle Button */
.cat-accordion-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 13px;
    color: #64748b;
    border-radius: 4px;
    margin-left: 4px;
    user-select: none;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.cat-accordion-toggle:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* 3. Compact Scrollable Brand & Attribute Filters */
.widget_layered_nav ul {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 6px !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.widget_layered_nav ul::-webkit-scrollbar {
    width: 5px;
}

.widget_layered_nav ul::-webkit-scrollbar-track {
    background: #f8fafc;
}

.widget_layered_nav ul::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.widget_layered_nav ul li {
    padding: 5px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 13px;
}

.widget_layered_nav ul li a {
    color: #334155;
    text-decoration: none;
    transition: color 0.15s ease;
}

.widget_layered_nav ul li a:hover {
    color: #0284c7;
}

.widget_layered_nav ul li .count {
    float: right;
    font-size: 11px;
    color: #94a3b8;
}

/* 4. Active Filters Reset Button */
.widget_layered_nav_filters ul {
    list-style: none !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.widget_layered_nav_filters ul li a {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #fee2e2;
    color: #b91c1c !important;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.widget_layered_nav_filters ul li a:hover {
    background: #fecaca;
}
