/* Select Autocentrum overzicht v2 (stap 5, 07-10-2026). Laadt na css/sac2.css, alleen bij body.sac2-ui2 op het occasion-archief.
   Gedeelde knop-, sheet- en formulierregels zijn een kopie uit sac2-vdp.css (VDP blijft onaangeraakt). */

/* ---------- Oude elementen uit in v2 ---------- */
body.sac2-ui2.post-type-archive-occasion .sac-float-call,
body.sac2-ui2.post-type-archive-occasion .sac-float-wa,
body.sac2-ui2.post-type-archive-occasion .occasions-header[hidden],
body.sac2-ui2.post-type-archive-occasion .occasions-filters-section { display: none !important; }
body.sac2-ui2.post-type-archive-occasion .main-content { font-family: var(--sac-font); }
body.sac2-ui2.post-type-archive-occasion .occasions-grid-section { padding-top: 0; }

/* ---------- Kop ---------- */
.sac2-srp-head { padding: 12px 0 4px; }
.sac2-srp-h1 {
    font-family: var(--sac-font);
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--sac-ink);
    text-align: left;
}
.sac2-srp-count { margin: 0 0 12px; color: var(--sac-ink-600); font-size: 0.9375rem; }
.sac2-chips-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0 8px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}
.sac2-chips-row::-webkit-scrollbar { display: none; }
.sac2-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: var(--sac-radius-pill);
    border: 1px solid var(--sac-line);
    background: var(--sac-surface);
    color: var(--sac-ink);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.sac2-chip.is-on { background: var(--sac-green-700); border-color: var(--sac-green-700); color: #fff; }
.sac2-chip-n { font-weight: 400; opacity: 0.8; font-size: 0.8125rem; }
.sac2-chip:focus-visible { outline: 3px solid var(--sac-green-500); outline-offset: 2px; }
.sac2-srp-tools { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.sac2-tool-sort { flex: 1; min-width: 0; }
.sac2-tool {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--sac-tap);
    padding: 0 14px;
    border-radius: var(--sac-radius);
    border: 1px solid var(--sac-line);
    background: var(--sac-surface);
    color: var(--sac-ink);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.sac2-tool-n { background: var(--sac-green-700); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8125rem; }
.sac2-tool-sort select {
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 600;
    color: var(--sac-ink);
    min-height: 44px;
    width: 100%;
    text-overflow: ellipsis;
}
.sac2-tool-clear { color: var(--sac-green-700); text-decoration: underline; border: 0; background: transparent; padding: 0 4px; }
.sac2-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Grid en kaart ---------- */
body.sac2-ui2 .occasions-grid.sac2-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.sac2-card {
    display: flex;
    flex-direction: column;
    background: var(--sac-surface);
    border: 1px solid var(--sac-line);
    border-radius: var(--sac-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--sac-ink);
    font-family: var(--sac-font);
}
.sac2-card:hover { border-color: var(--sac-green-500); box-shadow: 0 6px 20px rgba(27, 31, 35, 0.08); }
.sac2-card:focus-visible { outline: 3px solid var(--sac-green-500); outline-offset: 2px; }
.sac2-card-media { position: relative; aspect-ratio: 3 / 2; background: var(--sac-surface-2); }
.sac2-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sac2-card-nophoto { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--sac-ink-600); }
.sac2-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--sac-green-700);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--sac-radius-pill);
}
.sac2-card-badge-sold { background: #1b1f23; }
.sac2-card.is-sold .sac2-card-media img { filter: grayscale(1); opacity: 0.7; }
.sac2-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sac2-card-price { font-size: 1.25rem; font-weight: 700; color: var(--sac-green-700); }
.sac2-card.is-sold .sac2-card-price { color: var(--sac-ink-600); text-decoration: line-through; }
.sac2-card-title { font-size: 1.0625rem; font-weight: 700; margin: 0; line-height: 1.25; color: var(--sac-ink); }
.sac2-card-sub {
    margin: 0;
    font-size: 0.875rem;
    color: var(--sac-ink-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sac2-card-chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sac2-card-chips li { background: var(--sac-surface-2); border-radius: 6px; padding: 3px 8px; font-size: 0.8125rem; color: var(--sac-ink); }
.sac2-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; font-size: 0.875rem; }
.sac2-card-status { color: var(--sac-green-700); font-weight: 600; }
.sac2-card-status.is-sold { color: var(--sac-ink-600); }
.sac2-card-cta { color: var(--sac-green-700); font-weight: 700; }
.sac2-card-cta::after { content: " \2192"; }

/* ---------- Contacthub ---------- */
.sac2-hub {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 18px 0 14px;
    border: 0;
    border-radius: var(--sac-radius-pill);
    background: var(--sac-green-700);
    color: #fff;
    font-family: var(--sac-font);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}
.sac2-hub:focus-visible { outline: 3px solid var(--sac-green-500); outline-offset: 2px; }
.sac2-hub-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.sac2-sheet-or { margin: 0 0 10px; color: var(--sac-ink-600); font-size: 0.9375rem; }
.sac2-sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--sac-line); margin-top: 8px; }
.sac2-sheet-foot .sac2-btn { flex: 1; }
.sac2-link { color: var(--sac-green-700); text-decoration: underline; font-weight: 600; min-height: var(--sac-tap); display: inline-flex; align-items: center; }

