/* =====================================================
   RESET & BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #0073e6;
}

a:hover {
    text-decoration: underline;
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: #f8f8f8;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a {
    color: #666;
    margin-right: 15px;
}

.top-links a:last-child {
    margin-right: 0;
}

.language-selector select {
    background: none;
    border: none;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.header-main {
    padding: 15px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0073e6;
}

.logo p {
    font-size: 12px;
    color: #999;
}

.add-listing-btn {
    background-color: #28a745;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.add-listing-btn:hover {
    background-color: #218838;
    text-decoration: none;
    color: #fff;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.main-nav {
    background-color: #0073e6;
    padding: 0;
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-menu li a:hover,
.nav-menu li.active a {
    background-color: #005bb5;
    text-decoration: none;
}

.nav-menu li.has-submenu:hover .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1000;
}

.submenu li a {
    color: #333;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
}

.submenu li:last-child a {
    border-bottom: none;
}

.submenu li a:hover {
    background-color: #f5f5f5;
    color: #0073e6;
}

/* =====================================================
   SEARCH SECTION
   ===================================================== */
.search-section {
    background: linear-gradient(135deg, #0073e6 0%, #005bb5 100%);
    padding: 40px 0;
    color: #fff;
}

.search-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
}

.search-box {
    background-color: #fff;
    border-radius: 50px;
    padding: 5px;
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    border-radius: 50px 0 0 50px;
    font-size: 16px;
    outline: none;
}

.search-box button {
    background-color: #28a745;
    border: none;
    padding: 15px 30px;
    border-radius: 0 50px 50px 0;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #218838;
}

/* =====================================================
   CATEGORIES SECTION
   ===================================================== */
.categories-section {
    padding: 40px 0;
}

.section-title {
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.category-card p {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.category-link {
    color: #0073e6;
    font-size: 14px;
    font-weight: 500;
}

/* =====================================================
   FEATURED SECTION
   ===================================================== */
.featured-section {
    padding: 40px 0;
    background-color: #fff;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.listing-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.listing-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.listing-image {
    height: 200px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    position: relative;
}

.listing-price {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 18px;
}

.listing-info {
    padding: 15px;
}

.listing-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.listing-title a {
    color: #333;
}

.listing-details {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.listing-location {
    font-size: 12px;
    color: #999;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background-color: #1a1a2e;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #ccc;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 12px;
    color: #888;
}

/* =====================================================
   SEARCH PAGE STYLES
   ===================================================== */
.search-filters {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.filter-group input[type="number"] {
    width: calc(50% - 5px);
    display: inline-block;
}

.filter-group .range-input {
    display: flex;
    gap: 10px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary {
    background-color: #0073e6;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #005bb5;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-success:hover {
    background-color: #218838;
}

.listing-stats {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

/* =====================================================
   ADD LISTING PAGE STYLES
   ===================================================== */
.form-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.form-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073e6;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label .required {
    color: #dc3545;
    margin-left: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
}

.checkbox-group label {
    margin-bottom: 0;
}

.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.image-upload-area:hover {
    border-color: #0073e6;
}

.image-upload-area input {
    display: none;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0,0,0,0.6);
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    cursor: pointer;
}

/* =====================================================
   BREADCRUMBS
   ===================================================== */
.breadcrumbs {
    padding: 15px 0;
    background-color: #fff;
    margin-bottom: 20px;
    font-size: 13px;
}

.breadcrumbs a {
    color: #666;
}

.breadcrumbs a:hover {
    color: #0073e6;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .logo-area {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu li a {
        padding: 10px 15px;
    }
    
    .submenu {
        position: static;
        box-shadow: none;
        background-color: #005bb5;
    }
    
    .submenu li a {
        padding-left: 30px;
        color: #fff;
    }
    
    .search-box {
        margin: 0 15px;
    }
    
    .categories-grid,
    .listing-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}