/* /kaarten/: alle kaarten in Pasr, met zoeken en filters. Alleen op die pagina geladen. */
:root { --tile-gap:16px; --field:var(--paper-2); --label:var(--ink-2); }
.cards-page { background: var(--paper); color: var(--ink); overflow-x: hidden; }
.cards-page .nav ul a[aria-current="page"] { color: var(--ink); font-weight: 700; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 16px;
  border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* Kop met de aantallen */
.kh { text-align: center; padding: 26px 0 34px; }
.kh h1 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 6vw, 64px); letter-spacing: -0.04em; line-height: 1.02;
  margin: 16px auto 14px; max-width: 16ch; }
.kh .lead { margin: 0 auto 26px; max-width: 40ch; }
.kh-stats { display: flex; justify-content: center; gap: 14px; margin: 0 auto 14px; flex-wrap: wrap; }
.kh-stats div { background: var(--paper-2); border: 1px solid var(--line); border-radius: 22px; padding: 14px 24px 16px; min-width: 200px;
  display: flex; flex-direction: column-reverse; align-items: center; }
.kh-stats dt { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.kh-stats dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1.05; letter-spacing: -0.03em;
  color: var(--iris); font-variant-numeric: tabular-nums; }
.kh-date { font-size: 14px; color: var(--label); margin: 0; }
.cards-page .pill { background: color-mix(in srgb, var(--mint), var(--paper) 78%); }

/* De lijst (geen standaard sectie-ruimte bovenaan) */
.cards-page .kl { padding: 0 0 20px; }

/* Zoeken en filters (alleen met JavaScript; zonder JS staan beide lijsten onder elkaar) */
.kf { position: sticky; top: 0; z-index: 5; padding: 12px 0 10px; margin-bottom: 8px;
  background: var(--paper); background: color-mix(in srgb, var(--paper), transparent 6%);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
html:not(.js) .kf { display: none; }
.kf-search { position: relative; }
.kf-search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--label); pointer-events: none; }
.kf-search input { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--field); border: 1.5px solid var(--line);
  border-radius: 16px; padding: 13px 16px 13px 46px; -webkit-appearance: none; appearance: none; }
.kf-search input::placeholder { color: var(--label); opacity: 1; }
.kf-search input:focus { outline: none; border-color: var(--iris); box-shadow: 0 0 0 4px color-mix(in srgb, var(--iris), transparent 78%); }
.kf-search input::-webkit-search-cancel-button { cursor: pointer; }
.kf-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 10px; flex-wrap: wrap; }

.kf-kind { display: inline-flex; border: 0; margin: 0; padding: 3px; border-radius: 13px; background: var(--soft); min-width: 0; }
.kf-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.kf-kind label { padding: 8px 16px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  white-space: nowrap; transition: background .15s, color .15s; }
.kf-kind input:checked + label { background: var(--paper-2); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 15, 60, .18); }
.kf-kind input:focus-visible + label { outline: 3px solid var(--iris); outline-offset: 1px; }

.kf-cat { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); }
.kf-cat select { font: inherit; font-size: 15px; color: var(--ink); background-color: var(--field); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 8px 34px 8px 12px; max-width: 100%; -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%238A86B3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.kf-cat select:focus-visible { outline: 3px solid var(--iris); outline-offset: 2px; }
.kf-cat[hidden] { display: none; }
.kf-status { font-size: 14px; color: var(--label); margin: 10px 2px 0; min-height: 1.4em; }
.kf-other { display: block; width: 100%; text-align: left; font: inherit; font-size: 15px; color: var(--ink); background: var(--soft);
  border: 0; border-radius: 14px; padding: 12px 14px; margin-top: 8px; cursor: pointer; }
.kf-other b { color: var(--iris-deep); }
.kf-other[hidden] { display: none; }

/* Tegels zoals in de app: de kaart in merkkleur met het logo, de naam eronder */
.kg-block { margin-bottom: 30px; }
.kg-title { font-family: var(--display); font-size: 24px; letter-spacing: -0.02em; margin: 18px 0 14px; }
.kg-title span { color: var(--label); font-weight: 600; }
.js .kg-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kg-note { font-size: 15px; color: var(--ink-2); margin: -4px 0 16px; }
.js .kg-block .kg-note { margin-top: 6px; }
.js .kg-block.off { display: none; }
.kg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px var(--tile-gap); }
.kc { min-width: 0; }
.kc[hidden] { display: none; }
.kc-card { position: relative; aspect-ratio: 1.586 / 1; border-radius: 14px; overflow: hidden; color: #fff;
  box-shadow: inset 0 0 0 .75px rgba(255, 255, 255, .16), 0 10px 22px -16px rgba(20, 15, 60, .55); }