/* Bestaande filterform in de sheet: compacte, verticale lay-out; v1-opmaak (hidden, flex-rij) uit. */
.sac2-filters-body .occasions-filters-form,
.sac2-filters-body .occasions-filters-form.hidden {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    max-height: none !important;
    overflow: visible !important;
    pointer-events: auto !important;
    margin: 0 !important;
}
.sac2-filters-body .filter-row { display: flex; flex-direction: column; gap: 10px; }
.sac2-filters-body .filter-group { width: 100%; }
.sac2-filters-body .unified-dropdown-display { min-height: 48px; }
.sac2-filters-body .filter-label { display: none; }

/* ---------- Gedeeld: knoppen, sheet, formulier (kopie uit sac2-vdp.css) ---------- */
.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;
}
.sac2-primary:hover { background: #246f44; color: #fff; }
.sac2-secondary {
    background: var(--sac-surface);
    color: var(--sac-green-700);
    border-color: var(--sac-green-700);
}
.sac2-secondary:hover { background: var(--sac-green-050); }
/* ---------- 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; }


/* ---------- Tablet ---------- */
@media (min-width: 640px) {
    body.sac2-ui2 .occasions-grid.sac2-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .sac2-chips-row { margin: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; }
}

/* ---------- Desktop: filters links (sticky), 3 kolommen ---------- */
@media (min-width: 1024px) {
    .sac2-srp-h1 { font-size: 2rem; }
    .sac2-tool-sort { flex: 0 0 auto; }
    .sac2-tool-sort select { width: auto; min-width: 220px; }
    .sac2-srp-count { font-size: 1rem; }
    body.sac2-ui2.post-type-archive-occasion .occasions-grid-section .container {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        column-gap: 32px;
        align-items: start;
    }
    .sac2-srp-head { grid-column: 1 / -1; }
    body.sac2-ui2 .occasions-grid.sac2-grid { grid-column: 2; grid-template-columns: repeat(3, 1fr); gap: 24px; }
    body.sac2-ui2.post-type-archive-occasion .pagination-wrapper,
    body.sac2-ui2.post-type-archive-occasion .no-occasions { grid-column: 2; }
    /* Filtersheet wordt een vaste linkerkolom. */
    .sac2-sheet-filters { position: sticky; inset: auto; top: 96px; grid-column: 1; grid-row: 2 / span 3; z-index: 1; max-height: calc(100vh - 112px); overflow-y: auto; }
    .sac2-sheet-filters[hidden] { display: block; }
    .sac2-sheet-filters .sac2-sheet-backdrop { display: none; }
    .sac2-sheet-filters .sac2-sheet-panel { position: static; transform: none; max-height: none; border: 1px solid var(--sac-line); border-radius: var(--sac-radius); padding: 16px; }
    .sac2-sheet-filters .sac2-sheet-close { display: none; }
    .sac2-sheet-filters .sac2-sheet-foot .sac2-btn { display: none; }
    .sac2-tool-filters { display: none; }
    .sac2-hub-label { display: inline; }
    /* Contact-sheet als zijpaneel rechts. */
    .sac2-sheet-contact .sac2-sheet-panel { left: auto; top: 0; bottom: 0; width: 440px; max-height: none; border-radius: 0; padding: 20px 24px; transform: translateX(100%); }
    .sac2-sheet-contact.is-open .sac2-sheet-panel { transform: translateX(0); }
}
