@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #060a14;
  --bg-elevated: #0c1324;
  --card: #0f182c;
  --card-hover: #13203a;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.36);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --cyan: #22d3ee;
  --sky: #38bdf8;
  --indigo: #818cf8;
  --emerald: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --shadow-lg: 0 20px 50px -12px rgba(2, 6, 23, 0.78);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(48rem 28rem at 15% -5%, rgba(34, 211, 238, 0.13), transparent 70%),
    radial-gradient(44rem 26rem at 88% 4%, rgba(99, 102, 241, 0.12), transparent 68%),
    linear-gradient(180deg, #060a14 0%, #070d1b 100%);
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

h1, h2, h3, p, ol {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.shell {
  width: min(1220px, calc(100% - 36px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(6, 10, 20, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}

.brand-tag {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.48rem 0.95rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary,
.btn-primary-sm {
  background: linear-gradient(135deg, var(--sky) 0%, var(--cyan) 100%);
  color: #041320;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(34, 211, 238, 0.22);
}

.btn-primary:hover,
.btn-primary-sm:hover {
  filter: brightness(1.07);
  box-shadow: 0 6px 24px rgba(34, 211, 238, 0.34);
}

.btn-primary-sm {
  min-height: 36px;
  padding: 0.38rem 0.82rem;
  font-size: 0.84rem;
}

.btn-manual {
  background: rgba(129, 140, 248, 0.14);
  border-color: rgba(129, 140, 248, 0.34);
  color: #e0e7ff;
}

.btn-manual:hover {
  background: rgba(129, 140, 248, 0.24);
  border-color: rgba(129, 140, 248, 0.6);
}

.btn-ghost {
  background: rgba(15, 24, 44, 0.75);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
}

.btn-block {
  width: 100%;
  min-height: 42px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.1);
  color: #a7f3d0;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chip-btn:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.5);
}

/* Compact Banner */
.main-content {
  flex: 1;
  padding-block: 1.5rem 3.5rem;
}

.banner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background:
    radial-gradient(28rem 16rem at 0% 0%, rgba(56, 189, 248, 0.1), transparent 70%),
    linear-gradient(145deg, rgba(15, 24, 44, 0.92), rgba(10, 16, 30, 0.92));
  box-shadow: var(--shadow-lg);
}

.banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.24);
  color: var(--emerald);
  font-size: 0.78rem;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.banner h1 {
  margin-top: 0.55rem;
  font-size: clamp(1.38rem, 2.6vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.banner-sub {
  margin-top: 0.42rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.trust-strip {
  display: grid;
  gap: 0.58rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.58rem 0.8rem;
  border-radius: 0.75rem;
  background: rgba(6, 10, 20, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.trust-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 0.55rem;
  background: rgba(56, 189, 248, 0.1);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.trust-item div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.55rem;
  min-width: 0;
}

.trust-item strong {
  font-size: 0.86rem;
  color: var(--text);
}

.trust-item span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Toolbar & Filters */
.toolbar {
  margin-top: 1.15rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(12, 19, 36, 0.88);
  backdrop-filter: blur(12px);
}

.toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  background: rgba(6, 10, 20, 0.75);
  border: 1px solid var(--border);
}

.seg-btn {
  min-height: 34px;
  padding: 0.32rem 0.78rem;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.seg-btn:hover {
  color: var(--text);
}

.seg-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(34, 211, 238, 0.14));
  color: #e0f2fe;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.42);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: flex-end;
  min-width: min(100%, 280px);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 340px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  min-height: 38px;
  padding: 0.42rem 0.8rem 0.42rem 2.25rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(6, 10, 20, 0.8);
  font-size: 0.87rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.28);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.toggle input:checked + .toggle-track {
  background: rgba(34, 211, 238, 0.28);
  border-color: var(--cyan);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
  background: var(--cyan);
}

.toggle-label {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.78rem;
  padding-top: 0.78rem;
  border-top: 1px solid var(--border);
}

.cat-pill {
  min-height: 32px;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 24, 44, 0.65);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.cat-pill:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.35);
  background: var(--card-hover);
}

.cat-pill[aria-pressed="true"] {
  background: var(--sky);
  border-color: var(--sky);
  color: #041320;
  font-weight: 700;
}

/* Category Sections & Cards */
.sections {
  display: grid;
  gap: 1.85rem;
  margin-top: 1.4rem;
}

.cat-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cat-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.cat-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--indigo));
}

