/* Properties Page - Modern Design */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #f39c12;
    --accent-color: #e74c3c;
    --bg-light: #f8f9fa;
    --text-dark: #333;
    --text-muted: #6c757d;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    --radius: 12px;
}

body {
    background-color: var(--bg-light);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Hero Section (Shared) */
.properties-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    padding: 3rem 0;
    color: white;
    margin-bottom: 2rem;
    border-radius: 0 0 2rem 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Detail Page Hero override */
.property-detail-hero {
    height: 400px;
    position: relative;
    border-radius: 0 0 2rem 2rem;
    overflow: hidden;
    margin-bottom: 3rem;
    background-color: var(--primary-color);
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 3rem 0;
    color: white;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.detail-location {
    font-size: 1.2rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Filter Bar */
.filter-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: -3rem;
    /* Overlap hero */
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-label-custom {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.form-control-custom,
.form-select-custom {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.form-control-custom:focus,
.form-select-custom:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
    outline: none;
}

.btn-search {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: transform 0.2s;
}

.btn-search:hover {
    transform: translateY(-2px);
    background-color: #e67e22;
}

/* Property Grid & Cards */
.property-card {
    border: none;
    border-radius: var(--radius);
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.card-img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .card-img-top {
    transform: scale(1.05);
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    z-index: 2;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-available {
    background-color: rgba(46, 204, 113, 0.9);
    color: white;
}

.badge-rented {
    background-color: rgba(231, 76, 60, 0.9);
    color: white;
}

.price-tag {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    backdrop-filter: blur(5px);
}

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

.property-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-features {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.feature-item i {
    color: var(--secondary-color);
}

.btn-view-details {
    display: block;
    text-align: center;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-view-details:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Sticky Sidebar (Detail Page) */
.sticky-top-custom {
    position: sticky;
    top: 2rem;
    z-index: 100;
}

.booking-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.booking-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.booking-period {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.landlord-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.landlord-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-main {
    grid-column: span 4;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
}

/* Features List */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-box {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #eee;
}

.feature-box i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* Scrollable Rooms List */
.rooms-scroll-container {
    max-height: 800px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
.rooms-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.rooms-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rooms-scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.rooms-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Form Styles Extension */
.form-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f8f9fa;
}

.upload-zone:hover {
    border-color: var(--secondary-color);
    background-color: #fff8e1;
}

.amenity-checkbox {
    display: none;
}

.amenity-label {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dark);
    background: white;
}

.amenity-checkbox:checked+.amenity-label {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(44, 62, 80, 0.2);
}

/* Pagination */
.pagination {
    margin-top: 3rem;
}

.page-link {
    color: var(--primary-color);
    border: none;
    margin: 0 0.25rem;
    border-radius: 8px !important;
    padding: 0.75rem 1rem;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}