/* Autohaus Neusternberg - Hauptstil */
/* Design basiert auf der Feuerwehr Neusternberg Website */

:root {
    --primary: #C0392B;
    --primary-dark: #a93226;
    --secondary: #2C3E50;
    --secondary-light: #34495e;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== HEADER ==================== */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8%;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-height: 80px;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    font-weight: 300;
    color: var(--secondary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: color 0.3s;
    display: block;
    padding: 8px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* ==================== HERO ==================== */
.hero {
    min-height: 70vh;
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.9)), url('../img/hero.jpg') center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 8%;
    color: var(--white);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* ==================== SECTIONS ==================== */
section {
    padding: 60px 8%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--secondary);
}

/* ==================== CAR GRID ==================== */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.car-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-bottom: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.car-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f0f0f0;
}

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

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

.car-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.car-card-badge.sold {
    background: var(--danger);
}

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

.car-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
}

.car-card-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.car-card-spec {
    display: flex;
    align-items: center;
    gap: 6px;
}

.car-card-spec i {
    color: var(--primary);
    width: 16px;
}

.car-card-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* ==================== CAR DETAIL ==================== */
.car-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 60px 8%;
}

.car-detail-gallery {
    position: relative;
}

.car-detail-main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 10px;
    background: #f0f0f0;
}

.car-detail-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
}

.car-detail-thumbnails img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    border: 2px solid transparent;
}

.car-detail-thumbnails img:hover,
.car-detail-thumbnails img.active {
    opacity: 1;
    border-color: var(--primary);
}

.car-detail-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 10px;
}

.car-detail-brand {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.car-detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 25px;
}

.car-detail-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 10px;
}

.car-detail-spec-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.car-detail-spec-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.car-detail-spec-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.car-detail-description {
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(192, 57, 43, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-light);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1rem;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.filter-bar select,
.filter-bar input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    min-width: 150px;
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--secondary);
    color: #bdc3c7;
    padding: 60px 8% 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: left;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-section h4 {
    color: white;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
    font-size: 0.9rem;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* ==================== ADMIN STYLES ==================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--secondary);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.admin-sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

.admin-nav {
    list-style: none;
}

.admin-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.admin-nav li a:hover,
.admin-nav li a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 3px solid var(--primary);
}

.admin-nav li a i {
    width: 20px;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: var(--bg-light);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 1.8rem;
    color: var(--secondary);
}

/* ==================== ADMIN TABLE ==================== */
.admin-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--secondary);
    color: white;
    padding: 15px 20px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.admin-table img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

/* ==================== ADMIN FORM ==================== */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    max-width: 800px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Image Upload */
.image-upload {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.image-upload:hover {
    border-color: var(--primary);
    background: rgba(192, 57, 43, 0.02);
}

.image-upload i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.image-upload p {
    color: var(--text-muted);
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 120px;
    height: 90px;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.image-preview-item .remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card-icon.red { background: var(--primary); }
.stat-card-icon.blue { background: var(--secondary); }
.stat-card-icon.green { background: var(--success); }
.stat-card-icon.orange { background: var(--warning); }

.stat-card-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat-card-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ==================== LOGIN PAGE ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 30px;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    header {
        padding: 0 5%;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .hero h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }
    
    section {
        padding: 40px 5%;
    }
    
    .car-grid {
        grid-template-columns: 1fr;
    }
    
    .car-detail {
        grid-template-columns: 1fr;
        padding: 40px 5%;
    }
    
    .car-detail-main-image {
        height: 300px;
    }
    
    .car-detail-specs-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar select,
    .filter-bar input {
        width: 100%;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        text-align: center;
    }
}
