/* Isolated App Container */
.of-filter-app {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
    background: transparent !important;
    clear: both;
}

.of-filter-app * {
    box-sizing: border-box;
}

/* Sidebar Column */
.of-filter-app .filter-sidebar-column {
    flex: 0 0 250px;
    max-width: 250px;
}

/* Products Column */
.of-filter-app .products-grid-column {
    flex: 1;
    min-width: 0;
}

/* Sidebar UI - Desktop (Borders Removed) */
.of-filter-app .custom-category-filter-wrapper {
    background: transparent; 
}

.of-filter-app .filter-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #111827;
    padding-bottom: 8px;
    line-height: 1.2;
}

.of-filter-app .custom-cat-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.of-filter-app .custom-cat-filter-list .cat-item {
    margin-bottom: 6px;
}

.of-filter-app .custom-cat-filter-list .filter-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.of-filter-app .custom-cat-filter-list .filter-btn:hover,
.of-filter-app .custom-cat-filter-list .cat-item.active .filter-btn {
    background: rgba(6, 209, 27, 0.08);
    border-color: #06D11B;
    color: #06D11B;
    font-weight: 600;
}

.of-filter-app .custom-cat-filter-list .count {
    font-size: 11px;
    color: #6b7280;
}

/* Products Grid Layout - 4 Columns Desktop */
.of-filter-app .custom-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.of-filter-app .custom-product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.of-filter-app .custom-product-card:hover {
    transform: translateY(-2px);
}

.of-filter-app .product-image-wrapper {
    background: #f9fafb;
    padding: 15px;
    text-align: center;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.of-filter-app .product-image-wrapper img {
    max-height: 150px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.of-filter-app .product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.of-filter-app .product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.3;
    text-align: center;
}

.of-filter-app .product-title a {
    color: #111827;
    text-decoration: none;
    box-shadow: none;
}

.of-filter-app .view-product-btn {
    display: block;
    text-align: center;
    background: #111;
    color: #ffffff !important;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.of-filter-app .view-product-btn:hover {
    background: #05b217;
}

/* Responsiveness */
@media (max-width: 1199px) {
    .of-filter-app .custom-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .of-filter-app .custom-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MOBILE VIEW - HORIZONTAL SCROLL SLIDER & 2 PRODUCTS PER ROW */
@media (max-width: 768px) {
    .of-filter-app {
        flex-direction: column;
        gap: 15px;
    }
    
    .of-filter-app .filter-sidebar-column {
        width: 100%;
        max-width: 100%;
        flex: none;
    }
    
    /* Mobile par Border, Radius, aur Padding wapas add kar di */
    .of-filter-app .custom-category-filter-wrapper {
        background: #ffffff;
        border: 1px solid #e5e7eb; 
        border-radius: 10px; 
        padding: 10px;
    }

    .of-filter-app .filter-header {
        display: none;
    }

    /* Slider Container */
    .of-filter-app .custom-cat-filter-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 5px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .of-filter-app .custom-cat-filter-list::-webkit-scrollbar {
        display: none;
    }

    .of-filter-app .custom-cat-filter-list .cat-item {
        margin-bottom: 0;
        flex: 0 0 auto;
    }

    .of-filter-app .custom-cat-filter-list .filter-btn {
        width: auto;
        padding: 8px 16px;
        border-radius: 30px;
        white-space: nowrap;
        justify-content: center;
        gap: 8px;
    }

    /* Strict 2 Products Per Row for Mobile */
    .of-filter-app .custom-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px; /* Mobile par grid items ke beech ka gap */
    }
    
    /* Mobile product card scaling adjustments */
    .of-filter-app .product-image-wrapper {
        height: 130px;
        padding: 10px;
    }
    .of-filter-app .product-image-wrapper img {
        max-height: 110px;
    }
    .of-filter-app .product-info {
        padding: 10px;
    }
    .of-filter-app .product-title {
        font-size: 12px;
        margin: 0 0 8px 0;
    }
    .of-filter-app .view-product-btn {
        font-size: 11px;
        padding: 6px 8px;
    }
}