/* ---------- Tokens (dark, blue/gray) ---------- */
:root {
  --bg: #12151A;
  --bg-grid-line: rgba(108, 147, 214, 0.06);
  --surface: #1B2027;
  --surface-raised: #232A33;
  --surface-sunken: #0D1014;
  --border: #333B45;
  --border-soft: #262D36;
  --ink: #E9ECEF;
  --ink-soft: #93A0AC;
  --ink-faint: #5C6773;
  --blue: #6C93D6;
  --blue-deep: #3E5C8A;
  --blue-glow: rgba(108, 147, 214, 0.35);
  --orange: #F2814A;
  --orange-glow: rgba(242, 129, 74, 0.3);

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius: 2px;
  --header-h: 84px;
  --nav-h: 60px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--nav-h) + 16px); }

body {
  margin: 0;
  background:
    linear-gradient(var(--bg-grid-line) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, var(--bg-grid-line) 1px, transparent 1px) 0 0 / 32px 100%,
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }

::selection { background: var(--blue-deep); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(18, 21, 26, 0.9);
  backdrop-filter: blur(6px);
  position: relative;
  z-index: 5;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--orange);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px var(--orange-glow));
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.header-contact {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}
.header-contact:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 28px 60px;
  background:
    radial-gradient(ellipse 700px 320px at 50% 0%, rgba(108,147,214,0.14), transparent 70%),
    var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(108,147,214,0.07) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(108,147,214,0.07) 1px, transparent 1px) 0 0 / 28px 100%;
  -webkit-mask-image: radial-gradient(ellipse 620px 260px at 50% 20%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 620px 260px at 50% 20%, #000 55%, transparent 100%);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.hero-content { position: relative; max-width: 680px; margin: 0 auto; text-align: center; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin: 0 0 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--ink);
}

.hero-sub {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Category nav ---------- */
.cat-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 21, 26, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.cat-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: var(--nav-h);
}

.search-field {
  position: relative;
  flex-shrink: 0;
  width: 220px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink);
}
.search-field input::placeholder { color: var(--ink-faint); }
.search-field input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.cat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-pills::-webkit-scrollbar { display: none; }

.cat-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  white-space: nowrap;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cat-pill:hover { border-color: var(--blue); color: var(--blue); }
.cat-pill.active {
  background: var(--blue-deep);
  border-color: var(--blue);
  color: var(--ink);
}

/* ---------- Catalog ---------- */
#catalog { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

.cat-section { padding: 48px 0 16px; border-bottom: 1px solid var(--border-soft); }
.cat-section:last-child { border-bottom: none; }

.cat-section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.cat-section-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--orange);
  border: 1px solid var(--orange);
  padding: 2px 8px;
  border-radius: var(--radius);
}

.cat-section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0;
  color: var(--ink);
}

.cat-section-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 8px;
}

/* ---------- Product card w/ corner-bracket signature ---------- */
.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  padding: 18px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.product-card:hover {
  border-color: var(--blue-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.product-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.product-card::before,
.product-card::after,
.corner-br::before,
.corner-br::after { content: ""; position: absolute; width: 10px; height: 10px; }

.product-card::before { top: -1px; left: -1px; border-top: 2px solid var(--ink-faint); border-left: 2px solid var(--ink-faint); }
.product-card::after  { top: -1px; right: -1px; border-top: 2px solid var(--ink-faint); border-right: 2px solid var(--ink-faint); }
.corner-br::before    { bottom: -1px; left: -1px; border-bottom: 2px solid var(--ink-faint); border-left: 2px solid var(--ink-faint); }
.corner-br::after     { bottom: -1px; right: -1px; border-bottom: 2px solid var(--ink-faint); border-right: 2px solid var(--ink-faint); }

.product-card:hover::before, .product-card:hover::after,
.product-card:hover .corner-br::before, .product-card:hover .corner-br::after {
  border-color: var(--blue);
}

.card-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 30% 25%, rgba(108,147,214,0.22), transparent 55%),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 100% 10px,
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 10px 100%,
    var(--surface-sunken);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-thumb svg {
  width: 56%;
  height: 56%;
  color: var(--blue);
  filter: drop-shadow(0 0 10px var(--blue-glow));
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-dim-label {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  background: rgba(13, 16, 20, 0.7);
  padding: 1px 5px;
  border-radius: 2px;
}

.card-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

.card-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  color: var(--ink);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
}

.card-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--orange);
}

.card-view {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue);
  letter-spacing: 0.03em;
}

.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ---------- Detail overlay ---------- */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 10, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.detail-overlay.open { display: flex; }

.detail-panel {
  position: relative;
  background: var(--surface);
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.detail-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border);
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.detail-close:hover { border-color: var(--orange); color: var(--orange); }

.detail-thumb {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 30% 25%, rgba(108,147,214,0.2), transparent 55%),
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 100% 14px,
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 14px 100%,
    var(--surface-sunken);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.detail-thumb svg {
  width: 32%;
  height: 32%;
  color: var(--blue);
  filter: drop-shadow(0 0 12px var(--blue-glow));
}
.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-code { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }

.detail-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 6px 0 16px;
  color: var(--ink);
}

.detail-desc { color: var(--ink-soft); margin-bottom: 20px; }

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.spec-label { font-family: var(--font-mono); color: var(--ink-faint); font-size: 0.7rem; letter-spacing: 0.04em; display: block; margin-bottom: 3px; }
.spec-value { font-family: var(--font-mono); color: var(--ink); }

.material-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.material-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  padding: 3px 8px;
  border-radius: var(--radius);
}

.detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}

.detail-price { font-family: var(--font-mono); font-size: 1.3rem; color: var(--orange); }
.detail-price small { display: block; font-size: 0.65rem; color: var(--ink-faint); font-family: var(--font-mono); }

.inquire-btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--blue-deep);
  color: var(--ink);
  border: 1px solid var(--blue);
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.inquire-btn:hover { background: var(--blue); border-color: var(--blue); color: var(--surface-sunken); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px; margin-top: 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; font-size: 0.8rem; color: var(--ink-faint); }
.footer-inner p { margin: 4px 0; }
.footer-meta { font-family: var(--font-mono); font-size: 0.72rem; }
.footer-inner code { font-family: var(--font-mono); background: var(--surface); color: var(--ink-soft); padding: 1px 5px; border-radius: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .header-inner { padding: 0 18px; }
  .header-contact { display: none; }
  .hero { padding: 52px 18px 40px; }
  .cat-nav-inner { padding: 10px 18px; flex-direction: column; align-items: stretch; }
  .search-field { width: 100%; }
  #catalog { padding: 0 18px; }
  .detail-specs { grid-template-columns: 1fr 1fr; }
  .detail-footer { flex-direction: column; align-items: stretch; }
  .inquire-btn { text-align: center; }
}
