/* Single Fahrzeug Template Styles */
/* Basierend auf dem BMW 118D Design */

:root {
    --fzv-primary: #FF8C00;
    --fzv-dark: #333333;
    --fzv-gray: #666666;
    --fzv-light-gray: #f5f5f5;
    --fzv-border: #e0e0e0;
}

.fzv-single-fahrzeug {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--fzv-dark);
    background: white;
}

/* Hero Section - nur Titel */
.fzv-hero-section {
    background: #5b5b5b;
    color: white;
    padding: 30px 0;
    margin-bottom: 0;
    border-radius: 0 0 50px 50px;
    border-top: 1px solid white;
    overflow: hidden;
}

.fzv-hero-section .container {
    border-radius: 0 0 50px 50px;
}

.fzv-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fzv-fahrzeug-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    letter-spacing: 0.5px;
    color: white !important;
}

/* Main Section - Hauptbereich mit Bild und Info */
.fzv-main-section {
    background: white;
    padding: 40px 0;
}

/* Mobile Info Boxes - standardmäßig ausgeblendet */
.fzv-mobile-info-boxes {
    display: none;
}

.fzv-main-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fzv-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Linke Spalte - Hauptbild */
.fzv-image-column {
    position: relative;
}

.fzv-hauptbild {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.fzv-hauptbild img {
    width: 100%;
    height: 450px;
    object-fit: contain;
}

/* Rechte Spalte - Preis und Auto Details */
.fzv-info-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Neue Preis Box im Main Section */
.fzv-price-box {
    background: var(--fzv-primary);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    color: white;
    box-shadow: 0 5px 15px rgba(255,140,0,0.3);
}

.fzv-price-amount {
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* AUTO DETAILS BOX - NUR AUSSENBOX */
.fzv-auto-details-box {
    background: white;
    border: 1px solid #ccc;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 20px;
    height: auto;
    padding: 20px;
}

/* HEADER BOX */
.fzv-header {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 25px 25px 0 0;
    text-align: center;
    font-size: 1.2rem;
    color: var(--fzv-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CONTENT DIV */
.fzv-content {
    margin: 50px 30px 30px 30px;
    display: grid;
    grid-template-columns: 50% 50%;
    grid-template-rows: 1fr 1fr 1fr;
}

/* DETAIL ITEMS */
.fzv-detail-item {
    display: flex;
    align-items: center;
    padding: 10px 0 10px 10px;
    border-bottom: 1px solid #e0e0e0;
}

.fzv-detail-item:nth-child(5),
.fzv-detail-item:nth-child(6) {
    border-bottom: none;
}

.fzv-detail-item i {
    color: #0d274e;
    margin-right: 10px;
}

.fzv-detail-item span {
    color: var(--fzv-dark);
}

/* Thumbnail Section (Original - kann entfernt werden wenn nicht mehr verwendet) */
.fzv-thumbnails-section {
    background: white;
    padding: 20px 0;
}

.fzv-thumbnails-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.fzv-thumbnail {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.fzv-thumbnail:hover,
.fzv-thumbnail.active {
    border-color: var(--fzv-primary);
    transform: scale(1.05);
}

.fzv-thumbnail img {
    width: 120px;
    height: 90px;
    object-fit: cover;
}

/* Main Image Navigation */
.fzv-hauptbild {
    position: relative;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.fzv-hauptbild img {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Auch für Thumbnail-Bilder */
.fzv-thumbnail-inline img {
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
    -moz-user-drag: none !important;
    user-drag: none !important;
}

.fzv-main-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.fzv-nav-btn {
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    margin: 0 15px;
    opacity: 0.8;
}

.fzv-nav-btn:hover {
    background: var(--fzv-primary);
    opacity: 1;
    transform: scale(1.1);
}

.fzv-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(0,0,0,0.3);
}

.fzv-nav-btn:disabled:hover {
    transform: none;
    background: rgba(0,0,0,0.3);
}

.fzv-image-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10;
}

/* Thumbnail Container */
.fzv-thumbnails-container {
    position: relative;
    margin-top: 15px;
}

/* Inline Thumbnail Carousel (under main image) - MAXIMAL 5 BILDER SICHTBAR */
.fzv-thumbnails-inline {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 15px;
    border-radius: 10px;
    background: #f8f9fa;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Thumbnail Container */
.fzv-thumbnails-container {
    position: relative;
    margin-top: 15px;
    width: 100%;
    overflow: hidden;
}

.fzv-thumbnails-inline::-webkit-scrollbar {
    display: none;
}

/* Thumbnail Navigation */
.fzv-thumb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 0.8;
}

.fzv-thumb-nav:hover {
    background: var(--fzv-primary);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.fzv-thumb-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(0,0,0,0.3);
}

.fzv-thumb-nav:disabled:hover {
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
}

.fzv-thumb-nav-left {
    left: 5px;
    z-index: 30;
}

.fzv-thumb-nav-right {
    right: 5px;
    z-index: 30;
}

.fzv-thumbnail-inline {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
    position: relative;
}

.fzv-thumbnail-inline:hover {
    border-color: var(--fzv-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.fzv-thumbnail-inline.active {
    border-color: var(--fzv-primary);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(255,140,0,0.3);
}

.fzv-thumbnail-inline img {
    width: 130px;
    height: 90px;
    object-fit: cover;
    transition: all 0.3s ease;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
    -moz-user-drag: none !important;
    user-drag: none !important;
}

/* Thumbnail-Container Breiten-Constraints */

/* Desktop: 5 Bilder */
@media (min-width: 1025px) {
    .fzv-thumbnails-inline {
        width: 720px !important; /* Genau 5 Thumbnails: 5*130px + 4*10px + 30px */
        max-width: 720px !important;
        min-width: 720px !important;
    }
}

/* Tablet und Mobile: volle Breite */
@media (max-width: 1024px) {
    .fzv-thumbnails-inline {
        width: 100% !important;
        max-width: 100% !important;
    }
}

.fzv-thumbnail-inline:hover img {
    transform: scale(1.1);
}


/* Details Section */
.fzv-details-section {
    background: white;
    padding: 60px 0;
}

/* Inline Details Section (under image) */
.fzv-details-section-inline {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.fzv-details-full-width {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.fzv-details-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 0 20px;
}

/* Hauptinformationen Box */
.fzv-details-main {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.fzv-details-main h2 {
    font-size: 1.8rem;
    color: var(--fzv-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--fzv-primary);
}

/* Beschreibung */
.fzv-beschreibung {
    margin-bottom: 40px;
}

.fzv-beschreibung-text {
    line-height: 1.8;
    color: var(--fzv-gray);
    font-size: 1.05rem;
}

/* Technische Daten Grid */
.fzv-technische-daten {
    margin-bottom: 40px;
}

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

.fzv-daten-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--fzv-light-gray);
    border-radius: 8px;
    transition: background 0.3s;
}

.fzv-daten-item:hover {
    background: #e8e8e8;
}

.fzv-daten-label {
    color: var(--fzv-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fzv-daten-label:before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--fzv-primary);
}

.fzv-daten-wert {
    font-weight: 600;
    color: var(--fzv-dark);
}

/* Ausstattung */
.fzv-ausstattung {
    margin-top: 40px;
}

.fzv-ausstattung-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.fzv-ausstattung-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--fzv-light-gray);
    border-radius: 6px;
    font-size: 0.95rem;
}

.fzv-ausstattung-item i {
    color: var(--fzv-primary);
    font-size: 0.9rem;
}

/* Sidebar */
.fzv-details-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.fzv-info-column {
    position: sticky;
    top: 20px;
}

/* Preis Box - ENTFERNT */


/* Kontakt Box */
.fzv-kontakt-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.fzv-kontakt-box h3 {
    color: var(--fzv-dark);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.fzv-kontakt-info {
    margin-bottom: 30px;
}

.fzv-kontakt-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.fzv-kontakt-item i {
    color: var(--fzv-primary);
    font-size: 1.2rem;
    width: 25px;
}

.fzv-kontakt-item strong {
    color: var(--fzv-dark);
    display: block;
    margin-bottom: 5px;
}

/* Anfrage Formular */
.fzv-anfrage-form {
    border-top: 1px solid var(--fzv-border);
    padding-top: 20px;
}

.fzv-anfrage-form h4 {
    color: var(--fzv-dark);
    margin-bottom: 20px;
}

.fzv-form-group {
    margin-bottom: 15px;
}

.fzv-form-group input,
.fzv-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--fzv-border);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.fzv-form-group input:focus,
.fzv-form-group textarea:focus {
    outline: none;
    border-color: var(--fzv-primary);
    box-shadow: 0 0 0 3px rgba(255,140,0,0.1);
}

.fzv-submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--fzv-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fzv-submit-btn:hover {
    background: #ff7700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,140,0,0.3);
}

/* Aktions-Buttons */
.fzv-aktionen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.fzv-aktionen button {
    padding: 12px;
    border: 2px solid transparent;
    background: #FF8C00;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: normal;
    font-family: inherit;
}

.fzv-aktionen button:hover {
    background: #0066cc;
    color: white;
}

.fzv-aktionen a.fzv-btn-share {
    background: #FF8C00;
    color: white;
    border: 2px solid transparent;
}

.fzv-aktionen a.fzv-btn-share:hover {
    background: #0066cc;
    color: white;
}

/* PDF Link als Button stylen */
.fzv-aktionen a.fzv-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #FF8C00;
    transition: all 0.3s;
    cursor: pointer;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: normal;
    font-family: inherit;
}

.fzv-aktionen a.fzv-btn:hover {
    background: #0066cc;
    color: white;
}

/* Share Dropdown - NACH OBEN öffnen da am Seitenende */
.fzv-share-dropdown {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--fzv-border);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 999999 !important;
    min-width: 180px;
}

/* Sicherstellen dass Aktionen-Container korrekte Position hat */
.fzv-aktionen {
    position: relative !important;
    z-index: 999998 !important;
}

/* TEILEN Button als relativer Container */
.fzv-aktionen button#share-btn {
    position: relative !important;
}

.fzv-share-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--fzv-border);
    color: #333;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.fzv-share-option:last-child {
    border-bottom: none;
}

