/* Custom Styles for Classifieds Portal */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.main-content {
    min-height: 500px;
}

/* Top Bar */
.top-bar {
    font-size: 0.85rem;
}

.top-bar a {
    text-decoration: none;
}

.top-bar a:hover {
    text-decoration: underline;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

.dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 50px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.search-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Category Cards */
.category-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.category-card a {
    text-decoration: none;
    color: inherit;
}

/* Listing Cards */
.listing-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.listing-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.listing-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.listing-card-body {
    padding: 15px;
}

.listing-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.listing-card-price {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.listing-card-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.listing-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.badge-featured {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Featured Ads Section */
.featured-section {
    background: #f8f9fa;
    padding: 50px 0;
    margin: 50px 0;
}

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 0;
    margin: 50px 0;
}

.stat-box {
    text-align: center;
    padding: 20px;
}

.stat-box i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-box h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-box p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Form Styling */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    padding: 10px 25px;
    font-weight: 500;
    border-radius: 5px;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
}

.btn-primary:hover {
    background: #0b5ed7;
}

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 0;
    margin-bottom: 30px;
}

.page-header h1 {
    margin-bottom: 0;
    font-weight: bold;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #666;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filters-sidebar h5 {
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* Detail Page */
.detail-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.detail-info {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.detail-info h2 {
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.info-item {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
}

/* Contact Seller Box */
.contact-seller-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

/* Footer */
footer {
    margin-top: auto;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 20px;
}

footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    padding-left: 5px;
}

footer .social-links a:hover {
    color: var(--primary-color);
}

/* Admin Panel Styles */
.admin-sidebar {
    background: #2c3e50;
    min-height: 100vh;
    padding: 20px 0;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    margin: 5px 0;
    border-radius: 5px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid;
}

.stat-card.primary {
    border-left-color: var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .category-card i {
        font-size: 2rem;
    }
    
    .stat-box h3 {
        font-size: 2rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Image Upload Preview */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Pagination */
.pagination {
    margin-top: 30px;
}

.page-link {
    color: var(--primary-color);
}

.page-link:hover {
    color: var(--primary-color);
    background-color: #e9ecef;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
