/* Custom overrides for Bootstrap can go here. */

/* Global Roboto Font for entire system - Optimized with font-display: swap */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

/* Import Roboto Black specifically for SVG logo */
@font-face {
  font-family: 'Roboto-Black';
  src: url('https://fonts.googleapis.com/css2?family=Roboto:wght@900&display=swap');
  font-weight: 900;
  font-display: swap;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    background-color: #ffffff;
}

/* Override Bootstrap light background to pure white for clean canvas */
.bg-light,
.text-bg-light {
    --bs-bg-opacity: 1 !important;
    background-color: #ffffff !important;
    color: #1d283a !important;
}

/* Global Container - Consistent max-width across all pages */
.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 12px;
}

/* Headings keep appropriate weights */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

/* Bootstrap buttons and components */
.btn {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

/* Example:
body {
    font-family: 'Your-Custom-Font', sans-serif;
}
*/ 

/* Modern Navbar Styles */
.navbar-modern {
    background: #1d283a;
    backdrop-filter: blur(10px);
    border: none !important;
    padding: 20px 0;
    transition: all 0.3s ease;
    border-radius: 0 !important;
}

.navbar-modern .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.navbar-modern .nav-link i {
    color: inherit;
    transition: inherit;
}

.navbar-modern .nav-link:hover,
.navbar-modern .nav-link:focus {
    color: #ffffff !important;
}

.navbar-modern .favorites-link {
    padding-right: 0.75rem !important;
}

.mobile-quick-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 70%;
}

.mobile-user-dropdown {
    position: relative;
}

.quick-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    appearance: none;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.quick-btn:hover,
.quick-btn:focus {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.quick-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.quick-btn.active {
    background: #ffffff;
    color: #1e3a8a;
    border-color: #ffffff;
}

.quick-btn i {
    font-size: 1rem;
}

.mobile-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    padding: 0 3px;
    border-radius: 10px;
    display: none;
    line-height: 1.2;
}

