:root {
  --bg: #f5f7f8;
  --paper: #ffffff;
  --paper-soft: #fbfcf7;
  --ink: #182026;
  --muted: #66727c;
  --line: #dfe6ea;
  --teal: #0b8f87;
  --teal-dark: #08736c;
  --amber: #b86f1f;
  --green: #217a46;
  --red: #b93c36;
  --shadow: 0 14px 34px rgba(24, 32, 38, 0.1);
}

* {
  box-sizing: border-box;
}

.is-hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter,
    "Microsoft YaHei",
    "PingFang SC",
    Arial,
    sans-serif;
  line-height: 1.55;
}

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

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

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(11, 143, 135, 0.25);
  border-radius: 8px;
  color: var(--paper);
  background: linear-gradient(135deg, var(--teal), #2a9d55);
  font-size: 14px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav a {
  min-width: 64px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: #eef5f4;
  outline: none;
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.icon-button,
.text-button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.icon-button:hover,
.text-button:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.icon-button {
  width: 40px;
  padding: 0;
}

.text-button,
.primary-button,
.ghost-button {
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  outline: none;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.ghost-button {
  background: transparent;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.notice,
.store,
.support {
  margin-top: 22px;
}

.notice {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(11, 143, 135, 0.08), rgba(184, 111, 31, 0.08)),
    var(--paper);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.section-heading__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--teal);
  background: rgba(11, 143, 135, 0.12);
  font-size: 22px;
}

.section-heading p,
.eyebrow {
  margin: 0 0 4px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
}

.section-heading h1,
.store h2,
.support h2,
.modal h2 {
  margin: 0;
  letter-spacing: 0;
}

.section-heading h1 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.notice__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.notice__grid article {
  min-height: 140px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.notice__grid h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.notice__grid p,
.support p,
.modal-copy {
  margin: 0;
  color: var(--muted);
}

.store {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.store__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--teal-dark);
  font-weight: 700;
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  color: var(--muted);
}

.quick-search:focus-within {
  border-color: rgba(11, 143, 135, 0.55);
  box-shadow: 0 0 0 4px rgba(11, 143, 135, 0.12);
}

.quick-search input,
.search-popover input,
.order-search input,
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.category-strip button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.category-strip button:hover,
.category-strip button.is-active {
  border-color: rgba(11, 143, 135, 0.45);
  color: var(--teal-dark);
  background: #eef8f6;
}

.category-strip small {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(11, 143, 135, 0.12);
  color: var(--teal-dark);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.toolbar button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.toolbar button:hover,
.toolbar button.is-active {
  color: var(--ink);
  background: #edf1f2;
}

.result-line {
  min-height: 24px;
  margin: 14px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 332px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.product-card:hover {
  border-color: rgba(11, 143, 135, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card__media {
  display: grid;
  place-items: center;
  min-height: 96px;
  color: var(--paper);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.28), transparent 28%),
    linear-gradient(135deg, var(--card-a), var(--card-b));
}

.product-card__media svg {
  width: 42px;
  height: 42px;
  opacity: 0.9;
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.product-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 64px;
}

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

.badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(33, 122, 70, 0.12);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.badge--manual {
  background: rgba(184, 111, 31, 0.14);
  color: var(--amber);
}

.product-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 3px 7px;
  border-radius: 6px;
  background: #f1f4f5;
  color: #4d5962;
  font-size: 12px;
}

.product-card__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.metric {
  padding: 8px;
  border-radius: 8px;
  background: #f7f9f9;
}

.metric small,
.detail-stat small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong,
.detail-stat strong {
  display: block;
  margin-top: 1px;
  font-size: 15px;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.price {
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.support h2 {
  font-size: 24px;
}

.support p {
  max-width: 700px;
  margin-top: 8px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
  color: var(--muted);
  font-size: 13px;
}

.modal,
.search-popover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.modal.is-open,
.search-popover.is-open {
  display: block;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 24, 0.52);
}

.modal__panel {
  position: relative;
  width: min(880px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: auto;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

.modal__panel--narrow {
  width: min(620px, calc(100% - 24px));
  padding: 24px;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
}

.detail-main {
  padding: 28px;
}

.detail-side {
  padding: 28px;
  border-left: 1px solid var(--line);
  background: #f8faf9;
}

.detail-hero {
  display: grid;
  place-items: center;
  height: 160px;
  margin-bottom: 18px;
  border-radius: 8px;
  color: white;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.3), transparent 28%),
    linear-gradient(135deg, var(--card-a), var(--card-b));
}

.detail-hero svg {
  width: 58px;
  height: 58px;
}

.detail-main h2 {
  padding-right: 44px;
  font-size: 28px;
  line-height: 1.22;
}

.detail-main p {
  color: var(--muted);
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.detail-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  gap: 8px;
  color: #40505a;
}

.feature-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--teal);
}

.checkout-form {
  display: grid;
  gap: 14px;
}

.checkout-form label {
  display: grid;
  gap: 7px;
  color: #36444d;
  font-size: 14px;
  font-weight: 800;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea,
.order-search input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-form textarea {
  min-height: 86px;
  padding-top: 10px;
  resize: vertical;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus,
.order-search input:focus {
  border-color: rgba(11, 143, 135, 0.55);
  box-shadow: 0 0 0 4px rgba(11, 143, 135, 0.12);
}

.quantity-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.total-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(185, 60, 54, 0.18);
  border-radius: 8px;
  background: #fff7f5;
}

.total-box span {
  color: var(--muted);
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.terms input {
  width: 17px;
  min-height: 17px;
  margin-top: 2px;
  accent-color: var(--teal);
}

.order-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
}

.order-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding: 6px;
  border-radius: 8px;
  background: #f1f4f8;
}

.order-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #53616c;
  font-weight: 800;
}

.order-tabs button.is-active {
  border-color: #e5eaf0;
  background: #fff;
  color: #3651ff;
  box-shadow: 0 8px 18px rgba(54, 81, 255, 0.08);
}

.browser-order-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #b9efc9;
  border-radius: 8px;
  background: #effbf3;
  color: #217a46;
  font-size: 14px;
}

