/* /assets/css/places.css */
/* --- Modern CSS Variables - Consistent with Marketplace --- */
:root {
    --primary: #008753;
    --primary-dark: #0066cc;
    --primary-light: #4da6ff;
    --secondary: #00bfff;
    --accent: #ff6b6b;
    --success: #28a745;
    --text-dark: #2D3748;
    --text-light: #718096;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --featured-gold: #FFD700;
    --featured-orange: #FFA500;
}

/* --- Modern Body Styling --- */
body {
    background: 
        radial-gradient(circle at 20% 80%, rgba(250, 239, 239, 0.959) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(238, 229, 229, 0.979) 0%, #e8ebf1f8 50%),
        radial-gradient(circle at 40% 40%, rgb(224, 218, 218) 0%, transparent 50%);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Fix mobile spacing for bottom nav */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px !important; /* Space for bottom nav */
    }
    
    body.logged-in footer,
    body.logged-in .site-footer {
        display: none !important;
    }
    
    .main-content-wrapper {
        padding-bottom: 2rem !important;
    }
    
    /* Ensure last item is not covered */
    #businesses-list {
        margin-bottom: 1.5rem;
    }
}

.main-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
    flex-grow: 1;
}

/* --- Header Section --- */
.marketplace-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.marketplace-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.header-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
}

.header-text .subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

/* Location Auto Filter Message */
.location-auto-filter {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(0, 135, 83, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    max-width: 500px;
}

.location-auto-filter p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.location-auto-filter small {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
}

.location-auto-filter .btn-secondary {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.desktop-view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-light);
    padding: 0.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.view-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.view-btn.active {
    background: var(--bg-white);
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.view-btn:hover:not(.active) {
    background: rgba(0, 135, 83, 0.1);
}

.view-icon {
    font-size: 1.1rem;
}

.view-label {
    font-size: 0.9rem;
}

.marketplace-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* --- Action Buttons --- */
.create-post-btn, .my-listings-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

.create-post-btn {
    background: var(--gradient-primary);
    color: white;
}

.create-post-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.my-listings-btn {
    background: var(--success);
    color: white;
}

.my-listings-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* --- Location Filter Bar (Top) --- */
.location-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 135, 83, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 135, 83, 0.2);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.location-filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 300px;
}

.location-filter-group label {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.location-filter-select {
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    flex: 1;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.location-filter-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 135, 83, 0.1);
}

