/*
Theme Name: EPA Dossier
Theme URI: https://eternalpeptidesaus.com
Author: Eternal Peptides AUS
Description: The research catalogue presented as a pharmaceutical product dossier. Every compound carries a record header, a research-area code, and a four-test assay matrix built from the certificates actually on file.
Version: 1.3.1
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: epa-dossier
*/

/* ============================================================ tokens
   A clinical white paper. One structural accent (deep blue); research
   areas carry their own hue, used only as an edge or a chip. Committed
   to a single light palette — the dossier is a printed-document idea.
   ============================================================ */
:root {
  --ground:    #fbfcfd;
  --surface:   #ffffff;
  --surface-2: #f2f5f7;
  --surface-3: #e9eef2;

  --ink:   #0e1418;
  --ink-2: #55626e;
  --ink-3: #8a96a2;

  --rule:   #dce3e8;
  --rule-2: #c3ced7;

  --accent:      #14506e;
  --accent-ink:  #0d3a51;
  --accent-soft: #e7f0f5;

  --pass:  #15803d;
  --pass-soft: #e6f2ea;
  --warn:  #b45309;
  --warn-soft: #f8efe2;
  --stop:  #9f1239;

  --sans:  "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  --pad: clamp(18px, 4vw, 48px);
  --max: 1240px;
}

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

/* visually hidden but reachable by keyboard and screen readers */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  width: auto; height: auto; margin: 0; padding: 12px 18px;
  clip-path: none; white-space: normal;
  background: var(--accent); color: #fff; font-weight: 600; border-radius: 2px;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.epa-wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }

/* ---------------------------------------------------------- typography */
h1, h2, h3, h4 { margin: 0; line-height: 1.14; text-wrap: balance; letter-spacing: -0.014em; font-weight: 600; }
h1 { font-size: clamp(28px, 4.2vw, 44px); }
h2 { font-size: clamp(21px, 2.6vw, 28px); }
h3 { font-size: 17px; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.epa-compound { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }

/* the small uppercase field label that runs through the whole dossier */
.epa-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.epa-record {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- header */
.epa-head {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 40;
}
.epa-head__bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 66px;
}
.epa-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.epa-brand__mark { display: block; color: var(--ink); flex: 0 0 auto; }
.epa-brand__mark svg { display: block; }
.epa-brand__text { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.epa-brand__name { font-weight: 700; font-size: 16px; letter-spacing: -0.022em; white-space: nowrap; }
.epa-brand__tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.epa-brand .custom-logo { max-height: 40px; width: auto; }

.epa-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.epa-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.epa-nav a {
  display: block; padding: 8px 11px; font-size: 14px; font-weight: 500;
  color: var(--ink-2); text-decoration: none; border-radius: 2px;
}
.epa-nav a:hover { color: var(--ink); background: var(--surface-2); }
.epa-nav .current-menu-item > a { color: var(--accent); }

.epa-cart {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink);
  border: 1px solid var(--rule-2); padding: 7px 12px; border-radius: 2px; background: var(--surface);
}
.epa-cart:hover { border-color: var(--accent); color: var(--accent); }
.epa-cart__n {
  background: var(--accent); color: #fff; font-size: 10.5px; min-width: 17px;
  height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
}
.epa-burger { display: none; background: none; border: 1px solid var(--rule-2); border-radius: 2px; padding: 8px 10px; cursor: pointer; }
.epa-burger span { display: block; width: 17px; height: 1.5px; background: var(--ink); margin: 3.5px 0; }

/* ------------------------------------------------------- breadcrumbs */
.epa-crumbs { padding: 14px 0 0; }
.epa-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.epa-crumbs li + li::before { content: "/"; color: var(--ink-3); margin-right: 7px; }
.epa-crumbs { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.02em; }
.epa-crumbs a { color: var(--ink-2); text-decoration: none; }
.epa-crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ====================================================== assay matrix
   The signature element. Four cells, one per test. A filled cell means a
   certificate is genuinely on file; an open cell means it is not.
   ==================================================================== */
.epa-matrix { display: inline-flex; gap: 3px; }

.epa-matrix--mini .epa-cell {
  width: 19px; height: 19px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600;
  border: 1px solid var(--rule-2); border-radius: 2px;
  color: var(--ink-3); background: var(--surface);
}
.epa-matrix--mini .epa-cell.is-on { background: var(--pass-soft); border-color: var(--pass); color: var(--pass); }
.epa-matrix--mini .epa-cell.is-off { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--surface-3) 3px 4px); }

