/* ── Roy-skin ────────────────────────────────────────────────────────────
   Site-brede detail-overrides bovenop design-tokens.css (dat de kleuren al
   draagt: accent oranje, ink navy, Poppins). Sinds 2 jul 2026 (besluit JJ,
   QA F3) staat hier ook de site-brede Roy header (.royh) en footer (.royf) —
   markup in header.php/footer.php, 1:1 uit Roy's homepage-mockup. */

/* ── Header (.royh) ── */
/* --navy/--orange zijn aliassen op de canonieke tokens (audit P2: één palet-bron) */
.royh, .royf { --navy: var(--bn-ink); --orange: var(--bn-accent);
  font-family: var(--bn-font); box-sizing: border-box; }
.royh *, .royf * { box-sizing: border-box; }
.royh a, .royf a { text-decoration: none; color: inherit; }

.royh { position: sticky; top: 0; z-index: var(--bn-z-sticky); background: #fff; border-bottom: 1px solid var(--bn-line); transition: box-shadow .3s ease; }
.royh.scrolled { box-shadow: 0 6px 24px rgba(26, 35, 64, .08); }
body.admin-bar .royh { top: 32px; }
.royh__bar { max-width: var(--bn-container); margin: 0 auto; display: flex; align-items: center; gap: 28px; padding: 16px 32px; }
.royh__logo { font-weight: 800; font-size: 26px; color: var(--navy); white-space: nowrap; }
.royh__logo span { color: var(--orange); }
.royh__search { flex: 1; display: flex; align-items: center; background: #fff; border: 1.5px solid var(--bn-line); border-radius: var(--bn-radius-pill); padding: 4px 6px 4px 20px; max-width: 560px; margin: 0 auto; }
.royh__search input[type=search] { border: 0; outline: 0; flex: 1; font-size: 16px; font-family: inherit; background: transparent; }
/* 16px voorkomt iOS-focus-zoom (F-06). De focusring staat op de wrapper i.p.v. per veld
   te verdwijnen — het veld had outline:none zonder vervanging, wat WCAG 2.4.7 brak (F-20). */
.royh__search:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.royh__search button { border: 0; background: transparent; cursor: pointer; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.royh__actions { display: flex; align-items: center; gap: 22px; white-space: nowrap; }
.royh__actions a { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--navy); }
.royh__cart .badge { background: var(--bn-accent-text); color: #fff; border-radius: var(--bn-radius-pill); font-size: 12px; padding: 1px 7px; font-weight: 700; }
.royh__nav { max-width: var(--bn-container); margin: 0 auto; display: flex; gap: 26px; padding: 0 32px 14px; overflow-x: auto; }
.royh__nav a { font-size: 15px; font-weight: 600; color: var(--navy); white-space: nowrap; }
/* Tekstkleur op wit: --bn-accent-text (4,84:1). --orange (#f26722) haalt hier maar 3,12:1
   en 15px/600 telt als normale tekst, dus AA-eis 4,5:1. Het logo (r.19) en de footer-versie
   (r.35) mogen --orange houden: 26px/800 = grote tekst (eis 3:1) resp. oranje op navy (4,96:1). */
.royh__nav a:hover { color: var(--bn-accent-text); }

/* ── Categorie-dropdown (besluit JJ 22 jul: subcategorieën bij hover, tweede rij eruit) ──
   De nav mag niet clippen zodra hij een uitklap draagt: overflow-x:auto op .royh__nav zou
   het paneel afkappen. Op smalle schermen blijft de rij scrollbaar — daar is geen hover,
   dus daar valt er ook niets te clippen (zie media-query onderaan). */
.royh__nav { overflow: visible; flex-wrap: wrap; row-gap: 4px; }
.royh__item { position: relative; }
.royh__item > a { display: inline-flex; align-items: center; gap: 5px; }
.royh__caret { flex: none; transition: transform .15s ease; }
.royh__drop {
  position: absolute; top: 100%; left: -14px; z-index: var(--bn-z-dropdown, 90);
  min-width: 214px; padding: 8px; margin-top: 2px;
  background: #fff; border: 1px solid var(--bn-line); border-radius: var(--bn-radius);
  box-shadow: var(--bn-shadow-md, 0 12px 28px rgba(26,35,64,.14));
  display: flex; flex-direction: column; gap: 1px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.royh__drop a {
  font-size: 14px; font-weight: 600; color: var(--navy);
  padding: 9px 12px; border-radius: 8px; white-space: nowrap;
}
.royh__drop a:hover, .royh__drop a:focus-visible { background: var(--bn-soft-2); color: var(--bn-accent-text); }
.royh__drop-all { border-bottom: 1px solid var(--bn-line); border-radius: 8px 8px 0 0; margin-bottom: 3px; }

/* Openen: hover alleen waar een muis is; :focus-within houdt hem toetsenbord-bedienbaar.
   Zonder de pointer-gate zou één tik op een touchscreen het paneel openen én de link
   volgen — de klassieke dubbele-tik-val. */
@media (hover: hover) and (pointer: fine) {
  .royh__item:hover > .royh__drop { opacity: 1; visibility: visible; transform: translateY(0); }
  .royh__item:hover > a > .royh__caret { transform: rotate(180deg); }
}
.royh__item:focus-within > .royh__drop { opacity: 1; visibility: visible; transform: translateY(0); }
.royh__item:focus-within > a > .royh__caret { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .royh__drop, .royh__caret { transition: none; }
}

/* ── Footer (.royf) ── */
.royf { background: var(--navy); color: #cfd4e2; margin-top: 8px; }
.royf__in { max-width: var(--bn-container); margin: 0 auto; padding: 40px 32px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.royf__logo { font-weight: 800; font-size: 22px; color: #fff; }
.royf__logo span { color: var(--orange); }
.royf small { display: block; color: #9aa3bd; font-size: 13px; margin-top: 4px; }
.royf__links { display: flex; gap: 22px; flex-wrap: wrap; }
/* Taphoogte: de links stonden op 21px hoog. Ze staan in een rij, niet inline in een
   tekstblok, dus de inline-uitzondering van WCAG 2.5.8 (24x24) geldt niet. 44px is de
   basisregel elders in het thema (zie .royh__actions/.royh__nav). */
.royf__links a { color: #cfd4e2; font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; }
.royf__links a:hover { color: #fff; }

/* ── Responsive header ── */
@media (max-width: 782px) {
  body.admin-bar .royh { top: 46px; }
}
@media (max-width: 768px) {
  .royh__bar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .royh__logo { font-size: 22px; }
  .royh__search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .royh__actions { gap: 4px; margin-left: auto; }
  .royh__actions a span.lbl { display: none; }
  /* Tap-targets ≥42px voor de icoon-links (mobiele-audit P2), passend naast het logo */
  .royh__actions a { justify-content: center; min-height: 44px; min-width: 42px; }
  .royh__nav a { align-items: center; display: inline-flex; min-height: 44px; }
  .royh__nav { padding-bottom: 6px; flex-wrap: nowrap; overflow-x: auto; }
  /* Geen hover op touch: de dropdown blijft dicht, de tik gaat gewoon naar de categorie.
     De subcategorieën blijven daar bereikbaar via de native categoriekiezer op de
     shop-pagina (.bn-cat-select). */
  .royh__drop { display: none; }
  .royh__caret { display: none; }
}

/* ── Knoppen: zachte lift/press site-breed (consistent met shop micro-interacties) ── */
@media (prefers-reduced-motion: no-preference) {
  .royh__search button, .royh__cart, .button {
    transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  }
  .royh__search button:hover, .royh__cart:hover { transform: translateY(-1px); }
  .royh__search button:active, .royh__cart:active { transform: scale(0.96); }
}

/* ── Focus-rings (toegankelijkheid, altijd aan) ── */
.royh__logo:focus-visible, .royh__search button:focus-visible, .royh__actions a:focus-visible,
.royh__nav a:focus-visible, .royf__links a:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 3px; border-radius: var(--bn-radius);
}
