:root {
  --bg:
    radial-gradient(circle at 12% 8%, rgba(88, 143, 184, 0.15), transparent 18%),
    radial-gradient(circle at 88% 14%, rgba(118, 170, 158, 0.12), transparent 22%),
    linear-gradient(180deg, #edf3f5 0%, #e7eff1 52%, #edf3f5 100%);
  --surface: rgba(251, 253, 253, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.97);
  --surface-muted: #eef4f6;
  --line: rgba(106, 128, 144, 0.18);
  --text: #16232c;
  --text-soft: #4f6572;
  --text-muted: #748592;
  --accent: #17597f;
  --accent-strong: #0f76af;
  --accent-soft: rgba(15, 118, 175, 0.12);
  --positive: #0f76af;
  --positive-soft: rgba(15, 118, 175, 0.14);
  --warning: #9a6500;
  --warning-soft: rgba(154, 101, 0, 0.12);
  --danger: #7b8791;
  --danger-soft: rgba(123, 135, 145, 0.16);
  --shadow: 0 24px 58px rgba(36, 52, 60, 0.08);
  --shadow-strong: 0 26px 64px rgba(21, 58, 80, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1220px;
  --font-stack: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-stack);
  background: var(--bg);
}

body {
  min-height: 100vh;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  opacity: 0.45;
}

img {
  display: block;
  max-width: 100%;
}

dialog:not([open]) {
  display: none;
}

button,
input,
dialog {
  font: inherit;
}

button {
  border: none;
  font-family: inherit;
}

.page-shell {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.masthead {
  display: grid;
  gap: 16px;
}

.top-panels {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
}

.notice-card,
.brand-block,
.series-nav,
.content,
.site-footer {
  min-width: 0;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.notice-card {
  padding: 22px 24px;
}

.notice-head,
.detail-topbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.section-eyebrow {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice-card h1,
.brand-block h2,
.content-head h3,
.detail-head h4,
.detail-remark h5 {
  margin: 0;
}

.notice-card h1 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.notice-action,
.contact-action,
.purchase-action,
.detail-close {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(15, 118, 175, 0.18);
  border-radius: 999px;
  background: rgba(15, 118, 175, 0.08);
  color: var(--accent);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.notice-action:hover,
.contact-action:hover,
.purchase-action:hover,
.detail-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(15, 118, 175, 0.12);
}

.notice-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  cursor: pointer;
}

.notice-preview p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.85;
}

.notice-preview-hint {
  color: var(--accent);
}

.brand-block {
  overflow: hidden;
  padding: 22px 24px;
}

.brand-block::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 175, 0.14), transparent 68%);
  pointer-events: none;
}

.brand-title-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.store-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 18px rgba(15, 118, 175, 0.16);
}

.brand-block h2 {
  position: relative;
  min-width: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.brand-copy {
  position: relative;
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.75;
}

.brand-actions {
  position: relative;
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.series-nav {
  padding: 14px 16px;
}

.series-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.series-tabs {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.series-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 0;
  padding: 0 18px;
  border: 1px solid rgba(106, 128, 144, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 252, 0.98));
  color: var(--text-soft);
  font-weight: 600;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(30, 48, 61, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.series-tab:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 175, 0.28);
  box-shadow:
    0 18px 28px rgba(21, 58, 80, 0.1),
    0 0 0 4px rgba(15, 118, 175, 0.06);
}

.series-tab.is-active {
  background: linear-gradient(180deg, rgba(224, 242, 252, 1), rgba(236, 248, 252, 0.98));
  border-color: rgba(15, 118, 175, 0.34);
  box-shadow:
    0 18px 28px rgba(15, 118, 175, 0.14),
    0 0 0 5px rgba(15, 118, 175, 0.08);
  color: var(--accent-strong);
}

.series-tab-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.search-box {
  display: flex;
  flex: 0 0 320px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  min-width: 0;
  padding: 0 12px 0 14px;
  border: 1px solid rgba(106, 128, 144, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 252, 0.98));
  box-shadow: 0 8px 18px rgba(30, 48, 61, 0.04);
}

.search-icon {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: #81919c;
}

.clear-search {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  cursor: pointer;
}

.clear-search:hover {
  background: #e4eef2;
}

.content {
  overflow: hidden;
  margin-top: 6px;
  padding: 24px;
  border-color: rgba(15, 118, 175, 0.16);
  box-shadow: var(--shadow-strong);
}

.content::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 175, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 30%);
  pointer-events: none;
}

.content-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  min-width: 0;
}

