:root {
    --primary: #00b4d8;
    --primary-dark: #0096b7;
    --accent: #00b4d8;
    --accent-hover: #0096b7;
    --whatsapp: #25d366;
    --bg-dark: #111119;
    --bg-darker: #0a0a10;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --text-light: #e0e0e0;
    --text-muted-dark: #8a8a9a;
    --card-radius: 1rem;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-light);
    background: var(--bg-darker);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-hover);
}

.text-accent {
    color: var(--accent) !important;
}

.btn-accent {
    background-color: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: #fff;
}

.btn-outline-accent {
    color: var(--accent);
    border-color: var(--accent);
    background: transparent;
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: #fff;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.15rem rgba(0, 180, 216, 0.35);
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 5rem 0 4rem;
}

@media (min-width: 768px) {
    .hero-section {
        min-height: 75vh;
        padding: 6rem 0 5rem;
    }
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 16, 0.45) 0%,
        rgba(10, 10, 16, 0.6) 50%,
        rgba(10, 10, 16, 0.92) 100%
    );
    z-index: 1;
}

.hero-section h1 {
    font-size: 2.2rem;
    font-weight: 800;
    font-style: italic;
    color: var(--accent);
    letter-spacing: -0.01em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-section .lead {
    color: rgba(255,255,255,0.85);
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 1px 10px rgba(0,0,0,0.4);
}

@media (min-width: 768px) {
    .hero-section h1 {
        font-size: 3rem;
    }
}

/* Info Section (dark cards) */
.dark-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--card-radius);
    padding: 2rem;
    transition: border-color 0.3s, background 0.3s;
}

.dark-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.dark-card h5 {
    color: #fff;
}

.dark-card p {
    color: var(--text-muted-dark);
}

.dark-card .icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 180, 216, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

/* Car Cards */
.car-card {
    border: none;
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.car-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.car-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.car-card .badge-price {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
}

.car-card .card-body {
    padding: 1.25rem;
}

.car-card .car-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.car-card .car-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.car-card .car-specs .spec {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--text-muted-dark);
    background: rgba(255,255,255,0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
}

.car-card .text-muted {
    color: var(--text-muted-dark) !important;
}

/* WhatsApp Button */
.btn-whatsapp {
    background-color: var(--whatsapp);
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    transition: background-color 0.2s;
}

.btn-whatsapp:hover {
    background-color: #128c7e;
    color: white;
}

.whatsapp-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--whatsapp);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
    color: white;
}

/* Social Icons */
.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.social-icon:hover {
    background: var(--accent);
    color: #fff;
}

/* Detail Page */
.detail-gallery img {
    border-radius: var(--card-radius);
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

.detail-gallery img:hover {
    opacity: 0.85;
}

.detail-info-table th {
    font-weight: 600;
    white-space: nowrap;
    width: 40%;
    color: var(--text-muted-dark);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

.detail-info-table td {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-light);
}

.detail-info-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-light);
}

/* Info/Detail cards dark */
.info-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    padding: 1.5rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    color: #ccc;
    z-index: 9999;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.4);
    border-top: 1px solid rgba(0,180,216,0.2);
}

.cookie-banner a {
    color: var(--accent);
}

/* Filter Section */
.filter-bar {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}

.filter-bar .form-label {
    color: var(--text-muted-dark);
}

.filter-bar .form-select,
.filter-bar .form-control {
    background: var(--bg-darker);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-light);
}

.filter-bar .form-select:focus,
.filter-bar .form-control:focus {
    background: var(--bg-darker);
    color: var(--text-light);
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid rgba(255,255,255,0.06);
    color: var(--text-light);
    padding: 2.5rem 0 1.5rem;
    margin-top: 3rem;
}

/* Admin Styles */
.admin-sidebar {
    min-height: 100vh;
    background: var(--bg-dark);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* Responsive Image Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.gallery-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.5rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .gallery-grid img {
        height: 160px;
    }
}

/* Sortable Image Gallery (Admin Edit) */
.gallery-sortable {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
}

.sortable-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: grab;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sortable-item:active { cursor: grabbing; }

.sortable-item.dragging {
    opacity: 0.4;
    border-color: #00b4d8;
}

.sortable-item.drag-over {
    border-color: #00b4d8;
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.3);
}

.sortable-item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.sortable-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 3px;
}

.btn-hauptbild, .btn-remove {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-hauptbild {
    background: rgba(255,255,255,0.85);
    color: #888;
}
.btn-hauptbild.active {
    background: #ffc107;
    color: #fff;
}
.btn-hauptbild:hover { background: #ffc107; color: #fff; }

.btn-remove {
    background: rgba(220,53,69,0.85);
    color: #fff;
}
.btn-remove:hover { background: #dc3545; }

.hauptbild-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,180,216,0.85);
    color: #fff;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Spacing */
.section-padding {
    padding: 3rem 0;
}

/* No-image placeholder */
.no-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-muted-dark);
    font-size: 3rem;
}

/* Opening hours styling */
.opening-hours td {
    padding: 0.15rem 0;
}

.opening-hours td:first-child {
    color: var(--accent);
    font-weight: 600;
    padding-right: 1rem;
}

/* ========== Fullscreen Lightbox ========== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 180, 216, 0.5);
    border-color: var(--accent);
}

.lightbox-prev {
    left: 15px;
}

.lightbox-next {
    right: 15px;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 10px;
    text-align: center;
}

@media (max-width: 576px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}