@supports not (aspect-ratio: 1 / 1) { .kc-card { height: 0; padding-top: 63%; } }
.kc-card.ink-dark { color: #17162A; box-shadow: inset 0 0 0 1px rgba(23, 22, 42, .10), 0 10px 22px -16px rgba(20, 15, 60, .45); }
.kc-card .kc-cover { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.kc-card.has-cover .kc-logo, .kc-card.has-cover .kc-word { display: none; }
.kc-card.has-cover.ink-dark { box-shadow: 0 10px 22px -16px rgba(20, 15, 60, .45); }
.kc-logo { position: absolute; top: 27%; bottom: 27%; left: 17%; right: 17%; display: flex; align-items: center; justify-content: center; }
.kc-logo img { width: 100%; height: 100%; object-fit: contain; }
.kc-logo.plate { top: 24%; bottom: 24%; left: 14%; right: 14%; background: var(--plate, #fff); border-radius: 10px; padding: 6px 10px; }
.kc-logo.opaque { left: 50%; right: auto; width: 34%; transform: translateX(-50%); top: 22%; bottom: 22%; }
.kc-logo.opaque img { border-radius: 22%; }
.kc-word { position: absolute; left: 12px; right: 12px; bottom: 10px; font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.15;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-saldo { position: absolute; top: 7px; right: 7px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px;
  border-radius: 999px; background: rgba(0, 0, 0, .58); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.kc-saldo svg { width: 12px; height: 12px; display: inline-block; }
a.kc-saldo:hover { background: rgba(0, 0, 0, .78); }
.kc-saldo:focus-visible { outline: 3px solid var(--iris); outline-offset: 2px; }
.kc-name { display: block; margin-top: 7px; padding: 0 2px; font-size: 14px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.kc-name { text-decoration: none; }
a.kc-name:hover { color: var(--ink); text-decoration: underline; }
.kc-gids { color: var(--iris-deep); font-weight: 700; }
footer nav { flex-wrap: wrap; gap: 8px 22px; }
.kc.new .kc-card { animation: kc-in .35s ease both; }
@keyframes kc-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
/* Stempelkaarten (Pasr Zakelijk): kleur van de zaak, logo en naam, de vakjes en de beloning, zoals in de app */
.ks-card { display: flex; flex-direction: column; justify-content: space-between; padding: 9px 11px 9px; }
@supports not (aspect-ratio: 1 / 1) { .ks-card { height: auto; padding-top: 9px; min-height: 96px; } }
.ks-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ks-logo { flex: none; width: 24px; height: 24px; border-radius: 6px; object-fit: cover; background: rgba(255, 255, 255, .9); }
.ks-biz { font-family: var(--display); font-weight: 700; font-size: 13px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-dots { display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 3px; max-width: 100%; }
.ks-dots i { display: block; aspect-ratio: 1 / 1; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; max-width: 14px; }
.ks-reward { font-size: 11px; font-weight: 600; line-height: 1.2; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-sub { display: block; padding: 0 2px; font-size: 12.5px; color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-empty { text-align: center; background: var(--paper-2); border: 1px dashed var(--line); border-radius: 22px; padding: 26px 20px 12px; margin: 4px 0 0; }
.ks-empty p { color: var(--ink-2); margin: 0 0 14px; }
.ks-empty b { color: var(--ink); font-size: 18px; }
.ks-empty[hidden] { display: none; }
.kg-empty { text-align: center; color: var(--ink-2); padding: 30px 0 10px; margin: 0; }
.kg-empty[hidden] { display: none; }

/* Mis je een winkel? */
.km { padding: 30px 0 90px; }
.km-box { display: flex; gap: 20px; align-items: flex-start; background: var(--paper-2); border: 1px solid var(--line); border-radius: 26px;
  padding: 26px 28px; box-shadow: 0 30px 60px -44px rgba(40, 30, 120, .4); }
.km-icon { flex: none; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #6A5CFF, #2ED3A6); }
.km-icon svg { width: 28px; height: 28px; }
.km h2 { font-family: var(--display); font-size: 28px; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 10px; }
.km p { color: var(--ink-2); font-size: 17px; margin: 0 0 12px; max-width: 62ch; }
.km .actions { margin: 18px 0 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cards-page .pill { color: #5BE6BF; background: rgba(46, 211, 166, .16); }
  :root:not([data-theme="light"]) .cards-page .kc-card { box-shadow: inset 0 0 0 .75px rgba(255, 255, 255, .14); }
}

@media (max-width: 620px) {
  .cards-page .wrap { width: calc(100% - 32px); }
  .kh { padding: 14px 0 26px; }
  .kh-stats { gap: 10px; flex-wrap: nowrap; }
  .kh-stats div { min-width: 0; flex: 1 1 0; padding: 12px 10px 14px; border-radius: 18px; }
  .kh-stats dd { font-size: 36px; }
  .kh-stats dt { font-size: 13px; line-height: 1.3; text-align: center; }
  .kf-row { gap: 10px; }
  .kf-kind { display: flex; width: 100%; }
  .kf-kind label { flex: 1 1 0; min-width: 0; text-align: center; padding: 8px 2px; font-size: 13.5px; letter-spacing: -0.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kf-long { display: none; }
  .kf-cat { width: 100%; }
  .kf-cat label { flex: none; }
  .kf-cat select { flex: 1 1 auto; min-width: 0; }
  .kg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .kc-name { font-size: 13px; }
  .km-box { flex-direction: column; padding: 22px 18px; gap: 14px; }
  .km { padding-bottom: 70px; }
}
@media (min-width: 621px) and (max-width: 900px) { .kg { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .kc.new .kc-card { animation: none; } .kf-kind label { transition: none; } }
@media print { .kf, .km .actions { display: none; } .js .kg-block.off { display: block; } .kc[hidden] { display: block; } }

.cards-page .pill { color:var(--success); background:var(--success-bg); }
:root[data-theme="dark"] .cards-page .kc-card { box-shadow:inset 0 0 0 .75px rgba(255,255,255,.14); }
