:root {
  --page: #080a0d;
  --ink: #f6f7f9;
  --panel: #11151c;
  --surface: #0d1117;
  --line: #29313d;
  --muted: #9aa4b2;
  --text: #f6f7f9;
  --paper: #151a22;
  --orange: #ff6a00;
  --blue: #4d8dff;
  --lavender: #bda7ff;
  --radius: 8px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 72% 8%, rgba(77, 141, 255, 0.14), transparent 28rem),
    radial-gradient(circle at 18% 0%, rgba(255, 106, 0, 0.13), transparent 24rem),
    var(--page);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.disclaimer-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(16, 20, 26, 0.1);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: min(48vw, 340px);
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
  overflow: hidden;
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 28px);
  color: #535d6b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.primary-nav a {
  transition: color 160ms ease;
}

.primary-nav a:hover {
  color: var(--orange);
}

.primary-nav [data-logout] {
  padding: 7px 10px;
  border: 1px solid rgba(16, 20, 26, 0.14);
  border-radius: var(--radius);
}

.button {
  border: 1px solid rgba(16, 20, 26, 0.14);
  border-radius: var(--radius);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.disclaimer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 32px);
  background: rgba(8, 10, 13, 0.82);
  backdrop-filter: blur(18px);
}

.disclaimer-card {
  width: min(100%, 620px);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: #11151c;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.disclaimer-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 7vw, 2.4rem);
  line-height: 1;
}

.disclaimer-card p:not(.eyebrow) {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.disclaimer-confirm {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: #d8dde5;
  line-height: 1.55;
}

.disclaimer-confirm input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--orange);
}

.disclaimer-accept {
  width: 100%;
  min-height: 44px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: 460px;
  padding: clamp(42px, 6vw, 72px) clamp(16px, 5vw, 56px) 24px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 10% 4% auto auto;
  width: min(52vw, 760px);
  height: min(52vw, 760px);
  border: 1px solid rgba(16, 20, 26, 0.08);
  transform: rotate(28deg);
  pointer-events: none;
}

.hero-content,
.signal-bar {
  position: relative;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.92;
  font-weight: 800;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3vw, 3.2rem);
  line-height: 0.96;
  font-weight: 800;
}

h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.hero-copy {
  max-width: 520px;
  color: #5f6a78;
  font-size: clamp(0.92rem, 1.2vw, 1.04rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover,
.catalog-card:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 20, 26, 0.28);
}

.button.primary {
  border-color: var(--orange);
  background: var(--orange);
  color: white;
}

.button.secondary {
  background: #ffffff;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.signal-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  margin-top: 18px;
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(16, 20, 26, 0.08);
}

.signal-bar div {
  padding: 15px;
  background: rgba(255, 255, 255, 0.92);
}

.signal-bar strong,
.signal-bar span {
  display: block;
}

.signal-bar strong {
  margin-bottom: 5px;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.signal-bar span {
  color: var(--muted);
  font-size: 0.72rem;
}

.cart-toast,
.catalog-add-banner {
  border: 1px solid rgba(78, 201, 116, 0.42);
  border-radius: var(--radius);
  background: #102217;
  color: #f6fff8;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.cart-toast {
  display: none;
}

.catalog-add-banner {
  display: none;
  margin: 0 auto 18px;
  width: min(520px, 100%);
  padding: 14px 16px;
  text-align: center;
  position: sticky;
  top: 64px;
  z-index: 50;
}

.catalog-add-banner.is-visible {
  display: block;
  animation: slideDownFade 0.3s ease;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-peptide-button {
  margin-bottom: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 10, 14, 0.82);
  backdrop-filter: blur(4px);
}

.modal-backdrop.hidden {
  display: none;
}

.modal-dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f1720, #182534);
  color: #f8fcff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #dce7f1;
  cursor: pointer;
  font-size: 1.4rem;
}

.peptide-request-form {
  margin-top: 8px;
}

.order-section,
.products-section,
.research-section,
.quality-section,
.about-section {
  padding: clamp(46px, 7vw, 76px) clamp(16px, 5vw, 56px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1fr);
  column-gap: clamp(20px, 4vw, 60px);
  row-gap: 8px;
  align-items: start;
  margin-bottom: 26px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
}

