/* ═══════════════ bijpip — header.css ═══════════════
   Nieuwe header met mega menu's. Ontwerp 1-op-1 uit
   _concepten/master-menu-voorstel en de pm-header in _build/shell.html.
   Alles zit achter het pm- prefix en .pm-scope, zodat het nergens botst
   met de bestaande theme-klassen (.header, .panel, .acc, .mega ...).
   Wordt NA mobile-fixes.css geladen (afhankelijkheid in inc/header-menu.php).
   ════════════════════════════════════════════════════ */

.pm-scope {
  --bg: #ffffff;
  --ink: #2C2C2C;
  --wine: #883756;
  --clay: #A87C6D;
  --blush: #F9ECE8;
  --pink: #EBADD1;
  --cream: #FDF8F5;
  --muted: rgb(44 44 44 / 0.62);
  --line: rgb(44 44 44 / 0.12);
  --line-wine: rgb(136 55 86 / 0.18);
  --pad: 32px;
  --r: 4px;
  --max: 1400px;
  --font-body: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
:where(.pm-scope), :where(.pm-scope) *, :where(.pm-scope) *::before, :where(.pm-scope) *::after { margin: 0; padding: 0; box-sizing: border-box; }
.pm-scope { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: var(--ink); -webkit-font-smoothing: antialiased; }
body.pm-no-scroll { overflow: hidden; }
/* html clipt overflow-x (mobile-fixes.css), dus de scroll-lock moet op html. */
html:has(.pm-drawer.is-open) { overflow: hidden; }
:where(.pm-scope) img { display: block; max-width: 100%; }
:where(.pm-scope) a { color: inherit; text-decoration: none; }
:where(.pm-scope) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:where(.pm-scope) ul { list-style: none; }
:where(.pm-scope) :focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; border-radius: 2px; }
.pm-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pm-wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
:where(.pm-scope) svg { flex-shrink: 0; }

/* ─── 1. Top bar ─── */
.pm-topbar { background: var(--blush); color: var(--ink); font-size: 12.5px; letter-spacing: 0.02em; }
.pm-topbar__list { display: flex; justify-content: center; gap: 56px; height: 36px; align-items: center; }
.pm-topbar__item { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pm-topbar__item svg { width: 14px; height: 14px; color: var(--wine); }

/* ─── Sticky header shell ─── */
.pm-site-header { position: sticky; top: 0; z-index: 100; background: #fff; }
body.admin-bar .pm-site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .pm-site-header { top: 46px; }
}
@media screen and (max-width: 600px) {
  /* WP-adminbalk is hier niet meer fixed: hij scrollt weg. */
  body.admin-bar .pm-site-header { top: 0; }
}

/* ─── 2. Main row ─── */
.pm-mainrow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
  height: 84px;
}
.pm-logo { display: block; }
.pm-logo img { height: 50px; width: auto; mix-blend-mode: multiply; }
.pm-logo .header__logo-text { font-family: var(--font-head); font-size: 26px; line-height: 1; white-space: nowrap; }
.pm-search { position: relative; max-width: 640px; width: 100%; justify-self: center; }
.pm-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  padding: 0 54px 0 22px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, background 0.2s;
}
.pm-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.pm-search input::placeholder { color: var(--muted); }
.pm-search input:hover { border-color: var(--line-wine); }
.pm-search input:focus { outline: none; border-color: var(--wine); background: #fff; }
.pm-search button {
  position: absolute; right: 5px; top: 5px;
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--wine); color: #fff;
  transition: background 0.2s;
}
.pm-search button:hover { background: var(--ink); }
.pm-search button svg { width: 17px; height: 17px; }

.pm-actions { display: flex; align-items: center; gap: 26px; }
.pm-action {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 12px; color: var(--ink); position: relative;
  transition: color 0.2s;
}
.pm-action svg { width: 23px; height: 23px; }
.pm-action:hover { color: var(--wine); }
.pm-action__count,
.pm-scope .pm-action b.bijpip-cart-count,
.pm-scope .pm-action b.bijpip-wish-count {
  position: absolute; top: -5px; right: 10px; left: auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--wine); color: #fff;
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 500; line-height: 18px; text-align: center;
}
.pm-scope .pm-action b.bijpip-cart-count.is-empty,
.pm-scope .pm-action b.bijpip-wish-count.is-empty { display: none; }
.pm-icon-btn { display: none; width: 40px; height: 40px; place-items: center; color: var(--ink); }
.pm-icon-btn svg { width: 24px; height: 24px; }

