/* =====================================================
 *  Auto Fischer · Gebrauchtwagen · Frontend-CSS
 *  Wird vom Plugin geladen, integriert sich in Enfold.
 * ===================================================== */

.af-archive, .af-detail {
    --af-primary: #1a2942;
    --af-primary-light: #2c3e5e;
    --af-accent: #d97706;
    --af-accent-hover: #b45309;
    --af-success: #059669;
    --af-surface: #f7f8fa;
    --af-surface-2: #eef0f4;
    --af-border: #e2e5ec;
    --af-text: #1a1a1a;
    --af-text-muted: #6b7280;
    --af-text-light: #9ca3af;
    --af-radius: 6px;
    --af-radius-lg: 10px;
    --af-shadow: 0 4px 12px rgba(0,0,0,0.06);
    --af-shadow-lg: 0 12px 32px rgba(0,0,0,0.08);

    color: var(--af-text);
    padding: 24px 0 60px;
}

.af-archive *,
.af-detail * { box-sizing: border-box; }

.af-archive img,
.af-detail img { max-width: 100%; height: auto; display: block; }

/* ============ ARCHIVE ============ */

.af-archive-header h1 {
    font-size: 34px; font-weight: 800;
    color: var(--af-primary);
    letter-spacing: -0.5px;
    margin: 8px 0 6px;
}
.af-archive-sub {
    color: var(--af-text-muted); font-size: 15px;
    margin-bottom: 24px;
}
.af-count { color: var(--af-accent); font-weight: 700; }

.af-filter {
    background: white;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius-lg);
    padding: 16px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
    gap: 12px;
    box-shadow: var(--af-shadow);
    margin-bottom: 32px;
    align-items: end;
}
.af-filter-field { display: flex; flex-direction: column; gap: 4px; }
.af-filter-field label {
    font-size: 11px; font-weight: 600;
    color: var(--af-text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.af-filter-field input,
.af-filter-field select {
    padding: 9px 10px;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    font-size: 14px;
    background: white;
    width: 100%;
    height: 38px;
}
.af-filter-field input:focus,
.af-filter-field select:focus {
    outline: 2px solid var(--af-accent);
    outline-offset: -1px;
    border-color: var(--af-accent);
}
.af-filter-submit {
    background: var(--af-primary);
    color: white;
    border: 0;
    padding: 0 18px;
    height: 38px;
    border-radius: var(--af-radius);
    font-weight: 600;
    cursor: pointer;
}
.af-filter-submit:hover { background: var(--af-primary-light); }

.af-car-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.af-car-card {
    background: white;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius-lg);
    overflow: hidden;
    text-decoration: none !important;
    color: var(--af-text);
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
}
.af-car-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--af-shadow-lg);
    text-decoration: none !important;
}
.af-car-card-img {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--af-surface);
    overflow: hidden;
}
.af-car-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s;
}
.af-car-card:hover .af-car-card-img img { transform: scale(1.03); }

.af-badge {
    position: absolute; top: 12px; left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.5px; text-transform: uppercase;
    color: white;
}
.af-badge-available { background: var(--af-success); }
.af-badge-reserved  { background: var(--af-accent); }
.af-badge-sold      { background: #6b7280; }

.af-car-card-body { padding: 18px 20px 20px; }
.af-car-card-title {
    font-size: 17px; font-weight: 700;
    color: var(--af-primary);
    margin: 0 0 6px;
    line-height: 1.3;
}
.af-car-card-price {
    font-size: 22px; font-weight: 800;
    color: var(--af-text);
    margin-bottom: 14px;
}
.af-car-card-price .af-vat {
    font-size: 12px; font-weight: 500;
    color: var(--af-text-muted);
}
.af-car-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding-top: 14px;
    border-top: 1px solid var(--af-border);
    font-size: 13px;
}
.af-car-card-specs span {
    color: var(--af-text-muted);
    display: flex; align-items: center; gap: 6px;
}
.af-car-card-specs strong { color: var(--af-text); font-weight: 600; }

