/* CSS Variables for consistent theming */
:root {
    --primary-color: #5b21b6; /* royal purple */
    --primary-hover: #4c1d95; /* deeper purple */
    --secondary-color: #6b7280; /* neutral gray */
    --maps-color: #5b21b6;
    --success-color: #059669;
    --danger-color: #dc2626;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 10px rgba(0,0,0,0.10);
    --shadow-xl: 0 6px 18px rgba(0,0,0,0.12);
    --spacing-xs: 0.375rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1.25rem;
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
    --spacing-2xl: 4rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Dual purple corporate theme */
    --corporate-purple-1: #5b21b6;
    --corporate-purple-2: #7c3aed;
    --corporate-purple-light: #a78bfa;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--background-color);
    font-size: 16px;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Header */
.header {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-2xl) 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before { display: none; }

.logo {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.tagline {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-lg); }
.header-actions { display: flex; align-items: center; gap: var(--spacing-sm); }
.btn-sm { min-width: auto; padding: 0.5rem 0.75rem; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); }
/* Hamburger Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100%;
    background: var(--surface-color);
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.75rem;
}

.mobile-menu-item {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: left;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: 0.3s;
}

.mobile-menu-item:hover {
    background: var(--corporate-purple-light);
    color: white;
    border-color: var(--corporate-purple-1);
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

/* Auth Modal */
.auth-content {
    padding: var(--spacing-xl);
}

