:root {
  --bg: #08090a;
  --bg1: #0f1012;
  --bg2: #15171a;
  --bg3: #1d2024;
  --t1: #f7f8f8;
  --t2: #9ba1aa;
  --t3: #6b7078;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --acc: #8eaeb3;
  --hot: #d4a373;
  --live: #7fae8f;
  --warn: #d9826c;
  --r: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 9, 10, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__in {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--t1);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px rgba(127, 174, 143, 0.6);
}

.brand__tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(142, 174, 179, 0.14);
  color: var(--acc);
  border: 1px solid rgba(142, 174, 179, 0.25);
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
}
.nav a { color: var(--t2); }
.nav a:hover { color: var(--t1); text-decoration: none; }

/* Hero */
.hero {
  padding: 44px 0 24px;
}
.hero__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--acc);
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.hero__sub {
  color: var(--t2);
  max-width: 680px;
  font-size: 15px;
}
.notice {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg1);
  border: 1px solid var(--line);
  color: var(--t2);
  font-size: 13px;
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg1);
  color: var(--t2);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.tab:hover { border-color: var(--line-strong); color: var(--t1); }
.tab.is-active {
  background: var(--t1);
  color: var(--bg);
  border-color: var(--t1);
  font-weight: 600;
}

.controls__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--t2);
  cursor: pointer;
  user-select: none;
}
.toggle input { accent-color: var(--live); }

.search {
  background: var(--bg1);
  border: 1px solid var(--line);
  color: var(--t1);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  width: 240px;
  outline: none;
}
.search:focus { border-color: var(--acc); }

.meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 18px;
  font-size: 13px;
  color: var(--t3);
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .controls__right { width: 100%; justify-content: space-between; }
}

.card {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(142, 174, 179, 0.14);
  color: var(--acc);
}
.badge--hot { background: rgba(212, 163, 115, 0.16); color: var(--hot); }
.badge--live { background: rgba(127, 174, 143, 0.16); color: var(--live); }
.badge--warn { background: rgba(217, 130, 108, 0.16); color: var(--warn); }

.warranty {
  font-size: 11px;
  color: var(--t3);
  font-family: var(--mono);
}

.card__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}
.card__sub {
  font-size: 13px;
  color: var(--t2);
  flex: 1;
}

.card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  font-size: 11px;
  color: var(--t2);
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 6px;
}

.card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.price {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1;
}
.price__from {
  font-size: 12px;
  font-weight: 400;
  color: var(--t3);
  margin-left: 3px;
}
.price__delivery {
  display: block;
  font-size: 11px;
  color: var(--t3);
  margin-top: 4px;
}

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--bg2);
  color: var(--t1);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
}
.btn:hover { background: var(--bg3); text-decoration: none; }
.btn--primary {
  background: var(--t1);
  color: var(--bg);
  border-color: var(--t1);
}
.btn--primary:hover { background: #e3e6ea; }
.btn--ghost {
  background: transparent;
  color: var(--acc);
  border-color: rgba(142, 174, 179, 0.35);
}

/* FAQ */
.faq {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.faq h2 { font-size: 18px; margin-bottom: 16px; }
.faq__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 760px) {
  .faq__grid { grid-template-columns: 1fr; }
}
.faq__item {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}
.faq__item h3 { font-size: 14px; margin-bottom: 6px; }
.faq__item p { font-size: 13px; color: var(--t2); }

/* Footer */
.footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding: 22px 0 36px;
  font-size: 12px;
  color: var(--t3);
}
.footer__in {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg1);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--t2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { color: var(--t1); }
.modal__head h2 { font-size: 19px; margin: 8px 0 4px; }
.modal__head p { font-size: 13px; color: var(--t2); }

.label {
  font-size: 12px;
  color: var(--t3);
  margin-bottom: 8px;
}

.variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.variant-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--t1);
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
}
.variant-btn.is-selected {
  border-color: var(--acc);
  background: rgba(142, 174, 179, 0.14);
  color: var(--t1);
  font-weight: 600;
}

.modal__qty-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.qty button {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--bg2);
  color: var(--t1);
  font-size: 16px;
  cursor: pointer;
}
.qty span {
  min-width: 36px;
  text-align: center;
  font-family: var(--mono);
  font-size: 14px;
}
.total { text-align: right; }
.total__price {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--hot);
}

.order-box {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.order-code {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--t1);
  background: var(--bg);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  word-break: break-all;
  margin-bottom: 10px;
}
.order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.order-actions .btn { flex: 1; }

.modal__qr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.modal__qr img {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.modal__qr strong { display: block; font-size: 14px; margin-bottom: 4px; }
.modal__qr p { font-size: 12px; color: var(--t2); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--t3);
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--t1);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 80;
}
.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