.af-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--af-text-muted);
}

/* ============ DETAIL ============ */

.af-breadcrumb {
    padding: 8px 0 18px;
    font-size: 13px; color: var(--af-text-muted);
}
.af-breadcrumb a { color: var(--af-text-muted); text-decoration: none; }
.af-breadcrumb a:hover { color: var(--af-accent); }
.af-breadcrumb .sep { margin: 0 8px; color: var(--af-text-light); }

.af-sold-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
    padding: 12px 16px;
    border-radius: var(--af-radius);
    margin-bottom: 24px;
    font-size: 14px;
}

.af-detail-title-row {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 24px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.af-detail-title h1 {
    font-size: 32px; font-weight: 800;
    color: var(--af-primary);
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin: 0;
}
.af-meta {
    color: var(--af-text-muted); font-size: 14px;
    margin-top: 6px;
    display: flex; gap: 16px; flex-wrap: wrap;
}
.af-detail-price { text-align: right; }
.af-price {
    font-size: 36px; font-weight: 800;
    color: var(--af-text);
    line-height: 1;
}
.af-price-info {
    font-size: 13px; color: var(--af-text-muted);
    margin-top: 4px;
}

.af-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

/* Galerie */
.af-gallery-main {
    aspect-ratio: 16 / 10;
    background: var(--af-surface);
    border-radius: var(--af-radius-lg);
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    cursor: zoom-in;
}
.af-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.af-gallery-counter {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0,0,0,0.7); color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px; font-weight: 500;
}
.af-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}
.af-gallery-thumb {
    aspect-ratio: 16 / 10;
    background: var(--af-surface);
    border-radius: var(--af-radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0;
    transition: border-color 0.15s;
}
.af-gallery-thumb.active { border-color: var(--af-accent); }
.af-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* CTA Panel */
.af-cta {
    background: white;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius-lg);
    padding: 22px;
    position: sticky; top: 100px;
    box-shadow: var(--af-shadow);
    align-self: start;
}
.af-cta h3 {
    font-size: 14px; font-weight: 600;
    color: var(--af-text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin: 0 0 14px;
}
.af-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--af-radius);
    font-size: 15px; font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    margin-bottom: 10px;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}
.af-btn-primary { background: var(--af-accent); color: white; }
.af-btn-primary:hover { background: var(--af-accent-hover); color: white; text-decoration: none; }
.af-btn-secondary { background: var(--af-primary); color: white; }
.af-btn-secondary:hover { background: var(--af-primary-light); color: white; text-decoration: none; }
.af-btn-outline {
    background: white; color: var(--af-text);
    border: 1px solid var(--af-border);
}
.af-btn-outline:hover { border-color: var(--af-accent); color: var(--af-accent); text-decoration: none; }
.af-btn .icon { font-size: 18px; }

.af-cta-divider {
    border-top: 1px solid var(--af-border);
    margin: 16px 0;
}
.af-cta-trust {
    font-size: 13px;
    color: var(--af-text-muted);
    line-height: 1.6;
}
.af-cta-trust strong {
    color: var(--af-primary);
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}
.af-cta-trust a { color: var(--af-accent); }

/* Quick Specs */
.af-quick-specs {
    background: var(--af-surface);
    border-radius: var(--af-radius-lg);
    padding: 22px 0;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}
