/**
 * Black Friday-check v3 - the sections below the hero: best deals, one section per group, "Zo checkt Mate een prijs" and the FAQ.
 * Mobile first (deals swipe sideways on a phone); colours from theme tokens only.
 */

.bf-sectie {
    margin-top: 44px;
    scroll-margin-top: calc(var(--header-h, 56px) + var(--admin-bar-h, 0px) + 72px);
}

.bf-sectie > h2,
.bf-sectie__kop h2 {
    font-size: clamp(1.5rem, 1.1rem + 0.9vw, 1.875rem);
    font-weight: 800;
}

.bf-sectie__kop {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px 16px;
    flex-wrap: wrap;
}

.bf-sectie__dek {
    margin: 6px 0 0;
    max-width: 720px;
}

.bf-bij {
    font-size: 0.875rem;
    color: var(--text-zwak);
}

/* ---------- Deal cards ---------- */

.bf-deals {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    gap: 12px;
    margin: 20px -16px 0;
    padding: 0 16px 6px;
    scrollbar-width: none;
}

.bf-deals::-webkit-scrollbar {
    display: none;
}

.bf-deals .bf-deal {
    flex: none;
    width: 272px;
    scroll-snap-align: start;
}

.bf-deals--lijst,
.bf-deals--rest {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    scroll-snap-type: none;
    margin: 20px 0 0;
    padding: 0;
}

.bf-deals--lijst .bf-deal,
.bf-deals--rest .bf-deal {
    width: auto;
}

.bf-deals--rest {
    margin-top: 12px;
}

.bf-deal {
    background: var(--oppervlak);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.bf-deal__top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bf-deal__kop {
    min-width: 0;
}

.bf-plaat--deal {
    width: 64px;
    height: 64px;
}

.bf-deal__soort {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-zwak);
}

:where(.bf-page) .bf-deal__naam {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1.35;
    margin-top: 2px;
    overflow-wrap: anywhere;
    /* Only the name is cut (three lines, full name in the title of the link); prices and sentences are never clipped. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

:where(.bf-page) .bf-deal__naam:hover {
    color: var(--brand);
    text-decoration: underline;
}

.bf-deal__prijs {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 8px;
    margin-top: 2px;
}

/* Amounts never wrap and never clip: the row wraps instead (the saving drops under the price on a narrow card). */
.bf-deal__prijs b {
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--text-primary);
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bf-deal__bespaar {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--signal-go);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bf-deal__normaal {
    font-size: 0.8125rem;
    color: var(--text-zwak);
    margin-top: -6px;
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
}

.bf-oordeel--vink {
    align-items: flex-start;
    line-height: 1.35;
    text-align: left;
}

.bf-oordeel--vink svg {
    flex: none;
    margin-top: 1px;
}

.bf-deal__voet {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: auto;
}

.bf-deal__voet .bf-plaat--winkel {
    width: 68px;
    height: 28px;
    font-size: 0.6875rem;
    border-radius: 6px;
}

.bf-deal__bij {
    flex: 1 1 96px;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
    color: var(--text-zwak);
    line-height: 1.3;
}

.bf-deal__voet .bf-knop {
    flex: none;
    margin-left: auto;
}

/* ---------- A group ---------- */

.bf-soorten {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    margin: 16px -16px 0;
    padding: 2px 16px;
    list-style: none;
    scrollbar-width: none;
}

.bf-soorten::-webkit-scrollbar {
    display: none;
}

.bf-soorten li {
    flex: none;
}

:where(.bf-page) .bf-soorten a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--oppervlak);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.bf-soorten a small {
    color: var(--signal-go);
    font-weight: 700;
    font-size: inherit;
}

:where(.bf-page) .bf-soorten a:hover {
    border-color: var(--brand);
    color: var(--text-primary);
}

:where(.bf-page) .bf-soorten a[aria-pressed="true"] {
    background: var(--text-primary);
    color: var(--oppervlak);
    border-color: var(--text-primary);
}

.bf-soorten a[aria-pressed="true"] small {
    color: inherit;
}

.bf-noot {
    margin: 10px 0 0;
    font-size: 0.875rem;
    color: var(--text-zwak);
}

.bf-allemaal {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin: 6px 0 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 700;
    color: var(--brand);
    cursor: pointer;
    text-align: left;
}