.section-heading h2 {
  grid-column: 1;
}

.section-heading p:last-child {
  grid-column: 2;
  grid-row: 2;
  color: #626d7b;
  line-height: 1.65;
}

.section-heading.compact {
  display: block;
  max-width: 760px;
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(180px, 220px);
  gap: 10px;
  align-items: end;
  margin: -4px 0 22px;
}

.catalog-controls label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.catalog-controls span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.catalog-controls input,
.catalog-controls select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: #0b0f15;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
}

.products-section > .section-heading {
  width: min(100%, 1160px);
  margin: 0 auto 26px;
}

.products-section > .catalog-controls {
  width: min(100%, 1160px);
  margin: -4px auto 22px;
}

.products-section > .catalog-add-banner,
.products-section > .product-grid {
  width: min(100%, 1160px);
  margin-left: auto;
  margin-right: auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  justify-content: center;
  gap: clamp(16px, 2vw, 24px);
}

.catalog-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
  max-width: 360px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 232, 226, 0.98)),
    #f4f1eb;
  color: #101318;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.catalog-card::before,
.catalog-card::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(16, 20, 26, 0.22);
  pointer-events: none;
}

.catalog-card::before {
  top: 12px;
  left: 12px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.catalog-card::after {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.catalog-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px 4px 20px;
  border-bottom: 0;
  color: #66707b;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.catalog-card-header::before {
  content: "";
  width: 42px;
  height: 2px;
  margin-top: 0.42rem;
  background: var(--accent);
}

.catalog-card-header span:first-child {
  margin-right: auto;
  color: #11151c;
}

.catalog-image {
  display: grid;
  place-items: end center;
  height: 246px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-bottom: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 78%, rgba(16, 20, 26, 0.16), transparent 7rem),
    transparent;
}

.catalog-image img {
  width: 100%;
  height: 282px;
  object-fit: contain;
  transform: translateY(-18px);
  filter: drop-shadow(0 20px 18px rgba(0, 0, 0, 0.2));
}

.catalog-details {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-height: 0;
  padding: 8px 20px 18px;
}

.catalog-title-block {
  display: grid;
  gap: 6px;
}

.catalog-product-body {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(118px, 0.88fr);
  gap: 8px;
  align-items: center;
}

