/* ELECTRO SHOP STYLES - CUSTOM */

/* --- Layout --- */
.electro-shop-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    max-width: 1480px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Inter', sans-serif;
}

/* --- Sidebar --- */
.electro-shop-sidebar-area {
    padding-right: 20px;
    background: transparent;
}

.electro-sidebar-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 25px;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 2px solid #046EA9;
    /* Brand Accent */
    display: inline-block;
}

/* Accordion Widgets */
.electro-shop-widget {
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
}

.electro-shop-widget:last-child {
    border-bottom: none;
}

.widget-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    padding: 18px 0;
    margin: 0;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    user-select: none;
    transition: color 0.3s;
}

.widget-title:hover {
    color: #046EA9;
}

/* Chevron */
.widget-title::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-right: 2px solid #aaa;
    border-bottom: 2px solid #aaa;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.widget-title.active::after {
    transform: rotate(225deg);
    border-color: #046EA9;
}

/* Widget Lists */
.electro-shop-widget ul {
    /* display: none; handled by JS now for smooth animation */
    /* display: none; */
    padding: 0 0 20px 0;
    list-style: none;
    margin: 0;
}

/* Remove :hover overrides or .active overrides for display, let JS handle it */

/* .electro-shop-widget.active ul { display: block; } REMOVED */

.electro-shop-widget ul li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.electro-shop-widget ul li:hover {
    color: #000;
}

/* Checkbox Style */
.electro-shop-widget ul li::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border: 1px solid #d1d1d1;
    border-radius: 3px;
    background: #fff;
    transition: all 0.2s;
    flex-shrink: 0;
}

/* Checked State */
.electro-shop-widget ul li.chosen::before,
.electro-shop-widget ul li.current-cat::before {
    background: #046EA9;
    border-color: #046EA9;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='12px' height='12px'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.electro-shop-widget ul li.chosen a,
.electro-shop-widget ul li.current-cat a {
    font-weight: 700;
    color: #046EA9;
}

.electro-shop-widget ul li a {
    color: inherit;
    text-decoration: none;
    flex: 1;
}

.count {
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Hierarchical Categories */
.electro-shop-widget ul li.depth-1 {
    margin-left: 15px;
    font-size: 13px;
}

.electro-shop-widget ul li.depth-2 {
    margin-left: 30px;
    font-size: 12px;
}

.electro-shop-widget ul li.depth-3 {
    margin-left: 45px;
    font-size: 11px;
}

/* Reset Filters Button */
.electro-reset-filters {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f1f1;
    color: #444;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.reset-btn i {
    font-size: 14px;
}

.reset-btn:hover {
    background: #046EA9;
    color: #fff;
}

/* Price Filter */
.price-filter-wrapper {
    padding: 15px 0 25px 0;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs input {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    outline: none;
}

.price-inputs input:focus {
    border-color: #046EA9;
}

.price-inputs span {
    color: #999;
}

.price-inputs button {
    background: #046EA9;
    color: #fff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.price-inputs button:hover {
    background: #035a8a;
}

/* --- Content Area --- */
.woocommerce-products-header__title {
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    color: #222;
}

/* --- Product Grid --- */
.electro-shop-content-area ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-content: start;
    justify-items: start;
}

/* Fix empty first item in grid caused by pseudo-elements */
.electro-shop-content-area ul.products::before,
.electro-shop-content-area ul.products::after {
    display: none !important;
}

.electro-shop-content-area ul.products li.product {
    background: #fff;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box;
    border-radius: 0;
}

.electro-shop-content-area ul.products li.product:hover {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    z-index: 10;
    border-color: transparent;
}

.electro-shop-content-area ul.products li.product img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: contain;
    /* show the full image — no cropping */
    object-position: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    background: transparent;
}

/* Ensure the WooCommerce anchor wrapping the thumbnail does not clip */
.electro-shop-content-area ul.products li.product a img,
.electro-shop-content-area ul.products li.product .woocommerce-LoopProduct-link img {
    overflow: visible;
}

.electro-shop-content-area ul.products li.product a:has(img),
.electro-shop-content-area ul.products li.product .woocommerce-LoopProduct-link {
    display: block;
    overflow: visible;
}

.electro-shop-content-area ul.products li.product:hover img {
    transform: scale(1.08);
}

.electro-shop-content-area ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 0 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
}

/* --- Loading Overlay --- */
.electro-shop-wrapper {
    position: relative;
    min-height: 500px;
}

.electro-shop-wrapper.electro-loading::before {
    content: '';
    position: absolute;
    top: 200px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(4, 110, 169, 0.2);
    border-radius: 50%;
    border-top-color: #046EA9;
    animation: spin 0.8s ease-in-out infinite;
    z-index: 100;
}

@keyframes spin {
    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

.electro-shop-content-area ul.products li.product .price {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    display: block;
    margin-top: 10px;
}

.electro-shop-content-area ul.products li.product .button {
    display: none;
    /* Hide Add to Cart */
}

/* --- Mobile / Responsive Helpers --- */
/* By default, hide mobile triggers on Desktop */
.electro-shop-mobile-toggle {
    display: none;
}

.electro-shop-mobile-header {
    display: none;
}

@media (max-width: 1024px) {
    .electro-shop-wrapper {
        grid-template-columns: 1fr;
    }

    .electro-shop-content-area ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile Sidebar */
    .electro-shop-sidebar-area {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100%;
        background: #fff;
        z-index: 9999;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
        padding: 25px;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    .electro-shop-sidebar-area.active {
        left: 0;
    }

    /* Show Mobile Headers */
    .electro-shop-mobile-header {
        display: block;
        margin-bottom: 20px;
    }

    .electro-mobile-filter-close {
        background: #D32F2F;
        color: #fff;
        border: none;
        padding: 8px 15px;
        border-radius: 4px;
        font-weight: 600;
        cursor: pointer;
    }

    .electro-shop-mobile-toggle {
        display: block;
        margin-bottom: 25px;
    }

    .electro-shop-mobile-toggle button {
        width: 100%;
        background: #f8f8f8;
        border: 1px solid #ddd;
        padding: 12px;
        font-weight: 700;
        text-transform: uppercase;
        color: #333;
        display: flex;
        justify-content: center;
        gap: 10px;
        cursor: pointer;
    }
}

/* --- Load More Button --- */
.electro-load-more-wrapper {
    text-align: center;
    padding: 40px 20px;
    margin-top: 20px;
}

.electro-load-more-btn {
    background: #046EA9;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(4, 110, 169, 0.2);
    position: relative;
    min-width: 200px;
}

.electro-load-more-btn:hover {
    background: #035a8a;
    box-shadow: 0 4px 12px rgba(4, 110, 169, 0.3);
    transform: translateY(-2px);
}

.electro-load-more-btn:active {
    transform: translateY(0);
}

.electro-load-more-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.electro-load-more-btn .btn-loader {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.electro-load-more-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* --- NEW Badge --- */
.electro-new-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 5;
    pointer-events: none;
}

.electro-new-badge img {
    width: 60px !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
}