:root {
  --blue: #1b33d1;
  --blue-2: #2855ff;
  --ink: #0d1b2a;
  --slate: #5d697b;
  --muted: #eef2f7;
  --line: #d9dfeb;
  --paper: #ffffff;
  --soft: #f7f9fc;
  --steel: #6b7280;
  --green: #15803d;
  --amber: #b45309;
  --shadow: 0 20px 60px rgba(13, 27, 42, 0.13);
  --radius: 8px;
  font-family: Montserrat, Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 76px;
  padding: 0 34px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 5px solid var(--blue);
  border-right-color: #a7afbf;
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.brand-mark::before {
  inset: 8px;
  border: 3px solid var(--blue);
  border-left-color: transparent;
}

.brand-mark::after {
  width: 10px;
  height: 10px;
  background: var(--paper);
  right: -6px;
  top: 7px;
}

.brand-mark span {
  inset: 15px;
  background: #a7afbf;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  color: var(--blue);
  font-size: 24px;
  font-weight: 800;
}

.brand-copy small {
  color: var(--slate);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.nav-link {
  min-height: 38px;
  padding: 0 14px;
  color: var(--slate);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}

.nav-link.active,
.nav-link:hover {
  color: var(--blue);
  background: #eef3ff;
  border-color: #d9e2ff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-btn,
.cart-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.icon-btn:hover,
.cart-button:hover {
  color: var(--blue);
  border-color: #b9c6ff;
}

.cart-button {
  position: relative;
}

.cart-button span {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  color: var(--paper);
  background: var(--blue);
  border: 2px solid var(--paper);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

main {
  padding: 26px 34px 48px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  align-items: stretch;
  min-height: 360px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 46%, #ebf0ff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 52px 56px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  color: var(--slate);
  font-size: 16px;
  line-height: 1.7;
}

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

.api-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-top: 8px;
  padding: 0 12px;
  color: var(--slate);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
}

.api-status span {
  width: 10px;
  height: 10px;
  background: var(--amber);
  border-radius: 50%;
}

.api-status.connected span {
  background: var(--green);
}

.api-status.demo span {
  background: var(--amber);
}

.api-status.error span {
  background: #dc2626;
}

.primary-btn,
.secondary-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 800;
  border: 1px solid transparent;
}

.primary-btn {
  color: var(--paper);
  background: var(--blue);
  box-shadow: 0 12px 26px rgba(27, 51, 209, 0.25);
}

.primary-btn:hover {
  background: var(--blue-2);
}

.secondary-btn {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.secondary-btn:hover {
  color: var(--blue);
  border-color: #b9c6ff;
}

.text-btn {
  min-height: 32px;
  padding: 0 4px;
  color: var(--blue);
  background: transparent;
}

.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.full {
  width: 100%;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  background:
    linear-gradient(145deg, rgba(13, 27, 42, 0.96), rgba(11, 25, 80, 0.96)),
    #0d1b2a;
}

.seal-stage {
  position: relative;
  width: min(86%, 520px);
  aspect-ratio: 1.25;
}

.seal-ring {
  position: absolute;
  border-radius: 50%;
  transform: rotateX(64deg) rotateZ(-18deg);
  box-shadow:
    inset 0 20px 34px rgba(255, 255, 255, 0.05),
    inset 0 -14px 26px rgba(0, 0, 0, 0.65),
    0 28px 36px rgba(0, 0, 0, 0.5);
}

.ring-a {
  inset: 12% 4% 16% 2%;
  border: 34px solid #050913;
  outline: 10px solid #244eff;
}

.ring-b {
  inset: 23% 15% 27% 12%;
  border: 24px solid #0f172a;
  outline: 7px solid #5f738f;
}

.ring-c {
  inset: 35% 31% 39% 27%;
  border: 17px solid #040811;
  outline: 5px solid #244eff;
}

.product-label {
  position: absolute;
  right: 0;
  bottom: 18px;
  width: 210px;
  padding: 14px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.product-label span {
  display: block;
  color: #b9c6ff;
  font-size: 12px;
  font-weight: 800;
}

.product-label strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 18px;
  background: var(--paper);
}

.trust-item svg {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: var(--blue);
}

.trust-item span {
  color: var(--slate);
  font-size: 13px;
  line-height: 1.35;
}

.trust-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.filters,
.content-view {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filters {
  position: sticky;
  top: 94px;
  padding: 20px;
}

.panel-head,
.section-head,
.drawer-head,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.search-field:focus-within {
  border-color: #9fb2ff;
  box-shadow: 0 0 0 4px rgba(27, 51, 209, 0.09);
}

.search-field input,
.text-input,
select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.filter-group {
  margin-top: 18px;
}

.segmented {
  display: grid;
  gap: 8px;
}

.segment-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
  color: var(--slate);
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  text-align: left;
}

.segment-btn.active {
  color: var(--blue);
  background: #edf2ff;
  border-color: #c9d6ff;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate);
  font-size: 14px;
  font-weight: 700;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
}

.range-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--slate);
  font-size: 12px;
}

.range-row strong {
  color: var(--ink);
}

.content-view {
  display: none;
  min-height: 560px;
  padding: 24px;
}

.active-view {
  display: block;
}

.section-head {
  margin-bottom: 20px;
}

.view-tools {
  min-width: 210px;
}

select,
.text-input {
  height: 42px;
  padding: 0 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 336px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.product-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 128px;
  background: linear-gradient(135deg, #f7f9fc 0%, #eef3ff 100%);
  border-bottom: 1px solid var(--line);
}

.mini-seal {
  width: 78px;
  height: 78px;
  border: 14px solid #050913;
  border-right-color: #244eff;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 8px #f7f9fc,
    0 18px 24px rgba(13, 27, 42, 0.16);
}

.product-photo {
  width: min(112px, 70%);
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(13, 27, 42, 0.18));
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  color: var(--blue);
  background: var(--paper);
  border: 1px solid #d7e0ff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.product-body {
  padding: 16px;
}

.sku {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.product-body h3 {
  margin-top: 6px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.product-meta span {
  padding: 5px 8px;
  color: var(--slate);
  background: var(--soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.stock.good {
  color: var(--green);
}

.stock.low {
  color: var(--amber);
}

.product-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.price {
  display: grid;
  gap: 2px;
}

.price small {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
}

.price strong {
  font-size: 19px;
}

.add-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--paper);
  background: var(--blue);
  border: 0;
  border-radius: var(--radius);
}

.add-btn:hover {
  background: var(--blue-2);
}

.add-btn[data-catalog-only="true"] {
  color: var(--blue);
  background: var(--paper);
  border: 1px solid #c9d6ff;
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.status {
  padding: 6px 10px;
  color: var(--green);
  background: #e9f8ef;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.support-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.support-layout article {
  min-height: 190px;
  padding: 22px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.support-layout p {
  color: var(--slate);
  line-height: 1.6;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: flex-end;
  background: rgba(13, 27, 42, 0.38);
}

.drawer.open {
  display: flex;
}

.drawer-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(460px, 100%);
  height: 100%;
  padding: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 18px 0;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty button {
  width: 28px;
  height: 28px;
  color: var(--blue);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 900;
}

.cart-summary {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 18px;
}

.cart-summary p {
  margin: 12px 0 0;
  color: var(--steel);
  font-size: 12px;
  line-height: 1.45;
}

.account-dialog {
  width: min(430px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.account-dialog::backdrop {
  background: rgba(13, 27, 42, 0.42);
}

.account-dialog form {
  padding: 24px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 70;
  transform: translate(-50%, 18px);
  opacity: 0;
  min-width: min(440px, calc(100% - 32px));
  padding: 13px 16px;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1120px) {
  .hero-band,
  .workspace {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

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

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy strong {
    font-size: 20px;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow: auto;
    padding-bottom: 12px;
  }

  main {
    padding: 16px;
  }

  .hero-copy {
    padding: 30px 22px;
  }

  .hero-band {
    min-height: 0;
  }

  .hero-visual {
    min-height: 270px;
  }

  .trust-strip,
  .product-grid,
  .support-layout {
    grid-template-columns: 1fr;
  }

  .content-view,
  .filters {
    padding: 16px;
  }

  .section-head,
  .order-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .order-row {
    display: grid;
  }

  .view-tools {
    width: 100%;
    min-width: 0;
  }
}
