:root {
  --btn-radius: 4px;
  --cta: #1771a1;
  --cta-text: #ffffff;
  --btn-hover: #1580ae;
  --btn-shadow: 0 8px 22px rgba(23, 113, 161, 0.28);
  --focus-ring: #4aa3c9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  font-weight: 650;
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn-sm {
  min-height: 40px;
  padding: 0.5rem 0.95rem;
  font-size: 0.75rem;
}

.btn-primary,
a.btn-primary {
  background: var(--cta);
  color: var(--cta-text);
  text-decoration: none;
  box-shadow: var(--btn-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.btn-primary:hover,
a.btn-primary:hover {
  background: var(--btn-hover);
  color: var(--cta-text);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(23, 113, 161, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-ghost,
.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong, rgba(255, 255, 255, 0.16));
  color: var(--text, #eef1f5);
  box-shadow: none;
}

.btn-outline {
  background: transparent;
}

.btn-ghost:hover,
.btn-outline:hover {
  border-color: var(--steel-bright, #c8d4e0);
  color: var(--steel-bright, #c8d4e0);
  transform: none;
}

.btn:focus-visible,
.nav-text:focus-visible,
.product-view:focus-visible,
a.product-media:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.size:focus-visible,
.dose:focus-visible,
.qty button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.nav-actions {
  gap: 0.85rem;
}

.nav-text {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted, #8491a0);
  text-decoration: none;
  padding: 0.35rem 0.1rem;
}

.nav-text:hover {
  color: var(--text, #eef1f5);
}

a.product-media {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* Cards clip to the rounded photo. Safari then treats the card as shrinkable
   and gives a flex:1 button the whole action row, which pushes View details
   outside the card. min-height keeps the card as tall as its content. */
.product {
  min-height: min-content;
}

.product-body {
  flex: 1 1 auto;
  min-width: 0;
}

.product-actions {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem 0.7rem;
  min-width: 0;
}

.product-actions .btn,
.product-actions .product-soon {
  flex: none;
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.product-actions .product-soon {
  text-align: center;
}

.product-view {
  flex: none;
  min-width: max-content;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted, #8491a0);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.product-view:hover {
  color: var(--text, #eef1f5);
}

.teaser-body .product-view {
  display: inline-block;
  margin-top: 0.85rem;
}

.size,
.dose,
.qty,
.search-form input,
.search-form select,
.toolbar input,
.toolbar select,
.coa-lookup input {
  border-radius: var(--btn-radius);
}

.buy-hint {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted, #8491a0);
  margin: 0.45rem 0 0.75rem;
}

.search-form input,
.toolbar input,
.toolbar select {
  min-height: 40px;
}

.size.active,
.dose.active {
  color: var(--cta-text);
}

.size.active small,
.dose.active small {
  color: var(--cta-text);
  opacity: 0.75;
}

html.size-drawer-open,
html.size-drawer-open body {
  overflow: hidden;
}

.size-scrim {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.size-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

.size-drawer {
  position: fixed;
  z-index: 250;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: var(--bg-card, var(--bg-elev, #161c26));
  color: var(--text);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  transform: translateX(104%);
  transition: transform 0.28s ease;
}

.size-drawer.open {
  transform: translateX(0);
}

.size-drawer[hidden],
.size-scrim[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .size-drawer {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 92vh;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    transform: translateY(104%);
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.28);
  }

  .size-drawer.open {
    transform: translateY(0);
  }
}

.size-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.size-drawer-head h2 {
  font-family: var(--display, inherit);
  font-size: 1.05rem;
  margin: 0;
}

.size-drawer-close {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev, var(--bg));
  color: var(--text);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.size-drawer-body {
  padding: 1.15rem;
  overflow: auto;
}

.size-drawer-product {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  align-items: center;
}

.size-drawer-product img,
.size-drawer-img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--card-radius, 8px);
  background: var(--bg-elev, #0a0c10);
}

.size-drawer-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.size-drawer-product h3 {
  font-family: var(--display, inherit);
  font-size: 1.25rem;
  margin: 0.15rem 0;
}

.size-drawer-price {
  font-weight: 800;
  font-size: 1.15rem;
}

.size-drawer .select-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.size-drawer-doses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.size-drawer .dose {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.8rem 0.5rem;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev, var(--bg));
  border-radius: var(--btn-radius);
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.size-drawer .dose small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.size-drawer .dose.active {
  background: var(--cta);
  color: var(--cta-text);
  border-color: var(--cta);
}

.size-drawer .dose.active small {
  color: var(--cta-text);
  opacity: 0.85;
}

.size-drawer-hint {
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.2em;
  margin: 0 0 0.85rem;
}

.size-drawer-actions {
  display: grid;
  gap: 0.5rem;
}

.size-drawer-actions .btn {
  width: 100%;
}

.size-drawer .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.co-go:disabled,
.co-go:disabled:hover {
  background: #8b95a3;
  color: #f4f6f8;
  border-color: transparent;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 1;
  pointer-events: none;
}

.cart-dose {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.cart-dose select {
  background: var(--bg-elev, var(--bg));
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--btn-radius, 4px);
  padding: 0.4rem 0.55rem;
  font-weight: 700;
  font-size: 0.82rem;
  min-height: 36px;
}

/* === Storefront components (trust, proof, sticky buy, footer) === */
:root {
  --u-panel: #161c26; --u-line: rgba(255,255,255,0.09); --u-line-strong: rgba(255,255,255,0.16);
  --u-text: #eef1f5; --u-muted: #8491a0; --u-accent: #4aa3c9; --u-ok: #6ec4a8; --u-soft: rgba(23,113,161,0.12);
  --u-footer-bg: #07090c; --u-footer-text: #8491a0; --u-footer-head: #eef1f5;
  --u-radius: 6px; --u-bar-bg: rgba(10,13,17,0.96);
}

/* Product page: offer + COA proof next to the price */
.pdp-offer {
  margin: 0.2rem 0 1rem; padding: 0.7rem 0.85rem; border-radius: var(--u-radius);
  background: var(--u-soft); border: 1px solid var(--u-line); font-size: 0.86rem; line-height: 1.45; color: var(--u-text);
}
.pdp-offer span { color: var(--u-muted); }
.pdp-proof {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem;
  margin: 0 0 1.1rem; font-size: 0.84rem; color: var(--u-muted);
}
.pdp-proof strong { color: var(--u-ok); font-size: 0.92rem; }
.pdp-proof a { color: var(--u-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* Product page: sticky add-to-cart on phones */
.sticky-buy { display: none; }
@media (max-width: 760px) {
  .sticky-buy {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background: var(--u-bar-bg); border-top: 1px solid var(--u-line-strong);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transform: translateY(110%); transition: transform 0.2s ease;
  }
  .sticky-buy.show { transform: translateY(0); }
  .sticky-buy-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
  .sticky-buy-info strong { font-size: 0.95rem; color: var(--u-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sticky-buy-info span { font-size: 0.78rem; color: var(--u-muted); }
  .sticky-buy .btn { flex-shrink: 0; min-height: 46px; }
  body.has-sticky-buy { padding-bottom: 76px; }
  body.has-sticky-buy .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Home: live COA proof section */
.proof-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem 2rem; align-items: center;
  margin-top: 1.4rem; padding: 1.4rem 1.5rem; background: var(--u-panel);
  border: 1px solid var(--u-line); border-radius: var(--u-radius);
}
.proof-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; list-style: none; }
.proof-facts li { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; color: var(--u-muted); }
.proof-facts strong { font-size: 1.05rem; color: var(--u-text); word-break: break-word; }
.proof-facts li:first-child strong { color: var(--u-ok); }
.proof-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
@media (max-width: 860px) {
  .proof-card { grid-template-columns: 1fr; }
  .proof-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Shop: compact list of compounds that are not for sale yet */
.restock { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--u-line); }
.restock h2 { font-size: 1.05rem; margin-bottom: 0.35rem; color: var(--u-text); }
.restock p { font-size: 0.86rem; color: var(--u-muted); margin-bottom: 0.8rem; }
.restock ul { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; }
.restock a {
  display: inline-flex; padding: 0.4rem 0.75rem; border: 1px solid var(--u-line-strong); border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; color: var(--u-text); text-decoration: none;
}
.restock a:hover { border-color: var(--u-accent); color: var(--u-accent); }

/* One footer on every page */
footer.site-footer {
  background: var(--u-footer-bg); color: var(--u-footer-text); border-top: 1px solid var(--u-line);
  padding: 3rem 0 1.5rem; margin-top: 0; font-size: 0.84rem;
}
.site-footer .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (max-width: 800px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font-size: 0.9rem; margin: 0 0 0.75rem; color: var(--u-footer-head); }
.site-footer p, .site-footer li { font-size: 0.84rem; color: var(--u-footer-text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--u-footer-head); }
.site-footer .footer-bottom { border-top: 1px solid var(--u-line); padding-top: 1.15rem; font-size: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer .footer-bottom p { font-size: 0.75rem; max-width: 72ch; }

/* Ironspire checkout: keep the sharp corners used everywhere else on the shop */
.co-field input, .co-field select, .co-pay, .co-sum, .co-coupon input, .co-coupon .btn,
.co-go, .co-ship, .co-trust div, .co-deal, .co-item img, .co-mobile-total {
  border-radius: var(--btn-radius, 4px) !important;
}
.co-num { border-radius: 2px; }

/* Cart */
body.cart-page {
  background:
    radial-gradient(ellipse 48% 22% at 10% 0%, color-mix(in srgb, var(--cta) 18%, transparent), transparent 62%),
    var(--bg);
}
.cart-kicker {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent, var(--cta)); margin-bottom: 0.45rem;
}
.cart-promo {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; flex-wrap: wrap;
  background: var(--u-soft); border: 1px solid color-mix(in srgb, var(--cta) 35%, transparent);
  border-left: 3px solid var(--cta); padding: 0.85rem 1.05rem; border-radius: var(--card-radius, 6px);
  margin: 0 0 1.15rem; font-size: 0.9rem; font-weight: 600;
}
.cart-promo span { color: var(--muted); font-weight: 500; font-size: 0.82rem; }
.cart-line {
  grid-template-columns: 76px minmax(0, 1fr) auto auto;
  gap: 0.85rem 1rem; align-items: center; padding: 1rem 0.15rem;
}
.cart-thumb {
  width: 76px; height: 76px; border-radius: 6px; overflow: hidden; display: block;
  background: #0a0c10; border: 1px solid var(--line);
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-cat {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.cart-lot { font-size: 0.72rem; font-weight: 600; color: var(--accent, var(--cta)); margin-top: 0.1rem; }
.cart-fill { font-size: 0.8rem; font-weight: 700; color: var(--ok); margin-top: 0.15rem; }
.cart-meta { color: var(--muted); font-size: 0.78rem; display: block; margin-top: 0.15rem; }
.cart-line-price { text-align: right; }
.cart-line-price strong { font-size: 1.02rem; }
.cart-sum .btn-primary { width: 100%; margin-top: 0.35rem; }
.cart-ship { margin: 0.85rem 0 0.35rem; }
.cart-ship-label { font-size: 0.84rem; font-weight: 700; }
.cart-ship.free .cart-ship-label { color: var(--ok); }
.cart-ship-track { height: 6px; margin-top: 0.45rem; background: var(--line); border-radius: 99px; overflow: hidden; }
.cart-ship-bar { height: 100%; background: var(--cta); border-radius: 99px; }
.cart-ship.free .cart-ship-bar { background: var(--ok); }
.cart-ship-note { color: var(--muted); font-size: 0.78rem; margin-top: 0.4rem; }
.cart-sum .note {
  color: var(--text); font-weight: 600; background: var(--u-soft); border: 1px solid var(--line);
  border-radius: var(--card-radius, 8px); padding: 0.7rem 0.8rem;
}
.cart-codes { color: var(--muted); font-size: 0.8rem; margin: 0.7rem 0 0.85rem; }
.cart-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.95rem; }
.cart-trust div {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--card-radius, 8px); padding: 0.7rem 0.75rem;
}
.cart-trust strong { display: block; font-size: 0.78rem; line-height: 1.3; margin-bottom: 0.25rem; }
.cart-trust small { display: block; color: var(--muted); font-size: 0.72rem; line-height: 1.4; font-weight: 500; }
.cart-dots {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.75rem; list-style: none;
  margin: 0.85rem 0 0; padding: 0; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.cart-dots li::before { content: "• "; color: var(--cta); }
.cart-more { padding: 0.5rem 0 3rem; }
.cart-more-head { margin-bottom: 1rem; }
.cart-more-head h2 { font-family: var(--display); font-size: clamp(1.35rem, 2vw, 1.7rem); letter-spacing: -0.02em; }
.cart-more .products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cart-more .product-media { aspect-ratio: 1; background: #0a0c10; position: relative; display: block; }
.cart-more .product-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-more .product-lot { font-size: 0.7rem; color: var(--accent, var(--cta)); font-weight: 600; }
.cart-more .product-fill { font-size: 0.78rem; color: var(--ok); font-weight: 600; }
.cart-more .product-view { font-size: 0.78rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.cart-badge {
  position: absolute; top: 0.65rem; left: 0.65rem;
  background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
  font-size: 0.68rem; font-weight: 700; padding: 0.28rem 0.5rem; border-radius: 2px;
}
@media (max-width: 800px) {
  .cart-more .products { grid-template-columns: 1fr; }
  .cart-trust { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cart-line { grid-template-columns: 64px minmax(0, 1fr); }
  .cart-thumb { width: 64px; height: 64px; }
  .cart-line .qty, .cart-line-price { grid-column: 2; justify-self: start; }
  .cart-line-price { text-align: left; }
}

/* Home nav is the source of truth. Page stylesheets copy an older bar
   (lighter search field, taller buttons, different spacing). These rules
   load last so Shop, FAQ, and the rest keep the home bar. */
.nav {
  background: rgba(10, 13, 17, 0.92);
}
.nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  flex-wrap: wrap;
  width: min(1160px, calc(100% - 2.5rem));
}
.nav .logo {
  gap: 0.65rem;
  font-size: 1.15rem;
  margin-right: 0;
}
.nav .nav-links {
  gap: 1.4rem;
  font-size: 0.86rem;
}
.nav .search-form {
  display: flex;
  flex: 1;
  min-width: 160px;
  max-width: 280px;
  gap: 0.35rem;
}
.nav .search-form input {
  flex: 1;
  width: auto;
  min-width: 0;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.16));
  color: inherit;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  font: inherit;
}
.nav .search-form input::placeholder {
  color: var(--muted, #8491a0);
  opacity: 0.9;
}
.toolbar select,
.toolbar input,
#liveQ {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.16));
  color: var(--text, #eef1f5);
  border-radius: 4px;
}
#liveQ {
  min-width: 220px;
  padding: 0.55rem 0.75rem;
}
@media (max-width: 900px) {
  .nav .nav-links { display: none; }
  .nav .search-form {
    max-width: none;
    flex: 1 1 100%;
    order: 5;
  }
}
