/* Select Autocentrum VDP v2 (stap 3, 07-10-2026). Alleen geladen bij body.sac2-ui2 op single-occasion. Mobile-first; desktop-grid (stap 4) vanaf 1024 px onderaan. */

/* ---------- Oude elementen uit op v2 ---------- */
body.sac2-ui2.single-occasion .sac-float-call,
body.sac2-ui2.single-occasion .sac-float-wa,
body.sac2-ui2.single-occasion .mobile-sticky-cta,
body.sac2-ui2.single-occasion .occasion-hero,
body.sac2-ui2.single-occasion .breadcrumb,
body.sac2-ui2.single-occasion .occasion-layout-wrapper .occasion-gallery,
body.sac2-ui2.single-occasion .occasion-details-card,
body.sac2-ui2.single-occasion .bovag-guarantee,
body.sac2-ui2.single-occasion .financial-section,
body.sac2-ui2.single-occasion .occasion-highlights {
    display: none !important;
}
body.sac2-ui2.single-occasion .occasion-main-grid {
    display: block;
}
body.sac2-ui2.single-occasion .occasion-main-content-left {
    width: 100%;
    max-width: none;
}
body.sac2-ui2.single-occasion .main-content {
    font-family: var(--sac-font);
    color: var(--sac-ink);
    padding-bottom: 96px; /* ruimte voor de onderbalk */
}
body.sac2-ui2.single-occasion .main-content section {
    padding-left: 16px;
    padding-right: 16px;
}
/* De .container (16 px) rond de linkerkolom vervalt in v2: secties regelen hun eigen marge, carrousels lopen tot de rand. */
body.sac2-ui2.single-occasion .occasion-layout-wrapper .container {
    padding-left: 0 !important;  /* single-occasion.css:2876 zet 16px !important */
    padding-right: 0 !important;
    max-width: none;
}
body.sac2-ui2.single-occasion .main-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 12px;
    color: var(--sac-ink);
}

/* ---------- Topblok ---------- */
.sac2-vdp-top {
    padding: 0 !important;
    margin: 0 0 8px;
}

/* Galerij: scroll-snap, 3:2, volle breedte */
.sac2-gallery {
    position: relative;
    background: #111;
}
.sac2-gallery-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    aspect-ratio: 3 / 2;
}
.sac2-gallery-track::-webkit-scrollbar { display: none; }
.sac2-gallery-slide {
    flex: 0 0 100%;
    margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.sac2-gallery-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sac2-gallery-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--sac-radius-pill);
    pointer-events: none;
}
.sac2-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--sac-surface);
}
.sac2-thumbs::-webkit-scrollbar { display: none; }
.sac2-thumb {
    flex: 0 0 auto;
    width: 60px;
    height: 40px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: var(--sac-surface-2);
    cursor: pointer;
}
.sac2-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sac2-thumb.is-active { border-color: var(--sac-green-500); }

/* Titelblok */
.sac2-title {
    padding: 12px 16px 0;
}
.sac2-h1 {
    font-family: var(--sac-font);
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--sac-ink);
    letter-spacing: 0;
}
.sac2-sub {
    margin: 0 0 10px;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--sac-ink-600);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sac2-chips {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0 -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.sac2-chips::-webkit-scrollbar { display: none; }
.sac2-chip {
    flex: 0 0 auto;
    background: var(--sac-surface-2);
    border: 1px solid var(--sac-line);
    border-radius: var(--sac-radius-pill);
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sac-ink);
    white-space: nowrap;
}
.sac2-sold-notice {
    background: var(--sac-warn-050);
    border: 1px solid var(--sac-warn-500);
    border-radius: var(--sac-radius);
    padding: 10px 12px;
    margin: 0 0 12px;
    font-size: 0.9375rem;
}
.sac2-sold-notice a { color: var(--sac-green-700); text-decoration: underline; }

