/* کامپوننت‌های UI دیوار افغانستان */
/* ================================= */

/* جستجوی اصلی */
.divar-search {
    background: var(--bg-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.divar-search:hover {
    box-shadow: var(--shadow-xl);
}

.divar-search-input {
    border: none;
    font-size: 16px;
    padding: 1.25rem 1.5rem;
    background: transparent;
    width: 100%;
    outline: none;
    color: var(--text-primary);
}

.divar-search-input::placeholder {
    color: var(--text-light);
}

.divar-search-btn {
    background: var(--divar-red);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.divar-search-btn:hover {
    background: var(--divar-red-dark);
}

/* جستجوی بزرگ برای صفحه اصلی */
.divar-search.large {
    max-width: 100%;
}

.divar-search.large .divar-search-input {
    font-size: 18px;
    padding: 1.5rem 2rem;
}

.divar-search.large .divar-search-btn {
    padding: 1.5rem 2.5rem;
    font-size: 16px;
}

/* ================================= */
/* Modern Ad Card - Creative Design */
/* ================================= */

.modern-ad-card {
    position: relative;
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-family: inherit;
}

.modern-ad-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--divar-red);
}

.modern-ad-card:active {
    transform: translateY(-4px);
    transition: transform 0.1s ease;
}

.card-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Image Container */
.image-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-ad-card:hover .ad-image {
    transform: scale(1.1);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #94a3b8;
    font-size: 1.5rem;
    gap: 8px;
}

.no-image-placeholder span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Image Counter */
.image-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 3;
}

/* Top Badges */
.top-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
}

.transaction-badge {
    background: linear-gradient(135deg, var(--divar-red) 0%, #dc2626 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(166, 38, 38, 0.3);
}

.exchange-badge {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Favorite Button */
.favorite-button {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #64748b;
    font-size: 1rem;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.favorite-button:hover {
    background: white;
    color: var(--divar-red);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(166, 38, 38, 0.2);
}

.favorite-button.active {
    background: var(--divar-red);
    color: white;
    box-shadow: 0 4px 16px rgba(166, 38, 38, 0.4);
}

.favorite-button.active i {
    animation: heartBeat 0.6s ease-in-out;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

/* Content Section */
.content-section {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
    background: var(--bg-white);
}

/* Title Row */
.title-row {
    margin-bottom: 8px;
}

.ad-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}

/* Inline Info Row */
.inline-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.info-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.03);
}

.info-item i {
    width: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

.info-item.category {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    font-weight: 500;
}

.info-item.subcategory {
    background: linear-gradient(135deg, rgba(166, 38, 38, 0.1) 0%, rgba(166, 38, 38, 0.05) 100%);
    color: var(--divar-red);
    border: 1px solid rgba(166, 38, 38, 0.2);
    font-weight: 500;
}

.info-item.location {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.info-item.time {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Price Row */
.price-row {
    margin-bottom: 0;
    padding: 6px 0;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
}
}

.main-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--divar-red);
    white-space: nowrap;
}

.secondary-price {
    font-size: 1rem;
    font-weight: 600;
    color: #059669;
    white-space: nowrap;
}

.negotiable-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #f59e0b;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 6px;
}

.negotiable-price i {
    font-size: 0.9rem;
}

/* View Button Row */
.view-button-row {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.meta-item.time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}

.meta-item.time i {
    width: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

.subcategory-tag {
    background: linear-gradient(135deg, rgba(166, 38, 38, 0.1) 0%, rgba(166, 38, 38, 0.05) 100%);
    color: var(--divar-red);
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 500;
    border: 1px solid rgba(166, 38, 38, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.view-button {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--divar-red);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.modern-ad-card:hover .view-button {
    transform: translateX(-4px);
}

.view-button i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.modern-ad-card:hover .view-button i {
    transform: translateX(-2px);
}

/* Card Link */
.card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-decoration: none;
    color: transparent;
}

/* Loading State */
.modern-ad-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.modern-ad-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--divar-red);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* Enhanced Hover Effects */
.modern-ad-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(166, 38, 38, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.modern-ad-card:hover::before {
    opacity: 1;
}

/* Focus States for Accessibility */
.modern-ad-card:focus-within {
    outline: 2px solid var(--divar-red);
    outline-offset: 2px;
}

.favorite-button:focus {
    outline: 2px solid var(--divar-red);
    outline-offset: 2px;
}

/* Dark Mode Support */
[data-theme="dark"] .modern-ad-card {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .image-container {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

[data-theme="dark"] .no-image-placeholder {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #94a3b8;
}

[data-theme="dark"] .content-section {
    background: var(--bg-card);
}

[data-theme="dark"] .category-tag {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #cbd5e1;
}

[data-theme="dark"] .subcategory-tag {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(220, 38, 38, 0.3);
}

[data-theme="dark"] .footer-section {
    border-top-color: #334155;
}

/* ================================= */
/* Modern Grid Layout */
/* ================================= */

.modern-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.ad-card-wrapper {
    width: 100%;
    height: 100%;
}

/* Legacy Grid Support */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.ad-card-container {
    width: 100%;
}

/* Featured/Urgent Badges */
.ad-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.ad-badge.urgent {
    background: #ff6b35;
    color: white;
}

.ad-badge.featured {
    background: #4f46e5;
    color: white;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .ad-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .no-image {
    background: var(--bg-light);
    color: var(--text-light);
}

[data-theme="dark"] .favorite-btn {
    background: rgba(31, 41, 55, 0.9);
    color: var(--text-light);
}

[data-theme="dark"] .favorite-btn:hover {
    background: var(--bg-white);
    color: var(--divar-red);
}

[data-theme="dark"] .category-badge,
[data-theme="dark"] .subcategory-badge {
    background: var(--bg-light);
    color: var(--text-secondary);
}

/* کارت دسته‌بندی */
.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--divar-red);
}

.category-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--divar-red), var(--divar-orange));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    color: white;
    font-size: 24px;
    transition: transform 0.3s ease;
}

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