.cat-section-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr));
  gap: 0.9rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.05rem 1.1rem;
  border-radius: 0.95rem;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(19, 30, 56, 0.86) 0%, rgba(12, 19, 36, 0.94) 100%);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 14px 32px -12px rgba(2, 8, 23, 0.85), 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.card-manual:hover {
  border-color: rgba(129, 140, 248, 0.48);
  box-shadow: 0 14px 32px -12px rgba(2, 8, 23, 0.85), 0 0 0 1px rgba(129, 140, 248, 0.14);
}

.card-out {
  opacity: 0.68;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.68rem;
}

.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.16rem 0.52rem;
  border-radius: 0.42rem;
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.pill-auto {
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.24);
}

.pill-manual {
  background: rgba(129, 140, 248, 0.13);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.26);
}

.pill-accent {
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.stock-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.stock-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.stock-available {
  color: var(--emerald);
}

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

.stock-out {
  color: var(--rose);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}

.card-note {
  margin-top: 0.42rem;
  margin-bottom: 0.95rem;
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.83rem;
  line-height: 1.52;
  overflow-wrap: anywhere;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  margin-top: auto;
}

.price-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.price-val {
  font-size: 1.32rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.price-sub {
  margin-top: 0.14rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.card-footer .btn {
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.83rem;
  flex-shrink: 0;
}

.empty-state {
  margin-top: 1.25rem;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  border-radius: 1rem;
  border: 1px dashed var(--border);
  background: rgba(12, 19, 36, 0.5);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(6, 10, 20, 0.9);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.3rem;
  flex-wrap: wrap;
}

.footer-left strong {
  font-size: 0.9rem;
}

.footer-left p {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 680px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.online-badge {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Dialog */
dialog {
  width: min(32rem, calc(100% - 24px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 1.1rem;
  background: #0c1426;
  color: var(--text);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}

dialog::backdrop {
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(5px);
}

.dialog-card {
  padding: 1.3rem 1.35rem;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dialog-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
}

.dialog-header h2 {
  margin-top: 0.15rem;
  font-size: 1.22rem;
}

.icon-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: rgba(15, 24, 44, 0.8);
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-secondary);
}

.icon-close:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.order-box-wrap {
  padding: 0.9rem;
  border-radius: 0.85rem;
  background: rgba(6, 10, 20, 0.65);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.selected-item-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.selected-item-bar span {
  font-size: 0.9rem;
  font-weight: 650;
}

.selected-item-bar strong {
  font-size: 1.08rem;
  color: var(--cyan);
  white-space: nowrap;
}

.field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

#order-text {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: #060a14;
  font-size: 0.85rem;
  resize: none;
}

.dialog-section + .dialog-section {
  margin-top: 1rem;
}

.dialog-section h3 {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.55rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(15, 24, 44, 0.7);
}

.contact-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-meta small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.contact-meta strong {
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-mini {
  padding: 0.26rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.1);
  color: #bae6fd;
  font-size: 0.76rem;
  font-weight: 600;
  flex-shrink: 0;
}

.copy-mini:hover {
  background: rgba(56, 189, 248, 0.2);
}

.step-list {
  padding-left: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.65;
}

.toast:not(:empty) {
  padding: 0.5rem 0.85rem;
  border-radius: 0.6rem;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #d1fae5;
  font-size: 0.84rem;
  font-weight: 600;
}

.dialog-toast:not(:empty) {
  margin-top: 0.85rem;
  text-align: center;
}

.page-toast:not(:empty) {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 50;
  background: #0d2824;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 860px) {
  .banner {
    grid-template-columns: 1fr;
    padding: 1.15rem;
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100% - 24px);
  }
  .brand-divider,
  .brand-tag,
  #header-group-btn {
    display: none;
  }
  .toolbar-controls {
    width: 100%;
    justify-content: space-between;
  }
  .search-box {
    max-width: none;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
  }
}
