:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #047857;
  --accent-hover: #065f46;
  --accent-soft: #ecfdf5;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 30px -12px rgba(15, 23, 42, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  cursor: pointer;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--text);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 3px;
  border: 2px solid var(--accent-soft);
}

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

.brand-text strong {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.brand-text small {
  font-size: 11px;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}

.main-nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn-primary,
.btn-outline,
.btn-ghost,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 14px;
  padding: 9px 16px;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.btn-link {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
}

.btn-link:hover {
  color: var(--accent-hover);
}

.btn-lg {
  padding: 12px 22px;
  font-size: 15px;
}

/* Hero Section */
.hero-section {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-metrics dt {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.hero-metrics dd {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* Hero Spotlight Card */
.hero-spotlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.spotlight-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
}

.spotlight-visual {
  height: 210px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.device-frame {
  width: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device-screen {
  width: 100%;
  height: 112px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chip {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #a7f3d0;
  font-weight: 600;
}

.wave-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
}

.wave-bar.short {
  width: 62%;
  background: #10b981;
}

.device-base {
  width: 90px;
  height: 10px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.spotlight-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.price-tag {
  font-size: 18px;
  color: var(--text);
}

.spotlight-body h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.spotlight-body p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Catalog Section */
.catalog-section,
.directory-section,
.service-section {
  padding: 64px 0;
}

.directory-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.search-box input {
  width: 280px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.16s ease;
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-pill.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #ffffff;
}

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

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.product-thumb {
  height: 184px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.product-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-tone-slate {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.thumb-tone-emerald {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.thumb-tone-dark {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #ffffff;
}

.thumb-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
  z-index: 1;
}

.thumb-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  opacity: 0.72;
  position: relative;
  z-index: 1;
}

.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.product-cat {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.product-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.product-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.product-summary {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  gap: 10px;
}

.product-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text-secondary);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

/* Directory Grid */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.nav-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.nav-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.nav-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.nav-card h3 {
  margin: 0;
  font-size: 16px;
}

.nav-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Service Banner */
.service-banner {
  background: var(--text);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.service-banner .section-kicker {
  color: #6ee7b7;
}

.service-banner h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.service-banner p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.service-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.copy-feedback {
  font-size: 12px;
  color: #a7f3d0;
  min-height: 18px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-meta {
  display: flex;
  gap: 18px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 780px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  position: relative;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  z-index: 2;
}

.modal-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
}

.modal-visual {
  min-height: 300px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
}

.modal-info {
  padding: 32px;
}

.modal-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.modal-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.modal-price {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}

.modal-desc {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.modal-specs {
  margin: 0 0 22px;
  padding: 0 0 0 18px;
  font-size: 13.5px;
  color: var(--text);
}

.modal-specs li {
  margin-bottom: 6px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--accent);
  min-height: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }

  .product-grid,
  .nav-grid,
  .modal-layout {
    grid-template-columns: 1fr;
  }

  .modal-visual {
    min-height: 170px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .service-banner {
    padding: 28px 24px;
  }

  .service-actions {
    align-items: flex-start;
  }
}
