:root {
    --primary-color: #000000;
    --secondary-color: #e7c24c;
    --accent-color: #e7c24c;
    --dark-color: #1a1a1a;
    --light-color: #f5f5f5;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3d4a 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
}

/* Unit Cards */
.unit-card {
    background: white;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.unit-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.unit-card.greyed-out {
    opacity: 0.7;
    filter: grayscale(30%);
}

.unit-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    background-color: #e9ecef;
}

.unit-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.unit-card:hover .unit-image {
    transform: scale(1.05);
}

.unit-status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.unit-card.reserved .unit-status-overlay,
.unit-card.pending .unit-status-overlay {
    opacity: 1;
}

.status-label {
    background-color: var(--warning-color);
    color: #333;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-label.pending {
    background-color: #17a2b8;
    color: white;
}

.status-label.sold {
    background-color: var(--danger-color);
    color: white;
}

.unit-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--success-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.unit-status-badge.reserved {
    background-color: var(--warning-color);
    color: #333;
}

.unit-status-badge.pending {
    background-color: #17a2b8;
}

.unit-status-badge.sold {
    background-color: var(--danger-color);
}

/* Unit Details */
.unit-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.unit-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.unit-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.unit-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.spec-item {
    font-size: 0.9rem;
    color: #666;
}

.spec-label {
    font-weight: 600;
    color: #333;
}

.unit-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.unit-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-info-details,
.btn-reserve {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-info-details {
    background-color: var(--primary-color);
    color: white;
}

.btn-info-details:hover {
    background-color: #1f4657;
    color: white;
    text-decoration: none;
}

.btn-reserve {
    background-color: var(--secondary-color);
    color: white;
}

.btn-reserve:hover {
    background-color: #c9945e;
    color: white;
}

.unit-card.reserved .btn-reserve,
.unit-card.pending .btn-reserve,
.unit-card.sold .btn-reserve {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Filters */
.filters-section {
    background-color: var(--light-color);
    padding: 30px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #ddd;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(44, 95, 111, 0.2);
}

.btn-filter {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-filter:hover {
    background-color: #1f4657;
    color: white;
}

.btn-reset-filter {
    width: 100%;
    background-color: #999;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-reset-filter:hover {
    background-color: #777;
    color: white;
}

/* Admin Dashboard */
.admin-header {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: white;
    padding: 30px 0;
    margin-bottom: 30px;
    border-bottom: 3px solid #e7c24c;
}

.admin-header h1 {
    margin-bottom: 0;
    color: #e7c24c;
}

.admin-header p {
    color: rgba(231, 194, 76, 0.8);
}

.sidebar {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 60px;
    border-right: 3px solid #e7c24c;
}

.sidebar a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    transition: background-color 0.3s ease;
}

.sidebar a:hover,
.sidebar a.active {
    background-color: rgba(255,255,255,0.1);
}

.content-area {
    padding: 30px;
}

/* Tables */
.table {
    border-radius: 5px;
    overflow: hidden;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f0f0f0;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(44, 95, 111, 0.2);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border: none;
}

.btn-primary:hover {
    background-color: #1f4657;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border: none;
    color: white;
}

.btn-secondary:hover {
    background-color: #c9945e;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Modals */
.modal-header {
    background-color: var(--primary-color);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item.primary::after {
    content: 'PRIMARY';
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--success-color);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Grid */
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .units-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .filter-group {
        margin-bottom: 15px;
    }

    .sidebar {
        position: relative;
        top: auto;
    }
}

@media (max-width: 576px) {
    .units-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .unit-specs {
        grid-template-columns: 1fr;
    }

    .unit-price {
        font-size: 1.5rem;
    }
}

/* Alerts */
.alert {
    border-radius: 5px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 30px;
}

.page-link {
    color: var(--primary-color);
}

.page-link:hover {
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Icon Styles */
.icon-location {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-right: 5px;
    vertical-align: middle;
}

.icon-favorite {
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-right: 5px;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.icon-favorite:hover {
    transform: scale(1.2);
}

.icon-favorite.active {
    filter: brightness(1.2);
}

.unit-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.unit-icon-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.unit-icon-item svg {
    margin-right: 5px;
}

/* Enhanced Button Styles with Gold Accent */
.btn-primary {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border: 2px solid #e7c24c;
    color: #e7c24c;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e7c24c 0%, #c9a83a 100%);
    border-color: #e7c24c;
    color: #000000;
}

.btn-secondary {
    background-color: #e7c24c;
    border: 2px solid #e7c24c;
    color: #000000;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #c9a83a;
    border-color: #a88a2d;
    color: #000000;
    box-shadow: 0 4px 12px rgba(231, 194, 76, 0.3);
}

/* Premium Card Border Accent */
.unit-card {
    border-left: 4px solid #e7c24c;
}

.unit-card:hover {
    border-left-color: #c9a83a;
}

/* Navbar Gold Accent */
.navbar {
    border-bottom: 3px solid #e7c24c;
}

.navbar-brand {
    color: #e7c24c !important;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Hero Section Update */
.hero {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-bottom: 4px solid #e7c24c;
}

/* Form Focus Gold Accent */
.form-control:focus,
.form-select:focus {
    border-color: #e7c24c;
    box-shadow: 0 0 0 0.2rem rgba(231, 194, 76, 0.25);
}

/* Badge Accent */
.unit-status-badge {
    background-color: #e7c24c;
    color: #000000;
    border: 2px solid #e7c24c;
}

/* Table Header Gold Accent */
.table thead {
    background-color: #000000;
    color: #e7c24c;
    border-top: 3px solid #e7c24c;
}

/* Dashboard Stat Cards */
.stat-card {
    border-left: 4px solid #e7c24c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 8px 25px rgba(231, 194, 76, 0.2);
    transform: translateY(-2px);
}

.stat-card.primary {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: #e7c24c;
}

.stat-card.primary .card-title {
    color: rgba(231, 194, 76, 0.9);
}

.stat-card.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.stat-card.danger {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
}

/* Sidebar Active Link */
.sidebar a.active {
    background-color: rgba(231, 194, 76, 0.1);
    border-left: 4px solid #e7c24c;
    color: #e7c24c;
}