/* Prijs- en actieblok */
.sac2-action {
    padding: 12px 16px 16px;
    border-bottom: 8px solid var(--sac-surface-2);
}
.sac2-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.sac2-price {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    color: var(--sac-ink);
    letter-spacing: -0.01em;
}
.sac2-lease-link {
    font-size: 0.9375rem;
    color: var(--sac-green-700);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.sac2-avail {
    margin: 0 0 12px;
    font-size: 0.9375rem;
    color: var(--sac-ink-600);
}
.sac2-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sac2-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: var(--sac-btn-h);
    padding: 0 18px;
    border-radius: var(--sac-radius);
    font-family: var(--sac-font);
    font-size: 1.0625rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.2;
}
.sac2-btn:focus-visible { outline: 3px solid var(--sac-green-500); outline-offset: 2px; }
.sac2-primary {
    background: var(--sac-green-700);
    color: #fff !important;
    order: -2;
}
.sac2-primary:hover { background: #246f44; color: #fff; }
.sac2-secondary {
    background: var(--sac-surface);
    color: var(--sac-green-700);
    border-color: var(--sac-green-700);
    order: -1;
}
.sac2-secondary:hover { background: var(--sac-green-050); }
.sac2-secondary-link {
    background: transparent;
    color: var(--sac-green-700);
    min-height: var(--sac-tap);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    order: 0;
}
/* De oude .bez-call-cta / .bez-wa-cta opmaak (single-occasion.css, laadt later) resetten; de sac2-klassen bepalen kleur en vorm. */
body.sac2-ui2 .sac2-btn.bez-call-cta,
body.sac2-ui2 .sac2-btn.bez-wa-cta,
body.sac2-ui2 .sac2-bar-btn.bez-call-cta,
body.sac2-ui2 .sac2-bar-btn.bez-wa-cta {
    margin: 0;
    width: auto;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    transform: none;
    gap: 10px;
}
body.sac2-ui2 .sac2-primary.bez-call-cta,
body.sac2-ui2 .sac2-primary.bez-wa-cta,
body.sac2-ui2 .sac2-bar-main.bez-call-cta,
body.sac2-ui2 .sac2-bar-main.bez-wa-cta {
    background: var(--sac-green-700);
    border: 2px solid var(--sac-green-700);
    color: #fff !important;
    padding: 0 18px;
}
body.sac2-ui2 .sac2-primary.bez-call-cta:hover,
body.sac2-ui2 .sac2-primary.bez-wa-cta:hover,
body.sac2-ui2 .sac2-bar-main:hover {
    background: #246f44;
    border-color: #246f44;
}
body.sac2-ui2 .sac2-secondary-link.bez-call-cta,
body.sac2-ui2 .sac2-secondary-link.bez-wa-cta {
    background: transparent;
    border: 2px solid transparent;
    color: var(--sac-green-700) !important;
    padding: 0 18px;
}
body.sac2-ui2 .sac2-bar-icon.bez-call-cta,
body.sac2-ui2 .sac2-bar-icon.bez-wa-cta {
    background: var(--sac-green-050);
    border: 2px solid var(--sac-green-050);
    color: var(--sac-green-700) !important;
    padding: 0;
    width: 48px;
}
/* Het scroll-naar-boven-knopje (js/script.js) staat op de plek van de onderbalk; in v2 uit. */
body.sac2-ui2.single-occasion .scroll-to-top {
    display: none !important;
}
/* Praktische informatie: twee kolommen die in 358 px passen (de oude 2x1fr liep uit de kolom door min-width:auto). */
body.sac2-ui2.single-occasion .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: none;
}
body.sac2-ui2.single-occasion .overview-item {
    min-width: 0;
}
.sac2-cta-note {
    margin: 10px 0 0;
    font-size: 0.875rem;
    color: var(--sac-ink-600);
}
.sac2-checks {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}
.sac2-check {
    position: relative;
    padding-left: 22px;
    font-size: 0.875rem;
    color: var(--sac-ink);
}
.sac2-check::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--sac-green-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 9px no-repeat;
}

