/* Palma & Oliva extra's — kleuren zijn aan te passen via deze variabelen */
.pox, .pox-wa {
  --pox-olijf: #6e7451;
  --pox-terra: #b5633e;
  --pox-inkt: #2b2723;
  --pox-papier: #fffaf3;
  --pox-rond: 14px;
}
.pox { margin: clamp(2rem, 6vw, 4.5rem) auto; max-width: 1200px; padding: 0 16px; box-sizing: border-box; }
.pox *, .pox *::before, .pox *::after { box-sizing: border-box; }
.pox-kop { text-align: center; margin-bottom: 1.25rem; }
.pox-kop h2 { margin: 0 0 .35rem; }
.pox-kop p { margin: 0; opacity: .75; }

.pox-beeld { position: relative; border-radius: var(--pox-rond); overflow: visible; isolation: isolate; }
.pox-beeld > .pox-img, .pox-mo-voor, .pox-mo-na { border-radius: var(--pox-rond); }
.pox-img { display: block; width: 100%; height: auto; border-radius: var(--pox-rond); }

/* ---------- puntjes ---------- */
/* puntje zonder transform, zodat de kaart op mobiel echt vast onderin het scherm kan staan */
.pox-punt { position: absolute; left: var(--x); top: var(--y); z-index: 3; width: 0; height: 0; }
.pox-punt:has(.pox-kaart:not([hidden])) { z-index: 4; }
.pox-dot {
  all: unset; cursor: pointer; display: grid; place-items: center;
  position: absolute; left: 0; top: 0; translate: -50% -50%;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 250, 243, .55); backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.pox-dot span { width: 14px; height: 14px; border-radius: 50%; background: var(--pox-papier); box-shadow: 0 0 0 3px var(--pox-terra); }
.pox-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--pox-papier); animation: pox-puls 2.2s ease-out infinite;
}
.pox-dot:hover, .pox-dot[aria-expanded="true"] { transform: scale(1.12); }
.pox-dot:focus-visible { outline: 3px solid var(--pox-terra); outline-offset: 3px; }
@keyframes pox-puls { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }

/* ---------- productkaart ---------- */
.pox-kaart {
  position: absolute; left: 50%; top: calc(100% + 10px); z-index: 5;
  width: 250px; display: flex; gap: 12px; align-items: center;
  padding: 10px; border-radius: 12px; background: var(--pox-papier); color: var(--pox-inkt);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  transform: translateX(-50%); animation: pox-in .18s ease-out;
}
.pox-punt.is-links .pox-kaart { left: auto; right: -26px; transform: none; }
.pox-punt:not(.is-links) .pox-kaart { left: -26px; transform: none; }
.pox-punt.is-onder .pox-kaart { top: 28px; }
.pox-punt:not(.is-onder) .pox-kaart { top: auto; bottom: 28px; }
.pox-kaart[hidden] { display: none; }
@keyframes pox-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }

.pox-kaart-foto { flex: 0 0 72px; }
.pox-kaart-foto img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 8px; margin: 0; }
.pox-kaart-tekst { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pox-naam { color: inherit; font-weight: 600; line-height: 1.25; text-decoration: none; }
.pox-naam:hover { text-decoration: underline; }
.pox-prijs { color: var(--pox-terra); font-weight: 600; }
.pox-prijs del { opacity: .55; font-weight: 400; margin-right: 4px; }
.pox-prijs ins { text-decoration: none; }
.pox-knop {
  align-self: flex-start; margin-top: 4px; padding: 6px 12px; border-radius: 999px;
  background: var(--pox-olijf); color: #fff !important; font-size: .85rem; text-decoration: none; line-height: 1.2;
}
.pox-knop:hover { background: var(--pox-inkt); }

/* ---------- make-over slider ---------- */
.pox-mo-vak { --pos: 12%; aspect-ratio: auto; user-select: none; }
.pox-mo-voor .pox-img, .pox-mo-na .pox-img { width: 100%; height: 100%; object-fit: cover; }
.pox-mo-voor { position: relative; overflow: hidden; }
.pox-mo-na { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.pox-mo-greep {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2; width: 3px;
  background: var(--pox-papier); transform: translateX(-50%); pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 0, 0, .3);
}
.pox-mo-greep span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--pox-papier); color: var(--pox-inkt); font-size: 18px; letter-spacing: 2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.pox-mo-schuif {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; touch-action: pan-y;
}
.pox-mo-schuif:focus-visible + .pox-mo-punten { outline: none; }
.pox-mo-vak:has(.pox-mo-schuif:focus-visible) .pox-mo-greep span { outline: 3px solid var(--pox-terra); outline-offset: 2px; }
.pox-mo-punten { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.pox-mo-punten .pox-punt { pointer-events: auto; transition: opacity .2s ease; }
.pox-mo-punten .pox-punt.is-weg { opacity: 0; pointer-events: none; }
.pox-label {
  position: absolute; top: 14px; z-index: 2; padding: 4px 12px; border-radius: 999px;
  background: rgba(43, 39, 35, .6); color: #fff; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  pointer-events: none;
}
.pox-label-na { left: 14px; }
.pox-label-voor { right: 14px; }

/* ---------- WhatsApp ---------- */
.pox-wa {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); transition: transform .2s ease;
}
.pox-wa:hover { transform: scale(1.08); }
.pox-wa:focus-visible { outline: 3px solid var(--pox-inkt); outline-offset: 3px; }

/* ---------- kleine schermen: kaart onderaan de foto ---------- */
@media (max-width: 640px) {
  .pox-dot { width: 30px; height: 30px; }
  .pox-punt .pox-kaart, .pox-punt.is-links .pox-kaart, .pox-punt:not(.is-onder) .pox-kaart {
    position: fixed; left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; transform: none;
  }
  .pox-wa { right: 14px; bottom: 14px; width: 52px; height: 52px; }
  body:has(.pox-kaart:not([hidden])) .pox-wa { opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pox-dot::after { animation: none; }
  .pox-kaart { animation: none; }
}

/* hulpje voor de beheerder: positie van een klik */
.pox-pos { position: absolute; z-index: 6; padding: 4px 8px; border-radius: 6px; background: #111; color: #fff; font: 12px/1.3 monospace; transform: translate(-50%, -140%); pointer-events: none; }

/* in de smalle tekstkolom van het thema: breder, zodat het aansluit op de productrij */
.prose:has(> .pox) { max-width: none; }
.prose > .pox { max-width: 1100px; padding: 0; }
@media (max-width: 1132px) { .prose > .pox { padding: 0 16px; } }