.catalog-details h3 {
  margin-bottom: 0;
  color: #05070a;
  font-size: clamp(1.28rem, 1.9vw, 1.82rem);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.stock-flag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  margin-bottom: 0;
  padding: 0 8px;
  border: 1px solid rgba(16, 20, 26, 0.12);
  border-radius: 999px;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.in-stock {
  border-color: rgba(45, 125, 68, 0.24);
  background: rgba(45, 125, 68, 0.08);
  color: #2d7d44;
}

.out-stock {
  border-color: rgba(135, 45, 45, 0.22);
  background: rgba(135, 45, 45, 0.08);
  color: #872d2d;
}

.catalog-details p {
  margin: 0;
  color: #59626c;
  font-size: 0.72rem;
  line-height: 1.35;
}

.catalog-specs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.catalog-specs div {
  min-width: 0;
  padding: 0 0 6px;
  border-bottom: 1px solid rgba(16, 20, 26, 0.16);
  background: transparent;
}

.catalog-specs dt {
  margin-bottom: 3px;
  color: #6c737c;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.catalog-specs dd {
  margin: 0;
  color: #0f1318;
  font-size: 0.72rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.volume-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.volume-options legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.volume-options label {
  display: inline-flex;
  cursor: pointer;
  min-height: 40px;
}

.volume-options input {
  position: absolute;
  opacity: 0;
}

.volume-options span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(16, 20, 26, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: #0f1318;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.volume-options input:checked + span {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.volume-options input:disabled + span {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.62;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.catalog-card-footer {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.footer-order-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.footer-volume {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.footer-volume > span {
  color: #6c737c;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.footer-volume > .volume-options {
  justify-content: flex-end;
}

.footer-volume > :not(span):not(.volume-options) {
  color: #0f1318;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.price {
  width: fit-content;
  padding-top: 4px;
  border-top: 2px solid var(--accent);
  color: #161a20;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cart-add,
.text-button {
  border: 1px solid rgba(16, 20, 26, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.cart-add {
  min-height: 34px;
  padding: 0 13px;
  border-color: var(--accent);
}

.cart-add:hover,
.text-button:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 20, 26, 0.28);
}

.cart-add:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  border-color: rgba(16, 20, 26, 0.14);
  transform: none;
}

.order-section {
  background: var(--surface);
}

.order-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.order-panel p:not(.eyebrow) {
  color: #626d7b;
  line-height: 1.65;
}

.order-cart {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

/* Floating cart: on wider screens keep the order cart visible in the viewport
   like a shopping cart. On small screens it stays in-flow. */
@media (min-width: 980px) {
  .order-cart {
    position: fixed;
    right: clamp(16px, 3vw, 56px);
    top: 96px;
    width: min(360px, 26vw);
    max-height: calc(100vh - 140px);
    overflow: auto;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
    z-index: 40;
  }

  /* Ensure the main content doesn't sit underneath the fixed cart */
  main {
    padding-right: calc(min(360px, 26vw) + 48px);
  }

  /* Collapse the order panel layout so the cart is removed from flow cleanly */
  .order-panel {
    grid-template-columns: 1fr;
  }

  /* Remove the empty placeholder footer left behind by the fixed cart */
  .order-section {
    padding-top: 0;
    padding-bottom: 0;
    background: transparent;
  }
}

.order-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order-cart-header h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.text-button {
  min-height: 30px;
  padding: 0 10px;
}

.order-items {
  display: grid;
  gap: 8px;
  min-height: 48px;
}

.empty-order,
.order-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.order-message {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(16, 20, 26, 0.12);
  border-radius: var(--radius);
  background: #f7f8fa;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.order-contact {
  display: grid;
  gap: 8px;
}

.order-contact span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.order-contact input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(16, 20, 26, 0.12);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

/* Email display removed from UI; email still appended server-side */

.order-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(16, 20, 26, 0.08);
}

.order-item strong {
  font-size: 0.88rem;
}

.order-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quantity-control button,
.remove-item {
  display: grid;
  place-items: center;
  border: 1px solid rgba(16, 20, 26, 0.14);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

.quantity-control button {
  width: 28px;
  height: 28px;
}

.remove-item {
  width: 30px;
  height: 30px;
  font-size: 1rem;
}

.research-confirm {
  display: flex;
  gap: 10px;
  color: #535d6b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.research-confirm input {
  margin-top: 3px;
  accent-color: var(--orange);
}

.signal-button {
  width: 100%;
}

.research-section {
  background: var(--surface);
}

.panel {
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
}

.light-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 42px);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.light-panel p {
  color: #626d7b;
  line-height: 1.7;
}

.doc-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 20px;
}

.doc-list span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 900;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(16, 20, 26, 0.08);
}

.quality-grid article {
  min-height: 190px;
  padding: 20px;
  background: #ffffff;
}

.quality-index {
  display: block;
  margin-bottom: 28px;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 900;
}

.quality-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1fr);
  gap: clamp(20px, 4vw, 60px);
  align-items: center;
  border-top: 1px solid rgba(16, 20, 26, 0.1);
}

.about-section p:last-child {
  color: #626d7b;
  font-size: 0.98rem;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px clamp(16px, 5vw, 56px);
  border-top: 1px solid rgba(16, 20, 26, 0.1);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.splash-page,
.auth-page {
  min-height: 100vh;
}

.splash-shell,
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 56px);
}

.splash-shell {
  background:
    linear-gradient(110deg, rgba(255, 106, 0, 0.07), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(0, 107, 255, 0.08), transparent 30rem);
}

