/* ============================================================================
   AVAILABLE UNITS PAGE STYLES
   ============================================================================ */

/* Header Section */
.available-header {
    padding: 1.5rem 0;
}

.available-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-black);
    margin-bottom: 0.5rem;
}

.available-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* Stats Badges */
.available-stats {
    gap: 1rem;
}

.stat-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 6rem;
}

.stat-badge i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.stat-count {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-vacant {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.stat-vacant.active, .stat-vacant:hover {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(34, 197, 94, 0.3);
}

.stat-vacant-soon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.stat-vacant-soon.active, .stat-vacant-soon:hover {
    background: linear-gradient(135deg, var(--brand-yellow) 0%, var(--brand-primary-600) 100%);
    color: var(--brand-black);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(243, 193, 48, 0.3);
}

.stat-all {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
}

.stat-all.active, .stat-all:hover {
    background: linear-gradient(135deg, var(--brand-blue) 0%, #2d3553 100%);
    color: white;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(65, 74, 107, 0.3);
}

/* ============================================================================
   FEATURED CAROUSEL SECTION
   ============================================================================ */

.featured-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.featured-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-black);
    margin: 0;
}

.carousel-controls {
    gap: 0.5rem;
}

.carousel-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--brand-yellow);
    border-color: var(--brand-yellow);
    color: var(--brand-black);
}

/* Carousel Container */
.featured-carousel {
    overflow: hidden;
    position: relative;
}

.featured-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.1s linear;
    will-change: transform;
}

/* Featured Card */
.featured-card {
    flex-shrink: 0;
    width: 16rem;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
}

.featured-image {
    position: relative;
    height: 9rem;
    overflow: hidden;
}

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

.featured-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 2rem;
}

.featured-status {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.featured-status.status-vacant {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.featured-status.status-vacant-soon {
    background: rgba(234, 179, 8, 0.9);
    color: white;
}

.featured-info {
    padding: 0.875rem;
}

.featured-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.featured-price {
    margin-bottom: 0.5rem;
}

.featured-price .price-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-success);
}

.featured-price .price-period {
    font-size: 0.75rem;
    color: #9ca3af;
}

.featured-details {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.featured-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.featured-details i {
    color: #9ca3af;
}

.featured-location {
    font-size: 0.75rem;
    color: #9ca3af;
}

.featured-location i {
    color: var(--brand-red);
    margin-right: 0.25rem;
}

/* ============================================================================
   FILTERS SECTION
   ============================================================================ */

.filters-section {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1rem;
}

.filters-section .form-select,
.filters-section .form-control {
    font-size: 0.8125rem;
}

/* ============================================================================
   RESULTS INFO
   ============================================================================ */

.results-info {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.results-count {
    font-size: 0.9375rem;
    color: #374151;
}

.results-filter {
    color: #6b7280;
}

/* ============================================================================
   UNITS GRID
   ============================================================================ */

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.5rem;
}

.unit-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.unit-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
    border-color: var(--brand-yellow);
}

.unit-image {
    position: relative;
    height: 11rem;
    overflow: hidden;
}

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

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

.unit-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 3rem;
}

.unit-status {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.unit-status.status-vacant {
    background: rgba(34, 197, 94, 0.95);
    color: white;
}

.unit-status.status-vacant-soon {
    background: rgba(234, 179, 8, 0.95);
    color: white;
}

.unit-type-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.unit-content {
    padding: 1rem;
}

.unit-price {
    margin-bottom: 0.75rem;
}

.unit-price .price-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-success);
}

.unit-price .price-period {
    font-size: 0.875rem;
    color: #9ca3af;
}

.unit-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.detail-item {
    font-size: 0.8125rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.detail-item i {
    color: #9ca3af;
}

.unit-location {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unit-location i {
    color: var(--brand-red);
    margin-right: 0.25rem;
}

.unit-furnished {
    display: flex;
}

.furnished-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.furnished-badge.furnished {
    background: #dcfce7;
    color: #166534;
}

.furnished-badge.semi {
    background: #fef3c7;
    color: #92400e;
}

.furnished-badge.unfurnished {
    background: #f3f4f6;
    color: #6b7280;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
}

.no-results h4 {
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Pagination */
.pagination-wrapper {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.pagination .page-link {
    color: var(--brand-blue);
    border: 1px solid #e5e7eb;
}

.pagination .page-item.active .page-link {
    background: var(--brand-yellow);
    border-color: var(--brand-yellow);
    color: var(--brand-black);
}

.pagination .page-link:hover {
    background: var(--brand-yellow);
    border-color: var(--brand-yellow);
    color: var(--brand-black);
}

/* ============================================================================
   RESPONSIVE STYLES
   ============================================================================ */

@media (max-width: 991.98px) {
    .available-title {
        font-size: 1.5rem;
    }

    .stat-badge {
        padding: 0.5rem 0.75rem;
        min-width: auto;
    }

    .stat-count {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.625rem;
    }

    .featured-card {
        width: 14rem;
    }

    .featured-image {
        height: 7.5rem;
    }
}

@media (max-width: 767.98px) {
    .available-header {
        text-align: center;
    }

    .available-stats {
        justify-content: center;
    }

    .available-title {
        font-size: 1.375rem;
    }

    .stat-badge {
        flex: 1;
        min-width: 5rem;
        padding: 0.5rem;
    }

    .featured-section {
        padding: 1rem;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border-radius: 0;
    }

    .featured-card {
        width: 12rem;
    }

    .featured-image {
        height: 6.5rem;
    }

    .featured-info {
        padding: 0.625rem;
    }

    .featured-type {
        font-size: 0.6875rem;
    }

    .featured-price .price-value {
        font-size: 1rem;
    }

    .units-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .unit-image {
        height: 8rem;
    }

    .unit-content {
        padding: 0.75rem;
    }

    .unit-price .price-value {
        font-size: 1.125rem;
    }

    .unit-details {
        gap: 0.5rem;
    }

    .detail-item {
        font-size: 0.75rem;
    }

    .filters-section {
        padding: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .units-grid {
        grid-template-columns: 1fr;
    }

    .unit-image {
        height: 12rem;
    }

    .stat-badge {
        flex-direction: row;
        gap: 0.5rem;
    }

    .stat-badge i {
        margin-bottom: 0;
    }
}
