/**
 * Shop Sidebar Styling
 * Matches Original Electro Theme Design
 */

/* Sidebar Container */
.sidebar-shop.widget-area {
    width: 100%;
    margin-top: 50px;
}

/* Widget Styling - Match Electro Original */
.sidebar-shop .widget {
    margin-bottom: 5.143em; /* Original Electro value */
}

.sidebar-shop .widget:last-child {
    margin-bottom: 0;
}

/* Widget Title - Match Electro Original */
.sidebar-shop .widget .widget-title {
    font-size: 1.357em;
    line-height: 0.947em;
    margin-bottom: 1.842em;
    padding-bottom: 1.053em;
    position: relative;
    border-bottom: 1px solid #dddddd;
    font-weight: normal;
}

.sidebar-shop .widget .widget-title::after {
    content: ' ';
    width: 3.684em;
    border-bottom: 2px solid #2563eb; /* Primary color */
    display: block;
    position: absolute;
    bottom: -1px;
}

/* Product Categories Widget - Match Electro Original */
.sidebar-shop .widget_product_categories ul {
    list-style: none;
}

.sidebar-shop .widget_product_categories .product-categories,
.sidebar-shop .widget_product_categories .widget-title + ul {
    padding: 0 !important;
    margin: 0;
    border: 2px solid #dddddd;
    border-radius: 6px;
}

.sidebar-shop .widget_product_categories ul li {
    border-top: 1px solid #dddddd;
}

.sidebar-shop .widget_product_categories ul li:first-child {
    border: none;
}

.sidebar-shop .widget_product_categories .cat-item > a,
.sidebar-shop .widget_product_categories .cat-item > span {
    padding: 0.571em 0 0.643em 0;
    display: inline-block;
}

.sidebar-shop .widget_product_categories .cat-item a {
    color: #333e48;
    text-decoration: none;
    padding: 0.571em 2.143em 0.643em 2.143em;
    display: block;
    position: relative;
}

.sidebar-shop .widget_product_categories .cat-item a:hover {
    color: #2563eb;
}

.sidebar-shop .widget_product_categories .cat-item .count {
    float: right;
    font-size: 0.857em;
    color: #8f8f8f;
}

/* Product List Widget - Match Electro Original */
.sidebar-shop .widget_products ul.product_list_widget {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-shop .widget_products .product_list_widget li {
    margin-bottom: 1.35em; /* Original Electro value */
    display: block;
    clear: both;
}

.sidebar-shop .widget_products .product_list_widget li:last-child {
    margin-bottom: 0;
}

.sidebar-shop .widget_products .product_list_widget li a {
    display: block;
    text-decoration: none;
    color: #333e48;
}

.sidebar-shop .widget_products .product_list_widget li a:hover .product-title {
    color: #2563eb;
}

/* Images - 75px x 75px (Original Electro) */
.sidebar-shop .widget_products .product_list_widget li img {
    width: 75px;
    height: 75px;
    margin-right: 20px;
    float: left;
    object-fit: cover;
}

.sidebar-shop .widget_products .product_list_widget li .product-title {
    color: #333e48;
    font-weight: bold;
    font-size: 1em;
    display: block;
    line-height: 1.2em;
    margin-bottom: 0;
}

/* Star Rating - Match Electro Original */
.sidebar-shop .widget_products .star-rating {
    width: 5.2em;
    height: 1em;
    position: relative;
    font-size: 1em;
    margin: 8px 0;
    margin-left: 95px; /* 75px image + 20px margin */
}

.sidebar-shop .widget_products .star-rating::before {
    content: "★★★★★";
    color: #dddddd;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
}

.sidebar-shop .widget_products .star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.sidebar-shop .widget_products .star-rating span::before {
    content: "★★★★★";
    top: 0;
    position: absolute;
    left: 0;
    color: #fed700; /* Yellow for stars */
}

/* Price - Match Electro Original */
.sidebar-shop .widget_products .electro-price,
.sidebar-shop .widget_products .price {
    margin-top: 0;
    display: block;
    margin-left: 95px; /* 75px image + 20px margin */
    font-size: 1em;
}

.sidebar-shop .widget_products .star-rating + .electro-price,
.sidebar-shop .widget_products .star-rating + .price {
    margin-top: 0;
}

.sidebar-shop .widget_products .price .amount {
    display: inline-block;
    font-size: 1.071em;
    font-weight: bold;
}

.sidebar-shop .widget_products .price del {
    color: #8f8f8f;
    display: block;
    width: 100%;
    float: left;
}

.sidebar-shop .widget_products .price del .amount {
    font-size: 0.928em;
    text-decoration: line-through;
    font-weight: normal;
}

.sidebar-shop .widget_products .price ins {
    text-decoration: none;
    display: block;
    float: left;
}

.sidebar-shop .widget_products .price ins .amount {
    color: #dc3545; /* Danger color for sale price */
    font-weight: bold;
    font-size: 1.071em;
}

/* Filter Widgets Styling */
.sidebar-shop .widget_layered_nav ul,
.sidebar-shop .widget_rating_filter ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-shop .widget_layered_nav li,
.sidebar-shop .widget_rating_filter li {
    padding: 0.5em 0;
    border-bottom: 1px solid #eeeeee;
}

.sidebar-shop .widget_layered_nav li:last-child,
.sidebar-shop .widget_rating_filter li:last-child {
    border-bottom: none;
}

.sidebar-shop .widget_layered_nav label,
.sidebar-shop .widget_rating_filter a {
    color: #333e48;
    display: flex;
    align-items: center;
    width: 100%;
}

.sidebar-shop .widget_layered_nav label:hover,
.sidebar-shop .widget_rating_filter a:hover {
    color: #2563eb;
}

.sidebar-shop .widget_layered_nav .count,
.sidebar-shop .widget_rating_filter .count {
    margin-left: auto;
    color: #8f8f8f;
    font-size: 0.857em;
}

.sidebar-shop .widget_rating_filter .star-rating {
    width: 5.2em;
    height: 1em;
    position: relative;
    font-size: 1em;
    margin-right: 10px;
}

.sidebar-shop .widget_rating_filter .star-rating::before {
    content: "★★★★★";
    color: #dddddd;
    position: absolute;
}

.sidebar-shop .widget_rating_filter .star-rating span {
    overflow: hidden;
    position: absolute;
    padding-top: 1.5em;
}

.sidebar-shop .widget_rating_filter .star-rating span::before {
    content: "★★★★★";
    position: absolute;
    left: 0;
    top: 0;
    color: #fed700;
}

/* Price Filter Widget */
.sidebar-shop .widget_price_filter .price_slider_amount {
    margin-top: 1em;
}

.sidebar-shop .widget_price_filter input[type="text"] {
    border: 1px solid #dddddd;
    padding: 0.5em;
}

.sidebar-shop .widget_price_filter .btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Clear fix for product list items */
.sidebar-shop .product_list_widget > li::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive - Comprehensive Mobile Hide */
@media (max-width: 991px) {
    /* Force hide sidebar on mobile */
    .sidebar-shop,
    .sidebar-shop.widget-area,
    aside.sidebar-shop {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    /* Ensure content takes full width when sidebar is hidden */
    .shop-content-area,
    .shop-products-wrapper,
    .woocommerce-result-count + .products {
        width: 100% !important;
        max-width: 100% !important;
    }
}


