/* Global Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --light-gray: #f8f9fa;
    --dark-gray: #2c3e50;
    --black-dop: #1a1a1a;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Navbar Styles */
.bg-navy {
    background-color: var(--primary-color);
}

.navbar-brand {
    font-weight: 600;
}

/* Custom Dark Black for Navbar */
.bg-dark {
    background-color: var(--black-dop) !important; /* Hitam dop */
}

/* Card Styles */
.car-card {
    transition: transform 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.car-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-card .card-text {
    flex: 1;
}

.car-card .d-grid {
    margin-top: auto;
}

.car-card:hover {
    transform: translateY(-5px);
}

.car-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Mobile Responsive Card Image */
@media (max-width: 575px) {
    .car-card .card-img-top {
        height: 180px;
    }
    
    .car-card .card-body {
        padding: 1rem;
    }
    
    .car-card .card-title {
        font-size: 1.1rem;
    }
    
    .car-card img {
        width: 100%;
        height: auto;
        display: block;
    }
}

@media (max-width: 375px) {
    .car-card .card-img-top {
        height: 160px;
    }
    
    .car-card .card-body {
        padding: 0.875rem;
    }
    
    .car-card .card-title {
        font-size: 1rem;
    }
}

.car-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* Button Styles */
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* Mobile Responsive Buttons */
@media (max-width: 575px) {
    .btn-whatsapp {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
    
    .d-grid.gap-2 {
        gap: 0.5rem !important;
    }
}

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

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

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

/* Enhanced Card Styles */
.car-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(44, 62, 80, 0.1);
}

.car-card .card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.car-card .text-primary {
    color: var(--accent-color) !important;
    font-weight: 600;
}

/* Gradient Background for Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
}

/* Enhanced Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.3);
}

/* Badge Enhancement */
.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
}

/* Navbar Enhancement */
.navbar-dark .navbar-nav .nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
}

.navbar-dark .navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent-color);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Form Styling */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid rgba(44, 62, 80, 0.2);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

/* Card Hover Effect */
.car-card:hover .card-img-top {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.car-card .card-img-top {
    transition: transform 0.3s ease;
}

/* Price Tag Styling */
.price-tag {
    background: linear-gradient(135deg, var(--accent-color) 0%, #c0392b 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.car-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
}

/* Mobile Responsive Form */
@media (max-width: 575px) {
    .card.p-3 {
        padding: 1rem !important;
    }
    
    .row.g-3 > .col-md-3,
    .row.g-3 > .col-md-2 {
        margin-bottom: 0.75rem;
    }
    
    .row.g-3 > .col-md-3:last-child,
    .row.g-3 > .col-md-2:last-child {
        margin-bottom: 0;
    }
}

/* Mobile Layout Fixes */
@media (max-width: 575px) {
    body {
        overflow-x: hidden;
    }
    
    .container, .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-text small {
        font-size: 0.8rem;
    }
    
    .d-grid.gap-2 .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .card-title {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Dashboard Styles */
.dashboard-stats {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.dashboard-stats i {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Table Styles */
.table-responsive {
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    background: white;
}

.table th {
    background-color: var(--light-gray);
    border-bottom: 2px solid #dee2e6;
}

/* Status Badges */
.badge-tersedia {
    background-color: var(--accent-color);
    color: white;
}

.badge-terjual {
    background-color: #dc3545;
    color: white;
}

.badge-perbaikan {
    background-color: #ffc107;
    color: black;
}

.badge-arsip {
    background-color: #6c757d;
    color: white;
}

/* Responsive Badge Positioning */
@media (max-width: 575px) {
    .car-card .badge {
        top: 5px;
        right: 5px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* Grid System - Mobile First */
.car-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    align-items: stretch;
}

@media (min-width: 576px) {
    .car-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (min-width: 576px) {
    .car-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .car-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 992px) {
    .car-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

@media (min-width: 1200px) {
    .car-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Footer Styles */
footer {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

footer h5 {
    color: var(--primary-color);
    font-weight: 600;
}

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

.gallery-item {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 5px;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.gallery-item:hover {
    border-color: var(--primary-color);
}

#mainImage {
    transition: opacity 0.3s ease;
}