/* Custom CSS Variables */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --purple: #6f42c1;
    --brown: #8b4513;
    --orange: #fd7e14;
    --teal: #20c997;
    --pink: #e83e8c;
    --indigo: #6610f2;
}

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

/* Header Styles */
.navbar {
    border-bottom: 1px solid #e9ecef;
}

.search-container {
    max-width: 600px;
}

.search-container .input-group-text {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Categories Slider */
.categories-slider {
    border-bottom: 1px solid #e9ecef;
}

.categories-container {
    overflow: hidden;
}

.categories-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-item {
    min-width: 80px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.category-item:hover {
    transform: translateY(-2px);
}

.category-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.category-item:hover .category-icon {
    transform: scale(1.1);
}

/* Custom Background Colors */
.bg-purple { background-color: var(--purple) !important; }
.bg-brown { background-color: var(--brown) !important; }
.bg-orange { background-color: var(--orange) !important; }
.bg-teal { background-color: var(--teal) !important; }
.bg-pink { background-color: var(--pink) !important; }
.bg-indigo { background-color: var(--indigo) !important; }

/* Main Content */
.main-content {
    margin-top: 50px;
    padding: 2rem 0;
}

.section-title {
    font-weight: 600;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 2px;
}

/* Ad Cards */
.ad-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.ad-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ad-card:hover .card-img-top {
    transform: scale(1.05);
}

.favorite-btn {
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: none;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 1) !important;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button Animations */
.btn {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50, #34495e) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        margin-top: 160px;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .category-item {
        min-width: 70px;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .ad-card .card-img-top {
        height: 150px;
    }
    
    .main-content {
        margin-top: 200px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;