.location-filter-select:disabled {
    background-color: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.location-filter-note {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
}

.location-filter-note a {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

.clear-location-btn {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 2px solid #fecaca;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.clear-location-btn:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* Search button in filter bar */
.location-filter-bar .create-post-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* --- Mobile Header Controls --- */
.mobile-header-controls {
    display: none;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.mobile-view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-light);
    padding: 0.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    align-self: flex-start;
}

.mobile-search {
    width: 100%;
}

.mobile-search input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.mobile-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
    outline: none;
}

/* --- Featured Section Integration --- */
/* Ensure featured section has proper spacing */
.featured-section + .ads,
.featured-section + .marketplace-container {
    margin-top: 2rem;
}

.ads + .marketplace-container {
    margin-top: 2rem;
}

/* --- Marketplace Container --- */
.marketplace-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

/* --- Sidebar Styling --- */
.marketplace-sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.sidebar-search {
    margin-bottom: 1.5rem;
}

.sidebar-search input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.sidebar-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
    outline: none;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-icon {
    font-size: 1.2rem;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.sidebar-item:hover {
    background: rgba(0, 135, 83, 0.1);
    color: var(--text-dark);
}

.sidebar-item.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.sidebar-item .item-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.item-text {
    flex: 1;
    font-size: 0.95rem;
}

.apply-filters-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* --- Main Content Area --- */
.marketplace-content {
    min-width: 0; /* Prevent grid blowout */
}

/* --- Mobile Category Icons with Cycling System --- */
.mobile-category-icons {
    display: none;
    margin-bottom: 1.5rem;
}

.category-icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 items per row on mobile */
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.icon-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-align: center;
    position: relative;
    min-height: 70px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.icon-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.icon-category.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.icon-category.post-item-icon {
    background: linear-gradient(135deg, #008753, #00bfff);
    color: white;
    border-color: #008753;
}

.icon-category.more-icon {
    background: linear-gradient(135deg, #6c757d, #adb5bd);
    color: white;
    border-color: #6c757d;
}

.icon-category.more-icon:hover {
    background: linear-gradient(135deg, #5a6268, #868e96);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.icon-category .icon {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.icon-category .label {
    font-size: 0.7rem;
    line-height: 1.1;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.2em;
}

/* Category Cycling Controls */
.category-cycling-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.category-cycle-btn {
    padding: 0.4rem 0.8rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.category-cycle-btn:hover {
    background: rgba(0, 135, 83, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.category-cycle-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-cycle-indicator {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 0.25rem;
}

/* --- Quick Filter Chips --- */
.filter-chips {
    display: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.filter-chip {
    padding: 0.4rem 0.8rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 18px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    background: rgba(0, 135, 83, 0.1);
    border-color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Desktop Sort Controls --- */
.desktop-sort-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.results-count {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Featured Count Badge */
.featured-count {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    color: #996515;
    padding: 6px 14px;
    border-radius: 15px;
    font-weight: 700;
    margin-left: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.featured-count::before {
    content: '⭐';
    font-size: 0.9rem;
}

/* --- Business Listings Grid --- */
#businesses-list {
    display: grid;
    gap: 1.5rem;
}

/* Grid View - 3 items per row on desktop, 2 on mobile */
.grid-view {
    grid-template-columns: repeat(3, 1fr);
}

/* List View */
.list-view {
    grid-template-columns: 1fr;
}

/* Desktop List View */
@media (min-width: 1025px) {
    .list-view .item-card {
        flex-direction: row;
        min-height: 200px;
    }
    
    .list-view .item-image {
        width: 220px;
        height: 200px;
        flex-shrink: 0;
    }
    
    .list-view .item-content {
        flex: 1;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
    }
    
    .list-view .item-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .list-view .item-description {
        -webkit-line-clamp: 2;
        flex-grow: 1;
    }
    
    .list-view .item-meta {
        flex-direction: row;
        justify-content: space-between;
        gap: 1rem;
        margin-top: auto;
        padding-top: 1rem;
    }
    
    .list-view .contact-info-collapsed {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* Mobile List View (Compact) */
@media (max-width: 1024px) {
    .list-view .item-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .list-view .item-image {
        width: 100%;
        height: 180px;
    }
    
    .list-view .item-content {
        padding: 1rem;
    }
    
    .list-view .item-card-header {
        padding: 1rem;
    }
    
    .list-view .item-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .list-view .item-description {
        -webkit-line-clamp: 2;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .list-view .item-meta {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.5rem;
        padding-top: 0.5rem;
        font-size: 0.85rem;
    }
    
    .list-view .contact-info-collapsed {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* --- Business Card Styling --- */
.item-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Featured Item Styles */
.featured-item {
    border: 2px solid rgba(255, 215, 0, 0.5) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 249, 229, 0.95) 100%) !important;
}

.featured-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF8C00);
    border-radius: 2px 2px 0 0;
}

.featured-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 215, 0, 0.05) 100%);
    pointer-events: none;
    border-radius: 16px;
}

.featured-item:hover {
    border-color: #FFD700 !important;
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.15) !important;
}

.item-card-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.seller-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.seller-info h5 {
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.seller-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-light);
}

.verified-badge {
    background: var(--success);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: auto;
}

/* Featured Item Badge */
.featured-item-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(255, 165, 0, 0.3);
}

.featured-item-badge::after {
    content: '★';
    font-size: 0.8rem;
}

.item-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-description {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
}

.item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.item-location, .item-condition {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.item-location::before {
    content: "📍";
}

.item-condition::before {
    content: "🏠";
}

/* --- Image Styling --- */
.item-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-card:hover .item-image img {
    transform: scale(1.05);
}

/* No Image Placeholder Styling */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%);
    color: var(--text-light);
    padding: 1rem;
    text-align: center;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.placeholder-text {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Simple Image Placeholder (fallback) */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 2rem;
}

/* --- Contact Info Styling --- */
.contact-info-collapsed {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-item small {
    color: var(--text-dark);
    font-weight: 500;
    white-space: nowrap;
}

.contact-item span {
    color: var(--text-light);
}

.btn-primary-action {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    box-shadow: var(--shadow-sm);
}

.btn-primary-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.contact-timer {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-left: 0.5rem;
    font-weight: 500;
}

/* --- Business Actions --- */
.business-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
}

.business-actions .btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.business-actions .btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* --- Ads Section --- */
.ads {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ad-box {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.ad-box:hover {
    opacity: 0.9;
}

.ad-box img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ad-box p {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    text-align: center;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.empty-state p {
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1rem;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.empty-state-actions .btn-primary,
.empty-state-actions .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.empty-state-actions .btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empty-state-actions .btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empty-state-actions .btn-primary:hover,
.empty-state-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    grid-column: 1 / -1;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(0, 135, 83, 0.1);
    border-color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-light);
}

/* --- Modal Styling --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 1rem;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--text-light);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: var(--text-dark);
    background: rgba(0, 0, 0, 0.05);
}

/* --- Focus States for Accessibility --- */
.item-card:focus,
.create-post-btn:focus,
.my-listings-btn:focus,
.view-btn:focus,
.sidebar-item:focus,
.filter-chip:focus,
.pagination-btn:focus,
.apply-filters-btn:focus,
.btn-primary-action:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- Reduced Motion Support --- */
@media (prefers-reduced-motion: reduce) {
    .item-card,
    .create-post-btn,
    .my-listings-btn,
    .modal-content,
    .view-btn,
    .icon-category,
    .filter-chip,
    .apply-filters-btn,
    .btn-primary-action {
        transition: none;
        animation: none;
    }
    
    .item-card:hover,
    .create-post-btn:hover,
    .my-listings-btn:hover,
    .icon-category:hover,
    .filter-chip:hover,
    .btn-primary-action:hover {
        transform: none;
    }
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .marketplace-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .marketplace-sidebar {
        display: none;
    }
    
    .mobile-header-controls,
    .mobile-category-icons,
    .filter-chips {
        display: flex;
    }
    
    .desktop-sort-controls {
        display: none;
    }
    
    .marketplace-header-top {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .desktop-view-toggle {
        display: none;
    }
    
    .location-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .location-filter-group {
        flex-direction: column;
        align-items: flex-start;
        min-width: auto;
    }
    
    .location-filter-select {
        width: 100%;
    }
    
    .clear-location-btn {
        align-self: flex-start;
    }
    
    /* Grid view - 2 items per row on tablet/mobile */
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Mobile category grid */
    .category-icons-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content-wrapper {
        padding: 1rem;
    }
    
    .marketplace-header {
        padding: 1rem;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .marketplace-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .marketplace-actions .create-post-btn,
    .marketplace-actions .my-listings-btn {
        width: 100%;
        justify-content: center;
    }
    
    .category-icons-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }
    
    .icon-category {
        min-height: 65px;
    }
    
    .icon-category .icon {
        font-size: 1.1rem;
    }
    
    .icon-category .label {
        font-size: 0.65rem;
    }
    
    .filter-chips {
        overflow-x: auto;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }
    
    .filter-chip {
        flex-shrink: 0;
    }
    
    /* Ensure search button fits in mobile filter bar */
    .location-filter-bar .create-post-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Adjust featured count badge for mobile */
    .featured-count {
        padding: 4px 10px;
        font-size: 0.8rem;
        margin-left: 8px;
    }
    
    /* Adjust featured item badge for mobile */
    .featured-item-badge {
        padding: 3px 8px;
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .main-content-wrapper {
        padding: 0.5rem;
    }
    
    .marketplace-header {
        padding: 1rem 0.75rem;
        border-radius: 12px;
    }
    
    .header-text h1 {
        font-size: 1.75rem;
    }
    
    .category-icons-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Grid view - 2 items per row on mobile, 1 on very small */
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
    
    @media (max-width: 360px) {
        .grid-view {
            grid-template-columns: 1fr;
        }
        
        .category-icons-grid {
            grid-template-columns: repeat(2, 1fr);
        }
        
        .featured-count {
            display: block;
            margin-left: 0;
            margin-top: 5px;
            width: fit-content;
        }
    }
    
    .empty-state-actions {
        flex-direction: column;
    }
    
    .empty-state-actions button,
    .empty-state-actions a {
        width: 100%;
    }
}

/* Fix for contact info wrapping */
@media (max-width: 640px) {
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .contact-item .btn-primary-action {
        align-self: flex-start;
    }
}

/* Additional responsive grid adjustments */
@media (min-width: 1200px) {
    .grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 360px) {
    .grid-view {
        grid-template-columns: 1fr;
    }
}

/* Featured Section Spacing Adjustments */
@media (min-width: 769px) {
    .featured-section + .ads {
        margin-top: 2.5rem;
    }
    
    .featured-section + .marketplace-container {
        margin-top: 2.5rem;
    }
    
    .ads + .marketplace-container {
        margin-top: 2rem;
    }
}

/* Featured Item Spacing in List View */
.list-view .featured-item {
    margin-bottom: 1rem;
}

/* Featured Item Badge Positioning in List View */
@media (min-width: 1025px) {
    .list-view .featured-item-badge {
        position: absolute;
        top: 1rem;
        right: 1rem;
        margin-left: 0;
    }
}

/* Featured Count Responsive Behavior */
@media (max-width: 768px) {
    .featured-count {
        display: inline-block;
        margin-top: 5px;
    }
    
    .desktop-sort-controls .results-count {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 5px;
    }
}

/* Featured Item Hover Enhancement */
.featured-item:hover .featured-item-badge {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 165, 0, 0.4);
}

/* Featured Card Animation for Featured Items */
.featured-item {
    animation: featuredPulse 3s ease-in-out infinite;
}

@keyframes featuredPulse {
    0%, 100% { box-shadow: 0 4px 6px -1px rgba(255, 215, 0, 0.1), 0 2px 4px -1px rgba(255, 165, 0, 0.06); }
    50% { box-shadow: 0 10px 15px -3px rgba(255, 215, 0, 0.15), 0 4px 6px -2px rgba(255, 165, 0, 0.1); }
}

/* Featured Items in List View - Adjust spacing */
@media (min-width: 1025px) {
    .list-view .featured-item .item-card-header {
        padding-right: 130px; /* Make space for featured badge */
    }
}

/* Featured Section Loading State */
.featured-section.loading {
    opacity: 0.7;
    pointer-events: none;
}

.featured-section.loading .featured-card,
.featured-section.loading .carousel-slide {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

/* Dark Mode Adjustments for Featured Items */
@media (prefers-color-scheme: dark) {
    .featured-item {
        background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(50, 40, 0, 0.95) 100%) !important;
    }
    
    .featured-item-badge {
        box-shadow: 0 3px 8px rgba(255, 165, 0, 0.4);
    }
    
    .featured-count {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
        border-color: rgba(255, 215, 0, 0.4);
        color: #FFD700;
    }
}