@media (min-width: 992px) {
    .mobile-quick-actions {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-toggler {
        display: none;
    }

    .mobile-user-dropdown .dropdown-menu {
        position: absolute;
        right: 0;
        left: auto;
        margin-top: 8px;
    }
}

.navbar-modern:hover {
    
}

/* Brand Styling */
.brand-text {
    color: #ffffff !important;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Navbar Logo */
.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* Logo Color Variants */
/* We now use 2 separate SVG files instead of CSS filters */
/* buysellcy.svg - White + Orange (for dark backgrounds) */
/* buysellcy-dark.svg - Navy Blue + Orange (for light backgrounds) */

.logo-light {
    /* No filter needed - using correct SVG file */
}

.logo-dark {
    /* No filter needed - using correct SVG file */
}

.brand-text:hover {
    color: #f8f9fa !important;
    transform: translateY(-1px);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.brand-text i {
    color: #ffd700;
    font-size: 1.8rem;
}

/* Custom Toggle Button */
.custom-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.custom-toggler:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Search Bar Styling */
.search-container {
    max-width: 500px;
    width: 100%;
}

.search-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-group:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-icon {
    background: #1d283a;
    border: none;
    color: white;
    padding: 0.75rem 1rem;
}

.search-input {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background-color: #ffffff;
    border-radius: 8px;
}

.search-input:focus {
    box-shadow: none;
    background-color: #f8f9fa;
}

.search-btn {
    background: #f59e0b;
    color: #fff;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    box-shadow: none;
}

.search-btn:hover {
    background: #d97706;
    color: #fff;
}

.search-btn:active {
    background: #c56a05;
    color: #fff;
}

/* User Dropdown Styling */
.user-dropdown {
    color: #1d283a !important;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    background: #e2e8f0;
    border: none;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown:hover {
    background: #d7dde6;
    color: #1d283a !important;
}

.user-avatar {
    position: relative;
    display: inline-block;
}

.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.username-text {
    font-weight: 600;
    color: #ffffff;
}

/* Modern Dropdown Menu */
.modern-dropdown {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 250px;
    overflow: hidden;
}

/* Fix user dropdown header alignment */
.modern-dropdown .dropdown-header {
    padding: 0.85rem 1.2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px 10px 0 0;
    margin: 0;
    /* Remove negative margins */
    box-shadow: none;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f1f1;
}

.modern-dropdown .dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px !important;
    object-fit: cover;
    border: 2px solid #dee2e6;
    flex-shrink: 0;
}

.modern-dropdown .dropdown-header .ms-2 {
    margin-left: 0.75rem !important;
}

.modern-dropdown .dropdown-header .fw-bold {
    font-size: 1rem;
    color: #333;
}

.modern-dropdown .dropdown-header small {
    color: #888;
    font-size: 0.85rem;
}

/* Make sure dropdown-header and dropdown-item have same width and border radius */
.modern-dropdown .dropdown-header,
.modern-dropdown .dropdown-item {
    width: 100%;
    box-sizing: border-box;
}

.modern-dropdown .dropdown-item {
    padding: 0.65rem 1.2rem;
    color: #495057;
    transition: all 0.3s ease;
    border-radius: 0 !important;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    background: transparent;
    font-size: 0.97rem;
}

.modern-dropdown .dropdown-item:hover, .modern-dropdown .dropdown-item:focus {
    background: #1d283a !important;
    color: white !important;
    transform: none;
    border-radius: 0 !important;
    box-shadow: none;
    z-index: 2;
    opacity: 0.95;
}

.modern-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Login/Register Buttons */
.login-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.55rem 1.2rem;
    border-radius: 12px !important;
    transition: all 0.3s ease;
}

.login-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.register-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-radius: 12px !important;
    padding: 0.55rem 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.register-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Post Ad Button */
.post-ad-btn {
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 8px !important;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.post-ad-btn::before {
    content: none;
}

.post-ad-btn:hover {
    background: #d97706;
    color: #fff;
}

.post-ad-btn:active {
    background: #c56a05;
    color: #fff;
    transform: none;
}

/* Modern Footer Styles */
.footer-modern {
    background: #1d283a;
    color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.footer-main {
    padding: 4rem 0 2rem;
    position: relative;
    z-index: 1;
}

.footer-section {
    margin-bottom: 2rem;
}

/* Footer Brand */
.footer-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-brand i {
    color: #f59e0b;
    font-size: 2rem;
    margin-right: 0.75rem;
}

/* Footer Logo - Uses light version for dark footer background */
.footer-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    color: #f59e0b;
}

.footer-description {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #1d283a;
    color: #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.social-link:hover::before {
    left: 100%;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: none;
    color: #1d283a;
    background: #f59e0b;
}

/* Footer Titles */
.footer-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #f59e0b;
    border-radius: 1px;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
    color: #f59e0b;
}

.footer-links a:hover {
    color: #f59e0b;
    transform: translateX(15px);
}

.footer-links a:hover::before {
    opacity: 1;
}

/* Newsletter Section */
.newsletter-text {
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-form .input-group {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.newsletter-input {
    border: none;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.newsletter-input::placeholder {
    color: #bdc3c7;
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
    color: #ffffff;
}

.newsletter-btn {
    background: #f59e0b;
    border: none;
    color: white;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
}
.newsletter-btn:hover {
    background: #d97706;
    color: #fff;
}

.newsletter-btn:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: white;
    transform: translateX(2px);
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.copyright {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.footer-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.stat-item {
    color: #bdc3c7;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    color: #f59e0b;
    transform: translateY(-1px);
}

.stat-item i {
    color: #f59e0b;
    margin-right: 0.5rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #1d283a;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
    box-shadow: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #1d283a;
    transform: translateY(-3px);
    box-shadow: none;
}

.back-to-top i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .footer-main {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-stats {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .copyright {
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    .footer-main {
        padding: 2rem 0 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-stats {
        gap: 1rem;
    }
    
    .stat-item {
        font-size: 0.8rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Responsive Design for Navbar */
@media (max-width: 991.98px) {
    .navbar-modern {
        padding: 0.75rem 0;
    }
    
    .navbar-logo {
        height: 40px;
        max-width: 150px;
    }
    
    .search-container {
        margin: 1rem 0;
        max-width: 100%;
    }
    
    .user-dropdown {
        margin: 0.5rem 0;
        justify-content: center;
    }
    
    .modern-dropdown {
        margin-top: 0.25rem;
        min-width: 200px;
    }
}

/* Mobile Enhancements */
@media (max-width: 575.98px) {
    .brand-text {
        font-size: 1.25rem;
    }
    
    .brand-text i {
        font-size: 1.5rem;
    }
    
    .navbar-logo {
        height: 35px;
        max-width: 130px;
    }
    
    .post-ad-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Additional Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Loading Animation for Buttons */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Focus States for Accessibility */
.navbar-modern .nav-link:focus,
.navbar-modern .btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
} 

:root {
    --navbar-item-height: 44px;
}

/* Navbar items uniform height */
.navbar-modern .navbar-nav .nav-link,
.navbar-modern .navbar-nav .btn,
.navbar-modern .navbar-nav .user-dropdown,
.navbar-modern .navbar-nav .register-btn,
.navbar-modern .navbar-nav .login-link,
.navbar-modern .navbar-nav .post-ad-btn {
    min-height: var(--navbar-item-height);
    height: var(--navbar-item-height);
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 1rem;
    box-sizing: border-box;
}

/* User dropdown items uniform height */
.modern-dropdown .dropdown-item {
    min-height: var(--navbar-item-height);
    height: var(--navbar-item-height);
    display: flex;
    align-items: center;
    font-size: 1rem;
    padding-top: 0;
    padding-bottom: 0;
}

/* User dropdown header uniform height */
.modern-dropdown .dropdown-header {
    min-height: var(--navbar-item-height);
    height: var(--navbar-item-height);
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

/* Avatar and username alignment */
.user-avatar {
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-img, .dropdown-avatar {
    height: 32px !important;
    width: 32px !important;
    border-radius: 8px !important;
}
.username-text {
    line-height: 1;
    margin-left: 0.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

/* Search input uniform height */
.search-input {
    min-height: var(--navbar-item-height);
    height: var(--navbar-item-height);
    font-size: 1rem;
    padding-top: 0;
    padding-bottom: 0;
}

.search-btn, .search-icon {
    min-height: var(--navbar-item-height);
    height: var(--navbar-item-height);
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

/* ============================================
   FILTER BAR IMPROVEMENTS - Bazaraki Style
   ============================================ */

/* Filter Bar Main Section */
.filter-bar-section {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.filter-bar-section input,
.filter-bar-section select,
.filter-bar-section .form-select,
.filter-bar-section .form-control,
.filter-bar-section select.form-select,
.filter-bar-section select.form-select-sm {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.25rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    height: 31px;
    color: #495057;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2rem !important;
}

.filter-bar-section .form-control-sm,
.filter-bar-section .form-select-sm {
    height: 31px;
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
}

.filter-bar-section input:focus,
.filter-bar-section select:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
    outline: none;
    background: white !important;
}

.filter-bar-section .form-control::placeholder {
    color: #6c757d;
}

/* Search Button Styling - Compact */
.filter-bar-section .btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 0.25rem;
}

.filter-bar-section .btn-warning:hover {
    background: #ffb300;
    border-color: #ffb300;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.filter-bar-section .btn-warning.btn-sm {
    height: 36px;
    padding: 0.35rem 0.9rem;
    font-size: 0.875rem;
}

/* Reset Link Styling */
#reset-filters-btn {
    color: white !important;
    font-size: 0.875rem;
    transition: all 0.2s;
    text-decoration: none;
}

#reset-filters-btn:hover {
    color: #ffc107 !important;
    text-decoration: none;
}

/* List/Map View Buttons */
#listViewBtn,
#mapViewBtn {
    height: 31px;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
}

.filter-bar-section .btn-outline-light {
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    transition: all 0.2s;
}

.filter-bar-section .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
    color: white;
}

.filter-bar-section .btn-outline-light.active {
    background: white;
    border-color: white;
    color: #f59e0b;
}

/* Dropdown styling */
.filter-bar-section .dropdown-toggle {
    height: 31px;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
}

/* Results Info */
.results-info {
    font-size: 0.95rem;
}

.results-info strong {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Loading Overlay for Filters */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .filter-bar-section {
        padding: 0.5rem 0 !important;
    }
    
    .filter-bar-section .row {
        margin-bottom: 0.3rem !important;
    }
    
    .filter-bar-section input,
    .filter-bar-section select,
    .filter-bar-section .form-control-sm,
    .filter-bar-section .form-select-sm {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
        height: 28px;
    }
    
    .filter-bar-section .btn-warning {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
        height: 28px;
    }
    
    #reset-filters-btn {
        font-size: 0.8rem;
    }
    
    #listViewBtn,
    #mapViewBtn {
        height: 28px;
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 991px) {
    .filter-bar-section input,
    .filter-bar-section select {
        font-size: 0.85rem;
    }
}

/* Ensure consistent spacing */
.filter-bar-section .row.g-2 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.4rem;
}

/* Print Styles */
@media print {
    .filter-bar-section {
        display: none;
    }
}

/* ============================================
   LOCATION MODAL - Bazaraki Style
   ============================================ */

#locationModal .modal-header {
    background: #1d283a;
}

#locationModal .location-option-all:hover {
    background: #e9ecef !important;
}

.location-region-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
}

.location-region-header {
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.location-region-header:hover {
    background: #f0f0f0;
}

.location-city {
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.location-city:hover {
    background: #e9f5ff;
}

.location-city-link {
    color: #495057;
}

.location-area {
    padding: 0.2rem 0.5rem;
    transition: background 0.2s;
}

.location-area:hover {
    background: #f8f9fa;
}

.location-area-link {
    color: #6c757d;
}

/* ============================================
   CATEGORY MEGA MENU - Bazaraki Style
   ============================================ */

.category-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-main-btn {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    font-weight: 600;
    padding: 0.4rem 1rem;
    height: 36px;
    border-radius: 4px;
}

.category-main-btn:hover {
    background: #ffb300 !important;
    border-color: #ffb300 !important;
}

.category-main-btn .category-icon {
    width: 24px;
    height: 24px;
}

.category-mega-menu {
    min-width: 700px;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: none;
}

.category-group {
    margin-bottom: 0.5rem;
}

.category-group-title {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.category-group-title:hover {
    background: #f0f0f0;
    color: #000;
}

.category-sublist {
    margin: 0;
    padding-left: 0.5rem;
}

.category-subitem {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.category-subitem:hover,
.category-subitem.active {
    background: #e9f5ff;
    color: #0066cc;
}

.subcategory-btn {
    border-color: rgba(255,255,255,0.5) !important;
    color: white !important;
    font-size: 0.85rem;
}

.subcategory-btn:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* Location Button Styling */
.location-selector-btn {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
    font-size: 0.875rem;
    height: 31px;
}

.location-selector-btn:hover {
    background: #f8f9fa !important;
    border-color: #adb5bd !important;
}

/* ============================================
   ACTIVE FILTER STYLING - Bazaraki Style
   ============================================ */

.filter-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-wrapper select,
.filter-wrapper input {
    flex: 1;
    padding-right: 2rem !important;
}

.filter-wrapper.filter-active select,
.filter-wrapper.filter-active input {
    border-color: #ffc107 !important;
    border-width: 2px !important;
    background-color: #fffbeb !important;
}

.filter-wrapper select.has-value,
.filter-wrapper input.has-value {
    border-color: #ffc107 !important;
    border-width: 2px !important;
}

/* Auto-detect active filters by option selected */
.filter-bar-section select:not([value=""]):has(option:checked:not([value=""])),
.filter-bar-section select option:checked:not([value=""]) ~ option:first-of-type {
    border-color: #ffc107 !important;
}

/* For selects with selected non-empty option - yellow border */
.filter-bar-section select:focus-within,
.filter-bar-section .form-select:has(option[selected]:not([value=""])) {
    border-color: #ffc107 !important;
    border-width: 2px !important;
}

.filter-clear-btn {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #666;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    z-index: 10;
}

.filter-clear-btn:hover {
    color: #dc3545;
}

/* Reset Button - Red like Bazaraki */
#reset-filters-btn,
.reset-filters-link {
    color: #dc3545 !important;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
}

#reset-filters-btn:hover,
.reset-filters-link:hover {
    color: #c82333 !important;
    text-decoration: none;
}

/* Category Icon Button */
.category-icon-btn {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    min-height: 31px;
}

.category-icon-btn:hover {
    background: #ffb300 !important;
    border-color: #ffb300 !important;
}

/* ============================================
   CATEGORY MEGA MENU - Bazaraki Style
   ============================================ */

.category-mega-dropdown .dropdown-toggle {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    font-weight: 500;
}

.category-mega-menu {
    min-width: 550px;
    max-width: 650px;
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
}

/* Main category items - hover effect */
.main-cat-item {
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.15s, border-left 0.15s;
    border-left: 3px solid transparent;
}

.main-cat-item:hover,
.main-cat-item.hover-active {
    background: #fff !important;
    border-left-color: #ffc107;
}

.main-cat-item.active {
    background: #fff3cd !important;
    border-left-color: #ffc107;
    font-weight: 500;
}

.main-categories-col {
    max-height: 400px;
    overflow-y: auto;
}

.subcategories-col {
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
}

.subcats-list .dropdown-item:hover {
    background: #f8f9fa;
}

.category-mega-menu .subcategories-col,
.category-mega-menu .top-categories-col {
    max-height: 400px;
    overflow-y: auto;
}

.category-mega-menu .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 0;
}

.category-mega-menu .dropdown-item:hover {
    background: #f8f9fa;
}

.category-mega-menu .dropdown-item.active {
    background: #ffc107;
    color: #000;
}

/* ============================================
   LOCATION MAP MODAL - Bazaraki Style
   ============================================ */

#locationMapModal .modal-content {
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.location-options-list .location-option {
    cursor: pointer;
    transition: background 0.2s;
}

.location-options-list .location-option:hover,
.location-options-list .location-option.active {
    background: #f8f9fa;
}

.radius-buttons .radius-btn {
    min-width: 70px;
}

.radius-buttons .radius-btn.active {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

#locationMap {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Location Button Styling */
.location-btn {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
    font-size: 0.875rem;
    height: 31px;
}

.location-btn:hover {
    background: #f8f9fa !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .category-mega-menu {
        min-width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .category-selector-wrapper {
        flex-wrap: wrap;
    }
    
    .category-main-btn {
        font-size: 0.85rem;
        padding: 0.35rem 0.75rem;
    }
} 

/* Image Preview Drag & Drop */
.img-preview-wrapper .dragging {
    opacity: 0.5;
}

.img-preview-wrapper .drag-over {
    border: 2px dashed #007bff;
    border-radius: 8px;
}

#image-preview-container .col-6 {
    cursor: grab;
}

#image-preview-container .col-6:active {
    cursor: grabbing;
}

#image-preview-container .img-thumbnail {
    transition: transform 0.3s ease;
}

/* ============================================
   GRADIENT BACKGROUND CLASSES
   ============================================ */

.bg-gradient-primary {
    background: linear-gradient(135deg, #1d283a 0%, #f59e0b 100%);
}

/* ============================================
   UNIFIED HERO SECTION - All Pages
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, #1d283a 0%, #f59e0b 100%);
    padding: 2rem 0 3rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="hero-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23hero-pattern)"/></svg>');
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1,
.hero-section .hero-title {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section .hero-subtitle,
.hero-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.hero-section .hero-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

/* Hero section compact variant */
.hero-section.hero-compact {
    padding: 2rem 0;
}

.hero-section.hero-compact h1 {
    font-size: 1.75rem;
}

/* ============================================
   BREADCRUMBS - Clean Redesign
   ============================================ */

.breadcrumb-section {
    background: #ffffff;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
}

.breadcrumb-section .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
}

.breadcrumb-section .breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-section .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-section .breadcrumb-item a:hover {
    color: #0d6efd;
}

.breadcrumb-section .breadcrumb-item.active {
    color: #212529;
    font-weight: 500;
}

.breadcrumb-section .breadcrumb-item + .breadcrumb-item {
    padding-left: 0;
}

.breadcrumb-section .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
    margin-right: 0.5rem;
    padding: 0;
}

/* Schema.org structured data styling */
.breadcrumb-section [itemtype="https://schema.org/BreadcrumbList"] {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

/* Breadcrumb Responsive Styles */
@media (max-width: 767.98px) {
    .breadcrumb-section {
        padding: 0.75rem 0;
    }
    
    .breadcrumb-section .breadcrumb {
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    
    .breadcrumb-section .breadcrumb-item + .breadcrumb-item::before {
        margin-right: 0.25rem;
    }
}

/* ============================================
   PAGE CONTENT WRAPPER
   ============================================ */

.page-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.page-content.bg-light {
    background-color: #f8f9fa;
}

/* Card styling for content sections */
.content-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.content-card .card-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #3b82f6;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .hero-subtitle {
        font-size: 1rem;
    }
    
    .breadcrumb-section {
        padding: 0.5rem 0;
    }
    
    .breadcrumb-section .breadcrumb {
        font-size: 0.8rem;
    }
    
    .page-content {
        padding: 1.5rem 0;
    }
    
    .content-card {
        padding: 1.5rem;
    }
}

/* ==================== Premium Ad Styles ==================== */

/* Premium Badge - Base Styles */
.premium-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Top of Search Badge */
.premium-badge.top-badge {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    color: white;
    animation: pulse-badge 2s infinite;
}

/* Featured Badge */
.premium-badge.featured-badge {
    background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
    color: #212529;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Highlighted Ad Card */
.card.highlighted-ad {
    border: 2px solid #ffc107 !important;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 20%);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3) !important;
}

.card.highlighted-ad:hover {
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4) !important;
    transform: translateY(-5px);
}

/* Featured Ad Card */
.card.featured-ad {
    border: 2px solid #0d6efd !important;
    background: linear-gradient(180deg, #e7f1ff 0%, #ffffff 20%);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2) !important;
}

.card.featured-ad:hover {
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3) !important;
    transform: translateY(-5px);
}

/* Top of Search Ad Card */
.card.top-search-ad {
    border: 2px solid #dc3545 !important;
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 20%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2) !important;
}

.card.top-search-ad:hover {
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3) !important;
    transform: translateY(-5px);
}

/* Premium ribbon for homepage/sliders */
.premium-ribbon {
    position: absolute;
    top: 12px;
    right: -35px;
    background: linear-gradient(135deg, #ffc107 0%, #ffdb4d 100%);
    color: #212529;
    padding: 5px 40px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Card transition for all premium cards */
.card.highlighted-ad,
.card.featured-ad,
.card.top-search-ad {
    transition: all 0.3s ease;
}