.bf-allemaal:hover {
    color: var(--brand-sterk);
}

.bf-allemaal svg {
    flex: none;
    transition: transform 0.15s;
}

.bf-allemaal[aria-expanded="true"] svg {
    transform: rotate(-90deg);
}

/* ---------- Zo checkt Mate een prijs ---------- */

.bf-stappen {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.bf-stap {
    background: var(--oppervlak);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    position: relative;
}

.bf-stap__nr {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 2.75rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--brand) 18%, transparent);
    line-height: 1;
}

.bf-stap h3 {
    font-size: 1.125rem;
    font-weight: 800;
    margin-top: 14px;
}

.bf-stap p {
    margin: 6px 0 0;
    font-size: 0.9375rem;
}

.bf-page .bf-hoe__meter {
    margin-top: 32px;
    font-size: 1.25rem;
    font-weight: 800;
}

.bf-hoe__noot {
    margin: 16px 0 0;
    font-size: 0.8125rem;
    color: var(--text-zwak);
}

.bf-streng {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 16px;
    background: var(--veld);
    color: var(--veld-tekst);
    border-radius: 16px;
    padding: 16px;
}

.bf-streng p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--veld-zwak);
}

.bf-streng strong {
    color: var(--veld-tekst);
}

.bf-page .bf-streng a {
    color: var(--veld-tekst);
    font-weight: 700;
    text-decoration: underline;
}

.bf-streng :focus-visible {
    outline-color: var(--veld-tekst);
}

.bf-regels {
    margin-top: 16px;
    background: var(--oppervlak);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.bf-regels summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.bf-regels__tekst {
    padding: 0 16px 16px;
    font-size: 0.9375rem;
}

.bf-regels__tekst h3 {
    font-size: 1rem;
    margin-top: 16px;
}

.bf-regels__tekst p {
    margin: 6px 0 0;
}

/* ---------- FAQ ---------- */

.bf-faq {
    margin-top: 20px;
    background: var(--oppervlak);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.bf-faq details {
    border-top: 1px solid var(--border);
}

.bf-faq details:first-child {
    border-top: 0;
}

.bf-faq summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    font-weight: 700;
    color: var(--text-primary);
    min-height: 44px;
}

.bf-faq summary::-webkit-details-marker {
    display: none;
}

.bf-faq summary:focus-visible {
    outline-offset: -3px;
}

.bf-faq__chev {
    flex: none;
    color: var(--text-zwak);
    transition: transform 0.15s;
}

.bf-faq details[open] .bf-faq__chev {
    transform: rotate(180deg);
}

.bf-faq details p {
    margin: 0;
    padding: 0 16px 16px;
}

/* ---------- After Black Friday ---------- */

.bf-na {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 44px;
    background: var(--veld);
    color: var(--veld-zwak);
    border-radius: 16px;
    padding: 20px;
}

.bf-na h2 {
    color: var(--veld-tekst);
    font-size: 1.375rem;
}

.bf-na p {
    margin: 6px 0 0;
}

.bf-page > .bf-wrap:last-child {
    padding-bottom: 56px;
}

@media (min-width: 601px) {
    .bf-sectie { margin-top: 56px; }
    .bf-deals { margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; overflow: visible; scroll-snap-type: none; }
    .bf-deals .bf-deal { width: auto; }
    .bf-deals--lijst, .bf-deals--rest { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .bf-deals--rest { margin-top: 16px; }
    .bf-soorten { flex-wrap: wrap; overflow: visible; margin: 16px 0 0; padding: 0; }
    .bf-stap { padding: 22px; }
    .bf-streng { flex-direction: row; align-items: center; padding: 18px 22px; }
    .bf-regels summary { padding: 8px 24px; }
    .bf-regels__tekst { padding: 0 24px 20px; }
    .bf-faq summary { padding: 18px 24px; }
    .bf-faq details p { padding: 0 24px 18px; }
    .bf-na { flex-direction: row; align-items: center; justify-content: space-between; padding: 22px 28px; }
}

@media (min-width: 901px) {
    .bf-deals, .bf-deals--lijst, .bf-deals--rest { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bf-stappen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1101px) {
    .bf-deals, .bf-deals--lijst, .bf-deals--rest { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
