/* ==========================================================================
   CUSTOM STYLES - CLEANED UP VERSION
   ========================================================================== */

/* Base Styles */
.app-header {
    height: auto !important;
}

body.modal-open {
    overflow: hidden !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE STYLES
   ========================================================================== */

/* Tablet and Mobile (max-width: 991.98px) */
@media (max-width: 991.98px) {
    /* Header and Navigation */
    .app-header {
        position: relative !important;
        z-index: 1002;
    }
    
    .app-header .container-fluid {
        padding-bottom: 15px;
    }
    
    .header .logo {
        margin: 0;
    }
    
    .header .header_cont .main_dropdown {
        position: relative;
        top: 0;
        left: 0;
    }
    
    /* Sub Header */
    .sub_header {
        position: relative;
        z-index: 1001;
    }
    
    .sub_header .container {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .sub_header span {
        flex: 1;
        text-align: center;
    }
    
    .sub_header span.seperate {
        display: none;
    }
    
    .sub_header span a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        font-size: 0;
        line-height: 0;
        color: transparent;
    }
    
    .sub_header span a img.icon-preview {
        display: block;
        margin: 0 auto;
        width: 24px;
        height: 24px;
    }
    
    /* Breaking News */
    .breaking_news {
        position: relative;
        z-index: 1000;
        margin-bottom: 0;
    }
    
    /* Content and Layout */
    .app-body {
        margin-top: 0;
    }
    
    .content {
        position: relative;
        z-index: 1;
        padding-top: 15px !important;
        margin-top: 0;
    }
    
    .search-form {
        width: 100% !important;
    }

    .search-results .results .title { 
        font-size: 1.35rem;
        padding-top: 20px;
        padding-left: 20px;
    }

    .search-results > div:nth-of-type(1) {
        display: flex;
        justify-content: center;
        position: relative;
        border-left: none !important;
        margin: 0 !important;
    }

    .product-container {
        border-left: 1px solid #f0f3f5;
    }

    .form-group select.form-control {
        width: 100% !important;
    }

    .form-group .search-input {
        padding: 0 15px 0 55px !important;
    }

    li[data-counter]:after {
        display: none;
    }

    body {
        overflow-x: hidden;
    }
    
    /* Filter Modal Styles */
  /*  .sidenav.filter_box,
    .sidenav.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 1050 !important;
        background: white !important;
        transform: translateX(0) !important;
        overflow-y: auto !important;
    }
    
    .sidenav.filter_box .filter_blocks,
    .sidenav.filter_box .filter_header,
    .sidenav.filter_box .filter_body,
    .sidenav.filter_box .filter_card,
    .sidenav.active .filter_blocks,
    .sidenav.active .filter_header,
    .sidenav.active .filter_body,
    .sidenav.active .filter_card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .sidenav.filter_box .filter_header,
    .sidenav.active .filter_header {
        position: sticky !important;
        top: 0 !important;
        background: white !important;
        z-index: 1051 !important;
    }
    
    .sidenav.filter_box .filter_blocks *,
    .sidenav.active .filter_blocks * {
        visibility: visible !important;
    }
    
    .sidenav.filter_box .close_btn,
    .sidenav.active .close_btn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 1052 !important;
    }
    
    .sidenav.filter_box .block.sort,
    .sidenav.active .block.sort {
        display: none !important;
    }
    
    /* Sort Dropdown Styles */
    .sidenav.sort_by {
        position: relative;
        background: transparent;
        transform: none;
        width: auto;
        height: auto;
        z-index: auto;
        overflow: visible;
        display: block !important;
        padding: 0;
        transition: none;
        animation: none;
    }
    
    .sidenav.sort_by .filter_blocks {
        display: none !important;
    }
 
    .sidenav.sort_by .block.sort {
        display: block !important;
        visibility: visible;
        opacity: 1;
        /* position: absolute; */
        left: 0;
        right: 0;
        background: #F5F8FC;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        max-width: 100%;
        transition: none;
        animation: none;
        transform: none;
    }
    
    .sidenav.sort_by .block.sort ul {
        list-style: none;
        padding: 0;
        margin: 0;
        transition: none;
        animation: none;
    }
    
    .sidenav.sort_by .block.sort ul li {
        padding: 0;
        margin: 0;
        border-bottom: 1px solid #eee;
        transition: none;
        animation: none;
    }
    
    .sidenav.sort_by .block.sort ul li:last-child {
        border-bottom: none;
    }
    
    .sidenav.sort_by .block.sort ul li a {
        display: block;
        text-decoration: none;
        color: #333;
        font-size: 13px;
        font-weight: normal;
        padding: 7px 0;
        line-height: 1.4;
        transition: none;
        animation: none;
        transform: none;
    }
    
    .sidenav.sort_by .block.sort ul li a.active {
        color: #ff1e00;
        font-weight: 500;
    }
    
    .sidenav.sort_by .block.sort ul li a:hover {
        color: #ff1e00;
        background-color: #f8f9fa;
    }
    
    .sidenav.sort_by ~ .dropback {
        display: none !important;
    } 
    
    
    /* Layout Positioning */
    .left-side,
    .left-side .navbar {
        position: relative;
    }
}

/* Small Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .sub_header span a img.icon-preview {
        width: 20px;
        height: 20px;
    }
    
    .sub_header .container {
        padding: 8px 0;
    }
    
    .breaking_news {
        padding: 10px 15px;
        min-height: auto;
    }
    
    .content {
        padding-top: 10px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .section {
        margin-top: 15px;
    }


    .slider.coupons_slider .swiper-slide.block  {
        max-width: 140px;
    }
    
    .slider_section {
        margin-right: 0px;
    }
} 

/* ==========================================================================
   SEARCH RESULTS MOBILE NAVIGATION AND FILTER STYLES (moved from inline)
   ========================================================================== */

/* Mobile-only Navigation Styles */
.mobile-dropback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.mobile-dropback.show {
    display: block;
}

.mobile-sidenav {
    display: none;
}

/* Only show mobile navigation on mobile devices */
@media (max-width: 768px) {
    .mobile-dropback {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
    }
    
    .mobile-dropback.show {
        display: block;
    }
   
    .mobile-sidenav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background-color: #fff;
        z-index: 1301;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 0;
        box-shadow: none;
        display: block;
    }
    
    .mobile-sidenav.show {
        left: 0;
    }
    
    .mobile-sidenav .back {
        display: block;
        padding: 16px 20px;
        color: #007bff;
        text-decoration: none;
        font-weight: 500;
        font-size: 14px;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mobile-sidenav .back:hover {
        color: #0056b3;
        background-color: #f8f9fa;
    }
   
    .mobile-filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 16px;
        border-bottom: 1px solid #e0e0e0;
        background-color: #fff;
    }
    
    .mobile-filter-header span {
        font-weight: 600;
        font-size: 18px;
        color: #6f42c1;
        text-transform: none;
        letter-spacing: 0;
    }
    
    .mobile-close-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        font-size: 20px;
        color: #666;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-close-btn:hover {
        color: #333;
    }
    
    .mobile-filter-card {
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-filter-card-header {
        padding: 16px;
        background-color: #fff;
        font-weight: 500;
        font-size: 16px;
        cursor: pointer;
        color: #333;
        text-transform: none;
        letter-spacing: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-toggle-icon {
        font-size: 16px;
        color: #007bff;
        font-weight: bold;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-filter-card.collapsed .mobile-filter-card-body {
        display: none;
    }
    
    .mobile-filter-card-body {
        padding: 0 20px 20px 20px;
    }
    
    .mobile-filter-search {
        width: 100%;
        padding: 8px 12px;
        margin-bottom: 12px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        background-color: #fff;
    }
    
    .mobile-filter-search:focus {
        outline: none;
        border-color: #007bff;
    }
    
    .mobile-filter-list {
        list-style: none;
        padding: 0;
        margin: 0;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .mobile-filter-list li {
        padding: 0;
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-filter-list li:last-child {
        border-bottom: none;
    }
    
    .mobile-check-label {
        display: flex;
        align-items: flex-start;
        cursor: pointer;
        padding: 12px 0;
        font-size: 14px;
        color: #333;
        line-height: 1.4;
        width: 100%;
        position: relative;
    }
    
    .mobile-check-label:hover {
        background-color: #f8f9fa;
    }
    
    .mobile-check-label input[type="checkbox"] {
        margin-right: 12px;
        margin-top: 2px;
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        accent-color: #007bff;
    }
    
    .mobile-filter-counter {
        margin-left: auto;
        color: #666;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        flex-shrink: 0;
        padding-left: 8px;
    }
    
    /* Additional mobile filter improvements */
    .mobile-check-label .mobile-filter-counter {
        min-width: fit-content;
    }
    
    .mobile-check-label > span {
        flex: 1;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .mobile-filter-search {
        width: 100%;
        padding: 12px 16px;
        margin-bottom: 16px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        background-color: #fff;
        box-sizing: border-box;
    }
    
    .mobile-selected {
        margin: 16px 20px;
        padding: 16px;
        background-color: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
        display: none;
    }
    
    .mobile-selected span {
        font-weight: 600;
        font-size: 14px;
        color: #666;
        display: block;
        margin-bottom: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mobile-selected ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-selected li {
        padding: 8px 0;
        color: #333;
        font-size: 14px;
        border-bottom: 1px solid #e9ecef;
    }
    
    .mobile-selected li:last-child {
        border-bottom: none;
    }
    
    .mobile-filter-footer {
        padding: 16px;
        border-top: 1px solid #e0e0e0;
        text-align: center;
        background-color: #fff;
    }
    
    .mobile-filter-footer button {
        background-color: #e9ecef;
        color: #333;
        border: none;
        padding: 10px 32px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        text-transform: none;
        letter-spacing: 0;
        transition: background-color 0.2s;
    }
    
    .mobile-filter-footer button:hover {
        background-color: #dee2e6;
    }
    
    .mobile-filter-footer button.disabled {
        background-color: #e9ecef;
        color: #6c757d;
        cursor: not-allowed;
    }
    
    .mobile-filter-footer button.disabled:hover {
        background-color: #e9ecef;
    }
    
    .mobile-price-range {
        margin-bottom: 15px;
    }
    
    .mobile-price-range input {
        width: 100%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    .mobile-apply button {
        background-color: #007bff;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 4px;
        cursor: pointer;
        width: 100%;
    }
    
    .mobile-apply button:hover {
        background-color: #0056b3;
    }
    
    body.mobile-modal-open {
        overflow: hidden;
    }
}

/* Ensure full width on all mobile devices */
@media (max-width: 768px) {
    .mobile-sidenav {
        width: 100vw;
        height: 100vh;
    }
}

/* Results Count Styles */
.results-count {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-right: 20px;
    line-height: 40px;
}

/* Dropdown Styles */
.sort-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 220px;
    margin-top: 2px;
}

.sort-dropdown.show {
    display: block;
}

.dropdown-content {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.dropdown-header {
    display: none;
}

.dropdown-list {
    padding: 0;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.dropdown-item.active {
    background-color: #f8f9fa;
    color: #007bff;
    font-weight: 500;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 0;
}

/* Add dropdown arrow indicator */
.sort_btn::after {
    content: ' ▼';
    font-size: 10px;
    margin-left: 5px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.sort_btn.active::after,
.sort-dropdown.show + .sort_btn::after {
    transform: rotate(180deg);
}

/* ==========================================================================
   ADDITIONAL UTILITY CLASSES (replacing inline styles)
   ========================================================================== */

/* Position utility classes */
.navbar {
    position: relative;
}

.group_btns {
    position: relative;
}

.sort-dropdown-container {
    position: relative;
    display: inline-block;
    margin-top: 8px;
}

/* Pagination utility classes */
.page-link-prev {
    width: 60px;
}

.page-link-next {
    width: 40px;
}

/* Cookie button styles */
.cookie-manage-btn {
    color: #fff;
}

/* Additional dropdown fixes */
.sort_btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    position: relative;
}

.sort_btn:focus {
    outline: none;
}

.sort_btn:hover {
    color: #007bff;
}

/* Fix for dropdown positioning issues */
.sort-dropdown-container {
    position: relative !important;
    display: inline-block !important;
    margin-top: 8px !important;
}

/* Ensure dropdown content is properly styled */
.sort-dropdown .dropdown-content {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
}

/* Fix for any conflicts with existing styles */
.dropdown-item {
    display: block !important;
    padding: 12px 16px !important;
    color: #333 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 14px !important;
    transition: background-color 0.2s !important;
    white-space: nowrap !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #007bff !important;
    text-decoration: none !important;
}

.dropdown-item.active {
    background-color: #f8f9fa !important;
    color: #007bff !important;
    font-weight: 500 !important;
} 
