/* ============================================================
   WPCS Angebot Detail — angebot-detail.css
   Einzelansicht eines Aktions-/Herstellerangebots.
   Voraussetzung: style.css, form-elements.css, vehicle-detail.css, angebote.css
   ============================================================ */


/* ============================================================
   DETAIL LAYOUT OVERRIDE
   Sidebar rechts, 380px breit (identisch zu Fahrzeugdetail)
   ============================================================ */

.wpcs-detail-layout {
    grid-template-columns: 1fr 380px;
    margin-top: 32px;
}


/* ============================================================
   STICKY ACTION BAR
   Übernommen 1:1 aus vehicle-detail.css — kein Override nötig.
   Nur Preis-Suffix " / Monat" im HTML, kein CSS-Anpass.
   ============================================================ */


/* ============================================================
   ANGEBOT TYPE BADGE — INLINE (im Hero, nicht absolut)
   ============================================================ */

/* Überschreibt position:absolute aus angebote.css für
   die Verwendung im Hero / in Meta-Zeilen */
.wpcs-offer-type--inline {
    position: static;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}


/* ============================================================
   HERO — PREIS (Rate-Darstellung)
   ============================================================ */

/* Wrapper für "349 € / Monat" Zeile (replaces plain price value) */
.wpcs-offer-hero-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.wpcs-offer-hero-price__main {
    display: flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}

.wpcs-offer-hero-price__period {
    font-family: var(--wpcs-font-label);
    font-size: var(--wpcs-text-xl);
    font-weight: 400;
    color: var(--wpcs-color-text-muted);
    align-self: flex-end;
    padding-bottom: 3px;
}


/* ============================================================
   TEASER IMAGE (ersetzt die Galerie)
   ============================================================ */

.wpcs-offer-teaser {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    background: var(--wpcs-color-surface-3);
    border-radius: var(--wpcs-radius-md);
    overflow: hidden;
    margin-top: 12px;
    opacity: 0; /* GSAP initial */
}