.af-quick-spec {
    text-align: center;
    border-right: 1px solid var(--af-border);
    padding: 0 12px;
}
.af-quick-spec:last-child { border-right: none; }
.af-quick-spec .icon { font-size: 22px; margin-bottom: 6px; }
.af-quick-spec .label {
    font-size: 11px; color: var(--af-text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.af-quick-spec .value {
    font-size: 16px; font-weight: 700;
    color: var(--af-text);
}

/* Sections */
.af-section { margin-bottom: 44px; }
.af-section h2 {
    font-size: 22px; font-weight: 700;
    color: var(--af-primary);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--af-surface-2);
}

/* Highlights */
.af-highlights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.af-highlight {
    background: white;
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    padding: 16px;
    display: flex; gap: 12px; align-items: flex-start;
}
.af-highlight .icon {
    font-size: 22px;
    color: var(--af-success);
    flex-shrink: 0;
}
.af-highlight strong {
    display: block; font-size: 14px; color: var(--af-text);
    font-weight: 600;
    line-height: 1.4;
}

/* Description */
.af-description {
    font-size: 16px; line-height: 1.7;
    color: var(--af-text);
    max-width: 780px;
}
.af-description p { margin-bottom: 14px; }
.af-description strong { color: var(--af-primary); }

/* Features */
.af-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.af-feature-pill {
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    padding: 10px 14px;
    font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.af-feature-pill .check {
    color: var(--af-success); font-weight: 700;
}
.af-feature-pill.af-hidden { display: none; }
.af-feature-pill.af-show   { display: flex; }
.af-features-toggle {
    margin-top: 14px;
    color: var(--af-accent); font-size: 14px; font-weight: 600;
    background: none; border: 0; padding: 0;
    cursor: pointer;
}
.af-features-toggle:hover { text-decoration: underline; }

/* Tech data */
.af-tech-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}
.af-tech-row {
    display: flex; justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--af-border);
    font-size: 14px;
}
.af-tech-row .label { color: var(--af-text-muted); }
.af-tech-row .value { font-weight: 600; color: var(--af-text); }

.af-form-placeholder {
    background: var(--af-surface);
    border: 1px dashed var(--af-border);
    padding: 24px;
    border-radius: var(--af-radius);
    color: var(--af-text-muted);
    font-size: 14px;
    text-align: center;
}

/* Lightbox */
.af-lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    z-index: 9999;
    align-items: center; justify-content: center;
    padding: 24px;
}
.af-lightbox.open { display: flex; }
.af-lightbox img {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}
.af-lightbox-close {
    position: absolute; top: 20px; right: 24px;
    background: rgba(255,255,255,0.15); color: white;
    border: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
}
.af-lightbox-prev,
.af-lightbox-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.15); color: white;
    border: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
}
.af-lightbox-prev { left: 20px; }
.af-lightbox-next { right: 20px; }

/* ============ HOMEPAGE-SHORTCODE ============ */

.af-home-block {
    margin: 32px 0;
}
.af-home-block-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 18px;
    flex-wrap: wrap; gap: 12px;
}
.af-home-block-header h2 {
    font-size: 28px; font-weight: 800;
    color: var(--af-primary);
    margin: 0;
}
.af-home-block-header .af-more {
    color: var(--af-accent);
    font-weight: 600;
    text-decoration: none;
}
.af-home-block-header .af-more:hover { text-decoration: underline; }

/* ============ RESPONSIVE ============ */

@media (max-width: 960px) {
    .af-filter { grid-template-columns: 1fr 1fr; }
    .af-filter-submit { grid-column: 1 / -1; }
    .af-car-grid { grid-template-columns: 1fr 1fr; }
    .af-detail-grid { grid-template-columns: 1fr; }
    .af-cta { position: static; }
    .af-quick-specs { grid-template-columns: repeat(2, 1fr); }
    .af-quick-spec { border-right: 0; border-bottom: 1px solid var(--af-border); padding: 12px; }
    .af-highlights { grid-template-columns: 1fr 1fr; }
    .af-tech-data { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .af-filter { grid-template-columns: 1fr; }
    .af-car-grid { grid-template-columns: 1fr; }
    .af-detail-title-row { flex-direction: column; align-items: flex-start; }
    .af-detail-price { text-align: left; }
    .af-gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
    .af-highlights { grid-template-columns: 1fr; }
    .af-detail-title h1 { font-size: 24px; }
    .af-archive-header h1 { font-size: 26px; }
    .af-price { font-size: 28px; }
}
