/* Mobile.de Sync Pro - Frontend Styles */

/* Fahrzeug-Grid */
.mdsp-vehicle-grid {
    display: grid;
    gap: 30px;
    margin: 30px 0;
}

.mdsp-columns-2 { grid-template-columns: repeat(2, 1fr); }
.mdsp-columns-3 { grid-template-columns: repeat(3, 1fr); }
.mdsp-columns-4 { grid-template-columns: repeat(4, 1fr); }

/* Fahrzeug-Karte */
.mdsp-vehicle-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mdsp-vehicle-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.mdsp-vehicle-image {
    position: relative;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    overflow: hidden;
    background: #f5f5f5;
}

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

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

.mdsp-vehicle-price {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
}

.mdsp-vehicle-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mdsp-vehicle-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.mdsp-vehicle-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.mdsp-vehicle-title a:hover {
    color: #2271b1;
}

.mdsp-vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.mdsp-spec {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.mdsp-spec-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.mdsp-vehicle-footer {
    margin-top: auto;
    padding-top: 15px;
}

.mdsp-view-button {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    background: #2271b1;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.mdsp-view-button:hover {
    background: #135e96;
    color: #fff;
}

/* Suchformular */
.mdsp-search-form {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
}

.mdsp-search-title {
    font-size: 24px;
    margin: 0 0 20px 0;
}

.mdsp-search-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.mdsp-field {
    display: flex;
    flex-direction: column;
}

.mdsp-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.mdsp-field select,
.mdsp-field input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.mdsp-field select:focus,
.mdsp-field input:focus {
    outline: none;
    border-color: #2271b1;
}

.mdsp-search-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.mdsp-search-button {
    padding: 12px 30px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.mdsp-search-button:hover {
    background: #135e96;
}

.mdsp-reset-button {
    padding: 12px 30px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.mdsp-reset-button:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Einzelansicht */
.mdsp-single-vehicle {
    max-width: 1200px;
    margin: 0 auto;
}

.mdsp-vehicle-gallery {
    margin-bottom: 40px;
}

.mdsp-main-image {
    margin-bottom: 15px;
}

.mdsp-main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.mdsp-thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.mdsp-thumbnail {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.mdsp-thumbnail:hover,
.mdsp-thumbnail.active {
    border-color: #2271b1;
}

.mdsp-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.mdsp-vehicle-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.mdsp-specs-table {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

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

.mdsp-specs-table th,
.mdsp-specs-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.mdsp-specs-table th {
    background: #f0f0f0;
    font-weight: 600;
    width: 40%;
}

.mdsp-specs-table tr:last-child td,
.mdsp-specs-table tr:last-child th {
    border-bottom: none;
}

/* Kontaktformular */
.mdsp-contact-box {
    background: #fff;
    border: 2px solid #2271b1;
    border-radius: 8px;
    padding: 25px;
    position: sticky;
    top: 20px;
}

.mdsp-contact-box h3 {
    margin-top: 0;
}

.mdsp-dealer-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.mdsp-dealer-info p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mdsp-contact-form input,
.mdsp-contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.mdsp-contact-form button {
    width: 100%;
    padding: 12px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.mdsp-contact-form button:hover {
    background: #135e96;
}

/* Responsive */
@media (max-width: 992px) {
    .mdsp-vehicle-details {
        grid-template-columns: 1fr;
    }
    
    .mdsp-contact-box {
        position: static;
    }
}

@media (max-width: 768px) {
    .mdsp-vehicle-grid {
        grid-template-columns: 1fr !important;
    }
    
    .mdsp-search-fields {
        grid-template-columns: 1fr;
    }
    
    .mdsp-vehicle-specs {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================
   VEHARO GLOBAL FIXES
   ======================================== */

/* 1. FOOTER FIX - Archive nicht volle Breite */
.veharo-archive {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* 2. PAGINATION STYLING */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 20px 0;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: var(--veharo-radius, 8px);
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.page-numbers:hover {
    border-color: var(--veharo-primary, #2563eb);
    color: var(--veharo-primary, #2563eb);
    transform: translateY(-2px);
}

.page-numbers.current {
    background: var(--veharo-primary, #2563eb);
    border-color: var(--veharo-primary, #2563eb);
    color: white;
}

.page-numbers.dots {
    border: none;
    background: none;
}

@media (max-width: 768px) {
    .page-numbers {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
}