.category-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.category-card-count {
    font-size: 14px;
    color: var(--text-light);
}

.category-card-subcategories {
    margin-top: var(--spacing-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    justify-content: center;
}

.category-card-subcategory {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 11px;
    transition: all 0.2s ease;
}

.category-card-subcategory:hover {
    background: var(--divar-red);
    color: white;
}

/* کارت آمار */
.stats-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--divar-red), var(--divar-orange));
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.stats-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* فیلترهای جستجو */
.search-filters {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
}

.search-filters-toggle {
    padding: var(--spacing-lg);
    background: var(--bg-light);
    border: none;
    width: 100%;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-filters-toggle:hover {
    background: var(--bg-light);
}

.search-filters-content {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.filter-group {
    margin-bottom: var(--spacing-lg);
}

.filter-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.filter-tag {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.filter-tag:hover {
    border-color: var(--divar-red);
    color: var(--divar-red);
}

.filter-tag.active {
    background: var(--divar-red);
    border-color: var(--divar-red);
    color: white;
}

/* نوار ابزار آگهی‌ها */
.ads-toolbar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ads-count {
    font-size: 14px;
    color: var(--text-secondary);
}

.ads-sort {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.sort-label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.sort-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

/* تغییر نمایش */
.view-toggle {
    display: flex;
    gap: var(--spacing-xs);
}

.view-toggle-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn.active {
    background: var(--divar-red);
    border-color: var(--divar-red);
    color: white;
}

/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.pagination-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
}

.pagination-btn:hover {
    background: var(--bg-light);
    border-color: var(--divar-red);
    color: var(--divar-red);
}

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

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

/* نشان وضعیت */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.expired {
    background: var(--bg-light);
    color: var(--text-light);
}

/* حالت تاریک برای نشان‌های وضعیت */
[data-theme="dark"] .status-badge.pending {
    background: #78350f;
    color: #fcd34d;
}

[data-theme="dark"] .status-badge.active {
    background: #064e3b;
    color: #86efac;
}

[data-theme="dark"] .status-badge.inactive {
    background: #7f1d1d;
    color: #fca5a5;
}

/* Toast اعلان‌ها */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
    max-width: 400px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

/* اسپینر بارگذاری */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--divar-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

[data-theme="dark"] .loading-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content .loading-spinner {
    margin-bottom: var(--spacing-md);
}

/* ================================= */
/* Responsive Design */
/* ================================= */

@media (max-width: 1200px) {
    .modern-ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .results-grid,
    .ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .modern-ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
    
    .modern-ad-card {
        border-radius: 12px;
    }
    
    .image-container {
        height: 200px;
    }
    
    .content-section {
        padding: 12px;
        /* gap: 6px; */
    }
    
    .title-row {
        margin-bottom: 6px;
    }
    
    .ad-title {
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    .inline-info-row {
        gap: 6px;
        margin-bottom: 6px;
        padding: 4px 0;
    }
    
    .info-group {
        gap: 6px;
    }
    
    .info-item {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
    
    .price-row {
        margin-bottom: 0;
        padding: 4px 0;
    }
    
    .price-display {
        gap: 6px;
    }
    
    .main-price {
        font-size: 1.1rem;
    }
    
    .secondary-price {
        font-size: 0.9rem;
    }
    
    .negotiable-price {
        font-size: 0.9rem;
        padding: 2px 5px;
    }
    
    .results-grid,
    .ads-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }
    
    .ad-card-image {
        height: 160px;
    }
    
    .ad-card-content {
        padding: 10px;
    }
    
    .ad-card-title {
        font-size: 13px;
        min-height: 34px;
    }
}

@media (max-width: 480px) {
    .modern-ads-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .modern-ad-card {
        border-radius: 10px;
    }
    
    .image-container {
        height: 180px;
    }
    
    .content-section {
        padding: 10px;
        /* gap: 4px; */
    }
    
    .title-row {
        margin-bottom: 4px;
    }
    
    .ad-title {
        font-size: 0.85rem;
        min-height: 36px;
    }
    
    .inline-info-row {
        gap: 4px;
        margin-bottom: 4px;
        padding: 3px 0;
    }
    
    .info-group {
        gap: 4px;
    }
    
    .info-item {
        font-size: 0.65rem;
        padding: 1px 3px;
    }
    
    .price-row {
        margin-bottom: 0;
        padding: 3px 0;
    }
    
    .price-display {
        gap: 4px;
    }
    
    .main-price {
        font-size: 1rem;
    }
    
    .secondary-price {
        font-size: 0.85rem;
    }
    
    .negotiable-price {
        font-size: 0.85rem;
        padding: 2px 4px;
    }
    
    .favorite-button {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .image-counter {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .transaction-badge,
    .exchange-badge {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
    
    .results-grid,
    .ads-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .ad-card-image {
        height: 140px;
    }
    
    .ad-card-content {
        padding: 8px;
        gap: 0px;
    }
    
    .ad-card-title {
        font-size: 12px;
        min-height: 30px;
        -webkit-line-clamp: 2;
    }
    
    .ad-card-price {
        font-size: 13px;
    }
    
    .ad-location,
    .ad-time {
        font-size: 11px;
    }
    
    .favorite-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .image-count {
        font-size: 10px;
        padding: 1px 4px;
    }
} 