.epa-matrix--full { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.epa-matrix--full .epa-cell {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border: 1px solid var(--rule); border-radius: 2px;
  background: var(--surface); text-decoration: none; color: var(--ink-2);
  font-size: 13.5px;
}
.epa-matrix--full a.epa-cell:hover { border-color: var(--accent); color: var(--accent); }
.epa-matrix--full .epa-cell__k {
  width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600; border-radius: 2px;
  border: 1px solid var(--rule-2); color: var(--ink-3);
}
.epa-matrix--full .epa-cell.is-on { border-color: var(--pass); }
.epa-matrix--full .epa-cell.is-on .epa-cell__k { background: var(--pass); border-color: var(--pass); color: #fff; }
.epa-matrix--full .epa-cell.is-on { color: var(--ink); }
.epa-matrix--full .epa-cell.is-off { background: var(--surface-2); color: var(--ink-3); }
.epa-matrix--full .epa-cell.is-off .epa-cell__k { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--surface-3) 3px 4px); }

/* research-area chip */
.epa-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  padding: 3px 8px; border-radius: 2px;
  border: 1px solid var(--rule-2); color: var(--ink-2); background: var(--surface);
}
.epa-chip::before { content: ""; width: 7px; height: 7px; border-radius: 1px; background: var(--hue, var(--ink-3)); }
a.epa-chip:hover { border-color: var(--hue, var(--accent)); color: var(--ink); }

