/* BesteFietsendrager core: gedeelde basis (landkeuze, knoppen, prijsblokken, chips, kaarten, top-lijst, tags). Eén bron voor gedeelde css.
   Alleen Blocksy-paletvariabelen met terugval; CTA-oranje #C8460A met witte tekst (contrast 4,8:1). Voorvoegsel bfd-. */

/* ---------- Landkeuze: het juiste land tonen (standaard NL; html.bfd-land-be = BE) ---------- */
html.bfd-land-be [data-land="NL"],
html:not(.bfd-land-be) [data-land="BE"] { display: none !important; }

.bfd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Knop in de header */
.bfd-landwrap { display: inline-flex; align-items: center; }
.bfd-landwrap--auto { position: absolute; top: 6px; right: 8px; z-index: 60; }
.bfd-landwrap--auto.is-moved { position: static; }
.bfd-landbtn { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; min-width: 44px; padding: 0 .7rem; border: 1px solid var(--theme-palette-color-5, #cfd8e0); border-radius: 999px; background: var(--theme-palette-color-8, #fff); color: var(--theme-palette-color-4, #192a3d); font: inherit; font-size: .9rem; line-height: 1; cursor: pointer; }
.bfd-landbtn:hover { border-color: var(--theme-palette-color-1, #2872fa); }
.bfd-landbtn:focus-visible { outline: 3px solid var(--theme-palette-color-1, #2872fa); outline-offset: 2px; }
.bfd-landbtn__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bfd-landbtn__v { display: inline-flex; align-items: center; gap: .35rem; }
.bfd-landbtn .bfd-flag { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.bfd-landbtn__car { font-size: .8rem; }

/* Dialoog: klein, pagina erachter blijft zichtbaar; mobiel een paneel onderaan */
.bfd-land { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100000; }
html.bfd-land-ask .bfd-land, .bfd-land.is-open { display: block; }
.bfd-land__box { position: relative; margin: 0; padding: 1.1rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: var(--theme-palette-color-8, #fff); color: var(--theme-palette-color-4, #192a3d); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .22); max-height: 85vh; overflow-y: auto; }
.bfd-land__t { margin: 0 2.2rem .2rem 0; font-size: 1.15rem; line-height: 1.3; }
.bfd-land__p { margin: 0 0 .8rem; font-size: .92rem; color: var(--theme-palette-color-3, #3a4f66); }
.bfd-land__opts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .8rem; }
.bfd-land__opt { position: relative; display: block; margin: 0; cursor: pointer; }
.bfd-land__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bfd-land__card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 72px; padding: .6rem; border: 2px solid var(--theme-palette-color-5, #cfd8e0); border-radius: 12px; font-weight: 700; text-align: center; }
.bfd-land__card .bfd-flag { width: 36px; height: 24px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.bfd-land__opt input:checked + .bfd-land__card { border-color: var(--theme-palette-color-1, #2872fa); background: color-mix(in srgb, var(--theme-palette-color-1, #2872fa) 8%, #fff); }
.bfd-land__opt input:focus-visible + .bfd-land__card { outline: 3px solid var(--theme-palette-color-1, #2872fa); outline-offset: 2px; }
.bfd-land__go { display: block; width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: #C8460A; color: #fff; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.bfd-land__go:hover { background: #A83A08; }
.bfd-land__go:focus-visible, .bfd-land__x:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }
.bfd-land__x { position: absolute; top: .4rem; right: .4rem; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer; }
@media (min-width: 600px) {
	.bfd-land { left: 50%; right: auto; bottom: 24px; width: 420px; transform: translateX(-50%); }
	.bfd-land__box { border-radius: 16px; }
}

/* ---------- Knoppen ---------- */
a.bfd-btn, a.bfd-btn:visited { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 48px; padding: .55rem 1.1rem; border: 2px solid #C8460A; border-radius: 12px; background: #C8460A; color: #fff; font-weight: 800; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; transition: background .15s, transform .15s; }
a.bfd-btn:hover { background: #A83A08; border-color: #A83A08; color: #fff; transform: translateY(-1px); }
a.bfd-btn:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 2px; }
a.bfd-btn.bfd-btn--ghost, a.bfd-btn.bfd-btn--ghost:visited { background: var(--theme-palette-color-8, #fff); color: #A83A08; }
a.bfd-btn.bfd-btn--ghost:hover { background: #fff1e8; color: #7d2c05; border-color: #A83A08; }
@media (prefers-reduced-motion: reduce) { a.bfd-btn { transition: none; } a.bfd-btn:hover { transform: none; } }

/* ---------- Prijsblok ---------- */
.bfd-pb p { margin: 0; }
.bfd-pb__price { font-size: 1.5rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--theme-palette-color-4, #192a3d); }
.bfd-pb__shop, .bfd-pb__meta, .bfd-pb__upd, .bfd-pb__diff, .bfd-pb__aff { font-size: .88rem; color: var(--theme-palette-color-3, #3a4f66); }
.bfd-pb__none { font-weight: 700; color: var(--theme-palette-color-4, #192a3d); }
.bfd-pb__other { font-size: .92rem; margin-top: .2rem; }
.bfd-pb__none + .bfd-pb__other + a.bfd-btn { margin-top: .5rem; }
.bfd-pb--card .bfd-btn, .bfd-pb--hero .bfd-btn { display: flex; width: 100%; margin-top: .55rem; }
.bfd-pb--card .bfd-btn { min-height: 44px; font-size: .95rem; }
.bfd-pb--hero .bfd-pb__label { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--theme-palette-color-3, #3a4f66); }
.bfd-pb--hero .bfd-pb__price { font-size: clamp(2.1rem, 6vw, 2.8rem); letter-spacing: -.01em; }
.bfd-pb--hero .bfd-pb__meta { margin: .15rem 0 .2rem; }
.bfd-pb__stock { display: inline-block; padding: .05rem .5rem; border-radius: 999px; background: #e3f4e8; color: #17572b; font-weight: 700; font-size: .8rem; }
.bfd-pb__diff { margin-top: .4rem !important; font-weight: 600; }
.bfd-pb__aff { margin-top: .7rem !important; line-height: 1.4; }
.bfd-pb__upd { margin-top: .2rem !important; }

/* ---------- Chips, labels, score ---------- */
.bfd-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.bfd-chips li { margin: 0; padding: .2rem .6rem; border-radius: 999px; background: var(--theme-palette-color-6, #f2f5f7); border: 1px solid var(--theme-palette-color-5, #dfe6ec); color: var(--theme-palette-color-4, #192a3d); font-size: .82rem; line-height: 1.4; font-weight: 600; }
.bfd-rate { margin: .35rem 0 0; font-size: .86rem; color: var(--theme-palette-color-3, #3a4f66); }
.bfd-rate__s { color: #b36b00; }
.bfd-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 0; }
.bfd-tag { display: inline-block; padding: .12rem .55rem; border-radius: 6px; font-size: .75rem; font-weight: 700; line-height: 1.4; }
.bfd-tag--edit { background: #1b2a3d; color: #fff; }
.bfd-tag--pop { background: #fde9a6; color: #5a4300; }
.bfd-tag--best { background: #d9f0df; color: #17572b; }

/* ---------- Kaart ---------- */
.bfd-card { position: relative; display: flex; flex-direction: column; box-sizing: border-box; height: 100%; background: var(--theme-palette-color-8, #fff); border: 1px solid var(--theme-palette-color-5, #dfe6ec); border-radius: 14px; box-shadow: 0 4px 16px rgba(20, 40, 70, .07); overflow: hidden; }
.bfd-card__lbl { margin: 0; padding: .3rem .8rem; background: var(--theme-palette-color-4, #192a3d); color: #fff; font-size: .78rem; font-weight: 700; }
.bfd-card__rank { position: absolute; top: .5rem; left: .5rem; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--theme-palette-color-4, #192a3d); color: #fff; font-weight: 800; font-size: .95rem; }
.bfd-card__img { display: block; aspect-ratio: 4 / 3; background: #fff; }
.bfd-card__img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bfd-card__ph { display: block; width: 100%; height: 100%; background: var(--theme-palette-color-6, #f2f5f7); }
.bfd-card__body { flex: 1 1 auto; padding: .6rem .85rem 0; min-width: 0; }
.bfd-card__brand { margin: 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--theme-palette-color-3, #3a4f66); }
.bfd-card__t { margin: .1rem 0 0; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bfd-card__t a { color: inherit; text-decoration: none; }
.bfd-card__t a:hover { text-decoration: underline; }
.bfd-card__buy { padding: .6rem .85rem .85rem; }
.bfd-card__buy .bfd-btn--page { display: flex; width: 100%; margin-top: .55rem; min-height: 44px; }

/* ---------- Lijst en raster ---------- */
.bfd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: .9rem; margin: 0; padding: 0; list-style: none; }
.bfd-grid > li { margin: 0; min-width: 0; }
.bfd-top__h { margin: 0 0 .8rem; }
.bfd-top__l { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
.bfd-top__l > li { margin: 0; min-width: 0; }
@media (min-width: 640px) {
	.bfd-card--row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 220px; align-items: center; height: auto; }
	.bfd-card--row .bfd-card__img { aspect-ratio: 1 / 1; }
	.bfd-card--row .bfd-card__body { padding: .8rem; }
	.bfd-card--row .bfd-card__buy { padding: .8rem; }
}
