/* ==========================================================
   POSTERKADERS OVERAL + HEADER MET LOGO IN HET MIDDEN
   Het kader komt rechtstreeks uit de fantasieposter (de cartouche
   onderaan): gouden krullen, hop en graan in de hoeken, perkament
   in het midden. Lijnen en perkament zijn CSS, de hoekstukken zijn
   beelden die zacht uitlopen in de lijnen: past op elke maat.
   ========================================================== */

:root {
  --paper: #F4E4C5;          /* perkament (vaste waarde) */
  --paper-ink: #132E3A;      /* tekst op perkament */
  --paper-muted: #5C321D;    /* gedempte tekst op perkament */
  --paper-label: #7D5320;    /* labels op perkament (5,5:1) */
  --paper-accent: #7B241F;   /* Kempen-rood op perkament */
}

/* ---------- Het kader ---------- */
.cartouche {
  --ct-y: 52px;               /* hoogte van de hoekstukken */
  --ct-x: 117px;              /* breedte van de hoekstukken */
  position: relative; isolation: isolate;
  background: none !important; border: 0 !important; border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .5));
  padding: var(--ct-y) calc(var(--ct-x) * .4);

  /* kleuren binnen het perkament */
  color: var(--paper-ink);
  --parchment: var(--paper-ink);
  --parchment-muted: var(--paper-muted);
  --gold: var(--paper-label);
  --gold-soft: rgba(125, 83, 32, .45);
  --gold-faint: rgba(125, 83, 32, .25);
}
/* Laag 1 (::before): perkament + doorlopende gouden dubbele lijn, in code.
   De lijn ligt op exact dezelfde plek als in de hoekstukken (10% en 13%
   van de hoekbreedte), zodat ze er naadloos onder doorloopt. */
.cartouche::before {
  content: "" !important; position: absolute !important; z-index: -1; pointer-events: none;
  inset: calc(var(--ct-x) * .1) !important;
  width: auto !important; height: auto !important; margin: 0 !important; transform: none !important;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 250, 235, .55), transparent 70%),
    linear-gradient(180deg, #F6E9CC 0%, var(--paper) 55%, #EBD6AC 100%) !important;
  border: max(1.5px, calc(var(--ct-x) * .012)) solid #C9A24E !important;
  border-radius: 0 !important;
  box-shadow:
    inset 0 0 0 calc(var(--ct-x) * .02) var(--paper),
    inset 0 0 0 calc(var(--ct-x) * .02 + 1px) #9C7330,
    inset 0 0 26px rgba(122, 84, 30, .22) !important;
}
/* Laag 2 (::after): de vier hoekstukken uit de poster, met zachte uitloop */
.cartouche::after {
  content: "" !important; display: block !important; position: absolute !important; z-index: 0; pointer-events: none;
  inset: 0 !important; width: auto !important; height: auto !important; margin: 0 !important; transform: none !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background:
    url("assets/kader/hoek-tl.webp") left top / var(--ct-x) auto no-repeat,
    url("assets/kader/hoek-tr.webp") right top / var(--ct-x) auto no-repeat,
    url("assets/kader/hoek-bl.webp") left bottom / var(--ct-x) auto no-repeat,
    url("assets/kader/hoek-br.webp") right bottom / var(--ct-x) auto no-repeat !important;
}
.cartouche > * { position: relative; z-index: 1; }
.cartouche--big { --ct-y: 72px; --ct-x: 162px; }
.cartouche--slim { --ct-y: 34px; --ct-x: 77px; }

/* Teksten en accenten die op navy stonden, leesbaar maken op perkament */
.cartouche .eyebrow,
.cartouche .beer__style, .cartouche .product__cat, .cartouche .event__type,
.cartouche .notes dt { color: var(--paper-accent); }
.cartouche .eyebrow::before { background: var(--paper-accent); }
.cartouche .rule { color: var(--paper-label); }
.cartouche .rule i { background: var(--paper-accent); }
.cartouche p, .cartouche dd, .cartouche li { color: inherit; }
.cartouche .btn--ghost { background: transparent; color: var(--paper-ink); border-color: var(--paper-label); }
.cartouche .btn--ghost:hover { background: rgba(125, 83, 32, .14); color: var(--paper-ink); }
.cartouche .link-btn { color: var(--paper-label); }
.cartouche .link-btn:hover { color: var(--paper-accent); }
.cartouche a:not(.btn) { color: var(--paper-accent); }