/* Main content */
.main {
    padding: var(--spacing-2xl) 0;
    min-height: calc(100vh - 200px);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

/* Sidebar */
.sidebar {
    background: var(--surface-color);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    height: fit-content;
    border: 1px solid rgba(174, 11, 43, 0.08);
    /* Remove sticky positioning on mobile */
    position: relative;
    top: auto;
}

.form-section,
.filters-section {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
}

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

.form-section h2,
.filters-section h2 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: -0.005em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--surface-color);
    font-weight: 400;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(174, 11, 43, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.filter-group input,
.filter-group select {
    padding: .5rem;
}

/* Checkbox styling */
.filter-group input[type="checkbox"] {
    width: auto;
    margin-right: var(--spacing-sm);
    transform: scale(1.2);
    padding: .5rem;
}

.checkbox-label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

/* Other filters container */
.other-filters-container {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: rgba(174, 11, 43, 0.02);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(174, 11, 43, 0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.other-filters-container h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.other-filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-width: 140px;
    letter-spacing: -0.005em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background-color: #475569;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-maps {
    background-color: var(--corporate-purple-2);
    color: white;
    box-shadow: var(--shadow);
}

.btn-maps:hover {
    background-color: var(--corporate-purple-1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-other-filter {
    background-color: var(--primary-hover);
    color: white;
    box-shadow: var(--shadow);
}

.btn-other-filter:hover {
    background-color: #4a10a1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-danger:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Filter groups */
.filter-group {
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

/* Listings */
.listings-section h2 {
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Map Section */
.map-section {
    margin-bottom: var(--spacing-2xl);
}

.map-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.map-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    background: rgba(174, 11, 43, 0.02);
}

.map-location-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.map-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.map-iframe-wrapper {
    width: 100%;
    height: 360px;
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Detail map */
.detail-map {
    margin-top: var(--spacing-lg);
}

.detail-map-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
}

.detail-map-iframe-wrapper {
    width: 100%;
    height: 280px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.listings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.listing-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(174, 11, 43, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.listing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(174, 11, 43, 0.02), rgba(74, 16, 161, 0.02));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.listing-card:hover::before {
    opacity: 1;
}

.listing-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background-color: var(--border-color);
    transition: var(--transition);
}

.listing-card:hover .listing-image {
    transform: scale(1.02);
}

.listing-content {
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.listing-buttons {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.listing-buttons .btn {
    flex: 1;
    min-width: 120px;
}

.listing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.listing-city {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    font-weight: 500;
}

.listing-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.02em;
}

.listing-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
    font-size: 1rem;
}

.contact-btn {
    width: 100%;
    margin-bottom: var(--spacing-sm);
    font-size: 0.95rem;
    padding: var(--spacing-sm) var(--spacing-md);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.empty-state p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    font-weight: 500;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(174, 11, 43, 0.1);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    background: rgba(174, 11, 43, 0.02);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: var(--spacing-xs);
    line-height: 1;
    transition: var(--transition);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal .form {
    padding: var(--spacing-xl);
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

/* Toast */
.toast {
    position: fixed;
    top: var(--spacing-xl);
    right: var(--spacing-xl);
    background-color: var(--success-color);
    color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: white;
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.footer p {
    font-weight: 400;
    opacity: 0.9;
}

/* Detail Modal Styles */
.detail-modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    border: 1px solid rgba(174, 11, 43, 0.1);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    background: rgba(174, 11, 43, 0.02);
    position: sticky;
    top: 0;
    z-index: 10;
}

.detail-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.detail-modal-body {
    padding: var(--spacing-xl);
}

/* Images Section */
.detail-images-section {
    margin-bottom: var(--spacing-2xl);
}

.main-image {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-counter {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.thumbnail-gallery {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding: var(--spacing-sm) 0;
}

.thumbnail {
    min-width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    opacity: 0.7;
}

.thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
    transform: scale(1.05);
}

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

/* Detail Info Section */
.detail-info-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.detail-header {
    text-align: center;
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

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

.detail-location {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.detail-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.detail-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.detail-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

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

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.feature-tag {
    background: rgba(174, 11, 43, 0.1);
    color: var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(174, 11, 43, 0.2);
}

.no-features {
    color: var(--text-secondary);
    font-style: italic;
}

.detail-contact-btn {
    width: 100%;
    margin-top: var(--spacing-lg);
}

.detail-description,
.detail-payment {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow);
}

.detail-description h4,
.detail-payment h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.detail-payment-buttons{
    text-align: left;
}

.detail-description p {
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Responsive Design - Mobile First */
@media (max-width: 767px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;   
    }

    .sidebar {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-xl);
    }

    .form-section,
    .filters-section {
        margin-bottom: var(--spacing-lg);
        padding-bottom: var(--spacing-lg);
    }

    .filter-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .other-filters-grid {
        grid-template-columns: 1fr;
    }

    .listing-buttons {
        flex-direction: column;
    }

    .listing-buttons .btn {
        flex: none;
        min-width: auto;
    }

    .map-iframe-wrapper {
        height: 260px;
    }

    /* Detail Modal Mobile */
    .detail-modal-content {
        width: 98%;
        max-height: 98vh;
    }

    .detail-modal-header {
        padding: var(--spacing-lg);
    }

    .detail-modal-body {
        padding: var(--spacing-lg);
    }

    .main-image {
        height: 250px;
    }

    .detail-header h2 {
        font-size: 1.5rem;
    }

    .detail-price {
        font-size: 2rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .detail-card,
    .detail-payment {
        padding: var(--spacing-lg);
    }

    .detail-payment-buttons {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
}

/* Responsive Design - Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 0 var(--spacing-xl);
    }

    .filter-buttons {
        flex-direction: row;
        gap: var(--spacing-md);
    }

    .other-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        order: 2;
        /* Move sidebar after listings on tablet */
    }

    .listings-section {
        order: 1;
        /* Move listings first on tablet */
    }

    /* Detail Modal Tablet */
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-image {
        height: 500px;
    }

    .thumbnail {
        min-width: 100px;
        height: 100px;
    }

    .map-iframe-wrapper {
        height: 320px;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 400px 1fr;
        gap: var(--spacing-2xl);
    }

    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 0 var(--spacing-2xl);
    }

    .sidebar {
        position: sticky;
        top: var(--spacing-xl);
        order: 1;
        /* Restore normal order on desktop */
    }

    .listings-section {
        order: 2;
        /* Restore normal order on desktop */
    }

    /* Detail Modal Desktop */
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-image {
        height: 600px;
    }

    .detail-modal-content {
        width: 90%;
    }

    .map-iframe-wrapper {
        height: 420px;
    }
}

/* Accessibility improvements */
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Image fallback styling */
.listing-image[src=""],
.listing-image:not([src]) {
    background: linear-gradient(45deg, var(--border-color) 25%, transparent 25%),
        linear-gradient(-45deg, var(--border-color) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--border-color) 75%),
        linear-gradient(-45deg, transparent 75%, var(--border-color) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.listing-image[src=""]::after,
.listing-image:not([src])::after {
    content: "Resim mevcut değil";
}

/* Loading states */
.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background-color: rgba(174, 11, 43, 0.2);
    color: var(--text-primary);
}

/* Property tags in listing cards */
.listing-properties {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-direction: column;
}

.property-tag {
    background: rgba(174, 11, 43, 0.1);
    color: var(--primary-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(174, 11, 43, 0.2);
}

.property-tag.faturalar-dahil {
    background: rgba(5, 150, 105, 0.1);
    color: var(--success-color);
    border-color: rgba(5, 150, 105, 0.2);
}