/* ============================================================== hero */
.epa-hero { background: var(--surface); border-bottom: 1px solid var(--rule); }
.epa-hero__in {
  max-width: var(--max); margin: 0 auto; padding: clamp(38px, 6vw, 68px) var(--pad);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.epa-hero__eyebrow { margin-bottom: 16px; }
.epa-hero h1 { margin-bottom: 16px; }
.epa-hero__lede { font-size: 17.5px; color: var(--ink-2); max-width: 54ch; line-height: 1.58; }
.epa-hero__stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 26px; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.epa-hero__stat { flex: 1 1 0; min-width: 96px; padding: 13px 15px; background: var(--surface); border-right: 1px solid var(--rule); }
.epa-hero__stat:last-child { border-right: 0; }
.epa-hero__stat b { display: block; font-family: var(--mono); font-size: 21px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.epa-hero__fig { border: 1px solid var(--rule); border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.epa-hero__fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.epa-hero__cap { padding: 9px 13px; border-top: 1px solid var(--rule); background: var(--surface); }

.epa-btn {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14.5px;
  padding: 12px 20px; border: 1px solid var(--accent); border-radius: 2px; cursor: pointer;
}
.epa-btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.epa-btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-2); }
.epa-btn--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.epa-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ========================================================== sections */
.epa-section { padding: clamp(38px, 5.5vw, 62px) 0; }
.epa-section--tint { background: var(--surface-2); border-block: 1px solid var(--rule); }
.epa-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.epa-section__head p { color: var(--ink-2); margin: 6px 0 0; max-width: 62ch; }

/* ================================================== the dossier index
   A dense sortable table of the whole catalogue — the page's centrepiece.
   ================================================================== */
.epa-index { border: 1px solid var(--rule); border-radius: 2px; background: var(--surface); overflow: hidden; }
.epa-index__tools { display: flex; gap: 10px; flex-wrap: wrap; padding: 13px 15px; border-bottom: 1px solid var(--rule); background: var(--surface-2); align-items: center; }
.epa-index__tools input[type="search"] {
  flex: 1 1 220px; min-width: 0; font-family: var(--sans); font-size: 14px;
  padding: 8px 11px; border: 1px solid var(--rule-2); border-radius: 2px; background: var(--surface); color: var(--ink);
}
.epa-index__tools select {
  font-family: var(--sans); font-size: 14px; padding: 8px 11px;
  border: 1px solid var(--rule-2); border-radius: 2px; background: var(--surface); color: var(--ink);
}
.epa-index__count { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-left: auto; }

.epa-tablewrap { overflow-x: auto; }
table.epa-table { width: 100%; min-width: 780px; border-collapse: collapse; }
table.epa-table th, table.epa-table td { text-align: left; padding: 10px 15px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.epa-table thead th {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3); background: var(--surface);
  border-bottom: 1px solid var(--rule-2); position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.epa-table tbody tr:last-child td { border-bottom: 0; }
table.epa-table tbody tr:hover { background: var(--surface-2); }
.epa-table__code { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.epa-table__name { font-family: var(--serif); font-size: 15.5px; font-weight: 600; }
.epa-table__name a { color: var(--ink); text-decoration: none; }
.epa-table__name a:hover { color: var(--accent); text-decoration: underline; }
.epa-table__sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.epa-table__price { font-family: var(--mono); font-size: 14px; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.epa-table__price .woocommerce-Price-amount { font-family: var(--mono); }
td.epa-table__act { text-align: right; white-space: nowrap; }
.epa-mini-btn {
  display: inline-block; font-size: 12.5px; font-weight: 600; text-decoration: none;
  padding: 6px 11px; border: 1px solid var(--rule-2); border-radius: 2px; color: var(--ink); background: var(--surface);
}
.epa-mini-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ==================================================== area index grid */
.epa-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 14px; }
.epa-area {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--hue, var(--accent));
  border-radius: 2px; overflow: hidden;
}
.epa-area:hover { border-color: var(--rule-2); border-left-color: var(--hue, var(--accent)); box-shadow: 0 1px 0 var(--rule-2); }
.epa-area__img { aspect-ratio: 16 / 10; background: var(--surface-2); }
.epa-area__img img { width: 100%; height: 100%; object-fit: cover; }
.epa-area__body { padding: 13px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.epa-area__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.epa-area__code { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; color: var(--hue, var(--accent)); }
.epa-area__n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.epa-area__name { font-family: var(--serif); font-weight: 600; font-size: 16px; }
.epa-area__desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* ======================================================= filter chips */
.epa-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.epa-filters__search {
  width: 100%; font-family: var(--sans); font-size: 15px; padding: 12px 15px;
  border: 1px solid var(--rule-2); border-radius: 2px; background: var(--surface); color: var(--ink);
}
.epa-filters__search::placeholder { color: var(--ink-3); }
.epa-filters__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.epa-fchip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  padding: 7px 13px; border: 1px solid var(--rule-2); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
}
.epa-fchip span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.epa-fchip:hover { border-color: var(--hue, var(--accent)); color: var(--ink); }
.epa-fchip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.epa-fchip.is-active span { color: #9fb0bd; }
.epa-filters__count { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin: 0 0 14px; }
.epa-empty { padding: 40px 0; text-align: center; color: var(--ink-2); }

/* ========================================================= product card */
.epa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.epa-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 3px;
  display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.epa-card:hover { border-color: var(--rule-2); box-shadow: 0 2px 10px rgba(14, 20, 24, 0.06); }
.epa-card__img { display: block; aspect-ratio: 1; background: var(--surface-2); }
.epa-card__img img { width: 100%; height: 100%; object-fit: cover; }
.epa-card__body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.epa-card__area {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; text-decoration: none;
  color: var(--hue, var(--accent));
}
.epa-card__area:hover { text-decoration: underline; }
.epa-card__name { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.25; margin: 0; }
.epa-card__name a { color: var(--ink); text-decoration: none; }
.epa-card__name a:hover { color: var(--accent); }
.epa-card__size { font-size: 13px; color: var(--ink-2); }
.epa-card__test { font-size: 12px; display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.epa-card__test::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: var(--rule-2);
}
.epa-card__test.is-full { color: var(--pass); }
.epa-card__test.is-full::before { background: var(--pass); }
.epa-card__test.is-part { color: var(--warn); }
.epa-card__test.is-part::before { background: var(--warn); }
.epa-card__test.is-none { color: var(--ink-3); }
.epa-card__foot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.epa-card__price { font-family: var(--mono); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.epa-card__price .woocommerce-Price-amount { font-family: var(--mono); }
/* Woo's loop add-to-cart, restyled to the dossier button */
.epa-card .epa-add, .epa-card a.button, .epa-card .added_to_cart {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 2px; padding: 8px 15px; display: inline-block; line-height: 1.3; cursor: pointer;
}
.epa-card .epa-add:hover, .epa-card a.button:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.epa-card .added_to_cart { background: var(--surface); color: var(--accent); }
.epa-card a.button.loading { opacity: 0.6; }

/* =============================================== product detail (PDP) */
.epa-pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 52px); padding: 26px 0 clamp(38px, 5vw, 60px); align-items: start; }
.epa-pdp__media { border: 1px solid var(--rule); border-radius: 2px; background: var(--surface); overflow: hidden; position: sticky; top: 84px; }
.epa-pdp__media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.epa-pdp__cap { padding: 10px 14px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }

.epa-pdp__head { border-bottom: 1px solid var(--rule); padding-bottom: 18px; margin-bottom: 20px; }
.epa-pdp__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.epa-pdp h1 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 10px; }
.epa-pdp__price { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.epa-pdp__price .woocommerce-Price-amount { font-family: var(--mono); }
.epa-pdp__unit { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

.epa-spec { border: 1px solid var(--rule); border-radius: 2px; background: var(--surface); margin-bottom: 20px; }
.epa-spec__row { display: grid; grid-template-columns: 138px minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.epa-spec__row:last-child { border-bottom: 0; }
.epa-spec__k { padding: 10px 14px; background: var(--surface-2); border-right: 1px solid var(--rule); display: flex; align-items: center; }
.epa-spec__v { padding: 10px 14px; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.epa-block { margin-bottom: 22px; }
.epa-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.epa-prose { font-size: 15.5px; color: var(--ink-2); line-height: 1.68; max-width: 66ch; }
.epa-prose h2, .epa-prose h3 { color: var(--ink); margin: 1.4em 0 0.5em; font-size: 17px; }
.epa-prose ul, .epa-prose ol { padding-left: 1.15em; margin: 0 0 1em; }
.epa-prose li { margin-bottom: 0.35em; }

.epa-buy { border: 1px solid var(--rule-2); border-radius: 2px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.epa-buy form.cart { display: flex; gap: 10px; align-items: stretch; margin: 0; flex-wrap: wrap; }
.epa-buy .quantity input.qty {
  width: 74px; height: 44px; padding: 0 10px; text-align: center;
  font-family: var(--mono); font-size: 15px; border: 1px solid var(--rule-2);
  border-radius: 2px; background: var(--surface); color: var(--ink);
}
/* Woo ships its own rounded purple button; scope the override inside the PDP */
.epa-pdp .single_add_to_cart_button,
.epa-buy button.button, .epa-buy .button.alt {
  background: var(--accent) !important; color: #fff !important;
  border: 1px solid var(--accent) !important; border-radius: 2px !important;
  font-family: var(--sans) !important; font-weight: 600 !important; font-size: 15px !important;
  padding: 0 26px !important; height: 44px; line-height: 44px !important; flex: 1 1 auto; cursor: pointer;
}
.epa-pdp .single_add_to_cart_button:hover, .epa-buy button.button:hover { background: var(--accent-ink) !important; border-color: var(--accent-ink) !important; }

/* ------------------------------------------------------- COA lightbox */
.epa-lb { position: fixed; inset: 0; z-index: 100; background: rgba(14, 20, 24, 0.88); display: none; padding: 24px; }
.epa-lb.is-open { display: grid; place-items: center; }
.epa-lb__box { background: var(--surface); border-radius: 2px; max-width: min(880px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.epa-lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 15px; border-bottom: 1px solid var(--rule); }
.epa-lb__img { overflow: auto; background: var(--surface-2); }
.epa-lb__img img { max-width: 100%; }
.epa-lb__x { background: none; border: 1px solid var(--rule-2); border-radius: 2px; padding: 5px 11px; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--ink); }
.epa-lb__x:hover { border-color: var(--accent); color: var(--accent); }

/* ================================================== evidence band (dark) */
.epa-evidence { background: var(--ink); color: #e8edf1; }
.epa-evidence .epa-wrap { padding-block: clamp(38px, 5.5vw, 62px); }
.epa-evidence h2 { color: #fff; }
.epa-evidence__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.epa-evidence p { color: #b6c1cb; max-width: 58ch; }
.epa-evidence .epa-label { color: #8a96a2; }
.epa-evidence__tests { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 22px; }
.epa-evidence__test { border: 1px solid #2a343c; border-radius: 2px; padding: 12px 13px; background: #161e24; }
.epa-evidence__test b { display: block; font-size: 14.5px; color: #fff; margin-bottom: 3px; }
.epa-evidence__test span { font-size: 12.5px; color: #98a5b0; }
.epa-evidence__fig { border: 1px solid #2a343c; border-radius: 2px; overflow: hidden; background: #161e24; }
.epa-evidence__fig img { width: 100%; }
.epa-evidence__fig figcaption { padding: 9px 13px; border-top: 1px solid #2a343c; font-family: var(--mono); font-size: 11px; color: #8a96a2; }

/* ---------------------------------------------------------- notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  border: 1px solid var(--rule-2); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 2px; padding: 13px 16px; margin: 18px 0; list-style: none;
}
.woocommerce-error { border-left-color: var(--stop); }

/* ------------------------------------------------------------ footer */
.epa-foot { background: var(--surface); border-top: 1px solid var(--rule); margin-top: 8px; }
.epa-foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(150px, 1fr)); gap: 30px; padding-block: 42px; }
.epa-foot h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 11px; }
.epa-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.epa-foot a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.epa-foot a:hover { color: var(--accent); text-decoration: underline; }
.epa-foot__note { font-size: 13px; color: var(--ink-2); max-width: 42ch; line-height: 1.55; }
.epa-foot__bar { border-top: 1px solid var(--rule); padding-block: 16px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.epa-foot__bar p { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin: 0; }

/* ----------------------------------------------------------- pagination */
.woocommerce-pagination ul { list-style: none; display: flex; gap: 5px; padding: 0; margin: 26px 0 0; }
.woocommerce-pagination a, .woocommerce-pagination span {
  display: block; padding: 7px 12px; border: 1px solid var(--rule-2); border-radius: 2px;
  font-family: var(--mono); font-size: 13px; text-decoration: none; color: var(--ink-2); background: var(--surface);
}
.woocommerce-pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .epa-hero__in, .epa-pdp, .epa-evidence__grid { grid-template-columns: minmax(0, 1fr); }
  .epa-pdp__media { position: static; }
}
@media (max-width: 780px) {
  .epa-burger { display: block; margin-left: auto; }
  .epa-nav {
    display: none; position: absolute; inset: 66px 0 auto; background: var(--surface);
    border-bottom: 1px solid var(--rule); padding: 12px var(--pad) 16px; margin: 0;
  }
  .epa-nav.is-open { display: block; }
  .epa-nav ul { flex-direction: column; gap: 0; }
  .epa-nav a { padding: 11px 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .epa-head__bar { position: relative; gap: 12px; }
  .epa-cart { order: 3; }
  .epa-matrix--full { grid-template-columns: minmax(0, 1fr); }
  .epa-spec__row { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .epa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  /* at ~164px the price and button cannot sit side by side, so stack them
     deliberately with a full-width button rather than letting it wrap */
  .epa-card__foot { flex-direction: column; align-items: stretch; gap: 9px; padding-top: 10px; }
  .epa-card .epa-card__foot a.button { width: 100%; text-align: center; padding: 10px 12px; }
  .epa-card__body { padding: 12px 12px 13px; gap: 5px; }
  .epa-card__name { font-size: 15.5px; }
  .epa-card__price { font-size: 16px; }
  .epa-card__size, .epa-card__test { font-size: 11.5px; }
  /* comfortable thumb targets */
  .epa-fchip { padding: 9px 14px; font-size: 13px; }
  .epa-filters__search { padding: 13px 15px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
}
@media (max-width: 380px) {
  .epa-brand__tag { display: none; }
}
