/* Modern Layout CSS */

:root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --primary-gradient: linear-gradient(135deg, #FF6B00 0%, #ff8f40 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --text-main: #2d3436;
    --text-muted: #636e72;
}

/* Base Adjustments */
body {
    padding-top: 80px;
    /* Offset for fixed header */
}

/* =========================================
   Glassmorphism Header
   ========================================= */
.header-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--glass-shadow);
}

.modern-main-navbar {
    padding: 10px 0;
}

.modern-navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.modern-logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.modern-logo:hover img {
    transform: scale(1.05);
}

/* Desktop Navigation */
.desktop-only .nav-link {
    font-weight: 600;
    color: var(--text-main);
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color 0.3s ease;
}

.desktop-only .nav-link:hover,
.desktop-only .nav-link.active {
    color: var(--color-primary);
}

.desktop-only .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.desktop-only .nav-link:hover::after,
.desktop-only .nav-link.active::after {
    width: 80%;
}

/* Dropdown Menu */
.desktop-only .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    background: white;
    margin-top: 15px;
    padding: 15px;
    min-width: 220px;
    animation: slideUp 0.3s ease forwards;
}

.desktop-only .dropdown-item {
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.desktop-only .dropdown-item:hover {
    background: rgba(255, 107, 0, 0.08);
    /* Primary color low opacity */
    color: var(--color-primary);
    transform: translateX(5px);
}

/* Action Buttons */
.modern-action-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-trigger-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.search-trigger-btn span {
    font-size: 0.95rem;
}

.search-trigger-btn:hover {
    color: var(--color-primary);
}

.btn-add-listing {
    background: var(--primary-gradient);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-add-listing:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
    color: white;
}

.btn-login-outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-login-outline:hover {
    background: var(--color-primary);
    color: white;
}

/* Auth User Dropdown */
.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-auth {
    padding: 0;
    border: none;
    background: transparent;
}

.btn-auth::after {
    display: none;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: none;
    /* JS will toggle this */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.close-search-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.search-overlay-content {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.search-inputs-group {
    display: flex;
    background: #f1f3f5;
    padding: 10px;
    border-radius: 60px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.search-inputs-group .input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.search-inputs-group i {
    color: var(--color-primary);
    margin-right: 15px;
    font-size: 1.2rem;
}

.search-inputs-group input {
    border: none;
    background: transparent;
    width: 100%;
    height: 50px;
    font-size: 1.1rem;
    outline: none;
}

.search-inputs-group .divider {
    width: 1px;
    background: #dde1e7;
    height: 40px;
    margin: auto 0;
}

.search-btn {
    border-radius: 50px;
    padding: 0 40px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* =========================================
   Modern Footer
   ========================================= */
.footer-modern {
    background: #f9f9f9;
    position: relative;
    padding-top: 50px;
}

.footer-modern.bg-dark-gradient {
    background: #111;
    color: #b0b0b0;
}

.footer-newsletter-section {
    background: var(--primary-gradient);
    border-radius: 20px;
    padding: 50px;
    margin: -100px auto 50px;
    position: relative;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 20px 50px rgba(255, 107, 0, 0.25);
    z-index: 10;
}

.newsletter-content h3 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.subscription-form .input-group {
    background: white;
    padding: 8px;
    border-radius: 50px;
}

.subscription-form input {
    border: none;
    padding: 10px 20px;
    height: auto;
    font-size: 1.1rem;
    background: transparent;
}

.subscription-form input:focus {
    box-shadow: none;
    background: transparent;
}

.subscription-form button {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
}

/* Footer Widgets */
.footer-widget .widget-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-widget .widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.company-desc {
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-btn:hover {
    background: var(--color-primary);
    transform: translateY(-3px);
    color: white;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #b0b0b0;
    transition: all 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

.contact-info-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-info-list .icon {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-info-list .text {
    line-height: 1.6;
}

.contact-info-list a {
    color: white;
    font-weight: 500;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright-text {
    margin: 0;
    color: #888;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-toggles {
        display: flex;
        gap: 20px;
    }

    .mobile-toggles button {
        background: transparent;
        border: none;
        font-size: 1.5rem;
        color: var(--text-main);
    }

    .footer-newsletter-section {
        margin-top: 0;
        width: 100%;
        border-radius: 0;
        padding: 40px 20px;
    }

    .newsletter-content {
        text-align: center;
        margin-bottom: 20px;
    }

    .search-inputs-group {
        flex-direction: column;
        border-radius: 20px;
        background: transparent;
        box-shadow: none;
        gap: 15px;
    }

    .search-inputs-group .input-wrap {
        background: white;
        border-radius: 12px;
        padding: 5px 15px;
    }

    .search-inputs-group .divider {
        display: none;
    }
}

/* Mobile Side Menu */
.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 2000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-sidebar.active {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.mobile-menu-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   Banner Search Modern
   ========================================= */
.hero-search-wrapper {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-search-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-search-inner {
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: visible;
    /* Changed from hidden to visible for Select2 dropdowns */
    position: relative;
}

.hero-search-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 70px;
    position: relative;
}

.hero-search-group i {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.hero-search-input {
    border: none !important;
    background: transparent !important;
    height: 100% !important;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
    width: 100%;
    padding: 0 !important;
    box-shadow: none !important;
}

.hero-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.hero-search-divider {
    width: 1px;
    height: 40px;
    background: #e0e0e0;
}

.hero-ai-btn {
    background: linear-gradient(135deg, #FF6B00 0%, #ff4757 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border: none;
    background-color: rgba(255, 107, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: -5px;
}

.hero-ai-btn:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: rgba(255, 107, 0, 0.15);
}

.hero-search-submit {
    background: var(--primary-gradient);
    color: white;
    border: none;
    height: 60px;
    padding: 0 35px;
    border-radius: 10px;
    margin: 5px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.hero-search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

/* Select2 overrides for Banner */
.hero-search-group .select2-container--default .select2-selection--single {
    border: none !important;
    height: auto !important;
    background: transparent !important;
}

.hero-search-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-main) !important;
    font-weight: 500;
    font-size: 1.05rem;
    padding-left: 0 !important;
    line-height: normal !important;
}

.hero-search-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

/* Specific Field Widths */
.hero-search-group.title-group {
    flex: 1.5;
}

.hero-search-group.category-group {
    flex: 0.8;
}

.hero-search-group.location-group {
    flex: 1;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-search-inner {
        flex-direction: column;
        height: auto;
        padding: 5px;
        background: transparent;
        box-shadow: none;
        gap: 10px;
    }

    .hero-search-group {
        width: 100%;
        background: white;
        border-radius: 10px;
        height: 60px;
        margin-bottom: 0;
    }

    .hero-search-divider {
        display: none;
    }

    .hero-search-submit {
        width: 100%;
        margin: 5px 0 0 0;
        justify-content: center;
    }

    .hero-search-wrapper {
        padding: 10px;
    }
}

/* =========================================
   Listing Page Styling
   ========================================= */

/* Sidebar Widgets */
.widget-area .widget {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 24px;
}

.widget-area .widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.widget-area .widget .title {
    padding: 0;
    margin: 0;
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.widget-area .accordion-button {
    background: transparent;
    padding: 20px 24px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.05rem;
    box-shadow: none;
}

.widget-area .accordion-button:not(.collapsed) {
    background: rgba(255, 107, 0, 0.03);
    color: var(--color-primary);
}

.widget-area .accordion-button::after {
    background-size: 14px;
    transition: transform 0.3s ease;
}

.widget-area .accordion-body {
    padding: 20px 24px;
}

/* Filter Chips (Categories) */
.filter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    text-decoration: none;
}

.filter-chip i {
    font-size: 1rem;
    color: var(--color-primary);
}

.filter-chip:hover {
    background: #fdfdfd;
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.2);
}

.filter-chip.active i {
    color: white;
}

/* Sidebar List Items */
.widget-area .list-group-item, 
.widget-area li {
    border: none;
    padding: 8px 0;
    font-size: 0.95rem;
}

.widget-area a.category-toggle {
    display: block;
    color: var(--text-muted);
    transition: all 0.2s;
    padding: 4px 0;
    text-decoration: none;
}

.widget-area a.category-toggle:hover,
.widget-area li.open a.category-toggle {
    color: var(--color-primary);
    transform: translateX(5px);
    font-weight: 500;
}

/* Custom Checkboxes & Radios */
.input-checkbox, .input-radio {
    accent-color: var(--color-primary);
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

.form-check-label, .form-radio-label {
    cursor: pointer;
    font-weight: 400;
    color: var(--text-main);
}

/* Price Range Slider Styling */
.noUi-connect {
    background: var(--color-primary);
}

.noUi-handle {
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: grab;
}

.noUi-handle::before, .noUi-handle::after {
    display: none;
}

/* Pagination Styling */
.pagination {
    gap: 8px;
}

.pagination .page-item .page-link {
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-main);
    font-weight: 600;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin: 0;
}

.pagination .page-item .page-link:hover {
    background: #f8f9fa;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

/* No Listing Found State */
.empty-state-card {
    background: #fff;
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    border: 1px dashed #e0e0e0;
    margin-bottom: 30px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 107, 0, 0.08);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.empty-state-text {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 1.05rem;
}

.empty-state-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
}

/* Broad Search Alert */
.broad-search-alert {
    background: #ecf0f1;
    border-left: 4px solid var(--color-primary);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.broad-search-alert i {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-top: 2px;
}

.broad-search-alert p {
    margin: 0;
    color: var(--text-main);
    font-weight: 500;
}

.product-sort-area {
    background: transparent;
    padding-bottom: 20px;
}

#select_sort {
    border-radius: 50px;
    padding: 0 40px 0 20px;
    border: 1px solid #eee;
    background-color: #fff;
    height: 45px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    cursor: pointer;
    min-width: 220px;
}

#select_sort:focus {
    border-color: var(--color-primary);
    outline: none;
}
