/* ============================================
   REDESIGNED PROPERTIES PAGE
   ============================================ */

/* Search Icon Button in Header */
.btn-search-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: color 0.2s;
}

.btn-search-icon:hover {
    color: var(--primary-blue);
}

/* Search Modal */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 2000;
    padding-top: 100px;
}

.search-modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 700px;
    box-shadow: var(--shadow-xl);
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1rem;
}

.search-modal-header input {
    flex: 1;
    border: none;
    font-size: 1.125rem;
    outline: none;
    padding: 0.5rem;
}

.btn-close-search {
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-close-search:hover {
    background: var(--border-color);
}

/* Properties Page New Layout */
.properties-page-new {
    padding-top: 80px;
    min-height: 100vh;
    background: #F9FAFB;
    display: flex;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Left Sidebar Filters */
.properties-sidebar {
    width: 240px;
    flex-shrink: 0;
    padding: 2rem 0;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

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

.properties-sidebar .filter-btn,
.button-filters .filter-btn,
.filter-btn {
    padding: 0.5rem 1.25rem !important;
    border: 1px solid #E5E7EB;
    border-radius: 50px;
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    min-width: auto !important;
    width: auto !important;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

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

.checkbox-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-dropdown {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.875rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-dropdown:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-prefix .prefix {
    position: absolute;
    left: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-gray);
    pointer-events: none;
}

.filter-input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    background: white;
    font-size: 0.875rem;
    color: var(--text-dark);
    transition: border-color 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.btn-save-filters {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--primary-blue);
    border-radius: var(--radius-md);
    background: white;
    color: var(--primary-blue);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.btn-save-filters:hover {
    background: var(--primary-blue);
    color: white;
}

/* Main Content Area */
.properties-main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Property Grid New */
.property-grid-new {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Property Card New */
.property-card-new {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.property-card-new:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.property-image-link {
    display: block;
    text-decoration: none;
}

.property-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

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

.property-card-new:hover .property-image-container img {
    transform: scale(1.05);
}

.property-badge-new {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.property-badge-new.for-sale {
    background: #10B981;
    color: white;
}

.property-badge-new.for-rent {
    background: #F59E0B;
    color: white;
}

.property-badge-new.sold {
    background: #EF4444;
    color: white;
}

/* Watch List Button - matching landing page style */
.watch-list-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.625rem;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.watch-list-btn:hover:not(:disabled) {
    background: white;
    color: var(--primary-blue);
}

/* Watched/Saved state - filled icon style */
.watch-list-btn.watched {
    background: var(--primary-blue);
    color: white;
}

.watch-list-btn.watched svg {
    color: white;
    fill: white;
}

.watch-list-btn.watched:hover:not(:disabled) {
    background: #1d4ed8;
}

.watch-list-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.watch-list-btn svg {
    flex-shrink: 0;
}

.watch-list-btn-new {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.625rem;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 2;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.watch-list-btn-new:hover {
    background: white;
    color: var(--primary-blue);
}

.watch-list-btn-new.active {
    background: var(--primary-blue);
    color: white;
}

.watch-list-btn-new.active svg {
    fill: white;
}

.watch-list-btn-new svg {
    flex-shrink: 0;
}

.days-ago-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
}

/* Property Details New */
.property-details-new {
    padding: 1rem 1.25rem 1.25rem;
}

.property-address-new {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.property-address-new:hover {
    color: var(--primary-blue);
}

.property-type-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.property-type-row svg {
    color: #9CA3AF;
    flex-shrink: 0;
}

.property-price-new {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.75rem 0;
}

.property-features-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #F3F4F6;
}

.feature-icon-text {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
}

.feature-icon-text svg {
    color: #9CA3AF;
    flex-shrink: 0;
}

/* Loading Grid */
.loading-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.property-card-skeleton {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-content {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results svg {
    color: #D1D5DB;
    margin-bottom: 1.5rem;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Pagination New */
.pagination-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.pagination-new .page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-dark);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pagination-new .page-btn:hover:not(:disabled) {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

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

.pagination-new .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Map Search Floating Button */
.map-search-btn-floating {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    transition: all 0.3s;
    z-index: 100;
}

.map-search-btn-floating:hover {
    background: #1976D2;
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
    transform: translateY(-2px);
}

.map-search-btn-floating svg {
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .property-grid-new,
    .loading-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .properties-page-new {
        flex-direction: column;
    }

    .properties-sidebar {
        width: 100%;
        padding: 1rem 0;
    }

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

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

    .map-search-btn-floating {
        bottom: 5rem;
    }
}

@media (max-width: 640px) {
    .properties-page-new {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .property-grid-new,
    .loading-grid {
        grid-template-columns: 1fr;
    }

    .watch-list-btn-new {
        font-size: 0;
        padding: 0.625rem;
    }

    .watch-list-btn-new svg {
        margin: 0;
    }

    .map-search-btn-floating {
        bottom: 1rem;
        right: 1rem;
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }

    .watch-list-btn {
        font-size: 0;
        padding: 0.625rem;
    }

    .watch-list-btn svg {
        margin: 0;
    }
}

/* Spinning Animation */
.spinning {
    animation: spin 1s linear infinite;
}

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

/* Watchlist Toast Notification */
.watchlist-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    z-index: 3000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

.watchlist-toast.toast-success {
    background: #10B981;
    color: white;
}

.watchlist-toast.toast-error {
    background: #EF4444;
    color: white;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