/* ---------- Onderbalk ---------- */
.sac2-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 0 12px env(safe-area-inset-bottom);
    background: var(--sac-surface);
    border-top: 1px solid var(--sac-line);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
    font-family: var(--sac-font);
}
.sac2-bar.is-visible { transform: translateY(0); }
.sac2-bar-price {
    flex: 1 1 auto;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--sac-ink);
    white-space: nowrap;
}
.sac2-bar-actions { display: flex; gap: 8px; }
.sac2-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: var(--sac-radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
}
.sac2-bar-main {
    background: var(--sac-green-700);
    color: #fff !important;
    padding: 0 18px;
    order: 2;
}
.sac2-bar-icon {
    width: 48px;
    background: var(--sac-green-050);
    color: var(--sac-green-700) !important;
    order: 1;
}
.sac2-bar-icon span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Bottom-sheet ---------- */
.sac2-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    font-family: var(--sac-font);
}
.sac2-sheet[hidden] { display: none; }
.sac2-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s;
}
.sac2-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--sac-surface);
    border-radius: 16px 16px 0 0;
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.22s ease;
}
.sac2-sheet.is-open .sac2-sheet-backdrop { opacity: 1; }
.sac2-sheet.is-open .sac2-sheet-panel { transform: translateY(0); }
body.sac2-sheet-open { overflow: hidden; }
.sac2-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.sac2-sheet-head h2 { margin: 0; font-size: 1.25rem; }
.sac2-sheet-close {
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--sac-surface-2);
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    color: var(--sac-ink);
    cursor: pointer;
}
.sac2-sheet-intro { margin: 0 0 12px; color: var(--sac-ink-600); font-size: 0.9375rem; }
.sac2-field { margin-bottom: 12px; }
.sac2-field label, .sac2-field legend {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--sac-ink);
}
.sac2-opt { font-weight: 400; color: var(--sac-ink-600); }
.sac2-field input[type="text"], .sac2-field input[type="tel"], .sac2-field input[type="email"], .sac2-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #c9ced3;
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    color: var(--sac-ink);
    background: #fff;
}
.sac2-field input:focus, .sac2-field textarea:focus { outline: 2px solid var(--sac-green-500); outline-offset: 1px; border-color: var(--sac-green-500); }
.sac2-field .is-invalid { border-color: #c0392b; }
.sac2-moment { border: 0; padding: 0; margin: 0 0 12px; }
.sac2-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-size: 1rem;
    font-weight: 400;
}
.sac2-radio input { width: 20px; height: 20px; accent-color: var(--sac-green-700); margin: 0; }
.sac2-form-error {
    background: #fdecea;
    color: #8a1f11;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9375rem;
    margin: 0 0 12px;
}
.sac2-submit {
    width: 100%;
    background: var(--sac-green-700);
    color: #fff;
}
.sac2-submit.is-busy { opacity: 0.6; }
.sac2-form-note, .sac2-form-done p { margin: 12px 0 0; font-size: 0.9375rem; color: var(--sac-ink-600); text-align: center; }
.sac2-form-tel { color: var(--sac-green-700); font-weight: 700; text-decoration: underline; }
.sac2-form-done h3 { font-size: 1.125rem; margin: 8px 0; }

/* ---------- Contactblok ---------- */
.sac2-contact {
    padding: 24px 16px;
    border-top: 8px solid var(--sac-surface-2);
}
.sac2-contact-addr { margin: 0 0 12px; line-height: 1.5; }
.sac2-map-link { color: var(--sac-green-700); text-decoration: underline; }
.sac2-hours { margin: 0 0 12px; font-size: 0.9375rem; }
.sac2-hours div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--sac-line); }
.sac2-hours dt { margin: 0; color: var(--sac-ink-600); }
.sac2-hours dd { margin: 0; font-weight: 600; }
.sac2-contact-links { margin: 0; font-size: 1rem; }
.sac2-contact-links a { color: var(--sac-green-700); font-weight: 600; text-decoration: underline; }

/* ---------- Bestaande secties in v2 compacter ---------- */
body.sac2-ui2.single-occasion .occasion-description,
body.sac2-ui2.single-occasion .occasion-overview,
body.sac2-ui2.single-occasion .accessories-section,
body.sac2-ui2.single-occasion .similar-occasions-section,
body.sac2-ui2.single-occasion .reviews-section,
body.sac2-ui2.single-occasion .lease-form-section,
body.sac2-ui2.single-occasion .how-we-work-section,
body.sac2-ui2.single-occasion .faq-section {
    padding-top: 20px;
    padding-bottom: 20px;
    margin: 0;
    border-top: 8px solid var(--sac-surface-2);
}
body.sac2-ui2.single-occasion .occasion-description { border-top: 0; }
/* Vergelijkbare occasions: de carousel loopt tot de schermrand (zoals in v1). Met 16 px sectiepadding werd hij 358 px breed en
   snapte de eerste kaart (scroll-snap-align: center) naar scrollLeft 3; Chrome telt dat als scroll en stopt de LCP-meting. */
body.sac2-ui2.single-occasion .main-content section.similar-occasions-section {
    padding-left: 0;
    padding-right: 0;
}
body.sac2-ui2.single-occasion .similar-occasions-section h2 {
    padding-left: 16px;
    padding-right: 16px;
}
body.sac2-ui2.single-occasion .similar-occasions-carousel-wrapper {
    margin-left: 0;
    margin-right: 0;
}
body.sac2-ui2.single-occasion .similar-occasions-carousel {
    scroll-padding-left: 16px;
}
body.sac2-ui2.single-occasion .similar-occasions-carousel .carousel-slide {
    scroll-snap-align: start;
}

/* ---------- Hoogtepunten (uit accessoires, mapping in sac2/format.php) ---------- */
.sac2-highlights {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sac2-highlights li {
    font-size: 0.8125rem;
    line-height: 1.2;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--sac-green-050);
    color: var(--sac-green-700);
    font-weight: 600;
}