.wpcs-offer-teaser__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badges-Leiste unten links im Teaserbild */
.wpcs-offer-teaser__badges {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Gültigkeitssticker oben rechts */
.wpcs-offer-teaser__validity {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(10, 12, 18, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--wpcs-radius-sm);
    padding: 6px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.wpcs-offer-teaser__validity-label {
    font-family: var(--wpcs-font-mono);
    font-size: var(--wpcs-text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
}

.wpcs-offer-teaser__validity-date {
    font-family: var(--wpcs-font-label);
    font-size: var(--wpcs-text-base);
    font-weight: 600;
    color: #fff;
}


/* ============================================================
   INFO STRIP (Angebotseckdaten — kompakte Faktenzeile)
   ============================================================ */

.wpcs-offer-infostrip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    background: var(--wpcs-color-border);
    border: 1px solid var(--wpcs-color-border);
    border-radius: var(--wpcs-radius-md);
    overflow: hidden;
}

.wpcs-offer-infostrip__item {
    background: var(--wpcs-color-surface);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background var(--wpcs-transition);
}

.wpcs-offer-infostrip__item:hover {
    background: var(--wpcs-color-surface-3);
}

.wpcs-offer-infostrip__label {
    font-family: var(--wpcs-font-mono);
    font-size: var(--wpcs-text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wpcs-color-text-dim);
    line-height: 1;
}

.wpcs-offer-infostrip__value {
    font-family: var(--wpcs-font-label);
    font-size: var(--wpcs-text-lg);
    font-weight: 600;
    color: var(--wpcs-color-text);
    white-space: nowrap;
}

/* Highlight-Variante (z.B. Rate) */
.wpcs-offer-infostrip__item--accent .wpcs-offer-infostrip__value {
    color: var(--wpcs-color-primary);
}


/* ============================================================
   ANGEBOTSTEXT (zentraler Inhaltsbereich, kein Clamp)
   ============================================================ */

.wpcs-offer-text {
    font-family: var(--wpcs-font-body);
    font-size: var(--wpcs-text-lg);
    line-height: 1.85;
    color: var(--wpcs-color-text-muted);
}

.wpcs-offer-text p + p {
    margin-top: 14px;
}

.wpcs-offer-text h3 {
    font-family: var(--wpcs-font-label);
    font-size: var(--wpcs-text-xl);
    font-weight: 700;
    color: var(--wpcs-color-text);
    margin-top: 28px;
    margin-bottom: 10px;
}

.wpcs-offer-text ul {
    margin-top: 8px;
    margin-left: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wpcs-offer-text ul li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.wpcs-offer-text ul li::before {
    content: '';
    flex-shrink: 0;
    margin-top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--wpcs-color-primary-dim);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1 4l2 2 4-4' stroke='%2300c4a0' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}


/* ============================================================
   SIDEBAR — ANGEBOTSDETAILS (Rate-Darstellung)
   ============================================================ */

/* Rate groß im Sidebar-Preisbereich */
.wpcs-detail-sidebar-rate {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.wpcs-detail-sidebar-rate__value {
    font-family: var(--wpcs-font-label);
    font-size: var(--wpcs-text-5xl);
    font-weight: 700;
    color: var(--wpcs-color-text);
    line-height: 1;
}

.wpcs-detail-sidebar-rate__period {
    font-family: var(--wpcs-font-label);
    font-size: var(--wpcs-text-md);
    color: var(--wpcs-color-text-muted);
    font-weight: 400;
    align-self: flex-end;
    padding-bottom: 2px;
}

/* Validity-Hinweis in der Sidebar */
.wpcs-offer-sidebar-validity {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--wpcs-color-surface-3);
    border-radius: var(--wpcs-radius-sm);
    border: 1px solid var(--wpcs-color-border);
    font-family: var(--wpcs-font-mono);
    font-size: var(--wpcs-text-xs);
    color: var(--wpcs-color-text-muted);
}

.wpcs-offer-sidebar-validity strong {
    color: var(--wpcs-color-text);
    font-weight: 500;
}


/* ============================================================
   KONTAKTFORMULAR (Angebots-Version)
   ============================================================ */

/* .wpcs-detail-contact__offer-rate* sind Modifier der Summary-Card und liegen
   bei der Komponenten-Basis in cards.css. */


/* .wpcs-contact-cards*, .wpcs-contact-location-select*, .wpcs-contact-location-info*
   sind nach cards.css verschoben — generische Komponenten für Standort-Auswahl +
   Person-Cards-Container, werden auf allen Detail-Seiten + freier PageBuilder-
   Platzierung gebraucht. */


/* ============================================================
   EMISSION TEXT
   ============================================================ */

.wpcs-emission-wrapper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.wpcs_offer_emission {
    font-family: var(--wpcs-font-body);
    font-size: var(--wpcs-text-base);
    line-height: 1.7;
    color: var(--wpcs-color-text-muted);
    flex: 1;
    min-width: 200px;
}


/* CO2-Label (`.wpcs_co2_class_label`): global in ui.css definiert. */


/* ============================================================
   OFFER GALLERY (Swiper Carousel)
   ============================================================ */

.wpcs-offer-gallery {
    border-radius: var(--wpcs-radius-md);
    overflow: hidden;
}

.wpcs-offer-gallery__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: var(--wpcs-radius-sm);
}

.wpcs-offer-gallery .swiper-button-prev,
.wpcs-offer-gallery .swiper-button-next {
    color: var(--wpcs-color-text);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.wpcs-offer-gallery .swiper-button-prev::after,
.wpcs-offer-gallery .swiper-button-next::after {
    font-size: 14px;
    font-weight: 700;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .wpcs-detail-layout {
        grid-template-columns: 1fr;
    }

    .wpcs-sidebar {
        position: static;
    }

    .wpcs-offer-infostrip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .wpcs-offer-teaser {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 768px) {
    .wpcs-offer-infostrip {
        grid-template-columns: 1fr 1fr;
    }

    .wpcs-offer-teaser {
        aspect-ratio: 4 / 3;
    }

    .wpcs-detail-hero__header {
        flex-direction: column;
    }

    .wpcs-offer-hero-price {
        align-items: flex-start;
    }
}