.content-head h3 {
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.result-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  text-align: right;
  line-height: 1.8;
  word-break: break-word;
}

.feedback {
  position: relative;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(123, 135, 145, 0.1);
  color: var(--text-soft);
  line-height: 1.7;
}

.product-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.product-card {
  position: relative;
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: 280px;
}

.product-card-main {
  width: 100%;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 14px;
  aspect-ratio: 1 / 1;
  padding: 16px;
  border: 1px solid rgba(106, 128, 144, 0.2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 253, 0.96));
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(26, 45, 57, 0.06);
  transition:
    transform 190ms ease,
    box-shadow 190ms ease,
    border-color 190ms ease,
    background-color 190ms ease;
}

.product-card-main:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 40px rgba(24, 54, 73, 0.12);
}

.product-card[data-availability="available"] .product-card-main {
  border-color: rgba(15, 118, 175, 0.22);
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(240, 248, 252, 0.98));
}

.product-card[data-availability="available"] .product-card-main::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(180deg, rgba(15, 118, 175, 0.92), rgba(23, 89, 127, 0.64));
}

.product-card[data-availability="available"] .product-card-main:hover {
  border-color: rgba(15, 118, 175, 0.36);
  box-shadow: 0 28px 42px rgba(15, 118, 175, 0.16);
}

.product-card[data-availability="unavailable"] .product-card-main {
  border-color: rgba(123, 135, 145, 0.2);
  background: linear-gradient(180deg, rgba(245, 247, 248, 0.98), rgba(239, 243, 245, 0.98));
  color: #64717b;
}

.product-card[data-availability="unavailable"] .product-card-main:hover {
  border-color: rgba(123, 135, 145, 0.32);
  box-shadow: 0 20px 34px rgba(89, 99, 106, 0.12);
}

.product-card[data-availability="unavailable"] .product-name,
.product-card[data-availability="unavailable"] .price-block strong {
  color: #60707c;
}

.product-card[data-availability="unavailable"] .product-method,
.product-card[data-availability="unavailable"] .product-warranty,
.product-card[data-availability="unavailable"] .price-block span,
.product-card[data-availability="unavailable"] .stock-block span,
.product-card[data-availability="unavailable"] .product-series {
  color: #7a8791;
}

.product-card[data-availability="unknown"] .product-card-main {
  background: linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(244, 248, 250, 0.98));
}

.product-card:focus-visible,
.product-card-main:focus-visible,
.product-cart-button:focus-visible,
.series-tab:focus-visible,
.clear-search:focus-visible,
.search-box input:focus-visible,
.notice-action:focus-visible,
.contact-action:focus-visible,
.purchase-action:focus-visible,
.detail-close:focus-visible {
  outline: 2px solid rgba(15, 118, 175, 0.34);
  outline-offset: 2px;
}

.product-top-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

.product-series {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(231, 240, 244, 0.96);
  color: var(--text-soft);
  font-size: 12px;
}

.product-series-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.product-series span:last-child,
.series-tab span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid rgba(15, 118, 175, 0.2);
  border-radius: 999px;
  background: rgba(15, 118, 175, 0.08);
  color: var(--accent);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-cart-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 118, 175, 0.12);
}

.product-cart-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-warranty {
  display: -webkit-box;
  overflow: hidden;
  margin: -4px 0 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.product-method {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
}

.price-block,
.stock-block {
  min-width: 0;
}

.price-block span,
.stock-block span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 12px;
}

