: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;
}

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(40vw, 280px);
  height: 46px;
  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;
}

.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);
  }
}
.order-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;
}

.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: 18px 20px 8px 24px;
  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: center;
  min-height: 230px;
  margin: 0;
  padding: 0;
  border-bottom: 0;
  background:
    radial-gradient(circle at 50% 78%, rgba(16, 20, 26, 0.16), transparent 7rem),
    transparent;
}

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

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

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

.catalog-product-body {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(118px, 0.88fr);
  gap: 12px;
  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.45;
}

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

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

.catalog-specs dt {
  margin-bottom: 4px;
  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: 5px;
  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;
}

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

.volume-options span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(16, 20, 26, 0.16);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.52);
  color: #0f1318;
  font-size: 0.62rem;
  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: space-between;
  gap: 14px;
  padding-top: 6px;
}

.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;
  }

  /* Collapse button at top-left corner */
  .cart-collapse-button {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(78, 201, 116, 0.32);
    border-radius: var(--radius);
    background: rgba(78, 201, 116, 0.08);
    color: #4ec974;
    cursor: pointer;
    z-index: 1;
    transition: all 0.2s ease;
  }

  .cart-collapse-button:hover {
    background: rgba(78, 201, 116, 0.16);
    border-color: rgba(78, 201, 116, 0.48);
    transform: translateY(-1px);
  }

  /* Collapsed cart: show a narrow handle */
  .order-cart.collapsed {
    width: 56px;
    max-height: calc(100vh - 120px);
    overflow: visible;
  }

  .order-cart.collapsed .order-cart-intro,
  .order-cart.collapsed .order-items,
  .order-cart.collapsed .order-contact,
  .order-cart.collapsed .order-message,
  .order-cart.collapsed .research-confirm,
  .order-cart.collapsed .signal-button,
  .order-cart.collapsed .order-status,
  .order-cart.collapsed .order-cart-header {
    display: none;
  }

  .order-cart.collapsed .cart-collapse-button {
    position: static;
    width: 100%;
    height: 56px;
    font-size: 0.875rem;
    background: linear-gradient(135deg, rgba(78, 201, 116, 0.16), rgba(78, 201, 116, 0.08));
    border: 1px solid rgba(78, 201, 116, 0.32);
    font-weight: 600;
    display: grid;
    place-items: center;
    gap: 4px;
    color: #4ec974;
    transition: all 0.2s ease;
  }

  .order-cart.collapsed .cart-collapse-button:hover {
    background: linear-gradient(135deg, rgba(78, 201, 116, 0.24), rgba(78, 201, 116, 0.12));
    border-color: rgba(78, 201, 116, 0.48);
  }
}

/* Allow collapsing the cart at all viewport sizes: hide non-header contents */
@media (max-width: 979px) {
  .order-cart {
    position: relative;
  }

  .order-cart.collapsed {
    /* when not fixed, keep layout flow but hide internals */
    width: 56px !important;
    max-height: none;
  }

  .order-cart.collapsed .order-cart-intro,
  .order-cart.collapsed .order-items,
  .order-cart.collapsed .order-message,
  .order-cart.collapsed .research-confirm,
  .order-cart.collapsed .signal-button,
  .order-cart.collapsed .order-status,
  .order-cart.collapsed .order-cart-header {
    display: none !important;
  }
}

.cart-collapse-button {
  width: 100%;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: none;
  background: transparent;
  cursor: pointer;
}

.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(52vw, 260px);
  max-height: 42px;
  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-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-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 {
  width: 100%;
  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;
}

.admin-form textarea,
.admin-edit-card textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.inline-form {
  grid-template-columns: repeat(5, 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;
}

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

.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;
}

.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-panel h2 {
  font-size: 1.25rem;
}

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

.admin-edit-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) 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;
}

.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;
}

/* 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 {
  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));
  }

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

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

  .cart-toast {
    display: none;
  }

  .brand-subtitle {
    display: none;
  }

  .brand {
    width: min(58vw, 210px);
    height: 42px;
  }

  .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 {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .catalog-image {
    min-height: 230px;
  }

  .catalog-image img {
    height: 220px;
  }

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

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

}
