/* =====================================================================
   Benelux Peptides — Design System
   Version 1.0 · Tokens + base components
   Load order: fonts (in <head>) → design-system.css → page CSS files
   Scope: everything is namespaced under the body class .bp (added by the
   child theme) so it cannot leak into wp-admin.
   ===================================================================== */

/* ---------- 1. TOKENS ------------------------------------------------ */
:root {
  /* Brand */
  --bp-blue: #135bc2;            /* the ONE accent, fixed */
  --bp-blue-hover: #0f4da6;
  --bp-blue-active: #0c3f88;
  --bp-blue-soft: #e8f0fb;       /* tints for highlights, focus rings, chips */
  --bp-blue-softer: #f3f7fd;

  /* Ink (text + header) */
  --bp-ink: #0b1a33;             /* headings, header bar */
  --bp-ink-2: #22314d;           /* body text */
  --bp-ink-3: #5b6b85;           /* secondary text, captions */
  --bp-ink-4: #8a97ad;           /* placeholders, disabled */

  /* Surfaces */
  --bp-white: #ffffff;
  --bp-off: #f7f8fa;             /* page sections */
  --bp-grey-1: #eef1f5;          /* cards on off-white, table stripes */
  --bp-grey-2: #e3e7ee;          /* hairlines */
  --bp-grey-3: #cfd6e0;          /* input borders */

  /* Semantic */
  --bp-success: #137a4b;
  --bp-success-soft: #e6f4ed;
  --bp-warn: #9a5b00;
  --bp-warn-soft: #fdf3e3;
  --bp-error: #b42318;
  --bp-error-soft: #fdecea;

  /* Typography */
  --bp-font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bp-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --bp-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Fluid type scale (360px → 1280px) */
  --bp-text-xs: 0.75rem;                                  /* 12 */
  --bp-text-sm: 0.875rem;                                 /* 14 */
  --bp-text-base: 1rem;                                   /* 16 */
  --bp-text-md: 1.125rem;                                 /* 18 */
  --bp-text-lg: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);   /* 20–24 */
  --bp-text-xl: clamp(1.5rem, 1.25rem + 1.2vw, 2rem);     /* 24–32 */
  --bp-text-2xl: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);  /* 30–44 */
  --bp-text-3xl: clamp(2.375rem, 1.6rem + 3.4vw, 4rem);   /* 38–64 hero */

  --bp-leading-tight: 1.1;
  --bp-leading-snug: 1.25;
  --bp-leading-body: 1.6;
  --bp-tracking-tight: -0.02em;
  --bp-tracking-caps: 0.08em;

  /* Spacing (4px base) */
  --bp-s-1: 0.25rem;  --bp-s-2: 0.5rem;   --bp-s-3: 0.75rem;  --bp-s-4: 1rem;
  --bp-s-5: 1.25rem;  --bp-s-6: 1.5rem;   --bp-s-8: 2rem;     --bp-s-10: 2.5rem;
  --bp-s-12: 3rem;    --bp-s-16: 4rem;    --bp-s-20: 5rem;    --bp-s-24: 6rem;
  --bp-section-y: clamp(3rem, 2rem + 5vw, 6rem);

  /* Layout */
  --bp-container: 1200px;
  --bp-container-narrow: 760px;
  --bp-gutter: clamp(1rem, 4vw, 2rem);
  --bp-header-h: 68px;
  --bp-announce-h: 36px;

  /* Radii (restrained) */
  --bp-r-sm: 6px;
  --bp-r-md: 10px;
  --bp-r-lg: 12px;
  --bp-r-pill: 999px;

  /* Shadows (soft, cool) */
  --bp-shadow-xs: 0 1px 2px rgba(11, 26, 51, 0.05);
  --bp-shadow-sm: 0 1px 3px rgba(11, 26, 51, 0.06), 0 1px 2px rgba(11, 26, 51, 0.04);
  --bp-shadow-md: 0 6px 18px -6px rgba(11, 26, 51, 0.12), 0 2px 6px rgba(11, 26, 51, 0.05);
  --bp-shadow-lg: 0 20px 40px -16px rgba(11, 26, 51, 0.18), 0 4px 12px rgba(11, 26, 51, 0.06);
  --bp-ring: 0 0 0 3px rgba(19, 91, 194, 0.28);

  /* Motion */
  --bp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --bp-dur-fast: 150ms;
  --bp-dur: 240ms;
  --bp-dur-slow: 420ms;
}

