/* Properties Page Layout */
.properties-page {
    background: var(--background-color, #f8fafc);
    min-height: 100vh;
}

.properties-page .page-header {
    position: relative;
    color: white;
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
    margin-top: 40px;
    border-radius: 12px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.page-header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 1), rgba(30, 64, 175, 0.0));
    z-index: 2;
}

.page-header .container {
    max-width: none;
    padding: 0 20px;
}

.page-header-content {
    position: relative;
    z-index: 3;
}

.properties-page .page-header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px;
}

.properties-page .page-header-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

#properties-filter-form {
    padding: 20px;
}
.results-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-control label {
    font-weight: 600;
    color: var(--text-color, #374151);
    font-size: 0.9rem;
    white-space: nowrap;
}

.sort-control select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    color: var(--text-color, #374151);
    min-width: 150px;
    transition: all 0.2s ease;
}

.sort-control select:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.view-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    gap: 4px;
    padding: 4px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: #e2e8f0;
    color: var(--primary-color, #2563eb);
}

.view-btn.active {
    background: white;
    color: var(--primary-color, #2563eb);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-btn i {
    font-size: 1.1rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.results-info h2 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color, #374151);
}

.results-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .results-controls {
        justify-content: space-between;
        gap: 16px;
    }
    
    .sort-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .sort-control select {
        min-width: 120px;
    }
}

/* List View Styles */
.properties-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.properties-grid.list-view .property-card {
    display: flex;
    flex-direction: row;
    max-width: none;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: white;
    transition: all 0.3s ease;
}

.properties-grid.list-view .property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.properties-grid.list-view .property-image-container {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    margin-right: 16px;
}

.properties-grid.list-view .property-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.properties-grid.list-view .property-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.properties-grid.list-view .property-price {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.properties-grid.list-view .property-location {
    margin-bottom: 12px;
}

.properties-grid.list-view .property-features {
    margin-bottom: 12px;
}

.properties-grid.list-view .property-actions {
    margin-top: auto;
}

@media (max-width: 768px) {
    .properties-grid.list-view .property-card {
        flex-direction: column;
    }
    
    .properties-grid.list-view .property-image-container {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 12px;
    }
}

/* Loading Animation */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.breadcrumbs a:hover {
    color: white;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    justify-content: center;
}

.breadcrumb-current {
    color: white;
    font-weight: 500;
}

.properties-layout {
    padding: 40px 0;
}

.properties-content-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

/* Sidebar Styles */
.properties-sidebar {
    position: sticky;
    top: 20px;
}

.filters-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.filters-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color, #374151);
}

.clear-filters-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clear-filters-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.filters-form {
    padding: 20px;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: var(--text-color, #374151);
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    background: white;
    color: var(--text-color, #374151);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.price-range,
.area-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.price-separator,
.area-separator {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.advanced-toggle {
    width: 100%;
    padding: 10px 14px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.advanced-toggle:hover {
    background: #f1f5f9;
    border-color: var(--primary-color, #2563eb);
}

.advanced-toggle .toggle-icon {
    transition: transform 0.2s ease;
}

.advanced-filters {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    margin-bottom:20px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e5e7eb;
}

.results-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.results-count {
    font-size: 0.9rem;
    color: #6b7280;
}

.results-count strong {
    color: var(--primary-color, #2563eb);
    font-weight: 700;
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-controls label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.sort-controls select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    gap: 4px;
    padding: 4px;
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
}

.view-btn.active,
.view-btn:hover {
    background: white;
    color: var(--primary-color, #2563eb);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.properties-grid.list-view {
    grid-template-columns: 1fr;
}

.properties-grid.list-view .property-card {
    flex-direction: row;
    height: auto;
}

.properties-grid.list-view .property-image {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.properties-grid.list-view .property-content {
    flex: 1;
}

.properties-grid.list-view .property-features {
    grid-template-columns: repeat(4, 1fr);
}


/* No Properties */
.no-properties {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.no-properties-content i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 20px;
}

.no-properties-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px;
}

.no-properties-content p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 24px;
}


/* Bootstrap Icons Fix */
.bi {
    font-family: "bootstrap-icons" !important;
    font-style: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.property-location .bi {
    font-size: 14px !important;
    color: var(--primary-color, #2563eb) !important;
    display: inline-block !important;
    width: 14px !important;
    text-align: center !important;
    margin-right: 6px !important;
}

/* Property Cards Styles */
.property-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.property-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 32px;
    object-fit: cover;
    object-position: center;
}

.property-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.property-status.status-sale {
    background: var(--success-color, #10b981);
    color: white;
}

.property-status.status-rent {
    background: var(--primary-color, #3b82f6);
    color: white;
}

.property-status.status-sold {
    background: var(--text-secondary-color, #6b7280);
    color: white;
}

.property-status.status-rented {
    background: var(--warning-color, #f59e0b);
    color: white;
}

.property-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-card:hover .property-actions {
    opacity: 1;
}

.property-favorite,
.property-compare {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.property-favorite:hover,
.property-compare:hover {
    background: white;
    transform: scale(1.1);
}

.property-favorite.active {
    background: #ef4444;
    color: white;
}

.property-compare.active {
    background: #2563eb;
    color: white;
}

.property-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-header {
    margin-bottom: 12px;
}

.property-title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.property-title a {
    color: var(--text-color, #1f2937);
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-title a:hover {
    color: var(--primary-color, #2563eb);
}

.property-type {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--text-secondary-color, #6b7280);
    font-size: 0.9rem;
}

.property-location i {
    color: var(--primary-color, #2563eb);
    font-size: 14px;
    display: inline-block;
    width: 14px;
    text-align: center;
}

.property-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--success-color, #10b981);
    margin-bottom: 12px;
    line-height: 1.2;
}

.property-features {
    display: flex;
    gap: 8px;
    margin-top: auto;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary-color, #6b7280);
    padding: 6px 8px;
    background: var(--background-color, #f8fafc);
    border-radius: 6px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.property-feature i {
    font-size: 16px;
    color: var(--primary-color, #2563eb);
    display: inline-block;
    width: 16px;
    text-align: center;
}

.property-feature strong {
    color: var(--text-color, #374151);
    font-weight: 600;
}

.property-footer {
    margin-top: auto;
}

.property-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.property-link:hover {
    background: #2563eb;
    color: white;
}

.property-link i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.property-link:hover i {
    transform: translateX(2px);
}

/* List View Styles */
.properties-grid.list-view .property-card {
    flex-direction: row;
    height: auto;
}

.properties-grid.list-view .property-image-container {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.properties-grid.list-view .property-content {
    flex: 1;
}

.properties-grid.list-view .property-features {
    grid-template-columns: repeat(4, 1fr);
}

/* Pagination Styles */
.pagination-wrapper {
    padding: 20px;
    text-align: center;
    margin-top: 30px;
}

.page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    color: var(--text-color, #333);
    text-decoration: none;
    background: white;
    transition: all 0.2s ease;
}

.page-numbers:hover {
    background: var(--primary-color, #007cba);
    color: white;
    border-color: var(--primary-color, #007cba);
}

.page-numbers.current {
    background: var(--primary-color, #007cba);
    color: white;
    border-color: var(--primary-color, #007cba);
}

.page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

.page-numbers.dots:hover {
    background: transparent;
    color: var(--text-color, #333);
}

/* No Properties */
.no-properties {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-properties p {
    font-size: 18px;
    margin: 0;
}

/* Error State */
.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #ef4444;
}

.error p {
    font-size: 18px;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .properties-content-wrapper {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
    
    .properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .properties-page .page-header {
        padding: 40px 0;
    }
    
    .properties-page .page-header-content h1 {
        font-size: 2rem;
    }
    
    .properties-layout {
        padding: 20px 0;
    }
    
    .properties-content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .properties-sidebar {
        position: static;
        order: 2;
    }
    
    .properties-main {
        order: 1;
    }
    
    .results-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 20px;
    }
    
    .view-controls {
        justify-content: space-between;
    }
    
    .properties-grid {
        padding: 16px;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .property-image-container {
        height: 200px;
        width: 100%;
    }
    
    .property-image {
        object-fit: cover;
        object-position: center;
    }
    
    .property-content {
        padding: 16px;
    }
    
    .property-features {
        gap: 6px;
    }
    
    .property-feature {
        font-size: 0.75rem;
        padding: 4px 6px;
        gap: 4px;
    }
    
    .properties-grid.list-view .property-card {
        flex-direction: column;
    }
    
    .properties-grid.list-view .property-image {
        width: 100%;
        height: 200px;
    }
    
    .properties-grid.list-view .property-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .property-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .property-actions {
        opacity: 1;
    }
    
    .filters-container {
        border-radius: 12px;
    }
    
    .filters-form {
        padding: 16px;
    }
    
    .filter-group {
        margin-bottom: 14px;
    }
    
    .price-range,
    .area-range {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .price-separator,
    .area-separator {
        display: none;
    }
    
    
    .sticky-actions {
        justify-content: center;
    }
    
    .filters-summary {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .properties-page .page-header {
        padding: 60px 0;
        margin-top: 20px;
        border-radius: 8px;
    }
    
    .page-header .container {
        padding: 0 16px;
    }
    
    .properties-page .page-header-content h1 {
        font-size: 1.75rem;
    }
    
    .properties-page .page-header-content p {
        font-size: 1rem;
    }
    
    .breadcrumbs {
        font-size: 0.8rem;
        gap: 6px;
        margin-bottom: 16px;
    }
    
    .results-header {
        padding: 16px;
    }
    
    .results-info h2 {
        font-size: 1.25rem;
    }
    
    .view-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .sort-controls {
        justify-content: space-between;
    }
    
    .properties-grid {
        padding: 16px;
    }
    
    .filters-form {
        padding: 12px;
    }
    
    .filter-group {
        margin-bottom: 12px;
    }
    
    .property-image-container {
        height: 180px;
        width: 100%;
    }
    
    .property-image {
        object-fit: cover;
        object-position: center;
    }
    
    .property-content {
        padding: 14px;
    }
    
    .property-features {
        gap: 4px;
    }
    
    .property-feature {
        font-size: 0.7rem;
        padding: 3px 4px;
        gap: 3px;
    }
    
    .property-feature i {
        font-size: 12px;
    }
    
    
    .sticky-actions .btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}
