/* صفحات خاص - دیوار افغانستان */
/* ============================ */

/* Legal Pages Styling */
/* ============================ */

.legal-page {
    background: var(--bg-light);
    min-height: 100vh;
}

.legal-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.legal-header {
    background: linear-gradient(135deg, var(--divar-red), var(--divar-orange));
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.legal-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.legal-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.legal-content {
    padding: 3rem 2rem;
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    color: var(--divar-red);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.legal-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.legal-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-section ul {
    margin-bottom: 1rem;
    padding-right: 1.5rem;
}

.legal-section li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.legal-section ol {
    margin-bottom: 1rem;
    padding-right: 1.5rem;
}

.legal-section ol li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.legal-contact-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.legal-contact-card h5 {
    color: var(--divar-red);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.legal-contact-card p {
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.legal-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.legal-footer p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.legal-back-btn {
    background: var(--divar-red);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.legal-back-btn:hover {
    background: var(--divar-orange);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

[data-theme="dark"] .legal-section h2 {
    color: var(--divar-red);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .legal-section h3,
[data-theme="dark"] .legal-section h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .legal-section p,
[data-theme="dark"] .legal-section li {
    color: var(--text-secondary);
}

[data-theme="dark"] .legal-contact-card {
    background: var(--bg-light);
    border-color: var(--border-color);
}

[data-theme="dark"] .legal-contact-card p {
    color: var(--text-secondary);
}

/* Responsive design */
@media (max-width: 768px) {
    .legal-content {
        padding: 2rem 1rem;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-section h2 {
        font-size: 1.25rem;
    }
    
    .legal-section h3 {
        font-size: 1.1rem;
    }
}

/* ============================ */

/* صفحه اصلی */
.min-vh-75 {
    min-height: 75vh;
}

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
    z-index: 1;
}

/* کارت‌های آمار در هیرو */
.stats-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stats-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    display: block;
}

.stats-card .stats-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* هیرو اصلی */
.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.popular-cities {
    margin-top: 1.5rem;
}

.city-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.city-link {
    color: var(--divar-red);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.city-link:hover {
    color: var(--divar-red-dark);
    text-decoration: underline;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.categories-section {
    padding: 4rem 0;
}

.featured-ads-section {
    padding: 4rem 0;
}

/* جستجوی صفحه اصلی */
.hero-search {
    max-width: 600px;
}

/* صفحه جستجو */
.search-page-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 76px;
    z-index: 999;
}

/* Mobile Search Interface */
.mobile-search-form {
    padding: 1rem 0;
}

.mobile-search-bar {
    margin-bottom: 1rem;
}

.search-input-group {
    display: flex;
    background: white;
    border: 2px solid var(--divar-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    border-color: var(--divar-primary);
    box-shadow: 0 4px 12px rgba(166, 38, 38, 0.15);
}

.mobile-search-input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    background: transparent;
    outline: none;
}

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

.mobile-search-btn {
    background: var(--divar-primary);
    border: none;
    color: white;
    padding: 12px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-search-btn:hover {
    background: var(--divar-primary-hover);
}

.mobile-filter-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 4px;
}

.mobile-filter-buttons::-webkit-scrollbar {
    height: 2px;
}

.mobile-filter-buttons::-webkit-scrollbar-track {
    background: var(--divar-border-light);
    border-radius: 1px;
}

.mobile-filter-buttons::-webkit-scrollbar-thumb {
    background: var(--divar-border);
    border-radius: 1px;
}

.mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--divar-border);
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--divar-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: fit-content;
    position: relative;
}

.mobile-filter-btn:hover {
    background: var(--divar-bg-tertiary);
    border-color: var(--divar-border);
}

.mobile-filter-btn.active,
.mobile-filter-btn[aria-expanded="true"] {
    background: var(--divar-primary);
    border-color: var(--divar-primary);
    color: white;
}

.filter-count {
    background: var(--divar-primary);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    margin-right: -4px;
}

.mobile-filter-btn.active .filter-count {
    background: white;
    color: var(--divar-primary);
}

.mobile-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    display: none;
}

.mobile-dropdown.show {
    display: block;
    animation: slideInFromBottom 0.3s ease-out;
}

.mobile-dropdown-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--divar-border-light);
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.mobile-dropdown-header h6 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--divar-text-primary);
}

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

.mobile-close-btn:hover {
    background: var(--divar-border);
    color: var(--divar-text-primary);
}

.mobile-filter-sections {
    padding: 20px;
}

.mobile-filter-section {
    margin-bottom: 20px;
}

.mobile-filter-section:last-child {
    margin-bottom: 0;
}

.mobile-filter-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--divar-text-primary);
    margin-bottom: 8px;
}

.mobile-select {
    border: 1px solid var(--divar-border);
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    background: white;
    color: var(--divar-text-primary);
    transition: all 0.2s ease;
}

.mobile-select:focus {
    border-color: var(--divar-primary);
    box-shadow: 0 0 0 3px rgba(166, 38, 38, 0.1);
    outline: none;
}

.mobile-price-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-price-input {
    flex: 1;
    border: 1px solid var(--divar-border);
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    background: white;
    color: var(--divar-text-primary);
    transition: all 0.2s ease;
}

.mobile-price-input:focus {
    border-color: var(--divar-primary);
    box-shadow: 0 0 0 3px rgba(166, 38, 38, 0.1);
    outline: none;
}

.price-separator {
    font-size: 14px;
    color: var(--divar-text-muted);
    font-weight: 500;
}

.mobile-filter-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--divar-border-light);
    position: sticky;
    bottom: 0;
    background: white;
}

.mobile-clear-btn {
    flex: 1;
    border: 1px solid var(--divar-border);
    background: white;
    color: var(--divar-text-secondary);
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-clear-btn:hover {
    background: var(--divar-bg-tertiary);
    border-color: var(--divar-border);
}

.mobile-apply-btn {
    flex: 2;
    background: var(--divar-primary);
    border: 1px solid var(--divar-primary);
    color: white;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mobile-apply-btn:hover {
    background: var(--divar-primary-hover);
    border-color: var(--divar-primary-hover);
}

/* Category and City Lists */
.mobile-category-list,
.mobile-city-list {
    padding: 0 20px 20px;
}

.mobile-category-item,
.mobile-city-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--divar-border-light);
    text-decoration: none;
    color: var(--divar-text-primary);
    transition: all 0.2s ease;
}

.mobile-category-item:last-child,
.mobile-city-item:last-child {
    border-bottom: none;
}

.mobile-category-item:hover,
.mobile-city-item:hover {
    background: var(--divar-bg-tertiary);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 8px;
}

.mobile-category-item.active,
.mobile-city-item.active {
    color: var(--divar-primary);
    font-weight: 600;
}

.mobile-category-item i,
.mobile-city-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.mobile-category-item span:first-of-type,
.mobile-city-item span:first-of-type {
    flex: 1;
    font-size: 16px;
}

.category-count,
.city-count {
    font-size: 12px;
    color: var(--divar-text-muted);
    background: var(--divar-border-light);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.mobile-category-item.active .category-count,
.mobile-city-item.active .city-count {
    background: rgba(166, 38, 38, 0.1);
    color: var(--divar-primary);
}

.mobile-subcategory-list {
    background: var(--divar-bg-tertiary);
    margin: 8px -20px;
    padding: 8px 20px;
    border-radius: 8px;
}

.mobile-subcategory-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--divar-border);
    text-decoration: none;
    color: var(--divar-text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}

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

.mobile-subcategory-item:hover {
    color: var(--divar-primary);
}

.mobile-subcategory-item.active {
    color: var(--divar-primary);
    font-weight: 600;
}

