/* HCDB Pockies — mobile first */

/* Inter, self-hosted (variable font, SIL OFL 1.1 — see /fonts/OFL.txt) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"), url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --black: #000;
  --yellow: #ffd800;
  --white: #fff;
  --grey: #f2f2f2;
  --grey-text: #6e6e73;
  --radius: 24px;
  --gutter: 16px;
  --max: 1200px;
  --topbar-h: 56px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

.icon { display: block; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--yellow);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s ease, opacity .2s ease;
}
.button:active { transform: scale(.98); }
.button--block { display: flex; width: 100%; }
.button[disabled],
.button[aria-disabled="true"] { opacity: .35; cursor: not-allowed; pointer-events: none; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: rgba(0, 0, 0, .06); }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 calc(var(--gutter) - 6px) 0 var(--gutter);
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}
.topbar__logo img { height: 28px; width: auto; }

.cart-toggle { position: relative; }
.cart-toggle__count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--yellow);
  color: var(--black);
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  height: 30vh;
  min-height: 190px;
  max-height: 260px;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after { /* light dark overlay so white text is always readable */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .45));
}
.hero__title {
  position: relative;
  z-index: 1;
  padding: 0 var(--gutter);
  font-size: clamp(1.75rem, 7vw, 4.5rem);
  max-width: 16ch;
  text-align: center;
  text-wrap: balance;
}

/* ---------- Campaign line ---------- */

.campaign {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px var(--gutter) 4px;
  text-align: center;
}
.campaign__line { margin: 0; font-weight: 600; font-size: 1.05rem; }
.campaign__guarantee { margin: 8px 0 0; color: var(--grey-text); font-size: .875rem; }
.campaign__notice {
  display: inline-block;
  margin: 12px 0 0;
  padding: 6px 14px;
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--black);
  font-weight: 600;
}

/* ---------- Product cards ---------- */

.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
}
.products__loading { text-align: center; color: var(--grey-text); }

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 28px;
  border-radius: var(--radius);
  text-align: center;
}
.card--zwart { background: var(--black); color: var(--white); }
.card--geel  { background: var(--yellow); color: var(--black); }
.card--grijs { background: var(--grey); color: var(--black); }

.card__name { font-size: 1.75rem; }
.card__variant { margin: 4px 0 0; font-size: .95rem; opacity: .75; }
.card__tagline { margin: 6px 0 0; }
.card__image {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  margin: 16px auto;
  object-fit: contain;
}
.card__price { margin: 0 0 16px; font-size: 1.25rem; font-weight: 600; }

.card__fieldset { border: 0; margin: 0 0 14px; padding: 0; width: 100%; }
.card__legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Colour swatches (pyjama cards) */
.swatches { display: flex; justify-content: center; gap: 12px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch span {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.swatch__dot--geel { background: var(--yellow); }
.swatch__dot--zwart { background: var(--black); }
.swatch input:checked + span { outline: 2px solid var(--black); outline-offset: 3px; }
.swatch input:focus-visible + span { outline: 2px dashed var(--black); outline-offset: 3px; }

/* Size chips */
.sizes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size span {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 40px;
  padding: 0 10px;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px currentColor;
  font-size: .9rem;
  font-weight: 600;
  opacity: .8;
  cursor: pointer;
}
.size input:checked + span { opacity: 1; background: var(--black); color: var(--yellow); box-shadow: none; }
.card--zwart .size input:checked + span { background: var(--yellow); color: var(--black); }
.size input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 2px; }

.card__size-link {
  margin: 0 0 20px;
  padding: 4px;
  border: 0;
  background: none;
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.card .button { width: 100%; max-width: 280px; }
/* On a black card a black button would disappear: invert it there */
.card--zwart .button { background: var(--yellow); color: var(--black); }

/* ---------- Footer ---------- */

.footer {
  padding: 32px var(--gutter) 40px;
  border-top: 1px solid var(--grey);
  color: var(--grey-text);
  font-size: .875rem;
  text-align: center;
}
.footer__links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; }
.footer__links a { color: var(--black); text-decoration: none; font-weight: 600; }
.footer__links a:hover { text-decoration: underline; }
.footer p { margin: 4px 0; }

/* ---------- Cart drawer ---------- */

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, .4);
  opacity: 0;
  transition: opacity .25s ease;
}
.cart-backdrop.is-visible { opacity: 1; }

.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  background: var(--white);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.cart.is-open { transform: translateX(0); }

.cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 20px;
  border-bottom: 1px solid var(--grey);
}
.cart__title { font-size: 1.25rem; }
.cart__body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart__empty { margin: 40px 0; color: var(--grey-text); text-align: center; }

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--grey);
}
.cart-item__thumb { width: 64px; height: 64px; border-radius: 14px; background: var(--grey); padding: 4px; }
.cart-item__name { margin: 0; font-weight: 600; }
.cart-item__meta { margin: 0; color: var(--grey-text); font-size: .875rem; }
.cart-item__price { margin: 0; font-weight: 600; text-align: right; }
.qty { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.qty .icon-button { width: 32px; height: 32px; background: var(--grey); }
.qty .icon-button .icon { width: 16px; height: 16px; }
.qty__value { min-width: 24px; text-align: center; font-weight: 600; }

.cart__footer { padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--grey); }
.cart__total { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: 6px; }
.cart__hint { margin: 0 0 14px; color: var(--grey-text); font-size: .8rem; }
.cart__phase { margin: 10px 0 0; text-align: center; font-size: .875rem; color: var(--grey-text); }

/* ---------- Size dialog ---------- */

.size-dialog {
  width: min(480px, calc(100% - 2 * var(--gutter)));
  max-height: calc(100% - 64px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
}
.size-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.size-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 4px 24px;
}
.size-dialog__header h2 { font-size: 1.25rem; }
.size-dialog__body { padding: 8px 24px 24px; }
.size-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.size-table th, .size-table td { padding: 10px 6px; text-align: left; border-bottom: 1px solid var(--grey); }
.size-table th { font-weight: 600; }
.size-table td:first-child { font-weight: 600; }
.size-dialog__note { margin: 14px 0 0; color: var(--grey-text); font-size: .85rem; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--yellow);
  font-weight: 600;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* ---------- Larger screens ---------- */

@media (min-width: 700px) {
  :root { --gutter: 24px; }
  .hero { height: 52vh; max-height: 520px; }
  .campaign { padding-top: 28px; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (min-width: 1080px) {
  .products { grid-template-columns: repeat(3, 1fr); }
  .card { padding: 40px 28px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Text pages (contact, voorwaarden, privacy) ---------- */

.page { max-width: 680px; margin: 0 auto; padding: 40px var(--gutter) 56px; }
.page h1 { font-size: 2rem; margin-bottom: 16px; }
.page__details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 24px 0; }
.page__details dt { font-weight: 600; }
.page__details dd { margin: 0; }