/* ---------- Bierkaarten ---------- */
.beer.cartouche { padding: calc(var(--ct-y) * .9) calc(var(--ct-x) * .36) calc(var(--ct-y) * .8); border-top: 0 !important; }
.beer.cartouche .beer__label { margin: 0; }
.beer.cartouche .beer__body { padding: 20px 4px 0; }
.beer.cartouche .beer__more { color: var(--paper-ink); border-color: var(--paper-label); }
.beer.cartouche:hover .beer__more, .beer.cartouche .beer__more:hover { color: var(--navy-900); }
.beer.cartouche .beer__name { color: var(--paper-ink); }
.beer.cartouche .beer__notes, .beer.cartouche .beer__specs dd { color: var(--paper-muted); }

/* ---------- Webshop ---------- */
.product.cartouche { padding: calc(var(--ct-y) * .9) calc(var(--ct-x) * .36) calc(var(--ct-y) * .8); }
.product.cartouche .product__visual { border: 1px solid var(--paper-label); }
.product.cartouche .product__body { padding: 18px 2px 0; }
.product.cartouche .product__name { color: var(--paper-ink); }
.product.cartouche .product__price strong { color: var(--paper-ink); }
.product.cartouche .qty button { color: var(--paper-ink); }
.product.cartouche .qty { border-color: var(--paper-label); }
.product.cartouche .product__badge { background: var(--paper); color: var(--paper-accent); border-color: var(--paper-accent); }