.price-block strong {
  color: var(--accent-strong);
  font-size: 27px;
  line-height: 1;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.stock-pill[data-tone="positive"] {
  background: var(--positive-soft);
  color: var(--positive);
}

.stock-pill[data-tone="warning"] {
  background: var(--warning-soft);
  color: var(--warning);
}

.stock-pill[data-tone="danger"],
.stock-pill[data-tone="neutral"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed rgba(106, 128, 144, 0.34);
  border-radius: var(--radius-lg);
  color: var(--text-soft);
  background: rgba(239, 244, 246, 0.8);
  font-size: 17px;
  line-height: 1.8;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 22px;
  color: var(--text-soft);
  font-size: 14px;
}

.detail-modal {
  width: min(920px, calc(100vw - 24px));
  padding: 0;
  border: none;
  border-radius: 32px;
  background: transparent;
}

.detail-modal::backdrop {
  background: rgba(21, 33, 40, 0.42);
  backdrop-filter: blur(4px);
}

.detail-shell {
  background: linear-gradient(180deg, rgba(251, 253, 253, 0.98), rgba(245, 250, 250, 0.98));
  border: 1px solid rgba(106, 128, 144, 0.16);
  border-radius: 32px;
  padding: 30px;
  box-shadow: 0 24px 50px rgba(24, 38, 46, 0.16);
}

.detail-shell--notice {
  width: min(760px, calc(100vw - 24px));
}

.detail-head {
  margin-top: 22px;
}

.detail-series {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 17px;
}

.detail-head h4 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.summary-item {
  padding: 18px 20px;
  border: 1px solid rgba(106, 128, 144, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
}

.summary-item span {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 15px;
}

.summary-item strong {
  font-size: 24px;
  line-height: 1.55;
  color: var(--text);
}

.detail-remark {
  margin-top: 30px;
  padding: 24px;
  border: 1px solid rgba(15, 118, 175, 0.14);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(232, 245, 251, 0.52), rgba(242, 249, 251, 0.82));
}

.detail-remark--notice {
  margin-top: 22px;
}

.detail-remark h5 {
  font-size: 20px;
  color: var(--accent);
}

.detail-remark p {
  margin: 14px 0 0;
  color: #24323b;
  font-size: 20px;
  line-height: 1.95;
  white-space: pre-wrap;
}

.contacts-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.contact-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(15, 118, 175, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-decoration: none;
}

.contact-item strong {
  font-size: 17px;
}

.contact-item span {
  color: var(--text-soft);
  line-height: 1.7;
  word-break: break-word;
}

.contact-item em {
  color: var(--accent);
  font-style: normal;
  font-size: 13px;
}

.contacts-empty {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.8;
}

@media (max-width: 1199px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: 18px 12px 32px;
  }

  .top-panels {
    grid-template-columns: 1fr;
  }

  .series-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  .series-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .search-box {
    flex: none;
    width: 100%;
  }

  .content-head,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-meta {
    text-align: left;
  }

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

  .detail-modal {
    width: 100dvw;
    max-width: none;
    height: 100dvh;
    margin: 0;
  }

  .detail-shell,
  .detail-shell--notice {
    min-height: 100dvh;
    width: 100%;
    border-radius: 0;
    padding: 24px 18px 42px;
  }
}

@media (max-width: 640px) {
  .notice-card,
  .brand-block,
  .content {
    padding: 18px 16px;
  }

  .notice-head,
  .detail-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-title-row {
    gap: 10px;
  }

  .store-logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .brand-block h2 {
    font-size: 30px;
  }

  .series-nav {
    padding: 12px;
  }

  .series-tab {
    width: 100%;
    justify-content: flex-start;
    padding: 0 14px;
  }

  .content {
    padding: 16px;
  }

  .content-head h3 {
    font-size: 26px;
  }

  .result-meta {
    font-size: 13px;
  }

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

  .product-card-main {
    aspect-ratio: 0.92 / 1;
    padding: 12px;
    gap: 10px;
  }

  .product-series {
    padding: 5px 8px;
    font-size: 11px;
  }

  .product-series-icon,
  .series-tab-icon {
    width: 13px;
    height: 13px;
  }

  .product-cart-button {
    width: 34px;
    height: 34px;
  }

  .product-name {
    font-size: 17px;
  }

  .product-warranty {
    font-size: 11px;
  }

  .product-method {
    font-size: 12px;
    line-height: 1.55;
  }

  .price-block strong {
    font-size: 20px;
  }

  .stock-pill {
    padding: 6px 10px;
    font-size: 12px;
  }

  .detail-summary {
    grid-template-columns: 1fr;
  }

  .summary-item strong,
  .detail-remark p {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 14px 10px 28px;
  }

  .series-nav {
    padding: 10px;
  }

  .series-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .series-tab {
    min-height: 44px;
    padding: 0 12px;
    font-size: 14px;
  }

  .search-box {
    min-height: 44px;
    padding: 0 10px 0 12px;
  }

  .search-box input {
    font-size: 14px;
  }

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

  .product-card-main {
    aspect-ratio: 0.82 / 1;
    padding: 10px;
    gap: 8px;
  }

  .product-name {
    font-size: 16px;
  }

  .product-method {
    font-size: 11px;
    line-height: 1.45;
  }

  .product-warranty {
    font-size: 10px;
  }

  .price-block strong {
    font-size: 18px;
  }

  .stock-pill {
    padding: 5px 9px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .series-tabs {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-card-main {
    aspect-ratio: auto;
    min-height: 240px;
    padding: 12px;
  }

  .product-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