.splash-logo,
.auth-logo {
  position: fixed;
  top: clamp(16px, 3vw, 28px);
  left: clamp(16px, 3vw, 48px);
  width: min(68vw, 360px);
  max-height: 82px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.splash-panel,
.auth-panel {
  width: min(100%, 560px);
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.splash-panel h1,
.auth-panel h1 {
  margin-bottom: 16px;
}

.splash-panel p:not(.eyebrow),
.auth-panel p:not(.eyebrow) {
  color: #626d7b;
  line-height: 1.65;
}

.splash-login {
  margin-top: 18px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.auth-banner {
  margin-bottom: 18px;
  padding: 11px 12px;
  border: 1px solid rgba(45, 125, 68, 0.24);
  border-radius: var(--radius);
  background: rgba(45, 125, 68, 0.08);
  color: #2d7d44;
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-note {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 106, 0, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 106, 0, 0.12);
  color: rgba(16, 20, 26, 0.92);
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-note a {
  color: var(--orange);
  text-decoration: underline;
}

.auth-note-top {
  margin-bottom: 18px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(16, 20, 26, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.auth-form .button {
  width: 100%;
}

.hidden {
  display: none !important;
}

.admin-shell {
  padding: clamp(38px, 6vw, 72px) clamp(16px, 5vw, 56px);
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 420px);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: 28px;
}

.admin-hero h1 {
  margin-bottom: 14px;
}

.admin-hero p:not(.eyebrow) {
  color: #626d7b;
  line-height: 1.65;
}

.admin-token-form,
.admin-form,
.admin-edit-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
}

.admin-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-product-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.admin-product-form .image-path-field {
  grid-column: 1 / -1;
}

.admin-product-form input[type="color"],
.admin-edit-card input[type="color"] {
  width: 100%;
  min-height: 40px;
  padding: 4px;
}

.admin-token-form label,
.admin-form label,
.admin-edit-card label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.wide-field,
.admin-form .button,
.admin-edit-card > label,
.admin-edit-card .button,
.admin-actions {
  grid-column: 1 / -1;
}

.admin-token-form span,
.admin-form span,
.admin-edit-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-token-form input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-edit-card input,
.admin-edit-card select,
.admin-edit-card textarea,
.admin-table input,
.admin-table select,
.admin-table textarea {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(16, 20, 26, 0.14);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.copy-field .text-button {
  min-height: 36px;
  margin: 0;
  white-space: nowrap;
}

.table-copy-field {
  min-width: 340px;
}

.hash-value {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.admin-form textarea,
.admin-edit-card textarea,
.admin-table textarea {
  min-height: 92px;
  padding: 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
  resize: vertical;
}

.inline-form {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.inline-form .button {
  grid-column: auto;
  align-self: end;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-actions .button {
  width: auto;
}

.danger-button {
  border-color: rgba(198, 54, 45, 0.34);
  color: #b3261e;
}

.danger-button:hover {
  border-color: rgba(198, 54, 45, 0.6);
  background: #fff4f2;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
}

.admin-page-panel[data-admin-page="cards"] .admin-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.admin-page-panel[data-admin-page="cards"] .admin-panel {
  width: 100%;
}

.admin-page-panel[data-admin-page="cards"] .admin-panel.wide {
  grid-column: auto;
}

.admin-app {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.admin-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
}

.admin-tab {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-tab.is-active {
  border-color: var(--orange);
  background: var(--orange);
  color: white;
}

.admin-page-panel {
  display: none;
}

.admin-page-panel.is-active {
  display: block;
  min-width: 0;
}

.admin-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.admin-panel.wide {
  grid-column: 1 / -1;
}

.admin-product-create-panel {
  align-self: start;
}

.admin-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.admin-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  gap: 8px;
}

.search-group {
  flex: 1 1 260px;
}

.control-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.control-group input,
.control-group select {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font-size: 0.875rem;
}

.admin-product-list {
  display: grid;
  gap: 14px;
}

.admin-edit-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(140px, 1fr) minmax(110px, 0.7fr) 86px 130px;
  gap: 10px;
}

.admin-product-image-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(180px, 0.75fr);
  gap: 10px;
  align-items: end;
}

.admin-product-image-row img {
  width: 96px;
  height: 96px;
  padding: 8px;
  border: 1px solid rgba(16, 20, 26, 0.1);
  border-radius: var(--radius);
  background: #0b0f15;
  object-fit: contain;
}

.admin-table {
  overflow-x: auto;
  max-width: 100%;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(16, 20, 26, 0.08);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-table .text-button {
  margin-top: 8px;
  padding: 8px 10px;
}

.quote-price-detail {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

/* Dark theme surface overrides */
.site-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 13, 0.86);
}

.brand,
.splash-logo,
.auth-logo {
  border-color: transparent;
  background: transparent;
}

.primary-nav {
  color: var(--muted);
}

.primary-nav [data-logout],
.button,
.panel,
.catalog-card,
.order-cart,
.quality-grid,
.about-section,
.admin-token-form,
.admin-form,
.admin-edit-card,
.admin-tabs,
.admin-product-image-row img,
.admin-panel,
.splash-panel,
.auth-panel {
  border-color: rgba(255, 255, 255, 0.1);
}

.button:hover,
.catalog-card:hover,
.cart-add:hover,
.text-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.hero::before {
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-copy,
.section-heading p:last-child,
.order-panel p:not(.eyebrow),
.light-panel p,
.about-section p:last-child,
.splash-panel p:not(.eyebrow),
.auth-panel p:not(.eyebrow),
.admin-hero p:not(.eyebrow) {
  color: #aab3c0;
}

.button.secondary,
.signal-bar div,
.catalog-card,
.catalog-specs div,
.volume-options span,
.cart-add,
.text-button,
.order-cart,
.quantity-control button,
.remove-item,
.light-panel,
.quality-grid article,
.splash-panel,
.auth-panel,
.admin-token-form,
.admin-form,
.admin-edit-card,
.admin-tabs,
.admin-panel {
  background: var(--panel);
}

.signal-bar,
.catalog-specs,
.quality-grid {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.catalog-card {
  background:
    linear-gradient(180deg, rgba(20, 25, 33, 0.98), rgba(13, 17, 23, 0.96)),
    var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.catalog-card-header,
.catalog-image,
.order-item,
.admin-table th,
.admin-table td {
  border-color: rgba(255, 255, 255, 0.08);
}

.catalog-details p,
.empty-order,
.order-status,
.research-confirm {
  color: var(--muted);
}

.in-stock {
  border-color: rgba(78, 201, 116, 0.28);
  background: rgba(78, 201, 116, 0.12);
  color: #76e29b;
}

.out-stock {
  border-color: rgba(255, 116, 116, 0.26);
  background: rgba(255, 116, 116, 0.12);
  color: #ff9a9a;
}

.order-section,
.research-section {
  background: var(--surface);
}

.order-message,
.order-contact input,
.auth-form input,
.admin-token-form input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-edit-card input,
.admin-edit-card select,
.admin-edit-card textarea,
.admin-table input,
.admin-table select,
.admin-table textarea,
.control-group input,
.control-group select {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0b0f15;
  color: var(--text);
}

.auth-banner {
  border-color: rgba(78, 201, 116, 0.28);
  background: rgba(78, 201, 116, 0.12);
  color: #76e29b;
}

.splash-shell {
  background:
    linear-gradient(110deg, rgba(255, 106, 0, 0.1), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(77, 141, 255, 0.14), transparent 30rem),
    var(--page);
}

.site-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Product cards intentionally use light label styling against the dark catalog page. */
.catalog-card {
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 232, 226, 0.98)),
    #f4f1eb;
  color: #101318;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.22);
}

.catalog-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.catalog-card-header,
.catalog-image {
  border-color: rgba(16, 20, 26, 0.1);
}

.catalog-card-header {
  color: #66707b;
}

.catalog-card-header span:first-child,
.catalog-details h3,
.catalog-specs dd,
.price {
  color: #101318;
}

.catalog-details p {
  color: #59626c;
}

.catalog-specs {
  border-color: transparent;
  background: transparent;
}

.catalog-specs div {
  border-bottom-color: rgba(16, 20, 26, 0.16);
  background: transparent;
}

.catalog-specs dt,
.volume-options input:disabled + span {
  color: #6c737c;
}

.volume-options span,
.catalog-card .cart-add {
  border-color: rgba(16, 20, 26, 0.16);
  background: rgba(255, 255, 255, 0.52);
  color: #101318;
}

.catalog-card .cart-add {
  border-color: var(--accent);
}

.catalog-card .cart-add:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.76);
}

.catalog-card .in-stock {
  border-color: rgba(45, 125, 68, 0.24);
  background: rgba(45, 125, 68, 0.08);
  color: #2d7d44;
}

.catalog-card .out-stock {
  border-color: rgba(135, 45, 45, 0.22);
  background: rgba(135, 45, 45, 0.08);
  color: #872d2d;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
  }

  .hero,
  .section-heading,
  .catalog-controls,
  .admin-hero,
  .order-panel,
  .research-section,
  .about-section {
    grid-template-columns: 1fr;
  }

  .section-heading .eyebrow,
  .section-heading h2,
  .section-heading p:last-child {
    grid-column: auto;
    grid-row: auto;
  }

  .admin-grid,
  .quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-page-panel[data-admin-page="products"] .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 10px 14px;
  }

  .admin-page {
    overflow-x: hidden;
  }

  .admin-page .site-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-page .primary-nav {
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cart-toast {
    display: none;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .brand-subtitle {
    display: none;
  }

  .brand {
    width: min(70vw, 260px);
    height: 58px;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 3.8rem);
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
  }

  .hero-actions .button,
  .signal-bar,
  .quality-grid,
  .doc-list {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: minmax(0, min(100%, 360px));
  }

  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .catalog-card-footer,
  .order-item {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-order-controls {
    width: 100%;
    justify-content: space-between;
  }

  .footer-volume > .volume-options {
    justify-content: flex-start;
  }

  .catalog-product-body {
    grid-template-columns: 1fr;
  }

  .catalog-image {
    height: 244px;
    min-height: 0;
  }

  .catalog-image img {
    height: 274px;
    transform: translateY(-14px);
  }

  .admin-form,
  .admin-product-form,
  .inline-form,
  .admin-edit-row,
  .admin-product-image-row {
    grid-template-columns: 1fr;
  }

  .inline-form .button {
    grid-column: 1;
  }

  .admin-shell {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 28px 12px 40px;
  }

  .admin-hero {
    gap: 18px;
    margin-bottom: 18px;
  }

  .admin-hero h1 {
    font-size: clamp(2.3rem, 12vw, 3.2rem);
  }

  .admin-token-form,
  .admin-form,
  .admin-edit-card,
  .admin-panel {
    width: 100%;
    max-width: 100%;
    padding: 14px;
  }

  .admin-product-create-panel {
    padding: 14px;
  }

  .admin-product-form {
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .admin-product-form .wide-field,
  .admin-product-form .image-path-field,
  .admin-product-form .button {
    grid-column: 1;
  }

  .admin-product-form textarea {
    min-height: 116px;
  }

  .admin-product-form .button,
  .admin-product-edit-card .button {
    width: 100%;
  }

  .admin-app {
    gap: 14px;
    width: 100%;
    max-width: 100%;
  }

  .admin-page-panel,
  .admin-grid {
    width: 100%;
    max-width: 100%;
  }

  .admin-tabs {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-self: stretch;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tab {
    flex: 0 0 auto;
    max-width: 72vw;
    white-space: normal;
    text-align: center;
  }

  .admin-controls,
  .control-group,
  .control-group label,
  .admin-actions {
    display: grid;
    width: 100%;
  }

  .control-group label {
    align-items: stretch;
  }

  .control-group input,
  .control-group select,
  .admin-actions .button {
    width: 100%;
  }

  .admin-product-image-row {
    align-items: stretch;
  }

  .admin-product-image-row img {
    justify-self: center;
    width: min(42vw, 150px);
    max-width: 150px;
    height: 150px;
  }

  .admin-table {
    overflow: visible;
  }

  .admin-table table,
  .admin-table thead,
  .admin-table tbody,
  .admin-table tr,
  .admin-table th,
  .admin-table td {
    display: block;
  }

  .admin-table table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .admin-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .admin-table tr {
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .admin-table tr:first-child {
    border-top: 0;
  }

  .admin-table td {
    display: grid;
    grid-template-columns: minmax(82px, 34%) minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  .admin-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .admin-table td[data-label=""] {
    grid-template-columns: 1fr;
  }

  .admin-table td[data-label=""]::before {
    content: none;
  }

  .admin-table .text-button {
    width: 100%;
    margin-top: 0;
  }

}
