/* Desguace Faceted Search */
/* ========================= */

/* Wrapper: grid layout for sidebar + main */
.desguace-shop-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.desguace-shop-wrapper.sidebar-left #secondary {
    width: 280px;
    flex-shrink: 0;
}

.desguace-shop-wrapper.sidebar-left #primary {
    flex: 1;
    min-width: 0;
}

/* Filter widget base */
.desguace-filter-widget {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.desguace-filter-title {
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #D4521E;
}

.desguace-filter-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.desguace-filter-widget ul li {
    margin-bottom: 0.125rem;
    padding: 0.125rem 0;
}

.desguace-filter-widget ul li a {
    color: #4a4a4a;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.desguace-filter-widget ul li a:hover {
    background: #f5f5f5;
    color: #D4521E;
}

.desguace-filter-widget ul li.chosen a {
    background: #D4521E;
    color: #fff;
    font-weight: 600;
}

/* Active filters */
.widget_layered_nav_filters ul li a {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 4px;
    display: inline-block;
    margin: 0.125rem;
}

.widget_layered_nav_filters ul li a:hover {
    background: #D4521E;
    color: #fff;
    border-color: #D4521E;
}

.widget_layered_nav_filters ul li.chosen a::before {
    content: "\00d7 ";
    font-weight: 700;
}

/* Price filter — compact & elegant */
.price_slider_wrapper {
    padding-top: 4px;
}

.price_slider_wrapper .button {
    display: none;
}

.price_slider_wrapper .price_label {
    font-size: 0.8125rem;
    color: #6a6a6a;
    margin-top: 6px;
    padding: 6px 0 0;
}

.price_slider {
    height: 4px !important;
    background: #e0e0e0 !important;
    border: none !important;
    border-radius: 2px !important;
    margin: 8px 8px 0 !important;
}

.price_slider .ui-slider-range {
    background: #D4521E !important;
    border: none !important;
    height: 4px !important;
    border-radius: 2px !important;
}

.price_slider .ui-slider-handle {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 2px solid #D4521E !important;
    cursor: pointer !important;
    top: -7px !important;
    margin-left: -9px !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
    transition: box-shadow 0.15s;
}

.price_slider .ui-slider-handle:hover,
.price_slider .ui-slider-handle:focus {
    box-shadow: 0 2px 6px rgba(212,82,30,0.25) !important;
}

.price_slider_wrapper .price_slider_amount {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.price_slider_wrapper .price_slider_amount .clear {
    display: none;
}

.price_slider_wrapper input[type="text"] {
    width: 80px;
    padding: 4px 8px;
    font-size: 0.8125rem;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    text-align: center;
}

.price_slider_wrapper input[type="text"]:focus {
    border-color: #D4521E;
    outline: none;
}

/* Search widget */
.widget_product_search input[type="search"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: inherit;
}

.widget_product_search button {
    display: none;
}

/* Category count */
.widget_product_categories .count {
    color: #9a9a9a;
    font-size: 0.75rem;
    margin-left: auto;
}

/* Loading state */
.desguace-products-area {
    position: relative;
    min-height: 200px;
}

.desguace-products-area.desguace-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    z-index: 10;
}

.desguace-products-area.desguace-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #e0e0e0;
    border-top-color: #D4521E;
    border-radius: 50%;
    animation: desguace-spin 0.6s linear infinite;
    z-index: 11;
}

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

/* Header icons — ensure SVGs are at least 30x30px */
.bhfb-header .ws-svg-icon {
    width: 30px !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.bhfb-header .ws-svg-icon svg {
    width: 30px !important;
    height: 30px !important;
}

/* Responsive */
/* Compact page header (reduce height on catalog pages) */
.woocommerce-page-header {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    margin-bottom: 0 !important;
}
.woocommerce-page-header .woocommerce-products-header__title {
    font-size: 1.5rem;
    margin: 0;
}

@media (max-width: 768px) {
    .desguace-shop-wrapper.sidebar-left {
        flex-direction: column;
    }
    .desguace-shop-wrapper.sidebar-left #secondary {
        width: 100%;
    }
}
