/*
Theme Name: Squire Bio Center
Theme URI: https://theme-spark-remix.lovable.app
Author: Squire Bio Center
Description: Fast, dependency-free dark "lab instrument" theme for research-compound catalogues. Hand-written CSS (no framework), zero jQuery, a Compounds custom post type with price/purity/size specs, printed-vial labels and instant client-side category filtering.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: squire-bio-center
Tags: dark, one-column, two-columns, custom-colors, custom-menu, e-commerce, translation-ready
*/

/* ---------- tokens ---------- */
:root {
  --bg: #0d100e;
  --fg: #f7f8f7;
  --surface: #191d1a;
  --surface-2: #1f2420;
  --line: #2b312d;
  --muted: #9aa39c;
  --accent: #b4ff39;
  --accent-fg: #0d100e;
  --radius: 12px;
  --wrap: 1280px;
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { border-color: var(--line); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.02em; }
::selection { background: var(--accent); color: var(--accent-fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .wrap { padding: 0 32px; } }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.mono { font-family: var(--mono); }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; z-index: 100;
  background: var(--accent); color: var(--accent-fg);
  padding: 8px 14px; border-radius: 6px; width: auto; height: auto; clip: auto;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--accent); color: var(--accent-fg);
  border: 0; border-radius: 8px; padding: 12px 22px;
  font-family: var(--display); font-weight: 600;
  transition: filter .15s ease;
}
.btn:hover { filter: brightness(.93); color: var(--accent-fg); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 12px; color: var(--muted);
  background: var(--surface);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(6px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { color: inherit; }
.mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 4px; background: var(--accent); color: var(--accent-fg);
  font-family: var(--display); font-weight: 700; font-size: 14px;
}
.brand-name { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .2em; }
.main-nav ul { display: none; gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
@media (min-width: 768px) { .main-nav ul { display: flex; } }
.header-tools { display: flex; align-items: center; gap: 12px; }
.header-tools .chip { display: none; }
@media (min-width: 640px) { .header-tools .chip { display: inline-flex; } }
.cart-btn { position: relative; padding: 9px 18px; }
.cart-count {
  position: absolute; top: -8px; right: -8px;
  display: none; place-items: center; min-width: 20px; height: 20px;
  border-radius: 999px; background: var(--fg); color: var(--bg);
  font-size: 11px; font-weight: 700; padding: 0 5px;
}
.cart-count.is-visible { display: grid; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; gap: 40px; align-items: end; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 2fr 1fr; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px; padding: 5px 13px;
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--accent);
}
.hero h1 {
  margin: 0; font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: .92; font-weight: 700;
}
.hero p.lede { margin: 24px 0 0; max-width: 34rem; font-size: 1.125rem; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 32px; }
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat b { font-family: var(--display); font-size: 1.875rem; }
.stat span { font-size: 14px; line-height: 1.25; color: var(--muted); }
.hero-img {
  aspect-ratio: 4 / 5; width: 100%; object-fit: cover;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}

/* ---------- trust strip ---------- */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.trust .wrap { display: grid; }
@media (min-width: 640px) { .trust .wrap { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .trust .wrap { grid-template-columns: repeat(4, 1fr); } }
.trust-item { padding: 24px 0; border-top: 1px solid var(--line); }
.trust-item:first-child { border-top: 0; }
@media (min-width: 640px) {
  .trust-item { padding: 24px; border-top: 0; border-left: 1px solid var(--line); }
  .trust-item:first-child, .trust-item:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (min-width: 1024px) {
  .trust-item:nth-child(3) { border-left: 1px solid var(--line); padding-left: 24px; }
}
.trust-item p { margin: 0; }
.trust-item .t { font-family: var(--display); font-size: 1.125rem; font-weight: 600; }
.trust-item .b { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* ---------- catalogue ---------- */
.catalogue { padding: 56px 0 80px; }
.cat-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.cat-head h2 { margin: 0; font-size: 1.875rem; font-weight: 700; }
.cat-head .sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.filters {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 32px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto; border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 16px; font-size: 14px; transition: color .15s, border-color .15s;
}
.filter:hover { color: var(--fg); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 500; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- product card ---------- */
.card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.card h3 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.price { font-family: var(--display); font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.was { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.spec { margin: 8px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.size {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 4px 10px; font-size: 11px; transition: color .15s;
}
.size:hover { color: var(--fg); }
.size[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.add {
  width: 100%; margin-top: 20px; padding: 13px 16px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-fg);
  font-family: var(--display); font-size: 14px; font-weight: 600;
  transition: filter .15s;
}
.add:hover { filter: brightness(.93); }
.card .sheet-link { display: block; margin-top: 8px; text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ---------- printed vial label ---------- */
.vial { position: relative; overflow: hidden; background: var(--bg); container-type: inline-size; }
.vial > img { width: 100%; height: 100%; object-fit: cover; }
.vial-label {
  position: absolute; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3%; padding: 0 1%; text-align: center;
  overflow: hidden; pointer-events: none;
}
.vial-label.lyo { left: 36.5%; top: 38.5%; width: 26.5%; height: 36%; }
.vial-label.liquid { left: 40.5%; top: 53.5%; width: 22.5%; height: 22.5%; }
.vial-label span { width: 100%; font-family: var(--mono); text-transform: uppercase; }
.vial-label .l-brand { font-size: clamp(7px, 1.5cqw, 14px); letter-spacing: .2em; color: #737373; }
.vial-label .l-name {
  font-family: var(--display); font-size: clamp(12px, 2.6cqw, 29px); font-weight: 700;
  line-height: 1.05; letter-spacing: -.01em; color: #171717; word-break: break-word;
}
.vial-label .l-rule { width: 75%; height: 1px; background: #a3a3a3; }
.vial-label .l-size { font-size: clamp(8px, 1.7cqw, 17px); font-weight: 600; letter-spacing: .12em; color: #404040; }
.vial-label .l-purity { font-size: clamp(7px, 1.45cqw, 14px); letter-spacing: .1em; color: #737373; }
.vial-label .l-rou { font-size: clamp(6px, 1.3cqw, 13px); letter-spacing: .1em; color: #a3a3a3; }
.vial-4x3 { aspect-ratio: 4 / 3; width: 100%; }

/* ---------- single compound ---------- */
.single-wrap { padding: 32px 0 80px; }
.crumbs { margin-bottom: 24px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.crumbs span.sep { padding: 0 8px; }
.crumbs .current { color: var(--fg); }
.product { display: grid; gap: 40px; }
@media (min-width: 1024px) { .product { grid-template-columns: 1fr 1fr; } }
.product .vial-4x3 { border: 1px solid var(--line); border-radius: var(--radius); }
.product h1 { margin: 8px 0 0; font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 700; }
.product .kicker { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.product .desc { margin-top: 12px; max-width: 60ch; font-size: 14px; color: var(--muted); }
.price-lg { font-family: var(--display); font-size: 1.875rem; font-weight: 700; color: var(--accent); }
.was-lg { font-size: 1rem; color: var(--muted); text-decoration: line-through; }
.size-lg { padding: 8px 16px; font-size: 14px; }
.size-lg[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: var(--accent); }
.add-lg { padding: 16px; }
.specs { width: 100%; margin-top: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-collapse: collapse; font-size: 14px; }
.specs tr + tr { border-top: 1px solid var(--line); }
.specs th, .specs td { padding: 12px 0; }
.specs th { text-align: left; font-weight: 400; color: var(--muted); }
.specs td { text-align: right; font-weight: 500; }
.related { padding: 64px 0; }
.related h2 { margin: 0 0 24px; font-size: 1.5rem; font-weight: 700; }

/* ---------- page / post content ---------- */
.entry { padding: 48px 0 80px; }
.entry h1 { font-size: clamp(2rem, 4vw, 3rem); }
.entry-content { max-width: 70ch; }
.entry-content a { color: var(--accent); text-decoration: underline; }
.entry-content blockquote { margin: 24px 0; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--muted); }
.entry-content code, .entry-content pre { font-family: var(--mono); background: var(--surface); border-radius: 6px; }
.entry-content pre { padding: 16px; overflow: auto; }
.entry-content img, .entry-content figure { border-radius: var(--radius); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 32px 20px;
}
@media (min-width: 640px) { .site-footer .wrap { flex-direction: row; align-items: center; justify-content: space-between; } }
.site-footer .legal { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px);
  background: var(--surface-2); color: var(--fg);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 8px; padding: 12px 18px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
.site-footer .wrap { align-items: flex-start; }
.site-nap { font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.7; }
.site-nap span { display: block; }
.site-nap .nap-label { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg); margin-bottom: 4px; }
.site-nap .nap-name { color: var(--fg); }
.site-nap a { color: inherit; text-decoration: none; }
.site-nap a:hover { color: var(--accent); }