.browser-order-tools .ghost-button {
  min-height: 32px;
  padding: 0 10px;
  border-color: #b9efc9;
  background: #fff;
  color: #217a46;
}

.order-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.order-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

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

.order-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.order-card dt {
  color: #40505a;
  font-weight: 800;
}

.delivery-box {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #eff7f2;
  color: #245b37;
  font-size: 13px;
  word-break: break-word;
}

.search-popover {
  z-index: 120;
  background: rgba(12, 18, 24, 0.34);
}

.search-popover__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: min(720px, calc(100% - 24px));
  margin: 84px auto 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.search-popover label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-popover input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 18px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 150;
  width: min(360px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #172026;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .topbar__inner {
    flex-wrap: wrap;
    min-height: 86px;
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

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

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

  .detail-side {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .topbar__actions {
    gap: 6px;
  }

  .text-button {
    padding: 0 10px;
  }

  main,
  .footer,
  .topbar__inner {
    width: min(100% - 20px, 1180px);
  }

  .notice,
  .store,
  .support {
    padding: 16px;
  }

  .section-heading {
    gap: 12px;
  }

  .section-heading h1 {
    font-size: 26px;
  }

  .notice__grid,
  .product-grid,
  .detail-stats,
  .quantity-row {
    grid-template-columns: 1fr;
  }

  .store__header,
  .support,
  .product-card__footer,
  .order-card__head {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-search {
    width: 100%;
  }

  .toolbar,
  .category-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .toolbar button,
  .category-strip button {
    flex: 0 0 auto;
  }

  .modal__panel,
  .modal__panel--narrow {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .detail-main,
  .detail-side,
  .modal__panel--narrow {
    padding: 20px;
  }

  .detail-main h2 {
    font-size: 24px;
  }

  .order-search,
  .order-tabs,
  .search-popover__inner {
    grid-template-columns: 1fr;
  }

  .browser-order-tools {
    align-items: stretch;
    flex-direction: column;
  }
}
