:root {
    --subaru-blue: #0033A0;
    --subaru-light-blue: #005BBB;
    --subaru-dark: #001f5c;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.bg-subaru {
    background: linear-gradient(135deg, var(--subaru-blue) 0%, var(--subaru-light-blue) 100%);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
}

.btn-register {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.375rem 1.5rem !important;
}

.btn-register:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Buttons */
.btn-primary {
    background-color: var(--subaru-blue);
    border-color: var(--subaru-blue);
}

.btn-primary:hover {
    background-color: var(--subaru-dark);
    border-color: var(--subaru-dark);
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--subaru-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 51, 160, 0.25);
}

/* Badges */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* Alert Messages */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    transition: color 0.3s;
}

footer a:hover {
    color: var(--subaru-light-blue) !important;
}

/* Listing Detail */
.listing-detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail-gallery img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.thumbnail-gallery img:hover,
.thumbnail-gallery img.active {
    border-color: var(--subaru-blue);
}

/* Feature List */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.feature-item {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.feature-item i {
    color: var(--subaru-blue);
    margin-right: 5px;
}

/* Price Tag */
.price-tag {
    font-size: 2rem;
    font-weight: bold;
    color: var(--subaru-blue);
    margin: 20px 0;
}

/* Contact Box */
.contact-box {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--subaru-blue);
}

.contact-box h5 {
    color: var(--subaru-blue);
    margin-bottom: 15px;
}

.contact-box .btn {
    width: 100%;
    margin-bottom: 10px;
}

/* Status Badges */
.status-pending {
    background-color: var(--warning-color);
}

.status-approved {
    background-color: var(--success-color);
}

.status-rejected {
    background-color: var(--danger-color);
}

/* Admin Dashboard */
.admin-stat-card {
    border-left: 4px solid var(--subaru-blue);
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-stat-card h3 {
    color: var(--subaru-blue);
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.admin-stat-card p {
    color: #6c757d;
    margin: 5px 0 0 0;
}

/* Table Responsive */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: var(--subaru-blue);
    color: white;
}

/* Image Upload Preview */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.image-preview {
    position: relative;
    width: 100%;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
}

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

.image-preview .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .listing-card {
        margin-bottom: 20px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .price-tag {
        font-size: 1.5rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Custom Checkbox for Features */
.feature-checkbox {
    display: inline-block;
    margin: 5px;
}

.feature-checkbox input[type="checkbox"] {
    margin-right: 5px;
}

.feature-checkbox label {
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s;
}

.feature-checkbox input[type="checkbox"]:checked + label {
    background-color: var(--subaru-blue);
    color: white;
    border-color: var(--subaru-blue);
}

/* Listing Cards */
.listing-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    background: white;
    height: 100%;
}

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

.listing-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.listing-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.listing-body {
    padding: 15px;
}

.listing-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0033A0;
    margin-bottom: 10px;
}

.listing-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.listing-details {
    margin-bottom: 10px;
}

.listing-specs {
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.listing-location {
    margin-top: 8px;
}

.stat-item {
    padding: 20px;
}

.stat-item h3 {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

.cta-section {
    margin-top: 50px;
}

.hero-banner {
    background: linear-gradient(135deg, var(--subaru-blue) 0%, var(--subaru-light-blue) 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 0;
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.quick-search {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