/* Animations */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Active filter button states */
.mobile-filter-btn[aria-expanded="true"] {
    background: var(--divar-primary);
    border-color: var(--divar-primary);
    color: white;
}

/* Mobile responsive adjustments */
@media (max-width: 991.98px) {
    .search-header {
        padding: 0.75rem 0;
    }

    .results-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .results-info h5 {
        font-size: 1.1rem;
    }

    .view-options {
        margin-top: 0.5rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ad-card {
        border-radius: 12px;
    }

    .ad-card-image {
        height: 200px;
    }

    .pagination-wrapper {
        margin-top: 2rem;
    }
}

@media (max-width: 575.98px) {
    .mobile-search-form {
        padding: 0.75rem 0;
    }

    .mobile-search-bar {
        margin-bottom: 0.75rem;
    }

    .search-input-group {
        border-radius: 10px;
    }

    .mobile-search-input {
        padding: 10px 14px;
        font-size: 15px;
    }

    .mobile-search-btn {
        padding: 10px 14px;
        font-size: 15px;
    }

    .mobile-filter-buttons {
        gap: 6px;
        margin-bottom: 0.75rem;
    }

    .mobile-filter-btn {
        padding: 6px 10px;
        font-size: 13px;
        border-radius: 16px;
    }

    .filter-count {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }

    .mobile-dropdown-content {
        border-radius: 16px 16px 0 0;
        max-height: 90vh;
    }

    .mobile-dropdown-header {
        padding: 16px 16px 12px;
    }

    .mobile-dropdown-header h6 {
        font-size: 16px;
    }

    .mobile-close-btn {
        width: 28px;
        height: 28px;
    }

    .mobile-filter-sections {
        padding: 16px;
    }

    .mobile-filter-section {
        margin-bottom: 16px;
    }

    .mobile-filter-actions {
        padding: 16px;
        gap: 10px;
    }

    .mobile-category-list,
    .mobile-city-list {
        padding: 0 16px 16px;
    }

    .mobile-category-item,
    .mobile-city-item {
        padding: 10px 0;
    }

    .mobile-category-item:hover,
    .mobile-city-item:hover {
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .mobile-subcategory-list {
        margin: 6px -16px;
        padding: 6px 16px;
    }

    .results-header {
        padding: 0.75rem;
    }

    .results-info h5 {
        font-size: 1rem;
    }

    .ad-card-image {
        height: 180px;
    }

    .ad-card-title {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .ad-card-price {
        font-size: 0.85rem;
    }

    .ad-card-meta {
        font-size: 0.75rem;
    }
}

/* Touch improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .mobile-filter-btn:hover {
        background: white;
        border-color: var(--divar-border);
    }

    .mobile-filter-btn:hover:not(.active) {
        background: white;
        border-color: var(--divar-border);
        color: var(--divar-text-secondary);
    }

    .mobile-category-item:hover,
    .mobile-city-item:hover {
        background: transparent;
        margin: 0;
        padding: 12px 0;
    }

    .mobile-close-btn:hover {
        background: var(--divar-border-light);
        color: var(--divar-text-secondary);
    }
}

/* Dark mode support for mobile */
[data-theme="dark"] .mobile-dropdown-content {
    background: var(--divar-bg-secondary);
    color: var(--divar-text-primary);
}

[data-theme="dark"] .mobile-dropdown-header {
    background: var(--divar-bg-secondary);
    border-bottom-color: var(--divar-border);
}

[data-theme="dark"] .mobile-dropdown-header h6 {
    color: var(--divar-text-primary);
}

[data-theme="dark"] .mobile-filter-actions {
    background: var(--divar-bg-secondary);
    border-top-color: var(--divar-border);
}

[data-theme="dark"] .mobile-select,
[data-theme="dark"] .mobile-price-input {
    background: var(--divar-bg-primary);
    border-color: var(--divar-border);
    color: var(--divar-text-primary);
}

[data-theme="dark"] .mobile-category-item,
[data-theme="dark"] .mobile-city-item {
    color: var(--divar-text-primary);
    border-bottom-color: var(--divar-border);
}

[data-theme="dark"] .mobile-subcategory-list {
    background: var(--divar-bg-primary);
}

[data-theme="dark"] .mobile-subcategory-item {
    color: var(--divar-text-secondary);
    border-bottom-color: var(--divar-border);
}

.search-form-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.search-results-header,
.results-header {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

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

.results-info h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.view-options .btn-group {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.view-toggle {
    transition: all 0.2s ease;
}

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

.search-no-results,
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.search-no-results i,
.no-results-icon i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.results-list .ad-card {
    display: flex;
    flex-direction: row;
    height: 180px;
}

.results-list .ad-card-image {
    width: 200px;
    height: 180px;
    flex-shrink: 0;
}

.results-list .ad-card-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ad-card-container {
    position: relative;
}

.ad-card-link {
    text-decoration: none;
    color: inherit;
}

.ad-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

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

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

.ad-card-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--gray-200);
    color: var(--gray-400);
    font-size: 2rem;
}

.image-count {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.favorite-btn {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-600);
}

.favorite-btn:hover {
    background: white;
    color: var(--divar-red);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn.favorited {
    color: var(--divar-red);
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--divar-red);
}

.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ad-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--divar-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
}

.ad-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.ad-card-price {
    margin-bottom: 1rem;
}

.price-afn,
.price-usd {
    font-weight: 700;
    color: var(--divar-red);
    font-size: 16px;
}

.price-usd {
    color: var(--divar-orange);
    margin-right: 0.5rem;
}

.price-negotiable {
    font-weight: 600;
    color: var(--gray-600);
    font-style: italic;
}

.ad-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.ad-location,
.ad-time {
    font-size: 13px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
}

.ad-card-categories {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.category-badge,
.subcategory-badge {
    font-size: 11px;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.category-badge {
    background: var(--gray-100);
    color: var(--gray-700);
}

.subcategory-badge {
    background: rgba(166, 38, 38, 0.1);
    color: var(--divar-red);
}

/* Sidebar فیلترها */
.search-sidebar {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.filter-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.filter-link:hover {
    background: var(--gray-50);
    color: var(--divar-red);
}

.filter-link.active {
    background: rgba(166, 38, 38, 0.1);
    color: var(--divar-red);
    font-weight: 500;
}

.filter-link .count {
    font-size: 12px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
}

.filter-link.active .count {
    background: rgba(166, 38, 38, 0.2);
    color: var(--divar-red);
}

.subcategory-links {
    margin-top: 0.5rem;
    margin-right: 1rem;
    padding-right: 1rem;
    border-right: 2px solid var(--gray-200);
}

.subcategory-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 13px;
}

.subcategory-link:hover {
    background: var(--gray-50);
    color: var(--divar-red);
}

.subcategory-link.active {
    background: rgba(166, 38, 38, 0.1);
    color: var(--divar-red);
    font-weight: 500;
}

.city-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.city-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.city-link:hover {
    background: var(--gray-50);
    color: var(--divar-red);
}

.city-link.active {
    background: rgba(166, 38, 38, 0.1);
    color: var(--divar-red);
    font-weight: 500;
}

.city-link .count {
    font-size: 12px;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
}

.city-link.active .count {
    background: rgba(166, 38, 38, 0.2);
    color: var(--divar-red);
}

/* فیلترهای پیشرفته */
.advanced-filters {
    margin-top: 1rem;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.price-range {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.price-range input {
    flex: 1;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    font-size: 14px;
}

.price-separator {
    color: var(--gray-500);
    font-weight: 500;
}

/* Search page specific styles */
.search-page {
    background: var(--gray-50);
}

.search-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
}

.divar-search-form {
    background: white;
}

.divar-input,
.divar-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.divar-input:focus,
.divar-select:focus {
    border-color: var(--divar-red);
    box-shadow: 0 0 0 3px rgba(166, 38, 38, 0.1);
    outline: none;
}

.btn-divar {
    background: var(--divar-red);
    color: white;
    border: 1px solid var(--divar-red);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-divar:hover {
    background: var(--divar-red-dark);
    border-color: var(--divar-red-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.divar-btn-outline {
    background: transparent;
    color: var(--divar-red);
    border: 1px solid var(--divar-red);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.divar-btn-outline:hover {
    background: var(--divar-red);
    color: white;
}

.divar-link {
    color: var(--divar-red);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.divar-link:hover {
    color: var(--divar-red-dark);
}

.collapse-icon {
    transition: transform 0.2s ease;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.active-filter {
    display: flex;
    align-items: center;
    background: rgba(166, 38, 38, 0.1);
    color: var(--divar-red);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.remove-filter {
    background: none;
    border: none;
    color: var(--divar-red);
    margin-right: 0.25rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.remove-filter:hover {
    color: var(--divar-red-dark);
}

.category-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* صفحه جزئیات آگهی */
.ad-detail-header {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.ad-image-gallery {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.ad-image-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ad-image-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.ad-image-nav.prev {
    right: 1rem;
}

.ad-image-nav.next {
    left: 1rem;
}

.ad-image-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.ad-image-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ad-image-indicator.active {
    background: white;
}

.ad-info-section {
    padding: 2rem;
}

.ad-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.ad-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--divar-red);
    margin-bottom: 1.5rem;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.ad-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
    font-size: 14px;
}

.ad-meta-item i {
    color: var(--gray-500);
    width: 16px;
}

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

.ad-feature-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
}

.ad-feature-label {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.ad-feature-value {
    font-weight: 600;
    color: var(--gray-900);
}

.ad-description {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.ad-description h3 {
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.ad-description p {
    color: var(--gray-700);
    line-height: 1.8;
}

/* کارت اطلاعات فروشنده */
.seller-info-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.seller-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.seller-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.seller-verification {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.seller-verification.verified {
    color: #10b981;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-btn {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.contact-btn-primary {
    background: var(--divar-red);
    color: white;
}

.contact-btn-primary:hover {
    background: var(--divar-red-dark);
    color: white;
}

.contact-btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.contact-btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

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

.contact-btn-chat:hover {
    background: #c53030;
    border-color: #c53030;
    color: white;
    transform: translateY(-1px);
}

/* صفحه جزئیات آگهی */
.ad-detail-page {
    background: var(--gray-50);
    min-height: 100vh;
}

.no-image-placeholder {
    background: white;
    border-radius: var(--radius-xl);
    border: 2px dashed var(--gray-300);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.placeholder-content {
    color: var(--gray-500);
}

.image-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
}

.ad-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* آگهی‌های مشابه */
.similar-ads-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
}

/* فرم ثبت آگهی */
.ad-form-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* مراحل ایجاد آگهی */
.step-wizard {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 0 1rem;
}

.step-item {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.step-item.active .step-number {
    background: var(--divar-red);
    color: white;
}

.step-item.completed .step-number {
    background: var(--divar-red);
    color: white;
}

.step-line {
    height: 2px;
    background: var(--gray-300);
    flex: 1;
    margin: 0 1rem;
}

.step-item.completed .step-line {
    background: var(--divar-red);
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.category-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.category-option {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

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

.category-option.selected {
    border-color: var(--divar-red);
    background: rgba(166, 38, 38, 0.05);
}

.category-option-icon {
    font-size: 3rem;
    color: var(--divar-red);
    margin-bottom: 1rem;
}

.category-option-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.category-option-desc {
    font-size: 14px;
    color: var(--gray-600);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: var(--divar-red);
}

.image-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.image-upload-area:hover {
    border-color: var(--divar-red);
    background: var(--gray-50);
}

.image-upload-area.dragover {
    border-color: var(--divar-red);
    background: rgba(166, 38, 38, 0.05);
}

.image-upload-icon {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.image-upload-text {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.image-upload-hint {
    font-size: 12px;
    color: var(--gray-500);
}

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.uploaded-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

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

.remove-image {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

/* پروفایل کاربری */
.profile-header {
    background: linear-gradient(135deg, var(--divar-red), var(--divar-orange));
    color: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.profile-stat {
    text-align: center;
}

.profile-stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
}

.profile-stat-label {
    font-size: 12px;
    opacity: 0.9;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.profile-tabs {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.profile-tab-nav {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.profile-tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-600);
}

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

.profile-tab-content {
    padding: 2rem;
    min-height: 400px;
}

.profile-sidebar {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .ad-features-grid {
        grid-template-columns: 1fr;
    }
    
    .ad-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .profile-stats {
        gap: 1rem;
    }
    
    .profile-tab-nav {
        flex-direction: column;
    }
    
    .contact-buttons {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .contact-buttons .contact-btn {
        margin-bottom: 0;
    }
    
    .main-content {
        padding-bottom: 120px;
    }
}

@media (max-width: 576px) {
    .uploaded-images {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ad-title {
        font-size: 1.5rem;
    }
    
    .ad-price {
        font-size: 1.5rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .step-wizard {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-line {
        width: 2px;
        height: 30px;
        margin: 0.5rem 0;
    }
    
    .category-selection {
        grid-template-columns: 1fr;
    }
    
    .search-form-container,
    .ad-form-container,
    .ad-description,
    .profile-tabs,
    .profile-sidebar {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: var(--radius-lg);
    }
}

/* صفحات احراز هویت */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--gray-200);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    margin-bottom: 1rem;
}

.auth-logo .logo-img {
    max-width: 80px;
    height: auto;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0;
}

.auth-form {
    padding: 2rem;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
    border-top: 1px solid var(--gray-200);
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    position: relative;
    top: -0.75rem;
}

.auth-footer {
    padding: 0 2rem 2rem;
}

.auth-terms {
    font-size: 0.75rem;
    line-height: 1.4;
}

.auth-features {
    padding: 1rem 2rem 2rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Google Sign-In Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Noto Sans Arabic', 'Vazirmatn', 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.25px;
}

.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #c6c9cc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: #3c4043;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-google:active {
    background-color: #f1f3f4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.btn-google:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.25);
}

.btn-google .google-icon {
    flex-shrink: 0;
}

.btn-google span {
    white-space: nowrap;
}

.btn-google.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-google.loading .google-icon {
    animation: google-spin 1s linear infinite;
}

@keyframes google-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Google Auth Waiting Overlay (for WebView/App) */
.google-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.google-auth-overlay.active {
    opacity: 1;
}

.google-auth-modal {
    background: white;
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: googleModalSlideUp 0.4s ease;
}

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

.google-auth-spinner {
    margin-bottom: 24px;
    animation: google-spin 2s linear infinite;
    display: inline-block;
}

.google-auth-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.google-auth-message {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 24px;
}

.google-auth-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}

.google-auth-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    animation: googleDotPulse 1.4s infinite ease-in-out;
}

.google-auth-dots span:nth-child(1) { animation-delay: 0s; }
.google-auth-dots span:nth-child(2) { animation-delay: 0.2s; }
.google-auth-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes googleDotPulse {
    0%, 80%, 100% {
        background: #d1d5db;
        transform: scale(1);
    }
    40% {
        background: #4285F4;
        transform: scale(1.3);
    }
}

.google-auth-cancel {
    background: none;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 10px 28px;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-auth-cancel:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.google-auth-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #d4edda;
    color: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    animation: googleSuccessPop 0.4s ease;
}

@keyframes googleSuccessPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Google Auth Toast Notification */
.google-auth-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 999999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.google-auth-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.google-auth-toast.error {
    background: #dc3545;
}

.feature-item p {
    margin: 0;
    font-size: 0.75rem;
}

/* فرم‌های احراز هویت */
.divar-input,
.divar-select {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.divar-input:focus,
.divar-select:focus {
    outline: none;
    border-color: var(--divar-red);
    box-shadow: 0 0 0 3px rgba(166, 38, 38, 0.1);
}

.divar-checkbox {
    accent-color: var(--divar-red);
}

.btn-divar {
    background: var(--divar-red);
    color: white;
    border: 1px solid var(--divar-red);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-divar:hover {
    background: var(--divar-red-dark);
    border-color: var(--divar-red-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-divar {
    background: transparent;
    color: var(--divar-red);
    border: 1px solid var(--divar-red);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-divar:hover {
    background: var(--divar-red);
    color: white;
}

.auth-link {
    color: var(--divar-red);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--divar-red-dark);
    text-decoration: underline;
}

/* نوع حساب کاربری */
.account-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.account-type-item {
    margin-bottom: 0;
}

.account-type-item .form-check-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.account-type-item .form-check-input:checked + .form-check-label {
    border-color: var(--divar-red);
    background: rgba(166, 38, 38, 0.05);
}

.account-type-icon {
    font-size: 1.5rem;
    margin-left: 0.75rem;
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.account-type-item .form-check-input:checked + .form-check-label .account-type-icon {
    color: var(--divar-red);
}

.account-type-content h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.account-type-content small {
    color: var(--gray-600);
}

/* قدرت رمز عبور */
.password-strength {
    margin-bottom: 1rem;
}

.strength-meter {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar.strength-weak {
    background: #dc3545;
    width: 20%;
}

.strength-bar.strength-fair {
    background: #fd7e14;
    width: 40%;
}

.strength-bar.strength-good {
    background: #0dcaf0;
    width: 60%;
}

.strength-bar.strength-strong {
    background: #198754;
    width: 80%;
}

.strength-bar.strength-very-strong {
    background: #198754;
    width: 100%;
}

.strength-text {
    font-size: 0.75rem;
}

/* هشدارهای دیوار */
.divar-alert {
    border-radius: var(--radius-lg);
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-content {
    flex: 1;
}

/* فرم کمکی */
.form-help {
    margin-top: 0.25rem;
}

.form-help small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.required::after {
    content: " *";
    color: #dc3545;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .auth-page {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 0;
        border-radius: var(--radius-lg);
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .auth-footer {
        padding: 0 1.5rem 1.5rem;
    }
    
    .auth-features {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .account-type-selection {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .feature-item i {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .auth-form {
        padding: 1rem;
    }
    
    .auth-footer {
        padding: 0 1rem 1rem;
    }
    
    .auth-features {
        padding: 1rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .btn-divar,
    .btn-outline-divar {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* صفحه ثبت آگهی */
.create-ad-page {
    background: var(--gray-50);
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gray-200);
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    background: var(--gray-50);
    padding: 0 1rem;
    transition: all 0.3s ease;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.step.active .step-number {
    background: var(--divar-red);
    color: white;
    transform: scale(1.1);
}

.step.active .step-label {
    color: var(--divar-red);
    font-weight: 600;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1rem;
    color: var(--gray-600);
}

/* Form Steps */
.divar-form {
    position: relative;
}

.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-step.active {
    display: block;
}

/* Form Cards */
.form-card {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-card:hover {
    box-shadow: var(--shadow-md);
}

.form-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.form-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.form-card-title i {
    color: var(--divar-red);
}

.form-card-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0;
}

.form-card-body {
    padding: 1.5rem;
}

/* Form Elements */
.divar-textarea {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    resize: vertical;
    min-height: 120px;
}

.divar-textarea:focus {
    border-color: var(--divar-red);
    box-shadow: 0 0 0 3px rgba(166, 38, 38, 0.1);
    outline: none;
}

.form-help {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-help i {
    color: var(--divar-orange);
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--gray-50);
}

.image-upload-area:hover {
    border-color: var(--divar-red);
    background: rgba(166, 38, 38, 0.02);
}

.image-upload-area.drag-over {
    border-color: var(--divar-red);
    background: rgba(166, 38, 38, 0.05);
    transform: scale(1.02);
}

.upload-zone {
    cursor: pointer;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--bg-light);
}

.upload-zone.required {
    border-color: var(--divar-red);
    background: rgba(166, 38, 38, 0.02);
}

.upload-zone.required .upload-icon {
    color: var(--divar-red);
}

.upload-zone.required .upload-text h6 {
    color: var(--divar-red);
}

.upload-zone .upload-text p.text-success {
    font-weight: 600;
    color: var(--success-color) !important;
}

.upload-icon {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.upload-zone:hover .upload-icon {
    color: var(--divar-red);
    transform: scale(1.1);
}

.upload-text h6 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.upload-text p {
    color: var(--gray-500);
    margin-bottom: 0;
}

.upload-hint {
    margin-top: 1rem;
}

.upload-hint small {
    color: var(--gray-400);
}

/* Image Preview */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.image-preview-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.image-preview-item:hover {
    border-color: var(--divar-red);
    transform: scale(1.05);
}

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

.remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.remove-image:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 0.5rem;
    font-size: 10px;
    text-align: center;
}

.image-info small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Submit Section */
.submit-section {
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.submit-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.form-navigation .btn {
    min-width: 140px;
}

/* Category Specific Fields */
#categorySpecificFields {
    margin-top: 1.5rem;
}

#categorySpecificFields .form-card {
    border-left: 4px solid var(--divar-orange);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .create-ad-page {
        padding: 1rem 0;
    }
    
    .progress-steps {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .form-card-header {
        padding: 1rem;
    }
    
    .form-card-body {
        padding: 1rem;
    }
    
    .form-card-title {
        font-size: 1.125rem;
    }
    
    .upload-zone {
        padding: 1.5rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .form-navigation {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-navigation .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .progress-steps {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .step {
        padding: 0 0.5rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .step-label {
        font-size: 9px;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .form-card {
        margin-bottom: 1rem;
    }
    
    .upload-zone {
        padding: 1rem;
    }
    
    .upload-text h6 {
        font-size: 1rem;
    }
    
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* Divar Ad Page Styles - Exact Match */
:root {
    --divar-primary: #a62626;
    --divar-primary-hover: #8b1e1e;
    --divar-secondary: #f59e0b;
    --divar-text-primary: #0f172a;
    --divar-text-secondary: #64748b;
    --divar-text-muted: #94a3b8;
    --divar-border: #e2e8f0;
    --divar-border-light: #f1f5f9;
    --divar-bg-primary: #ffffff;
    --divar-bg-secondary: #f8fafc;
    --divar-bg-tertiary: #f1f5f9;
    --divar-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --divar-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --divar-primary: #dc2626;
    --divar-primary-hover: #b91c1c;
    --divar-secondary: #f59e0b;
    --divar-text-primary: #f8fafc;
    --divar-text-secondary: #cbd5e1;
    --divar-text-muted: #94a3b8;
    --divar-border: #334155;
    --divar-border-light: #475569;
    --divar-bg-primary: #1e293b;
    --divar-bg-secondary: #0f172a;
    --divar-bg-tertiary: #334155;
    --divar-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --divar-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.divar-ad-page {
    background-color: var(--divar-bg-secondary);
    min-height: 100vh;
    font-family: 'Noto Sans Arabic', 'Vazirmatn', 'Tahoma', sans-serif;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}
.divar-ad-page *,
.divar-ad-page *::before,
.divar-ad-page *::after {
    box-sizing: border-box;
}

/* Top Navigation - Exact Divar Style */
.divar-top-nav {
    background: var(--divar-bg-primary);
    border-bottom: 1px solid var(--divar-border);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.divar-breadcrumb {
    font-size: 13px;
    color: var(--divar-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.divar-breadcrumb a {
    color: var(--divar-primary);
    text-decoration: none;
    transition: color 0.15s ease;
    font-weight: 400;
}

.divar-breadcrumb a:hover {
    color: var(--divar-primary-hover);
}

.divar-breadcrumb .separator {
    color: var(--divar-text-muted);
    font-size: 12px;
    margin: 0 4px;
}

.divar-main-content {
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    gap: 16px;
    box-sizing: border-box;
}
/* Prevent Bootstrap row from causing horizontal overflow on ad page */
.divar-ad-page .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}
.divar-ad-page .row {
    margin-left: 0;
    margin-right: 0;
}
.divar-ad-page .row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
    max-width: 100%;
    min-width: 0;
}

/* Ad Main Content - Exact Divar Layout */
.divar-ad-main {
    background: var(--divar-bg-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--divar-shadow);
    border: 1px solid var(--divar-border);
    max-width: 100%;
}

.divar-ad-title {
    font-size: clamp(0.9rem, 2vw, 1.4rem);
    font-weight: 700;
    color: var(--divar-text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
    padding: 16px 16px 0 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.divar-ad-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--divar-text-muted);
    padding: 0 16px;
}

.divar-time::before {
    content: "•";
    margin-left: 4px;
}

.divar-location::before {
    content: "•";
    margin-left: 4px;
}

/* Image Gallery - Exact Divar Style */
.divar-image-gallery {
    margin-bottom: 0;
}

.divar-main-image {
    position: relative;
    width: 100%;
    height: 300px;
    background: var(--divar-bg-tertiary);
    overflow: hidden;
}

.divar-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.divar-image-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.divar-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.divar-nav-btn:hover {
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.divar-prev-btn {
    left: 12px;
}

.divar-next-btn {
    right: 12px;
}

.divar-nav-btn svg {
    width: 16px;
    height: 16px;
    color: #374151;
}

.divar-image-thumbnails {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    overflow-x: auto;
    background: var(--divar-bg-primary);
}

.divar-thumbnail {
    flex-shrink: 0;
    width: 48px;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--divar-border);
    transition: border-color 0.2s;
}

.divar-thumbnail.active {
    border-color: var(--divar-primary);
    border-width: 2px;
}

.divar-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.divar-no-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--divar-bg-tertiary);
    color: var(--divar-text-muted);
}

.divar-no-image-placeholder {
    text-align: center;
}

.divar-no-image-placeholder svg {
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Price Section - Exact Divar Style */
.divar-price-section {
    padding: 16px;
    border-bottom: 1px solid var(--divar-border-light);
}

.divar-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--divar-text-primary);
}

.divar-price-amount {
    color: var(--divar-text-primary);
}

.divar-price-usd {
    color: var(--divar-text-secondary);
    font-size: 14px;
    margin-right: 8px;
}

.divar-price-negotiable {
    color: var(--divar-text-secondary);
}

/* Ad Details - Exact Divar Grid */
.divar-ad-details {
    padding: 0 16px 16px 16px;
}

.divar-details-grid {
    display: grid;
    gap: 0;
}

.divar-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--divar-border-light);
    font-size: 14px;
}

.divar-detail-row:last-child {
    border-bottom: none;
}

.divar-detail-label {
    color: var(--divar-text-secondary);
    font-weight: 400;
}

.divar-detail-value {
    color: var(--divar-text-primary);
    font-weight: 500;
}

/* Description - Exact Divar Style */
.divar-description {
    padding: 16px;
    border-top: 8px solid var(--divar-bg-secondary);
    background: var(--divar-bg-primary);
}

.divar-description h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--divar-text-primary);
    margin: 0 0 12px 0;
}

.divar-description p {
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    color: var(--divar-text-primary);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Location Section */
.divar-location-section {
    padding: 16px;
    border-top: 8px solid var(--divar-bg-secondary);
    background: var(--divar-bg-primary);
}

.divar-location-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--divar-text-primary);
    margin: 0 0 12px 0;
}

.divar-location-info {
    padding: 12px;
    background: var(--divar-bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--divar-border);
}

.divar-location-text {
    font-size: 14px;
    color: var(--divar-text-primary);
}

/* Sidebar - Exact Divar Style */
.divar-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
}

/* Contact Card - Exact Divar Design */
.divar-contact-card {
    background: var(--divar-bg-primary);
    border-radius: 8px;
    border: 1px solid var(--divar-border);
    box-shadow: var(--divar-shadow);
    overflow: hidden;
}

.divar-contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 12px 16px;
    border-bottom: 1px solid var(--divar-border-light);
}

.divar-contact-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--divar-text-primary);
    margin: 0;
}

.divar-chat-btn {
    background: none;
    border: none;
    color: var(--divar-primary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}

.divar-chat-btn:hover {
    color: var(--divar-primary-hover);
    background: var(--divar-bg-tertiary);
}

.divar-contact-actions {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Buttons - Exact Divar Style */
.divar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
}

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

.divar-btn-primary:hover {
    background: var(--divar-primary-hover);
    border-color: var(--divar-primary-hover);
    color: white;
}

.divar-btn-outline {
    background: var(--divar-bg-primary);
    color: var(--divar-text-primary);
    border: 1px solid var(--divar-border);
}

.divar-btn-outline:hover {
    background: var(--divar-bg-tertiary);
    color: var(--divar-text-primary);
    border-color: var(--divar-border);
}

.divar-btn-full {
    width: 100%;
}

/* Safety Warning - Exact Divar Style */
.divar-safety-warning {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-top: 12px;
}

[data-theme="dark"] .divar-safety-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.divar-warning-icon {
    flex-shrink: 0;
    color: #d97706;
}

.divar-warning-text {
    font-size: 12px;
}

.divar-warning-text strong {
    display: block;
    color: #92400e;
    margin-bottom: 2px;
    font-weight: 600;
}

[data-theme="dark"] .divar-warning-text strong {
    color: #fbbf24;
}

.divar-warning-text p {
    color: #a16207;
    margin: 0;
    line-height: 1.4;
}

[data-theme="dark"] .divar-warning-text p {
    color: #fcd34d;
}

/* Actions Card - Exact Divar Style */
.divar-actions-card {
    background: var(--divar-bg-primary);
    border-radius: 8px;
    border: 1px solid var(--divar-border);
    box-shadow: var(--divar-shadow);
    padding: 16px;
}

.divar-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.divar-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--divar-bg-primary);
    border: 1px solid var(--divar-border);
    border-radius: 8px;
    color: var(--divar-text-primary);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.divar-action-btn:hover {
    background: var(--divar-bg-tertiary);
    color: var(--divar-text-primary);
}

.divar-action-btn.favorited {
    color: var(--divar-primary);
    border-color: var(--divar-primary);
    background: rgba(166, 38, 38, 0.05);
}

[data-theme="dark"] .divar-action-btn.favorited {
    background: rgba(220, 38, 38, 0.1);
}

.divar-action-btn.favorited svg path {
    fill: var(--divar-primary);
}

/* Toast Messages - Exact Divar Style */
.divar-toast {
    position: fixed;
    top: 16px;
    right: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--divar-shadow-lg);
    max-width: 300px;
}

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

.divar-toast-success {
    background: #059669;
}

.divar-toast-error {
    background: #dc2626;
}

/* Responsive Design - Exact Divar Breakpoints */
@media (max-width: 1024px) {
    .divar-main-content {
        padding: 12px;
    }
    .divar-ad-page .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

@media (max-width: 768px) {
    .divar-ad-page .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100%;
    }
    .divar-ad-page .row > [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }
    .divar-main-content {
        padding: 8px;
        flex-direction: column;
        max-width: 100%;
    }
    
    .divar-sidebar {
        position: static;
        order: -1;
    }
    
    .divar-ad-title {
        font-size: 18px;
        padding: 12px 12px 0 12px;
    }
    
    .divar-main-image {
        height: 240px;
    }
    
    .divar-contact-card,
    .divar-actions-card {
        margin-bottom: 8px;
    }
    
    .divar-nav-btn {
        width: 28px;
        height: 28px;
    }
    
    .divar-nav-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .divar-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .divar-ad-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 0 12px;
    }
}

@media (max-width: 480px) {
    .divar-ad-page .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .divar-ad-page .row > [class*="col-"] {
        padding-left: 4px;
        padding-right: 4px;
    }
    .divar-main-content {
        padding: 6px;
        max-width: 100%;
    }
    .divar-top-nav {
        padding: 6px 0;
    }
    .divar-top-nav .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .divar-breadcrumb {
        font-size: 12px;
        padding: 0 4px;
        flex-wrap: wrap;
    }
    
    .divar-main-image {
        height: 200px;
    }
    
    .divar-ad-title {
        font-size: 16px;
        padding: 8px 8px 0 8px;
    }
    
    .divar-price {
        font-size: 14px;
    }
    
    .divar-contact-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    .divar-contact-actions {
        padding: 12px;
    }
    
    .divar-actions-card {
        padding: 12px;
    }
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--divar-bg-primary);
    border: 1px solid var(--divar-border);
    box-shadow: var(--divar-shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000;
}

/* ======================================
   Onboarding Popup Styles
   ====================================== */

.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Ensure proper mobile viewport handling */
    height: 100dvh;
    width: 100dvw;
}

.onboarding-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ======================================
   Bootstrap Modal Backdrop Tweaks
   ====================================== */
/* غیرفعال کردن فید کلی صفحه برای بک‌دراپ بوت‌استرپ */
.modal-backdrop {
    background: transparent !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.onboarding-modal {
    background: var(--divar-bg-primary);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    /* Ensure proper mobile viewport handling */
    max-height: calc(100vh - 2rem);
}

.onboarding-overlay.show .onboarding-modal {
    transform: scale(1) translateY(0);
}

.onboarding-header {
    background: linear-gradient(135deg, var(--divar-primary), var(--divar-primary-hover));
    color: white;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.onboarding-logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 24px;
}

.onboarding-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.onboarding-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.onboarding-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.onboarding-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.onboarding-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--divar-bg-secondary);
    border-bottom: 1px solid var(--divar-border);
}

.progress-step {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--divar-border);
    transition: all 0.3s ease;
}

.progress-step.active {
    background: var(--divar-primary);
    transform: scale(1.2);
}

.progress-step.completed {
    background: var(--divar-primary);
}

.onboarding-content {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--divar-border) transparent;
    min-height: 0;
}

.onboarding-content::-webkit-scrollbar {
    width: 6px;
}

.onboarding-content::-webkit-scrollbar-track {
    background: transparent;
}

.onboarding-content::-webkit-scrollbar-thumb {
    background: var(--divar-border);
    border-radius: 3px;
}

.onboarding-content::-webkit-scrollbar-thumb:hover {
    background: var(--divar-text-muted);
}

.onboarding-step {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.onboarding-step.active {
    display: block;
}

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

/* Language Selection Step */
.language-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--divar-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--divar-bg-primary);
}

.language-option:hover {
    border-color: var(--divar-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(166, 38, 38, 0.1);
}

.language-option.selected {
    border-color: var(--divar-primary);
    background: rgba(166, 38, 38, 0.05);
}

.language-flag {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.language-flag.fa {
    background: transparent;
    color: white;
}

.language-flag.ps {
    background: transparent;
    color: white;
}

.language-flag.en {
    background: transparent;
    color: white;
}

.language-info {
    flex: 1;
}

.language-name {
    font-weight: 600;
    color: var(--divar-text-primary);
    margin-bottom: 0.25rem;
}

.language-native {
    font-size: 0.85rem;
    color: var(--divar-text-secondary);
}

/* Authentication Step */
.auth-form {
    margin-bottom: 1.5rem;
}

.auth-input-group {
    margin-bottom: 1rem;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--divar-border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--divar-bg-primary);
    color: var(--divar-text-primary);
}

.auth-input:focus {
    border-color: var(--divar-primary);
    box-shadow: 0 0 0 3px rgba(166, 38, 38, 0.1);
    outline: none;
}

.auth-input.is-invalid {
    border-color: #dc3545;
}

.auth-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-help {
    font-size: 0.8rem;
    color: var(--divar-text-muted);
    margin-top: 0.25rem;
}

.forgot-password-link {
    display: block;
    text-align: center;
    color: var(--divar-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
    margin-top: 0.5rem;
}

.forgot-password-link:hover {
    color: var(--divar-red);
    text-decoration: underline;
}

/* Registration Step */
.registration-form {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.account-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.account-type-item {
    margin-bottom: 0;
}

.account-type-item .form-check-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--divar-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    background: var(--divar-bg-primary);
}

.account-type-item .form-check-input:checked + .form-check-label {
    border-color: var(--divar-primary);
    background: rgba(166, 38, 38, 0.05);
}

.account-type-icon {
    font-size: 1.25rem;
    margin-left: 0.75rem;
    color: var(--divar-text-muted);
    transition: color 0.2s ease;
}

.account-type-item .form-check-input:checked + .form-check-label .account-type-icon {
    color: var(--divar-primary);
}

.account-type-content h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--divar-text-primary);
}

.account-type-content small {
    color: var(--divar-text-secondary);
    font-size: 0.8rem;
}

/* Password Strength */
.password-strength {
    margin-bottom: 1rem;
}

.strength-meter {
    height: 4px;
    background: var(--divar-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar.strength-weak {
    background: #dc3545;
    width: 20%;
}

.strength-bar.strength-fair {
    background: #fd7e14;
    width: 40%;
}

.strength-bar.strength-good {
    background: #0dcaf0;
    width: 60%;
}

.strength-bar.strength-strong {
    background: #198754;
    width: 80%;
}

.strength-bar.strength-very-strong {
    background: #198754;
    width: 100%;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--divar-text-muted);
}

/* Navigation Buttons */
.onboarding-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--divar-border);
    background: var(--divar-bg-secondary);
}

.onboarding-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.onboarding-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.onboarding-btn-secondary {
    background: var(--divar-bg-primary);
    color: var(--divar-text-primary);
    border-color: var(--divar-border);
}

.onboarding-btn-secondary:hover:not(:disabled) {
    background: var(--divar-bg-tertiary);
    border-color: var(--divar-border);
}

.onboarding-btn-primary {
    background: var(--divar-primary);
    color: white;
    border-color: var(--divar-primary);
}

.onboarding-btn-primary:hover:not(:disabled) {
    background: var(--divar-primary-hover);
    border-color: var(--divar-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(166, 38, 38, 0.2);
}

.onboarding-btn-loading {
    position: relative;
    color: transparent;
}

.onboarding-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Animation */
.success-animation {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 32px;
    color: white;
    animation: successPulse 2s ease-in-out;
}

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

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--divar-text-primary);
    margin-bottom: 1rem;
}

.success-message {
    color: var(--divar-text-secondary);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .onboarding-modal {
        width: 95%;
        max-height: 95vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    
    .onboarding-header {
        padding: 1.25rem 1.5rem 1rem;
        position: relative;
    }
    
    .onboarding-content {
        padding: 1.5rem;
        overflow: visible;
    }
    
    .onboarding-navigation {
        padding: 1rem 1.5rem;
    }
    
    .language-options {
        gap: 0.75rem;
    }
    
    .language-option {
        padding: 0.875rem;
    }
    
    .account-type-selection {
        grid-template-columns: 1fr;
    }
    
    /* Ensure proper form sizing on tablets */
    .auth-input {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .onboarding-modal {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    
    .onboarding-header {
        padding: 0.75rem 1rem 0.5rem;
        position: relative;
        min-height: auto;
    }
    
    .onboarding-logo {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin: 0 auto 0.5rem;
    }
    
    .onboarding-logo img {
        width: 30px;
        height: 30px;
    }
    
    .onboarding-title {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .onboarding-subtitle {
        font-size: 0.8rem;
        margin-bottom: 0;
    }
    
    .onboarding-progress {
        padding: 0.5rem 1rem;
    }
    
    .onboarding-content {
        padding: 1rem;
        overflow: visible;
    }
    
    .onboarding-navigation {
        padding: 1rem;
    }
    
    /* Ensure form elements are properly sized for mobile */
    .auth-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    .language-options {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .language-option {
        padding: 0.75rem;
    }
    
    .auth-form {
        margin-bottom: 1rem;
    }
    
    .auth-input-group {
        margin-bottom: 1rem;
    }
    
    /* Improve touch targets for mobile */
    .onboarding-close {
        width: 36px;
        height: 36px;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    /* Ensure buttons are properly sized for touch */
    .btn-primary, .btn-secondary {
        min-height: 44px;
        font-size: 16px;
    }
    
    /* Improve form spacing on mobile */
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Better spacing for account type selection */
    .account-type-selection {
        gap: 0.75rem;
    }
    
    .account-type-item {
        padding: 1rem 0.75rem;
    }
}

/* Dark theme support */
[data-theme="dark"] .onboarding-modal {
    background: var(--divar-bg-primary);
    border: 1px solid var(--divar-border);
}

[data-theme="dark"] .onboarding-content {
    background: var(--divar-bg-primary);
}

[data-theme="dark"] .language-option {
    background: var(--divar-bg-primary);
    border-color: var(--divar-border);
}

[data-theme="dark"] .auth-input {
    background: var(--divar-bg-primary);
    border-color: var(--divar-border);
    color: var(--divar-text-primary);
}

[data-theme="dark"] .account-type-item .form-check-label {
    background: var(--divar-bg-primary);
    border-color: var(--divar-border);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--divar-text-primary);
}

/* Enhanced Ad Show Page Styles */
/* ============================= */

/* Section Titles */
.divar-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--divar-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--divar-border-light);
    display: flex;
    align-items: center;
}

.divar-section-title i {
    color: var(--divar-primary-light);
}

/* Details Sections */
.divar-details-section {
    background: var(--divar-card-bg);
    border: 1px solid var(--divar-border-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.divar-details-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.divar-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.divar-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--divar-bg-secondary);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.divar-detail-row:hover {
    background: var(--divar-primary-bg);
    border-color: var(--divar-primary-light);
}

.divar-detail-label {
    font-weight: 500;
    color: var(--divar-text-secondary);
    font-size: 0.9rem;
    min-width: 100px;
}

.divar-detail-value {
    font-weight: 600;
    color: var(--divar-text-primary);
    text-align: left;
    flex: 1;
}

.divar-detail-value .badge {
    font-size: 0.8rem;
    padding: 0.4em 0.8em;
}

/* Amenities and Features */
.divar-amenities {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--divar-border-light);
}

.divar-amenities h6 {
    color: var(--divar-text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.divar-amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.divar-amenity-badge {
    display: inline-flex;
    align-items: center;
    background: var(--divar-success-bg);
    color: var(--divar-success-text);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--divar-success-border);
    transition: all 0.2s ease;
}

.divar-amenity-badge:hover {
    background: var(--divar-success);
    color: white;
    transform: translateY(-1px);
}

.divar-amenity-badge i {
    margin-left: 0.3rem;
    font-size: 0.8rem;
}

/* Location Card */
.divar-location-card {
    background: var(--divar-card-bg);
    border: 1px solid var(--divar-border-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.divar-location-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--divar-border-light);
}

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

.location-label {
    font-weight: 600;
    color: var(--divar-text-secondary);
    min-width: 80px;
    margin-left: 1rem;
}

.location-value {
    color: var(--divar-text-primary);
    font-weight: 500;
}

/* Contact Section */
.divar-contact-section {
    margin-bottom: 1.5rem;
}

.divar-contact-card {
    background: var(--divar-card-bg);
    border: 1px solid var(--divar-border-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--divar-border-light);
}

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

.contact-icon {
    font-size: 1.2rem;
    color: var(--divar-primary);
    margin-left: 1rem;
    width: 24px;
    text-align: center;
}

.contact-info {
    flex: 1;
}

.contact-label {
    display: block;
    font-size: 0.85rem;
    color: var(--divar-text-secondary);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--divar-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-value:hover {
    color: var(--divar-primary-dark);
    text-decoration: underline;
}

/* Owner Section */
.divar-owner-section {
    margin-bottom: 1.5rem;
}

.divar-owner-card {
    background: var(--divar-card-bg);
    border: 1px solid var(--divar-border-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.owner-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.owner-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--divar-primary-light);
    flex-shrink: 0;
}

.owner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--divar-primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--divar-primary);
    font-size: 1.5rem;
}

.owner-details {
    flex: 1;
}

.owner-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--divar-text-primary);
    margin-bottom: 0.25rem;
}

.owner-location {
    color: var(--divar-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.owner-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    font-size: 0.85rem;
    color: var(--divar-text-secondary);
    display: flex;
    align-items: center;
}

.stat-item i {
    color: var(--divar-primary-light);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .divar-details-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .divar-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .divar-detail-label {
        min-width: auto;
        font-size: 0.85rem;
    }
    
    .divar-detail-value {
        text-align: right;
        font-size: 0.95rem;
    }
    
    .divar-amenities-list {
        gap: 0.4rem;
    }
    
    .divar-amenity-badge {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .divar-location-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding: 1rem 0;
    }
    
    .location-label {
        min-width: auto;
        margin-left: 0;
        font-size: 0.85rem;
    }
    
    .contact-item {
        padding: 1.25rem 0;
    }
    
    .contact-icon {
        margin-left: 0.75rem;
    }
    
    .owner-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .owner-stats {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .stat-item {
        font-size: 0.8rem;
    }
    
    .divar-section-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .divar-details-section,
    .divar-location-card,
    .divar-contact-card,
    .divar-owner-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .divar-detail-row {
        padding: 0.75rem;
    }
    
    .divar-amenity-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .owner-avatar {
        width: 50px;
        height: 50px;
    }
    
    .avatar-placeholder {
        font-size: 1.2rem;
    }
    
    .owner-name {
        font-size: 1rem;
    }
}

/* ================================= */
/* Image Lightbox Modal Styles */
/* ================================= */

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    z-index: 10000;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
    margin: 0 auto;
}

#lightboxImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

.lightbox-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.lightbox-counter {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.lightbox-controls {
    display: flex;
    gap: 10px;
}

.lightbox-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        background: rgba(0, 0, 0, 0.7);
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 70vh;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-footer {
        margin-top: 15px;
        padding: 8px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .lightbox-controls {
        gap: 8px;
    }
    
    .lightbox-controls button {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .lightbox-container {
        max-width: 100vw;
        max-height: 100vh;
    }
    
    .lightbox-content {
        max-width: 100vw;
        max-height: 60vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .lightbox-nav {
        width: 35px;
        height: 35px;
    }
    
    .lightbox-prev {
        left: 5px;
    }
    
    .lightbox-next {
        right: 5px;
    }
    
    .lightbox-footer {
        margin-top: 10px;
        padding: 6px 12px;
    }
    
    .lightbox-counter {
        font-size: 13px;
    }
    
    .lightbox-controls button {
        width: 30px;
        height: 30px;
    }
}

/* Animation for smooth image transitions */
@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-modal.active .lightbox-container {
    animation: lightboxFadeIn 0.3s ease;
}

/* Smooth zoom effect */
.lightbox-image-zoomed {
    cursor: grab !important;
}

.lightbox-image-zoomed:active {
    cursor: grabbing !important;
}

/* Dark theme adjustments */
[data-theme="dark"] .lightbox-modal {
    background: rgba(0, 0, 0, 0.98);
}

[data-theme="dark"] .lightbox-footer {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .lightbox-controls button {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .lightbox-controls button:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Keyboard navigation hints (optional) */
.lightbox-hints {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal:hover .lightbox-hints {
    opacity: 1;
}

@media (max-width: 768px) {
    .lightbox-hints {
        display: none;
    }
}

.owner-name {
    font-size: 0.9rem;
}

/* ======================================
   Neo UI Redesign – Ad Show Experience
   Overrides and enhancements for a more
   graphical, modern, and polished look.
   This block intentionally appears at
   the end to take precedence.
   ====================================== */

/* Page background with soft gradient and decorative blur blobs */
.divar-ad-page {
    background: radial-gradient(1200px 600px at 120% -10%, rgba(166, 38, 38, 0.12), transparent 40%),
                radial-gradient(900px 600px at -20% 20%, rgba(245, 158, 11, 0.10), transparent 45%),
                var(--divar-bg-secondary);
    position: relative;
}

[data-theme="dark"] .divar-ad-page {
    background: radial-gradient(1200px 600px at 120% -10%, rgba(220, 38, 38, 0.16), transparent 40%),
                radial-gradient(900px 600px at -20% 20%, rgba(245, 158, 11, 0.12), transparent 45%),
                var(--divar-bg-secondary);
}

/* Top breadcrumb bar – glass effect */
.divar-top-nav {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--divar-border);
}
[data-theme="dark"] .divar-top-nav {
    background: rgba(30, 41, 59, 0.4);
}

.divar-breadcrumb a {
    font-weight: 600;
}

/* Main content card – rounded, elevated, subtle gradient */
.divar-ad-main {
    border-radius: 16px;
    border: 1px solid var(--divar-border);
    background: linear-gradient(180deg, var(--divar-bg-primary) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .divar-ad-main {
    background: linear-gradient(180deg, rgba(30,41,59,0.85) 0%, rgba(15, 23, 42, 0.85) 100%);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.45);
}

/* Title – stronger presence */
.divar-ad-title {
    font-size: clamp(0.9rem, 2vw, 1.4rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-top: 8px;
}

/* Meta – pill chips */
.divar-ad-meta {
    gap: 8px;
    display: flex;
    flex-direction: row;
}
.divar-ad-meta span {
    background: var(--divar-bg-tertiary);
    color: var(--divar-text-secondary);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--divar-border);
}
[data-theme="dark"] .divar-ad-meta span {
    background: rgba(255, 255, 255, 0.06);
}

/* Image gallery – taller hero, rounded, with soft shadow */
.divar-main-image {
    height: 360px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 32px -16px rgba(0,0,0,0.2);
}
@media (max-width: 768px) {
    .divar-main-image { height: 260px; }
}
@media (max-width: 480px) {
    .divar-main-image { height: 220px; }
}

.divar-image-counter {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

.divar-nav-btn {
    background: rgba(255,255,255,0.9);
}
[data-theme="dark"] .divar-nav-btn {
    background: rgba(15, 23, 42, 0.85);
}

.divar-thumbnail {
    border-radius: 8px;
}

/* Price section – prominent and clean */
.divar-price-section {
    background: linear-gradient(180deg, var(--divar-bg-primary), var(--divar-bg-primary));
    border-top: 1px solid var(--divar-border-light);
    border-bottom: 1px solid var(--divar-border-light);
}
.divar-price {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.divar-price-amount {
    font-size: 1.25rem;
    font-weight: 800;
}
.divar-price-usd,
.divar-price-negotiable {
    font-weight: 600;
}

/* Details cards – hover lift, soft borders */
.divar-details-section {
    border: 1px solid var(--divar-border);
    border-radius: 14px;
    background: var(--divar-bg-primary);
    box-shadow: 0 10px 20px -12px rgba(0,0,0,0.12);
}
[data-theme="dark"] .divar-details-section {
    background: rgba(30, 41, 59, 0.6);
}

.divar-detail-row {
    background: transparent;
    border: 1px dashed transparent;
}
.divar-detail-row:hover {
    background: var(--divar-bg-tertiary);
    border-color: var(--divar-border-light);
}

/* Amenities badges – soft green pill */
.divar-amenity-badge {
    background: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.25);
}
[data-theme="dark"] .divar-amenity-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

/* Contact card – glass + gradient border */
.divar-contact-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.9));
    border-radius: 14px;
    border: 1px solid rgba(166, 38, 38, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
[data-theme="dark"] .divar-contact-card {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.7));
    border-color: rgba(220, 38, 38, 0.25);
}

.divar-chat-btn {
    border: 1px solid transparent;
}
.divar-chat-btn:hover {
    background: var(--divar-bg-tertiary);
}

/* Generic buttons – elevate and animate */
.divar-btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.divar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -12px rgba(0,0,0,0.2);
}
.divar-btn-primary {
    background: linear-gradient(135deg, var(--divar-primary), var(--divar-primary-hover));
}

/* Action buttons list */
.divar-action-btn {
    border-radius: 10px;
}
.divar-action-btn:hover {
    transform: translateY(-1px);
}

/* Safety warning – softer */
.divar-safety-warning {
    border-radius: 12px;
}

/* Location card */
.divar-location-card {
    background: var(--divar-bg-primary);
    border: 1px solid var(--divar-border);
    border-radius: 14px;
    box-shadow: 0 10px 20px -12px rgba(0,0,0,0.12);
}

/* Similar ads section spacing */
.similar-ads-section.neo-section {
    background: var(--divar-bg-primary);
    border-radius: 16px;
    border: 1px solid var(--divar-border);
    box-shadow: 0 16px 32px -16px rgba(0,0,0,0.15);
}

/* Hide mobile bottom nav on ad show page (page-ad-show set on body by layout) */
.page-ad-show .mobile-bottom-nav,
body:has(.divar-ad-page) .mobile-bottom-nav {
    display: none !important;
}

.neo-action-bar {
    position: fixed;
    right: 12px;
    left: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--divar-border);
    border-radius: 16px;
    box-shadow: 0 24px 48px -24px rgba(0,0,0,0.25);
    padding: 10px;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem !important;
}
[data-theme="dark"] .neo-action-bar {
    background: rgba(17, 24, 39, 0.7);
}

.neo-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--divar-border);
    background: var(--divar-bg-primary);
    color: var(--divar-text-primary);
    font-weight: 700;
    flex: 1;
    justify-content: center;
    text-decoration: none;
}
.neo-action-btn.primary {
    background: linear-gradient(135deg, var(--divar-primary), var(--divar-primary-hover));
    border-color: transparent;
    color: #fff;
}
.neo-action-btn.icon-only {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    padding: 0;
}
.neo-action-btn:active { transform: translateY(1px); }

@media (min-width: 992px) {
    .neo-action-bar { display: none; }
}

/* Lightbox – polished controls */
.lightbox-modal { background: rgba(0, 0, 0, 0.94); }
[data-theme="dark"] .lightbox-modal { background: rgba(0, 0, 0, 0.96); }