/* ─── 3. Menu row ─── */
.pm-menubar { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.pm-menubar__inner { display: flex; justify-content: space-between; align-items: stretch; height: 52px; }
.pm-menu { display: flex; gap: 30px; height: 100%; }
.pm-menu > li { display: flex; }
.pm-menu__btn, .pm-menu__link {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  height: 100%;
  font-size: 14.5px; font-weight: 500; color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s;
}
.pm-menu__btn svg { width: 12px; height: 12px; transition: transform 0.25s var(--ease); opacity: 0.7; }
.pm-menu__btn::after, .pm-menu__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--wine); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.pm-menu__btn:hover, .pm-menu__link:hover, .pm-menu__btn[aria-expanded="true"] { color: var(--wine); }
.pm-menu__btn[aria-expanded="true"]::after, .pm-menu__link:hover::after { transform: scaleX(1); }
.pm-menu__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.pm-menu__link--sale { color: var(--wine); font-weight: 600; }
.pm-menu-side { display: flex; gap: 26px; align-items: center; }
.pm-menu-side a { font-size: 13px; color: var(--muted); transition: color 0.2s; }
.pm-menu-side a:hover { color: var(--wine); }

/* ─── 4. Mega panel ─── */
.pm-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 28px 40px -24px rgb(44 44 44 / 0.18);
  z-index: 5;
}
.pm-panel[hidden] { display: none; }
.pm-panel:not([hidden]) { animation: pmPanelIn 0.22s var(--ease); }
@keyframes pmPanelIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pm-panel__inner { display: flex; gap: 64px; padding-top: 36px; padding-bottom: 40px; }
.pm-panel__cols { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 28px 56px; align-content: start; }
.pm-panel--2 .pm-panel__cols { grid-template-columns: repeat(2, minmax(0, 260px)); }
.pm-panel--1 .pm-panel__cols { grid-template-columns: minmax(0, 260px); }
.pm-panel__head {
  grid-column: 1 / -1;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.pm-panel__title { font-family: var(--font-head); font-size: 24px; font-weight: 500; line-height: 1.3; }
.pm-panel__all { font-size: 13.5px; font-weight: 500; color: var(--wine); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pm-panel__all svg { width: 14px; height: 14px; transition: transform 0.2s; }
.pm-panel__all:hover svg { transform: translateX(3px); }
.pm-col__head { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.pm-col__head--ghost { visibility: hidden; }
.pm-col li + li { margin-top: 7px; }
.pm-col a { font-size: 14px; color: var(--muted); line-height: 1.4; transition: color 0.15s; display: inline-block; overflow-wrap: normal; }
.pm-col a:hover { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
.pm-tile {
  position: relative; display: block; width: 280px; flex-shrink: 0; align-self: flex-start;
  aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--blush);
}
.pm-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.pm-tile:hover img { transform: scale(1.04); }
.pm-tile__label {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  background: rgb(255 255 255 / 0.94); border-radius: var(--r);
  padding: 12px 14px; font-family: var(--font-head); font-size: 17px; line-height: 1.25;
}
.pm-tile__label small { display: block; font-family: var(--font-body); font-size: 12.5px; color: var(--wine); margin-top: 3px; }
/* 27-10-2026: tile photos are portrait (2:3); keep the 4:5 crop centred. Solo label = link text only. */
.pm-tile img { object-position: center 45%; }
.pm-tile__label--solo small { margin-top: 0; font-size: 13.5px; font-weight: 500; }

/* Page dim behind an open panel */
.pm-scrim {
  position: fixed; inset: 0; background: rgb(44 44 44 / 0.28); z-index: 90;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.pm-scrim.is-on { opacity: 1; visibility: visible; }

/* ─── Mobile drawer ─── */
.pm-drawer-scrim { position: fixed; inset: 0; background: rgb(44 44 44 / 0.4); z-index: 200; opacity: 0; transition: opacity 0.25s; }
.pm-drawer-scrim.is-on { opacity: 1; }
.pm-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 201;
  width: min(380px, 88vw); background: #fff; overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-100%); transition: transform 0.3s var(--ease);
  display: flex; flex-direction: column;
}
.pm-drawer.is-open { transform: none; }
.pm-drawer[hidden], .pm-drawer-scrim[hidden] { display: none; }
.pm-drawer__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.pm-drawer__top img { height: 38px; width: auto; mix-blend-mode: multiply; }
.pm-drawer__close { width: 40px; height: 40px; display: grid; place-items: center; }
.pm-drawer__close svg { width: 22px; height: 22px; }
.pm-acc > li { border-bottom: 1px solid var(--line); }
.pm-acc__btn, .pm-acc__link {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; font-size: 16px; font-weight: 500; text-align: left;
}
.pm-acc__btn svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.pm-acc__btn[aria-expanded="true"] { color: var(--wine); }
.pm-acc__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.pm-acc__link--sale { color: var(--wine); font-weight: 600; }
.pm-acc__body { padding: 0 20px 18px; }
.pm-acc__body[hidden] { display: none; }
.pm-acc__all { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 500; color: var(--wine); margin-bottom: 14px; }
.pm-acc__all svg { width: 13px; height: 13px; }
.pm-acc__group + .pm-acc__group { margin-top: 16px; }
.pm-acc__group h3 { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; line-height: 1.4; color: var(--ink); margin-bottom: 6px; }
.pm-acc__group a { display: block; padding: 6px 0; font-size: 14.5px; color: var(--muted); }
.pm-drawer__more { background: var(--cream); padding: 10px 0; margin-top: auto; }
.pm-drawer__more a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 14.5px; }
.pm-drawer__more svg { width: 18px; height: 18px; color: var(--wine); }

/* ─── Responsive ─── */
@media (max-width: 1180px) {
  .pm-menu { gap: 22px; }
  .pm-menu-side { display: none; }
  .pm-mainrow { gap: 32px; }
  .pm-tile { width: 230px; }
  .pm-panel__cols { column-gap: 36px; }
}
@media (max-width: 899px) {
  .pm-scope { --pad: 16px; }
  .pm-topbar__list { position: relative; justify-content: center; height: 34px; gap: 0; }
  .pm-topbar__item { position: absolute; left: 0; right: 0; justify-content: center; opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s var(--ease); }
  .pm-topbar__item.is-active { opacity: 1; transform: none; }
  .pm-mainrow { grid-template-columns: auto 1fr auto; gap: 8px; height: 62px; }
  .pm-logo { justify-self: center; }
  .pm-logo img { height: 38px; }
  .pm-logo .header__logo-text { font-size: 22px; }
  .pm-icon-btn { display: grid; }
  .pm-mainrow > .pm-search { display: none; }
  .pm-action--account, .pm-action--wish { display: none; }
  .pm-action__label { display: none; }
  .pm-actions { gap: 2px; }
  .pm-action { width: 40px; height: 40px; justify-content: center; }
  .pm-action__count,
  .pm-scope .pm-action b.bijpip-cart-count { top: 1px; right: 0; }
  .pm-menubar { display: none; }
  .pm-search--mobile { display: block; padding: 0 var(--pad) 12px; max-width: none; }
  .pm-search--mobile input { height: 42px; }
  .pm-search--mobile button { top: 3px; right: calc(var(--pad) + 3px); }
  .pm-site-header { border-bottom: 1px solid var(--line); }
}
@media (min-width: 900px) {
  .pm-search--mobile { display: none; }
  .pm-drawer, .pm-drawer-scrim { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-scope *, .pm-scope *::before, .pm-scope *::after { animation: none !important; transition: none !important; }
}

/* ─── Sticky pagina-elementen onder de hogere header ───
   --pm-sticky-top = sticky-offset van de header (adminbalk) + zijn hoogte
   + 18px lucht; header.js meet dat live. 156px is de terugval (138 + 18).
   Alleen desktop: daaronder zijn deze elementen in het thema static. */
@media (min-width: 900px) {
  .filters,
  .panel--sticky,
  body.bijpip-pdp .pd__info { top: var(--pm-sticky-top, 156px); }
}

/* ═══════════════ Filterkolom altijd bereikbaar — 22-10-2026 (Joey) ═══════════════
   Back-up: header.css.bak-20261022-voor-filterkolom-scroll
   De sticky filterkolom (Soort, Prijs, Formaat, ...) was hoger dan het venster,
   waardoor de onderste filters nooit in beeld kwamen. Nu: maximaal zo hoog als
   het venster min de sticky header (--pm-sticky-top, incl. 18px lucht) en nog
   eens 18px marge onderaan; wat niet past scrolt binnen de kolom.
   Negatieve marge + padding rechts: de scrollbalk krijgt eigen ruimte in de
   gap, zodat de tellers niet verschuiven. Vanaf 901px: tot en met 900px is
   #filters de mobiele lade (mobile-fixes.css). */
@media (min-width: 901px) {
  .filters {
    max-height: calc(100vh - var(--pm-sticky-top, 156px) - 18px);
    max-height: calc(100dvh - var(--pm-sticky-top, 156px) - 18px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-right: -14px;
    padding-right: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgb(168 124 109 / 0.45) transparent;
  }
  .filters::-webkit-scrollbar { width: 4px; }
  .filters::-webkit-scrollbar-track { background: transparent; }
  .filters::-webkit-scrollbar-thumb { background: rgb(168 124 109 / 0.45); border-radius: 4px; }
  .filters:hover::-webkit-scrollbar-thumb { background: rgb(136 55 86 / 0.55); }
  .filters:hover { scrollbar-color: rgb(136 55 86 / 0.55) transparent; }
}
/* Mobiele lade: laatste filter ook boven de iPhone-thuisbalk uit. */
@media (max-width: 900px) {
  .bijpip-js .filters { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
}