/* ========================================================
   SEARCH RESULTS (CATEGORY PAGE)
   Card component styles are in core.css (Global Card System).
   This file only handles page-specific theming/layout.
   ======================================================== */
.ail-taxonomy-page {
    background: #f8fafc;
    min-height: auto;
}

/* Navigation Paginator */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.pagination .nav-links {
    display: flex;
    gap: 10px;
}

.pagination a, .pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.pagination span.current {
    background: #0f172a;
    color: #fff;
}


/* Autocomplete styles moved to core.css */


/* ========================================================
   SMART FILTER SIDEBAR (Desktop vs Mobile Bottom-Sheet)
   ======================================================== */
.ail-floating-filter-btn {
    display: none !important;
}
.ail-search-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}
.ail-search-sidebar .ail-sheet-handle,
.ail-search-sidebar .ail-sheet-close-btn {
    display: none;
}

@media (max-width: 991px) {
    .ail-search-layout {
        flex-direction: column !important;
        gap: 0 !important;
    }
    .ail-search-sidebar {
        display: none; /* Hide static version natively */
    }
    
    .ail-floating-filter-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: fixed;
        bottom: calc(85px + env(safe-area-inset-bottom, 0px)); /* Sits above the Mobile Bottom Nav */
        left: 50%;
        transform: translateX(-50%);
        background: var(--primary-color);
        color: #fff;
        border: none;
        padding: 12px 24px;
        border-radius: 30px;
        font-weight: 700;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        z-index: 8888;
        cursor: pointer;
    }
    
    /* Bottom Sheet State */
    .ail-search-sidebar.ail-sheet-active {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 85vh;
        z-index: 10000;
        background: #fff;
        border-radius: 24px 24px 0 0;
        padding: 20px;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
        animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        flex: none !important;
    }
    
    .ail-search-sidebar.ail-sheet-active .ail-sheet-handle,
    .ail-search-sidebar.ail-sheet-active .ail-sheet-close-btn {
        display: block;
    }
}


/* ========================================================
   2. FIX: Location Search Autocomplete Dropdown (Z-Index)
   ======================================================== */
.ui-autocomplete, 
.ui-menu, 
.ui-widget-content, 
.select2-container, 
.select2-dropdown, 
.chosen-container, 
.chosen-drop,
.lp-search-results {
    z-index: 2147483647 !important; /* Sabse upar laane ke liye */
    position: absolute !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Ensure ki main search container dropdown ko hide na kare */
.lp-search-bar-all, 
.lp-search-bar, 
.header-search, 
.form-group, 
.header-container,
.lp-home-banner-contianer {
    overflow: visible !important;
}

/* Location list items hover styling */
.ui-autocomplete .ui-menu-item, 
.ui-autocomplete .ui-menu-item a {
    padding: 10px 15px !important;
    font-size: 14px !important;
    color: #333 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.ui-autocomplete .ui-menu-item:hover, 
.ui-autocomplete .ui-menu-item a:hover {
    background: #f8f9fa !important;
    color: #667eea !important;
}

/* Badge integration styles are in core.css (Global Card System) */

/* ========================================================
   PREMIUM CATEGORY GRID & CARDS (Horizontal Layout)
   ======================================================== */
.ail-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .ail-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ail-category-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.ail-cat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    text-decoration: none;
    transition: all .25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
    color: #0f172a;
    box-sizing: border-box;
}

@media (hover: hover) and (pointer: fine) {
    .ail-cat-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0,0,0,.08);
        border-color: rgba(0, 0, 0, 0.08);
    }
}

.ail-cat-icon {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color, #6C3BFF);
    flex-shrink: 0;
    background: transparent;
}
@media (max-width: 1024px) {
    .ail-cat-icon {
        width: 68px;
        height: 68px;
    }
}
@media (max-width: 768px) {
    .ail-cat-icon {
        width: 64px;
        height: 64px;
    }
}
.ail-cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ail-cat-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.ail-cat-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.ail-cat-count {
    font-size: 13px;
    color: #94a3b8;
    opacity: .7;
    margin-top: 4px;
}