/* ---------- Agenda ---------- */
.event.cartouche { padding: calc(var(--ct-y) * .75) calc(var(--ct-x) * .5); }
.event.cartouche .event__date { background: linear-gradient(180deg, var(--navy-700), var(--navy-900)); color: var(--paper); border-color: var(--paper-label); box-shadow: none; }
.event.cartouche .event__date span { color: var(--amber); }
.event.cartouche .event__date small { color: #C9B48E; }
.event.cartouche .event__title { color: var(--paper-ink); }
.event.cartouche .event__when { color: var(--paper-ink); }
.event.cartouche .event__place { color: var(--paper-muted); }
.event.cartouche:hover { transform: translateY(-3px); }

/* ---------- Kom langs ---------- */
.visit__card.cartouche { padding: calc(var(--ct-y) * 1.1) calc(var(--ct-x) * .5); }
.visit__card.cartouche h2 { color: var(--paper-ink); }
.visit__card.cartouche .visit__address { border-color: var(--gold-faint); }

/* ---------- Popup ---------- */
.modal__panel.cartouche { padding: 0; overflow: hidden; display: flex; flex-direction: column; filter: drop-shadow(0 30px 60px rgba(0,0,0,.7)); }
.modal__panel.cartouche .modal__close { position: absolute; top: calc(var(--ct-y) * .55); right: calc(var(--ct-x) * .55); float: none; margin: 0; background: var(--paper); color: var(--paper-ink); border-color: var(--paper-label); }
.modal__panel.cartouche .modal__body { padding: calc(var(--ct-y) * .95) calc(var(--ct-x) * .42) calc(var(--ct-y) * .9); overflow-y: auto; max-height: calc(100dvh - 48px); }
.modal__panel.cartouche .beer-detail__name,
.modal__panel.cartouche .event-detail__title,
.modal__panel.cartouche .beer-detail__price,
.modal__panel.cartouche .beer-detail__tagline,
.modal__panel.cartouche .beer-detail__quote { color: var(--paper-ink); }
.modal__panel.cartouche .beer-detail__zoom { background: var(--navy-900); color: var(--paper); }
.modal__panel.cartouche .beer-detail__label img { border-color: var(--paper-label); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.modal__panel.cartouche .event-detail__date { background: linear-gradient(180deg, var(--navy-700), var(--navy-900)); color: var(--paper); box-shadow: none; }
.modal__panel.cartouche .event-detail__date span { color: var(--amber); }
.modal__panel.cartouche .event-detail__date small { color: #C9B48E; }
.modal__panel.cartouche .newspaper__demo { color: var(--paper-muted); }
.modal__panel.cartouche .profile__bar { background: rgba(125, 83, 32, .2); }

/* ---------- Footer-bord ---------- */
.site-footer__plaque.cartouche { --ct-y: 64px; --ct-x: 144px; padding: calc(var(--ct-y) * .9) calc(var(--ct-x) * .55); margin-top: -10px; }
.site-footer__plaque.cartouche .footer-title { color: var(--paper-accent); }

/* ==========================================================
   HEADER — groot logo in het midden, menu links en rechts
   ========================================================== */
.site-header__inner.cartouche {
  height: var(--header-h); padding: 0 calc(var(--ct-x) * 1.05);
  display: block; overflow: visible;
}
.site-header .nav {
  height: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: var(--header-h); align-items: center; gap: clamp(16px, 2vw, 32px);
}
.nav__list { display: flex; gap: clamp(16px, 2vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav__list--left { justify-content: flex-end; }
.nav__list--right { justify-content: flex-start; align-items: center; }
.nav__cart { margin-left: auto; flex: none; }
.nav__list--right { min-width: 0; }
.site-header__actions--mobile { display: none; }
.site-header { max-width: calc(100vw - 2 * var(--side) * .55) !important; }
.site-header .nav a { color: var(--paper-ink); white-space: nowrap; font-size: 14px; letter-spacing: .14em; }
.site-header .nav a:hover, .site-header .nav a.is-current { color: var(--paper-accent); border-bottom-color: var(--amber); }

/* Het logo hangt als medaillon onder de balk */
.nav .brand {
  position: relative; z-index: 2; display: grid; place-items: center;
  align-self: start; margin-top: 4px; padding: 6px 24px 12px;
}
.nav .brand::before {
  content: ""; position: absolute; inset: 0 0 -6px; z-index: -1;
  background: radial-gradient(ellipse at 50% 35%, #FBF4E3 0%, var(--paper) 60%, #E5C98F 100%);
  border: 2px solid var(--brass);
  border-radius: 14px 14px 50% 50% / 14px 14px 38% 38%;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--paper-label), 0 0 0 3px var(--navy-900), 0 0 0 5px #D3A45E, 0 14px 26px rgba(0,0,0,.45);
}
.site-header .nav .brand img { height: 96px; width: auto; max-width: none; }
.brand--mobile { display: none; }

.site-header .cart-btn { color: var(--paper-ink); border-color: var(--paper-label); }

/* Smallere schermen: compact menu met knop, logo links */
@media (max-width: 1420px) {
  .nav__list { gap: 16px; }
  .site-header .nav a { font-size: 13px; letter-spacing: .08em; }
  .nav__cart .cart-btn { padding: 4px 8px; min-height: 38px; gap: 6px; font-size: 12px; }
  .site-header .nav .brand img { height: 84px; }
  .site-header__inner.cartouche { padding: 0 calc(var(--ct-x) * .95); }
}
@media (max-width: 1200px) {
  .nav__cart { display: none; }
  .site-header__actions--mobile { display: flex !important; }
  .site-header__inner.cartouche { display: flex; align-items: center; justify-content: space-between; padding: 0 calc(var(--ct-x) * .95); }
  .brand--mobile { display: block; }
  .brand--mobile img { height: 50px; width: auto; }
  .nav .brand { display: none; }
  .site-header__actions--mobile { gap: 10px; align-items: center; }
  .menu-btn { display: inline-block; }
  .site-header .nav {
    position: fixed; top: calc(var(--header-h) + var(--frame) + 18px); left: calc(var(--side) * .62); right: calc(var(--side) * .62); z-index: 69;
    height: auto; display: block;
    background: var(--paper); border: 2px solid var(--brass);
    box-shadow: 0 0 0 3px var(--navy-900), 0 0 0 5px #D3A45E, 0 18px 30px rgba(0,0,0,.5);
    transform: translateY(-140%); visibility: hidden; transition: transform .3s ease;
  }
  .site-header .nav.is-open { transform: none; visibility: visible; }
  .nav__list { flex-direction: column; gap: 0; padding: 0 var(--gutter) !important; }
  .nav__list--left { padding-top: 12px !important; }
  .nav__list--right { padding-bottom: 20px !important; }
  .site-header .nav a { display: block; padding: 14px 0; font-size: 15px; border-bottom: 1px solid rgba(164, 118, 52, .35); }
}
@media (max-width: 880px) {
  .cartouche { --ct-y: 40px; --ct-x: 90px; }
  .cartouche--big { --ct-y: 48px; --ct-x: 108px; }
  .cartouche--slim { --ct-y: 28px; --ct-x: 63px; }
  .site-footer__plaque.cartouche { --ct-y: 44px; --ct-x: 99px; }
}
@media (max-width: 600px) {
  .event.cartouche { padding: calc(var(--ct-y) * .9) calc(var(--ct-x) * .4); }
  .visit__card.cartouche, .site-footer__plaque.cartouche { padding: calc(var(--ct-y) * 1) calc(var(--ct-x) * .38); }
  .modal { padding: 4px; }
  .modal__panel.cartouche .modal__body { max-height: calc(100dvh - 8px); }
}