/* ---------- Tablet (768 tot 1023): mobiele opbouw met ruimere marges ---------- */
@media (min-width: 768px) and (max-width: 1023px) {
    .sac2-title, .sac2-action { padding-left: 24px; padding-right: 24px; }
    .sac2-cta { flex-direction: row; flex-wrap: wrap; }
    .sac2-cta .sac2-btn { flex: 1 1 240px; }
    .sac2-checks { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Desktop (stap 4): 2 kolommen, galerij links, sticky infokolom rechts ---------- */
@media (min-width: 1024px) {
    /* Grid op het article zelf: galerij (rij 1) en content-wrapper (rij 2) links, infokolom rechts over beide rijen.
       Zo blijft de sticky infokolom de hele contentlengte meelopen (sticky werkt alleen binnen de hoogte van zijn ouder).
       .sac2-vdp-top wordt met display:contents transparant zodat zijn twee kolommen directe grid-items zijn. */
    body.sac2-ui2.single-occasion article.occasion-detail {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
        grid-template-rows: auto 1fr;
        column-gap: 32px;
        align-items: start;
        max-width: 1400px;
        margin: 24px auto 16px;
        padding: 0;
    }
    .sac2-vdp-top { display: contents; }
    .sac2-col-media { grid-column: 1; grid-row: 1; min-width: 0; }
    .sac2-col-info { grid-column: 2; grid-row: 1 / span 2; }
    body.sac2-ui2.single-occasion article.occasion-detail > .container,
    body.sac2-ui2.single-occasion article.occasion-detail > .occasion-hero { display: none; }
    body.sac2-ui2.single-occasion .occasion-layout-wrapper { grid-column: 1; grid-row: 2; min-width: 0; }
    .sac2-gallery { border-radius: var(--sac-radius); overflow: hidden; }
    .sac2-gallery-track { cursor: zoom-in; }
    .sac2-thumbs { flex-wrap: wrap; overflow: visible; padding: 10px 0 0; background: transparent; }
    .sac2-thumb { width: calc((100% - 5 * 6px) / 6); height: auto; aspect-ratio: 3 / 2; flex: 0 0 auto; }
    .sac2-thumb:nth-child(n + 13) { display: none; }
    .sac2-col-info {
        position: sticky;
        top: 24px;
        align-self: start;
        border: 1px solid var(--sac-line);
        border-radius: var(--sac-radius);
        background: var(--sac-surface);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
        padding: 20px 24px 22px;
    }
    .sac2-title { padding: 0 0 14px; border-bottom: 1px solid var(--sac-line); }
    .sac2-h1 { font-size: 1.5rem; }
    .sac2-sub { -webkit-line-clamp: 2; }
    .sac2-action { padding: 14px 0 0; border-bottom: 0; }
    .sac2-price { font-size: 1.875rem; }
    .sac2-cta { flex-direction: column; }
    .sac2-cta .sac2-btn { height: 48px; }
    .sac2-checks { grid-template-columns: 1fr 1fr; }
    /* Geen mobiele onderbalk op desktop: de infokolom is al sticky. */
    .sac2-bar { display: none !important; }
    /* Formulier: rechter zijpaneel in plaats van bottom-sheet. */
    .sac2-sheet-panel {
        left: auto;
        top: 0;
        bottom: 0;
        width: 440px;
        max-height: none;
        border-radius: 0;
        padding: 24px 28px;
        transform: translateX(100%);
    }
    .sac2-sheet.is-open .sac2-sheet-panel { transform: translateX(0); }
    /* Content onder het grid: leesbreedte links, zelfde linkerlijn als de galerij. */
    body.sac2-ui2.single-occasion .occasion-layout-wrapper .container { max-width: none; margin: 0; padding-left: 0 !important; padding-right: 0 !important; }
    body.sac2-ui2.single-occasion .occasion-main-content-left { max-width: none; }
    body.sac2-ui2.single-occasion .main-content { padding-bottom: 32px; }
    body.sac2-ui2.single-occasion .main-content section { padding-left: 0; padding-right: 0; }
    body.sac2-ui2.single-occasion .similar-occasions-section h2 { padding-left: 0; padding-right: 0; }
    body.sac2-ui2.single-occasion .similar-occasions-carousel { scroll-padding-left: 0; }
    .sac2-contact { max-width: 1400px; margin-left: auto; margin-right: auto; }
}
@media (min-width: 1024px) and (max-height: 820px) {
    /* Lage schermen: compactere kaart zodat de primaire knop zichtbaar blijft. */
    .sac2-col-info { top: 12px; padding: 16px 20px 18px; }
    .sac2-highlights { display: none; }
}