.fzv-share-option:hover {
    background-color: var(--fzv-light-gray);
}

.fzv-share-option i {
    width: 16px;
    color: var(--fzv-primary);
}

/* Aktionen Container für relative Positionierung */
.fzv-aktionen {
    position: relative;
}

/* Weitere Fahrzeuge Section */
.fzv-weitere-section {
    background: white;
    padding: 60px 0;
}

.fzv-weitere-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--fzv-dark);
    margin-bottom: 40px;
}

.fzv-weitere-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 0 20px;
}

.fzv-weitere-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.fzv-weitere-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.fzv-weitere-item a {
    color: inherit;
    text-decoration: none;
}

.fzv-weitere-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

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

.fzv-weitere-preis {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--fzv-primary);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.fzv-weitere-info {
    padding: 15px;
}

.fzv-weitere-info h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--fzv-dark);
}

.fzv-weitere-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--fzv-gray);
}

/* No Image Placeholder */
.fzv-no-image,
.fzv-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--fzv-light-gray);
    color: #ccc;
}

.fzv-no-image i,
.fzv-no-thumb i {
    font-size: 4rem;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .fzv-main-grid {
        grid-template-columns: 1fr;
    }
    
    .fzv-info-column {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .fzv-details-section-inline {
        padding: 20px;
        margin-top: 20px;
    }
    
    .fzv-thumbnails-inline {
        padding: 10px;
        margin-top: 10px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .fzv-thumbnail-inline img {
        width: 100px;
        height: 75px;
    }
    
    /* Hide navigation arrows on tablets for touch */
    .fzv-thumb-nav {
        display: none;
    }
    
    .fzv-nav-btn {
        width: 45px;
        height: 45px;
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .fzv-fahrzeug-title {
        font-size: 1.8rem;
    }
    
    .fzv-details-grid {
        grid-template-columns: 1fr;
    }
    
    .fzv-details-sidebar {
        position: static;
    }
    
    .fzv-daten-grid,
    .fzv-ausstattung-grid {
        grid-template-columns: 1fr;
    }
    
    .fzv-weitere-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fzv-price-amount {
        font-size: 1.8rem;
    }
    
    .fzv-details-grid {
        grid-template-columns: 1fr;
    }
    
    .fzv-details-section-inline {
        padding: 15px;
        margin-top: 15px;
    }
    
    .fzv-details-section-inline h2 {
        font-size: 1.5rem;
    }
    
    /* Mobile thumbnails: volle Breite mit responsive gap - nur für Mobile */
    .fzv-thumbnails-inline {
        padding: 8px;
        gap: 8px;
    }
    
    .fzv-thumbnail-inline img {
        width: 80px;
        height: 60px;
    }
    
    /* Navigation buttons für mobile kleinere Thumbnails */
    .fzv-thumb-nav {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    /* Mobile navigation adjustments */
    .fzv-nav-btn {
        width: 40px;
        height: 40px;
        margin: 0 8px;
    }
    
    .fzv-image-counter {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Mobile: Grid wird zu Stack für bessere Darstellung */
    .fzv-main-grid {
        display: block;
    }
    
    .fzv-image-column {
        margin-bottom: 20px;
    }
    
    .fzv-info-column {
        position: static;
    }
    
    /* Mobile: Mobile Info Boxes anzeigen */
    .fzv-mobile-info-boxes {
        display: block;
        margin: 20px 0;
    }
    
    /* Mobile: Nur Preis und Auto Details Boxen der originalen Spalte ausblenden */
    .fzv-info-column .fzv-price-box,
    .fzv-info-column .fzv-auto-details-box {
        display: none;
    }
    
    /* Mobile: Kontakt und Aktionen bleiben sichtbar */
    .fzv-info-column .fzv-kontakt-box,
    .fzv-info-column .fzv-aktionen {
        display: block;
        margin-top: 20px;
    }
    
    /* Mobile: Buttons nebeneinander */
    .fzv-aktionen {
        display: flex !important;
        gap: 10px !important;
        justify-content: space-between !important;
    }
    
    .fzv-aktionen button {
        flex: 1;
        min-width: 120px;
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .fzv-weitere-grid {
        grid-template-columns: 1fr;
    }
    
    .fzv-hero-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .fzv-details-main {
        padding: 20px;
    }
    
    .fzv-thumbnails-inline {
        padding: 5px;
        gap: 5px;
    }
    
    .fzv-thumbnail-inline img {
        width: 70px;
        height: 50px;
    }
}