/* ── 2moso huisstijl ───────────────────────────────────────────── */
:root {
  --brand-blue: #006595;       /* PMS 307C — primair */
  --brand-blue-dark: #004f73;  /* hover/active */
  --brand-gray: #e7e7e2;       /* Cool Gray 1C — secundair */
  --brand-dark: #2a3433;       /* Black 6C — secundair / tekst */
  --ink: #2a3433;
  --ink-soft: #5a6068;
  --line: #e0e3e8;
  --surface: #ffffff;
  --bg: #f5f6f7;
}

/* ── Reset + base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: "Exo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
button { cursor: pointer; font: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* ── Layout ────────────────────────────────────────────────────── */
.app-loading .filterbar, .app-loading .layout { opacity: 0.4; pointer-events: none; }

/* Optie C — 2moso-blauwe headerbalk met witte tekst, afgeronde bovenhoeken. */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px; background: var(--brand-blue);
  border-radius: 12px 12px 0 0;
}
.topbar h1 { font-size: 22px; margin: 0; font-weight: 700; letter-spacing: 0.2px; color: #fff; }
.user-info { font-size: 14px; color: rgba(255,255,255,0.85); }
.user-info a { color: #fff; text-decoration: none; }
.user-info a:hover { text-decoration: underline; }

.filterbar {
  display: flex; gap: 16px; align-items: center;
  padding: 16px 32px; background: #fff; border-bottom: 1px solid #e0e3e8;
  position: sticky; top: 0; z-index: 10;
}
.search-wrap input {
  width: 240px; padding: 8px 12px; border: 1px solid #c8ccd2;
  border-radius: 6px; font-size: 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
.search-wrap input:focus {
  outline: none; border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0,101,149,0.15);
}
.categories { display: flex; gap: 8px; flex-wrap: wrap; }
.categories button {
  padding: 6px 14px; border: 1px solid #c8ccd2; background: #fff;
  border-radius: 16px; font-size: 13px; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.categories button:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.categories button.active { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }

.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px; padding: 24px 32px;
  max-width: 1400px; margin: 0 auto;
}

/* Smal iframe: cart onder de catalogus i.p.v. afgeknepen rechts */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .cart-sidebar { position: static; max-height: none; }
}

/* ── Catalog ───────────────────────────────────────────────────── */
/* min-width:0 voorkomt grid-blowout: de brede maatmatrix scrollt dan
   horizontaal binnen z'n kaart i.p.v. het cart-paneel weg te duwen. */
.catalog { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.product-card {
  background: #fff; border: 1px solid #e0e3e8; border-radius: 8px;
  padding: 16px;
}
.product-card.collapsed .product-body { display: none; }

.product-header {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; user-select: none;
}
.product-header h3 { margin: 0; font-size: 18px; }
.product-meta { color: #5a6068; font-size: 13px; }

.color-strip { display: flex; gap: 8px; margin-top: 12px; }
.color-thumb {
  width: 110px; height: 90px; border: 1px solid #e0e3e8; border-radius: 4px;
  background: #f0f0f0; cursor: pointer; overflow: hidden;
  position: relative; flex-shrink: 0;
}
.color-thumb-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.color-thumb .color-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 11px;
  text-align: center; padding: 2px 0;
}

.size-matrix { margin-top: 16px; overflow-x: auto; }
.size-matrix table { border-collapse: collapse; font-size: 13px; }
.size-matrix th, .size-matrix td {
  border: 1px solid #e0e3e8; padding: 4px 8px; text-align: center; min-width: 48px;
}
.size-matrix th { background: #f7f8fa; font-weight: 500; }
.size-matrix td.unavailable { color: #c8ccd2; background: #f7f8fa; }
.size-matrix input[type=number] {
  width: 44px; padding: 2px 4px; border: 1px solid #c8ccd2; border-radius: 3px;
  font: inherit; text-align: center;
}

/* ── Cart sidebar ─────────────────────────────────────────────── */
.cart-sidebar {
  position: sticky; top: 80px; align-self: start;
  background: #fff; border: 1px solid #e0e3e8; border-radius: 8px;
  padding: 16px; max-height: calc(100vh - 100px); overflow-y: auto;
}
.cart-sidebar h2 { margin: 0 0 12px; font-size: 16px; }
.cart-email { margin: 0 0 14px; padding: 0 0 14px; border-bottom: 1px solid #f0f0f0; }
.cart-email label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--dark, #2a3433); }
.cart-email input {
  width: 100%; padding: 9px 12px; border: 1px solid #c8ccd2; border-radius: 6px;
  font: inherit; font-size: 14px; transition: border-color 0.15s, box-shadow 0.15s;
}
.cart-email input:focus {
  outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0,101,149,0.15);
}
.cart-email-hint { margin: 8px 0 0; font-size: 12px; color: #c8102e; text-align: center; }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-lines li {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid #f0f0f0;
  cursor: pointer; font-size: 13px;
}
.cart-lines li:hover { background: #f7f8fa; }
.cart-totals { margin: 12px 0; font-size: 14px; }
.cart-totals div + div { margin-top: 4px; font-weight: 600; }

.checkout-btn {
  width: 100%; padding: 12px; background: var(--brand-blue); color: #fff;
  border: none; border-radius: 6px; font-size: 14px; font-weight: 600;
  margin-top: 8px; transition: background 0.15s;
}
.checkout-btn:not(:disabled):hover { background: var(--brand-blue-dark); }
.checkout-btn:disabled { background: #c8ccd2; cursor: not-allowed; }

.disclaimer {
  margin: 12px 0 0; font-size: 12px; color: #5a6068; text-align: center;
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(42,52,51,0.92);   /* brand-dark wash */
  display: flex; flex-direction: column;
  padding: 16px clamp(16px, 4vw, 48px) 24px;
}
/* Eigen rij rechtsboven — overlapt nooit de foto's of hun scrollbar */
.lightbox-close {
  align-self: flex-end; flex: 0 0 auto;
  width: 44px; height: 44px; margin-bottom: 12px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  background: rgba(0,0,0,0.4); border: 2px solid rgba(255,255,255,0.85);
  border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.lightbox-close svg { width: 20px; height: 20px; display: block; }
.lightbox-close:hover, .lightbox-close:focus-visible {
  background: var(--brand-blue); border-color: #fff; transform: scale(1.05); outline: none;
}
.lightbox-content {
  flex: 1 1 auto; min-height: 0; width: 100%;
  max-width: 1100px; margin: 0 auto;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-items: center; align-content: start;
  overflow-y: auto; scrollbar-gutter: stable;
}
.lightbox-content img { max-height: 78vh; border-radius: 6px; }

/* ── Toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 12px 20px; background: var(--brand-dark); color: #fff;
  border-radius: 6px; font-size: 14px; z-index: 200;
}
.toast.error { background: #c8102e; }
.toast.success { background: #2c7a3d; }

/* ── Bevestigingspagina ────────────────────────────────────────── */
.confirmation {
  display: flex; justify-content: center; align-items: flex-start;
  padding: 48px 24px; min-height: 320px;
}
.confirmation-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 520px; width: 100%; padding: 40px 32px; text-align: center;
}
.confirmation-check {
  width: 72px; height: 72px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: #e3f4e4; color: #2c7a3d; border-radius: 50%;
}
.confirmation-check svg { width: 36px; height: 36px; }
.confirmation-card h2 {
  margin: 0 0 8px; font-size: 24px; font-weight: 700; color: var(--brand-blue);
}
.confirmation-sub { margin: 0 0 24px; color: var(--ink-soft); font-size: 15px; }
.confirmation-ref {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  background: #eef6fa; border: 1px solid #cfe5ef; border-radius: 8px;
  padding: 16px 20px; margin: 0 auto 24px; max-width: 340px;
}
.confirmation-ref-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--brand-blue); font-weight: 600;
}
.confirmation-ref-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 22px; font-weight: 700; color: var(--brand-dark);
}
.confirmation-next {
  margin: 0 0 28px; color: var(--ink-soft); font-size: 14px; line-height: 1.5;
}
.confirmation-btn {
  padding: 12px 28px; background: var(--brand-blue); color: #fff;
  border: none; border-radius: 6px; font-size: 15px; font-weight: 600;
  transition: background 0.15s;
}
.confirmation-btn:hover { background: var(--brand-blue-dark); }

/* Besteloverzicht op de bevestigingspagina */
.confirmation-order {
  text-align: left; max-width: 380px; margin: 0 auto 24px;
  border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: #fafbfc;
}
.confirmation-order-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--brand-dark); }
.confirmation-order-list { list-style: none; margin: 0; padding: 0; }
.confirmation-order-list li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; padding: 6px 0; border-bottom: 1px solid #eef0f2;
}
.confirmation-order-list li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.confirmation-order-totals {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--brand-dark);
}
.confirmation-price-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); font-style: italic; }

/* Prijs-indicatief notitie in het mandje */
.cart-price-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); font-style: italic; }