@media (prefers-reduced-motion: reduce) {
  :root { --bp-dur-fast: 0ms; --bp-dur: 0ms; --bp-dur-slow: 0ms; }
}

/* ---------- 2. BASE -------------------------------------------------- */
.bp {
  font-family: var(--bp-font-body);
  font-size: var(--bp-text-base);
  line-height: var(--bp-leading-body);
  color: var(--bp-ink-2);
  background: var(--bp-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.bp *, .bp *::before, .bp *::after { box-sizing: border-box; }

.bp h1, .bp h2, .bp h3, .bp .bp-display {
  font-family: var(--bp-font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  color: var(--bp-ink);
  letter-spacing: var(--bp-tracking-tight);
  line-height: var(--bp-leading-tight);
  margin: 0 0 var(--bp-s-4);
}
.bp h1 { font-size: var(--bp-text-3xl); }
.bp h2 { font-size: var(--bp-text-2xl); }
.bp h3 { font-size: var(--bp-text-xl); line-height: var(--bp-leading-snug); }
.bp h4, .bp h5, .bp h6 {
  font-family: var(--bp-font-body);
  font-weight: 600;
  color: var(--bp-ink);
  line-height: var(--bp-leading-snug);
  margin: 0 0 var(--bp-s-3);
}
.bp h4 { font-size: var(--bp-text-lg); }
.bp h5 { font-size: var(--bp-text-md); }
.bp h6 { font-size: var(--bp-text-sm); text-transform: uppercase; letter-spacing: var(--bp-tracking-caps); color: var(--bp-ink-3); }

.bp p { margin: 0 0 var(--bp-s-4); }
.bp p:last-child { margin-bottom: 0; }
.bp a { color: var(--bp-blue); text-decoration: none; text-underline-offset: 3px; transition: color var(--bp-dur-fast) var(--bp-ease); }
.bp a:hover { color: var(--bp-blue-hover); text-decoration: underline; }
.bp a:focus-visible, .bp button:focus-visible, .bp input:focus-visible, .bp select:focus-visible, .bp textarea:focus-visible {
  outline: none; box-shadow: var(--bp-ring); border-radius: var(--bp-r-sm);
}
.bp img, .bp svg, .bp video { max-width: 100%; height: auto; display: block; }
.bp hr { border: 0; border-top: 1px solid var(--bp-grey-2); margin: var(--bp-s-8) 0; }
.bp small, .bp .bp-small { font-size: var(--bp-text-sm); color: var(--bp-ink-3); }
.bp .bp-eyebrow { font-size: var(--bp-text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--bp-tracking-caps); color: var(--bp-blue); margin-bottom: var(--bp-s-3); display: block; }
.bp .bp-lead { font-size: var(--bp-text-md); color: var(--bp-ink-3); max-width: 60ch; }
.bp .bp-muted { color: var(--bp-ink-3); }

/* Skip link */
.bp .bp-skip { position: absolute; left: -999px; top: 8px; background: var(--bp-ink); color: #fff; padding: 8px 12px; border-radius: var(--bp-r-sm); z-index: 1000; }
.bp .bp-skip:focus { left: 8px; }

/* ---------- 3. LAYOUT ------------------------------------------------ */
.bp .bp-container { width: 100%; max-width: var(--bp-container); margin-inline: auto; padding-inline: var(--bp-gutter); }
.bp .bp-container--narrow { max-width: var(--bp-container-narrow); }
.bp .bp-section { padding-block: var(--bp-section-y); }
.bp .bp-section--off { background: var(--bp-off); }
.bp .bp-section--tight { padding-block: calc(var(--bp-section-y) * 0.6); }
.bp .bp-section-head { max-width: 640px; margin-bottom: var(--bp-s-10); }
.bp .bp-section-head--center { margin-inline: auto; text-align: center; }

.bp .bp-grid { display: grid; gap: var(--bp-s-6); }
.bp .bp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.bp .bp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bp .bp-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1023px) { .bp .bp-grid--4 { grid-template-columns: repeat(2, 1fr); } .bp .bp-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .bp .bp-grid--2, .bp .bp-grid--3 { grid-template-columns: 1fr; } .bp .bp-grid--4 { grid-template-columns: repeat(2, 1fr); gap: var(--bp-s-4); } }

.bp .bp-stack > * + * { margin-top: var(--bp-s-4); }
.bp .bp-cluster { display: flex; flex-wrap: wrap; gap: var(--bp-s-3); align-items: center; }
.bp .bp-between { display: flex; justify-content: space-between; align-items: center; gap: var(--bp-s-4); }
.bp .bp-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 4. BUTTONS ---------------------------------------------- */
/* Variant classes may sit on the element itself (.bp-btn) or on a
   core/button wrapper (.wp-block-button.bp-btn--x); the custom properties
   inherit down to the real <a>, so both work. */
.bp .bp-btn:not(.wp-block-button), .bp .wp-block-button__link,
.bp .button, .bp .single_add_to_cart_button, .bp .checkout-button, .bp #place_order, .bp .wc-block-components-button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--bp-s-2);
  min-height: 48px; padding: 0 var(--bp-s-6);
  font: 600 var(--bp-text-base)/1 var(--bp-font-body);
  color: var(--_fg, #fff); background: var(--_bg, var(--bp-blue)); border: 1px solid var(--_bd, var(--bp-blue));
  border-radius: var(--bp-r-md); cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--bp-shadow-xs);
  transition: background var(--bp-dur-fast) var(--bp-ease), transform var(--bp-dur-fast) var(--bp-ease), box-shadow var(--bp-dur-fast) var(--bp-ease), color var(--bp-dur-fast), border-color var(--bp-dur-fast);
}
.bp .bp-btn:not(.wp-block-button):hover, .bp .wp-block-button__link:hover,
.bp .button:hover, .bp .single_add_to_cart_button:hover, .bp .checkout-button:hover, .bp #place_order:hover {
  color: var(--_fg-h, #fff); background: var(--_bg-h, var(--bp-blue-hover)); border-color: var(--_bd-h, var(--bp-blue-hover));
  text-decoration: none; box-shadow: var(--bp-shadow-md); transform: translateY(-1px);
}
.bp .bp-btn:not(.wp-block-button):active, .bp .wp-block-button__link:active, .bp .button:active { background: var(--_bg-a, var(--bp-blue-active)); transform: translateY(0); box-shadow: var(--bp-shadow-xs); }
.bp .bp-btn[disabled], .bp .button[disabled], .bp .button.disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.bp .wp-block-button { background: none; border: 0; padding: 0; }

.bp .bp-btn--secondary { --_bg: var(--bp-white); --_fg: var(--bp-ink); --_bd: var(--bp-grey-3); --_bg-h: var(--bp-off); --_fg-h: var(--bp-ink); --_bd-h: var(--bp-ink-4); --_bg-a: var(--bp-grey-1); }
.bp .bp-btn--ghost { --_bg: transparent; --_fg: var(--bp-blue); --_bd: transparent; --_bg-h: var(--bp-blue-soft); --_fg-h: var(--bp-blue-hover); --_bd-h: transparent; --_bg-a: var(--bp-blue-soft); }
.bp .bp-btn--ghost:not(.wp-block-button), .bp .wp-block-button.bp-btn--ghost > .wp-block-button__link { box-shadow: none; padding-inline: var(--bp-s-3); }
.bp .bp-btn--ink { --_bg: var(--bp-ink); --_bd: var(--bp-ink); --_bg-h: #15264a; --_bd-h: #15264a; --_bg-a: #0b1a33; }
.bp .bp-btn--sm:not(.wp-block-button), .bp .wp-block-button.bp-btn--sm > .wp-block-button__link { min-height: 40px; padding-inline: var(--bp-s-4); font-size: var(--bp-text-sm); }
.bp .bp-btn--lg:not(.wp-block-button), .bp .wp-block-button.bp-btn--lg > .wp-block-button__link { min-height: 56px; padding-inline: var(--bp-s-8); font-size: var(--bp-text-md); }
.bp .bp-btn--block:not(.wp-block-button), .bp .wp-block-button.bp-btn--block, .bp .wp-block-button.bp-btn--block > .wp-block-button__link { width: 100%; }
.bp .bp-btn .bp-icon { width: 18px; height: 18px; transition: transform var(--bp-dur-fast) var(--bp-ease); }
.bp .bp-btn:hover .bp-icon--arrow { transform: translateX(3px); }

/* ---------- 5. CARDS & SURFACES ------------------------------------- */
.bp .bp-card {
  background: var(--bp-white); border: 1px solid var(--bp-grey-2); border-radius: var(--bp-r-lg);
  box-shadow: var(--bp-shadow-sm); padding: var(--bp-s-6);
  transition: box-shadow var(--bp-dur) var(--bp-ease), transform var(--bp-dur) var(--bp-ease), border-color var(--bp-dur);
}
.bp .bp-card--hover:hover { box-shadow: var(--bp-shadow-lg); transform: translateY(-3px); border-color: var(--bp-grey-3); }
.bp .bp-card--flat { box-shadow: none; }
.bp .bp-card--soft { background: var(--bp-off); border-color: transparent; box-shadow: none; }
.bp .bp-panel { background: var(--bp-off); border-radius: var(--bp-r-lg); padding: var(--bp-s-6); }

/* ---------- 6. BADGES / CHIPS --------------------------------------- */
.bp .bp-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; border-radius: var(--bp-r-pill); font-size: var(--bp-text-xs); font-weight: 600; letter-spacing: 0.02em; background: var(--bp-grey-1); color: var(--bp-ink-2); }
.bp .bp-badge--blue { background: var(--bp-blue-soft); color: var(--bp-blue-active); }
.bp .bp-badge--success { background: var(--bp-success-soft); color: var(--bp-success); }
.bp .bp-badge--outline { background: transparent; border: 1px solid var(--bp-grey-3); }
.bp .bp-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--bp-r-pill); border: 1px solid var(--bp-grey-3); background: #fff; font-size: var(--bp-text-sm); font-weight: 500; color: var(--bp-ink-2); transition: all var(--bp-dur-fast); }
.bp .bp-chip:hover, .bp .bp-chip[aria-pressed="true"], .bp .bp-chip.is-active { border-color: var(--bp-blue); background: var(--bp-blue-soft); color: var(--bp-blue-active); text-decoration: none; }

/* ---------- 7. FORMS ------------------------------------------------- */
.bp label, .bp .form-row label { display: block; font-size: var(--bp-text-sm); font-weight: 600; color: var(--bp-ink); margin-bottom: 6px; }
.bp input[type="text"], .bp input[type="email"], .bp input[type="tel"], .bp input[type="password"], .bp input[type="number"], .bp input[type="search"], .bp input[type="url"],
.bp textarea, .bp select, .bp .select2-container--default .select2-selection--single {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: 400 var(--bp-text-base)/1.4 var(--bp-font-body); color: var(--bp-ink);
  background: #fff; border: 1px solid var(--bp-grey-3); border-radius: var(--bp-r-md);
  box-shadow: none; appearance: none; -webkit-appearance: none;
  transition: border-color var(--bp-dur-fast), box-shadow var(--bp-dur-fast);
}
.bp textarea { min-height: 120px; resize: vertical; }
.bp input:hover, .bp textarea:hover, .bp select:hover { border-color: var(--bp-ink-4); }
.bp input:focus, .bp textarea:focus, .bp select:focus { border-color: var(--bp-blue); box-shadow: var(--bp-ring); outline: none; }
.bp input::placeholder, .bp textarea::placeholder { color: var(--bp-ink-4); }
.bp select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235b6b85' stroke-width='2' viewBox='0 0 24 24'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.bp input[type="checkbox"], .bp input[type="radio"] { width: 18px; height: 18px; accent-color: var(--bp-blue); margin-right: 8px; vertical-align: -3px; }
.bp .bp-field { margin-bottom: var(--bp-s-4); }
.bp .bp-help { font-size: var(--bp-text-xs); color: var(--bp-ink-3); margin-top: 6px; }
.bp .bp-field.is-error input { border-color: var(--bp-error); }
.bp .bp-field.is-error .bp-help { color: var(--bp-error); }
/* Woo validation hooks */
.bp .woocommerce-invalid input.input-text { border-color: var(--bp-error) !important; }
.bp .woocommerce-validated input.input-text { border-color: var(--bp-success) !important; }
.bp .required { color: var(--bp-error); text-decoration: none; }

/* Quantity input */
.bp .quantity { display: inline-flex; align-items: stretch; border: 1px solid var(--bp-grey-3); border-radius: var(--bp-r-md); overflow: hidden; background: #fff; }
.bp .quantity .qty { width: 64px; min-height: 46px; border: 0; border-radius: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.bp .quantity .qty::-webkit-inner-spin-button, .bp .quantity .qty::-webkit-outer-spin-button { -webkit-appearance: none; }
.bp .quantity .bp-qty-btn { width: 44px; border: 0; background: var(--bp-off); color: var(--bp-ink); font-size: 18px; cursor: pointer; }
.bp .quantity .bp-qty-btn:hover { background: var(--bp-grey-1); }

/* ---------- 8. NOTICES (Woo) ---------------------------------------- */
.bp .woocommerce-message, .bp .woocommerce-info, .bp .woocommerce-error, .bp .bp-notice {
  border: 1px solid var(--bp-grey-2); border-left: 4px solid var(--bp-blue); background: var(--bp-blue-softer);
  color: var(--bp-ink-2); border-radius: var(--bp-r-md); padding: var(--bp-s-4) var(--bp-s-5); margin: 0 0 var(--bp-s-6);
  list-style: none; display: flex; flex-wrap: wrap; gap: var(--bp-s-3); align-items: center; justify-content: space-between;
}
.bp .woocommerce-message::before, .bp .woocommerce-info::before, .bp .woocommerce-error::before { display: none; }
.bp .woocommerce-message { border-left-color: var(--bp-success); background: var(--bp-success-soft); }
.bp .woocommerce-error { border-left-color: var(--bp-error); background: var(--bp-error-soft); }
.bp .woocommerce-error li { margin: 0; }

/* ---------- 9. TABLES ------------------------------------------------ */
.bp table { width: 100%; border-collapse: collapse; font-size: var(--bp-text-sm); }
.bp th { text-align: left; font-weight: 600; color: var(--bp-ink); padding: 12px 14px; border-bottom: 1px solid var(--bp-grey-2); background: var(--bp-off); }
.bp td { padding: 12px 14px; border-bottom: 1px solid var(--bp-grey-2); vertical-align: middle; }
.bp .bp-table--spec th { width: 36%; background: transparent; color: var(--bp-ink-3); font-weight: 500; }

/* ---------- 10. PRICE ------------------------------------------------ */
.bp .price, .bp .bp-price { font-family: var(--bp-font-body); font-weight: 600; color: var(--bp-ink); font-variant-numeric: tabular-nums; }
.bp .price del { color: var(--bp-ink-4); font-weight: 400; margin-right: 6px; opacity: 1; }
.bp .price ins { text-decoration: none; }
.bp .woocommerce-Price-currencySymbol { font-weight: 500; }

/* ---------- 11. MOTION HELPERS -------------------------------------- */
/* Scroll-in reveal: JS adds .is-in when element enters viewport. Without JS everything is visible. */
.bp-js .bp-reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--bp-dur-slow) var(--bp-ease), transform var(--bp-dur-slow) var(--bp-ease); }
.bp-js .bp-reveal.is-in { opacity: 1; transform: none; }
.bp-js .bp-reveal[data-delay="1"] { transition-delay: 80ms; }
.bp-js .bp-reveal[data-delay="2"] { transition-delay: 160ms; }
.bp-js .bp-reveal[data-delay="3"] { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) { .bp-js .bp-reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- 12. ICONS ------------------------------------------------ */
.bp .bp-icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.bp .bp-icon-tile { width: 44px; height: 44px; border-radius: var(--bp-r-md); background: var(--bp-blue-soft); color: var(--bp-blue); display: grid; place-items: center; }
.bp .bp-icon-tile .bp-icon { width: 22px; height: 22px; }

/* ---------- 13. ACCORDION (FAQ) ------------------------------------- */
.bp .bp-acc { border-top: 1px solid var(--bp-grey-2); }
.bp .bp-acc details { border-bottom: 1px solid var(--bp-grey-2); }
.bp .bp-acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--bp-s-4); padding: var(--bp-s-5) 0; font-weight: 600; color: var(--bp-ink); font-size: var(--bp-text-md); }
.bp .bp-acc summary::-webkit-details-marker { display: none; }
.bp .bp-acc summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--bp-ink-3); border-bottom: 2px solid var(--bp-ink-3); transform: rotate(45deg); transition: transform var(--bp-dur) var(--bp-ease); flex: none; margin-right: 4px; }
.bp .bp-acc details[open] summary::after { transform: rotate(-135deg); }
.bp .bp-acc summary:hover { color: var(--bp-blue); }
.bp .bp-acc .bp-acc-body { padding: 0 0 var(--bp-s-5); color: var(--bp-ink-3); max-width: 70ch; }

/* ---------- 14. LEGAL / COMPLIANCE BLOCK ---------------------------- */
/* Existing wording goes inside unchanged; this only styles the container. */
.bp .bp-legal { font-size: var(--bp-text-sm); color: var(--bp-ink-3); border: 1px solid var(--bp-grey-2); border-radius: var(--bp-r-md); padding: var(--bp-s-4) var(--bp-s-5); background: var(--bp-off); }
.bp .bp-legal strong { color: var(--bp-ink); }
