/*
Theme Name: Nexum Clinical
Theme URI: https://nexumpeptides.co.uk
Author: Nexum Peptides
Description: A restrained, science-led WooCommerce theme for the Nexum research catalogue.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: nexum-clinical
*/

:root {
  --nx-ink: #12272a;
  --nx-muted: #657477;
  --nx-paper: #f5f7f4;
  --nx-white: #ffffff;
  --nx-line: #d8e0dd;
  --nx-accent: #0c777b;
  --nx-accent-dark: #07585c;
  --nx-mist: #dfeeed;
  --nx-dark: #0d2528;
  --nx-radius: 14px;
  --nx-shadow: 0 18px 48px rgba(13, 37, 40, .08);
  --nx-width: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--nx-ink);
  background: var(--nx-paper);
  font-family: "DM Sans", "Avenir Next", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.nx-shell { width: min(calc(100% - 40px), var(--nx-width)); margin-inline: auto; }
.nx-kicker {
  margin: 0 0 12px; color: var(--nx-accent); font-size: 12px;
  font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.nx-button, .button, button.button, input.button, .wp-element-button {
  display: inline-flex !important; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px !important; border: 1px solid var(--nx-accent) !important;
  border-radius: 999px !important; background: var(--nx-accent) !important;
  color: #fff !important; font-weight: 700 !important; line-height: 1 !important;
  cursor: pointer; transition: .2s ease !important;
}
.nx-button:hover, .button:hover, button.button:hover, input.button:hover {
  transform: translateY(-1px); background: var(--nx-accent-dark) !important;
}
.nx-button--ghost {
  background: transparent !important; color: var(--nx-ink) !important;
  border-color: var(--nx-line) !important;
}

.nx-notice {
  padding: 9px 20px; background: var(--nx-dark); color: #dce9e7;
  text-align: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.nx-header {
  position: sticky; top: 0; z-index: 50; background: rgba(245,247,244,.94);
  border-bottom: 1px solid var(--nx-line); backdrop-filter: blur(14px);
}
.admin-bar .nx-header { top: 32px; }
.nx-header__inner {
  min-height: 82px; display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 38px;
}
.nx-brand { display: inline-flex; align-items: center; gap: 12px; }
.nx-brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--nx-ink); color: white; font-weight: 700; letter-spacing: -.03em;
}
.nx-brand__name { display: block; font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
.nx-brand__sub { display: block; color: var(--nx-muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.nx-nav ul { display: flex; justify-content: center; gap: 30px; margin: 0; padding: 0; list-style: none; }
.nx-nav a { font-size: 14px; font-weight: 600; }
.nx-nav a:hover { color: var(--nx-accent); }
.nx-header__actions { display: flex; align-items: center; gap: 10px; }
.nx-cart {
  min-width: 72px; padding: 10px 14px; border: 1px solid var(--nx-line);
  border-radius: 999px; font-size: 13px; font-weight: 700; text-align: center;
}
.nx-menu-toggle { display: none; border: 0; background: transparent; padding: 8px; color: var(--nx-ink); }

.nx-hero { padding: 72px 0 46px; overflow: hidden; }
.nx-hero__grid { display: grid; grid-template-columns: 1.03fr .97fr; gap: 70px; align-items: center; }
.nx-hero h1 {
  max-width: 700px; margin: 0 0 24px; font-family: "Manrope", "Avenir Next", sans-serif;
  font-size: clamp(48px, 6.3vw, 88px); line-height: .96; letter-spacing: -.065em;
}
.nx-hero h1 span { color: var(--nx-accent); }
.nx-hero__copy { max-width: 570px; margin: 0 0 30px; color: var(--nx-muted); font-size: 18px; }
.nx-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.nx-stage {
  position: relative; min-height: 570px; display: grid; place-items: center;
  border-radius: 40% 40% 18px 18px; background: linear-gradient(145deg, #eaf1ef, #cfe2df);
}
.nx-stage::before, .nx-stage::after {
  content: ""; position: absolute; border: 1px solid rgba(12,119,123,.28); border-radius: 50%;
}
.nx-stage::before { width: 76%; aspect-ratio: 1; }
.nx-stage::after { width: 52%; aspect-ratio: 1; }
.nx-stage img {
  position: relative; z-index: 2; width: min(74%, 410px); max-height: 470px;
  object-fit: contain; filter: drop-shadow(0 26px 26px rgba(18,39,42,.18));
}
.nx-stage__label {
  position: absolute; z-index: 3; right: 22px; bottom: 22px; max-width: 230px;
  padding: 14px 18px; border: 1px solid rgba(255,255,255,.8); border-radius: 14px;
  background: rgba(255,255,255,.82); box-shadow: var(--nx-shadow); backdrop-filter: blur(10px);
}
.nx-stage__label strong { display: block; font-size: 14px; }
.nx-stage__label span { display: block; color: var(--nx-muted); font-size: 12px; }

.nx-trust { padding: 18px 0 54px; }
.nx-trust__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius); background: var(--nx-white);
}
.nx-trust__item { padding: 22px 24px; }
.nx-trust__item + .nx-trust__item { border-left: 1px solid var(--nx-line); }
.nx-trust__item strong { display: block; font-size: 14px; }
.nx-trust__item span { color: var(--nx-muted); font-size: 13px; }

.nx-section { padding: 78px 0; }
.nx-section--white { background: var(--nx-white); }
.nx-section--dark { background: var(--nx-dark); color: #f2f6f4; }
.nx-section__head {
  display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px;
}
.nx-section__head h2 {
  max-width: 780px; margin: 0; font-family: "Manrope", "Avenir Next", sans-serif;
  font-size: clamp(34px, 4vw, 58px); line-height: 1.02; letter-spacing: -.05em;
}
.nx-text-link { color: var(--nx-accent); font-size: 14px; font-weight: 700; border-bottom: 1px solid currentColor; }

.nx-products, .woocommerce ul.products {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px !important; margin: 0 !important; padding: 0 !important;
}
.nx-products .product, .woocommerce ul.products li.product {
  float: none !important; width: auto !important; margin: 0 !important; padding: 0 0 20px !important;
  overflow: hidden; border: 1px solid var(--nx-line); border-radius: var(--nx-radius);
  background: var(--nx-white); transition: transform .22s ease, box-shadow .22s ease;
}
.nx-products .product:hover, .woocommerce ul.products li.product:hover {
  transform: translateY(-4px); box-shadow: var(--nx-shadow);
}
.nx-product__media, .woocommerce ul.products li.product > a:first-child {
  position: relative; display: block; aspect-ratio: 1 / 1.06; overflow: hidden;
  background: #edf2ef;
}
.nx-product__media img, .woocommerce ul.products li.product a img {
  width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover;
  transition: transform .45s ease;
}
.nx-product__media:hover img { transform: scale(1.035); }
.nx-code-tile {
  height: 100%; display: grid; align-content: center; justify-items: center;
  background: radial-gradient(circle at 50% 25%, #f9fffd, #dcebe8);
}
.nx-code-tile small { color: var(--nx-muted); letter-spacing: .16em; text-transform: uppercase; }
.nx-code-tile strong { margin-top: 4px; font-size: clamp(27px, 3vw, 42px); letter-spacing: -.05em; }
.nx-product__body { padding: 18px 18px 0; }
.nx-product__meta { margin: 0 0 6px; color: var(--nx-accent); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nx-product__title, .woocommerce ul.products li.product .woocommerce-loop-product__title {
  min-height: 49px; margin: 0 0 10px !important; padding: 0 !important;
  color: var(--nx-ink); font-size: 16px !important; line-height: 1.35; font-weight: 700;
}
.nx-product__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nx-product__price, .woocommerce ul.products li.product .price {
  margin: 0 !important; color: var(--nx-ink) !important; font-size: 15px !important; font-weight: 700 !important;
}
.nx-product__arrow {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--nx-mist); color: var(--nx-accent); font-size: 18px;
}
.woocommerce ul.products li.product .button { margin: 12px 18px 0 !important; }
.woocommerce span.onsale { min-height: auto; min-width: auto; padding: 7px 10px; background: var(--nx-accent); line-height: 1; }

.nx-protocol { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; }
.nx-protocol h2 { margin: 0 0 20px; font-size: clamp(34px, 4vw, 58px); line-height: 1.02; letter-spacing: -.05em; }
.nx-protocol p { color: #b9cac8; }
.nx-steps { display: grid; gap: 1px; overflow: hidden; border: 1px solid #284649; border-radius: var(--nx-radius); background: #284649; }
.nx-step { display: grid; grid-template-columns: 46px 1fr; gap: 18px; padding: 22px; background: var(--nx-dark); }
.nx-step__number { color: #70c3c1; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.nx-step strong { display: block; margin-bottom: 3px; }
.nx-step span { color: #9fb4b2; font-size: 14px; }

.nx-catalog-hero { padding: 62px 0 38px; }
.nx-catalog-hero h1 { margin: 0 0 12px; font-size: clamp(44px, 7vw, 76px); line-height: 1; letter-spacing: -.055em; }
.nx-catalog-hero p { max-width: 600px; color: var(--nx-muted); }
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { margin-bottom: 28px; }
.woocommerce .woocommerce-ordering select, select, input.input-text, textarea {
  min-height: 46px; padding: 9px 14px; border: 1px solid var(--nx-line); border-radius: 10px;
  background: var(--nx-white); color: var(--nx-ink);
}
.woocommerce nav.woocommerce-pagination { margin: 42px 0; }

.nx-main { min-height: 60vh; padding: 56px 0 90px; }
.woocommerce div.product { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.woocommerce div.product div.images, .woocommerce div.product div.summary { float: none; width: auto; }
.woocommerce div.product .product_title { font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.05em; }
.woocommerce div.product p.price { color: var(--nx-accent); font-size: 24px; }
.woocommerce-message, .woocommerce-info {
  border-top-color: var(--nx-accent); background: white; border-radius: var(--nx-radius);
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--nx-accent); }

.nx-footer { padding: 64px 0 28px; background: #081c1e; color: #d9e5e3; }
.nx-footer__grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 60px; padding-bottom: 54px; }
.nx-footer h2 { max-width: 520px; margin: 0; font-size: clamp(32px, 4vw, 54px); line-height: 1; letter-spacing: -.05em; }
.nx-footer h3 { margin: 0 0 14px; color: #7aa6a4; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.nx-footer ul { margin: 0; padding: 0; list-style: none; }
.nx-footer li { margin: 7px 0; }
.nx-footer a:hover { color: #77c8c5; }
.nx-footer__bottom {
  display: flex; justify-content: space-between; gap: 20px; padding-top: 22px;
  border-top: 1px solid #20383a; color: #7f9795; font-size: 12px;
}

@media (max-width: 980px) {
  .nx-nav { display: none; position: fixed; inset: 117px 0 0; padding: 34px 24px; background: var(--nx-paper); }
  .nx-nav.is-open { display: block; }
  .nx-nav ul { display: grid; justify-content: start; gap: 22px; }
  .nx-nav a { font-size: 24px; }
  .nx-menu-toggle { display: inline-block; }
  .nx-header__inner { grid-template-columns: 1fr auto auto; gap: 12px; }
  .nx-hero__grid, .nx-protocol { grid-template-columns: 1fr; gap: 40px; }
  .nx-stage { min-height: 480px; }
  .nx-products, .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .woocommerce div.product { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 700px) {
  .admin-bar .nx-header { top: 46px; }
  .nx-shell { width: min(calc(100% - 28px), var(--nx-width)); }
  .nx-notice { font-size: 10px; }
  .nx-header__inner { min-height: 70px; }
  .nx-brand__sub { display: none; }
  .nx-cart { min-width: auto; padding: 8px 11px; }
  .nx-hero { padding-top: 42px; }
  .nx-hero h1 { font-size: clamp(45px, 14vw, 65px); }
  .nx-hero__copy { font-size: 16px; }
  .nx-stage { min-height: 390px; border-radius: 34% 34% 16px 16px; }
  .nx-trust__grid { grid-template-columns: 1fr; }
  .nx-trust__item + .nx-trust__item { border-left: 0; border-top: 1px solid var(--nx-line); }
  .nx-section { padding: 58px 0; }
  .nx-section__head { align-items: start; flex-direction: column; }
  .nx-products, .woocommerce ul.products { grid-template-columns: 1fr 1fr; gap: 10px !important; }
  .nx-product__body { padding: 13px 13px 0; }
  .nx-product__title, .woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: 43px; font-size: 14px !important; }
  .nx-product__meta { font-size: 9px; }
  .nx-footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .nx-footer__bottom { flex-direction: column; }
}

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