:root {
  --red: #f23838;
  --red-deep: #c91f24;
  --orange: #ff6a2f;
  --gold: #b7803f;
  --teal: #2fb8ad;
  --ink: #1e2732;
  --muted: #6d7480;
  --line: #e7e9ee;
  --bg: #f5f6f8;
  --soft: #fff6f2;
  --shadow: 0 16px 40px rgba(33, 39, 50, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

button {
  cursor: pointer;
}

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

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

.container {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  height: 38px;
  background: #f0f0f0;
  border-bottom: 1px solid #e5e5e5;
  color: #222;
  font-size: 14px;
}

.topbar .container,
.masthead .container,
.nav-row .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-left,
.top-right,
.quick-links,
.auth-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-link,
.link-red {
  color: var(--red);
}

button.top-link {
  border: 0;
  background: transparent;
  padding: 0;
}

.divider {
  width: 1px;
  height: 14px;
  background: #cfcfcf;
}

.masthead {
  background: #fff;
  padding: 24px 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
}

.logo-mark {
  position: relative;
  width: 78px;
  height: 58px;
  border: 4px solid var(--orange);
  border-bottom: 0;
  border-radius: 46px 46px 14px 14px;
  background: #fff8f3;
  box-shadow: inset 0 -6px 0 rgba(255, 100, 52, 0.08);
}

.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  background: var(--orange);
}

.logo-mark::before {
  width: 84px;
  height: 4px;
  left: -5px;
  bottom: 2px;
  border-radius: 3px;
}

.logo-mark::after {
  width: 34px;
  height: 15px;
  right: 4px;
  bottom: -1px;
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}

.logo-core {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 38px;
  transform: translateX(-50%);
  color: var(--red);
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.brand-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--red-deep);
  line-height: 1.1;
}

.brand-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.search-area {
  flex: 1;
  max-width: 560px;
}

.search-box {
  display: flex;
  height: 48px;
  border: 2px solid var(--red);
  background: #fff;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 16px;
  outline: 0;
}

.search-box button {
  width: 102px;
  border: 0;
  background: var(--red);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.hot-terms {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.cart-btn,
.ghost-btn,
.outline-btn,
.primary-btn,
.danger-btn,
.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: 0.18s ease;
}

.cart-btn {
  position: relative;
  width: 126px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: 18px;
}

.cart-count {
  position: absolute;
  top: -9px;
  right: 14px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
}

.wechat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.wechat-label {
  writing-mode: vertical-rl;
  padding: 6px 4px;
  background: #6d70c9;
  color: #fff;
  border-radius: 3px;
  font-size: 13px;
}

.wechat-head img,
.wechat-footer img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border: 1px solid #ddd;
}

.nav-row {
  background: #fff;
  border-bottom: 3px solid #101010;
}

.nav-row .container {
  height: 54px;
}

.category-tab {
  width: 210px;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-left: 20px;
  background: linear-gradient(135deg, #ff563a, #ff2e35);
  color: #fff;
  font-weight: 800;
}

.nav-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-left: 20px;
  font-size: 18px;
  font-weight: 800;
}

.nav-menu a {
  color: var(--red);
  padding: 14px 10px;
}

.nav-menu a.active,
.nav-menu a:hover {
  color: #111;
}

.main {
  min-height: 520px;
}

.home-hero {
  --home-hero-height: clamp(390px, calc((100vw - 516px) * 0.704), 504px);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 250px;
  align-items: start;
  gap: 12px;
  margin-top: 12px;
}

.category-panel,
.side-card,
.panel,
.product-card,
.merchant-card,
.brand-card,
.order-card,
.form-card,
.detail-card {
  background: #fff;
  border: 1px solid var(--line);
}

.category-panel {
  align-self: start;
  max-height: var(--home-hero-height);
  overflow: hidden;
  padding: 0 16px 12px;
}

.category-group {
  padding: 13px 0;
  border-bottom: 1px solid #eee;
}

.category-group:last-child {
  border-bottom: 0;
}

.category-title {
  margin-bottom: 8px;
  color: #111;
  font-weight: 800;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #69727f;
  font-size: 13px;
  line-height: 1.7;
}

.hero-slider {
  position: relative;
  height: var(--home-hero-height);
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.hero-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-slider img.active {
  opacity: 1;
}

.slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.slider-dots button.active {
  background: var(--red);
}

.home-hero > aside {
  align-self: start;
  max-height: var(--home-hero-height);
  overflow: hidden;
}

.login-box {
  padding: 18px;
  text-align: center;
}

.login-box h3 {
  margin: 2px 0 16px;
  font-size: 16px;
  color: #8b929c;
  font-weight: 400;
}

.login-box .primary-btn,
.login-box .outline-btn {
  width: 100%;
  height: 45px;
  margin-top: 10px;
}

.notice-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.notice-tabs span {
  padding: 10px;
  text-align: center;
  font-weight: 800;
  border-right: 1px solid var(--line);
}

.notice-tabs span:first-child {
  color: var(--red);
}

.notice-list,
.deal-list {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  padding: 10px 14px;
  margin: 0;
  list-style: none;
  color: #737d8a;
  font-size: 13px;
}

.notice-list li {
  margin: 8px 0;
}

.deal-list {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.deal-title {
  padding: 10px 12px;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
}

.deal-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.deal-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.deal-item b {
  color: var(--ink);
  font-weight: 700;
}

.section {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.section-title small,
.more-link {
  color: var(--muted);
}

.reference-img {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
}

.merchant-showcase {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: #fff;
}

.merchant-tabs {
  border-right: 1px solid var(--line);
}

.merchant-tab {
  display: block;
  width: 100%;
  min-height: 86px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: center;
}

.merchant-tab b {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.merchant-tab span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.merchant-tab.active {
  background: var(--soft);
}

.merchant-products,
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-grid {
  gap: 14px;
}

.merchant-products .product-card {
  border-top: 0;
  border-bottom: 0;
  border-right: 0;
}

.product-card {
  min-width: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f1f3f6;
  object-fit: cover;
}

.product-title {
  margin-top: 12px;
  min-height: 46px;
  color: #242b35;
  font-size: 15px;
  line-height: 1.55;
}

.product-meta {
  color: var(--muted);
  font-size: 13px;
  min-height: 20px;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

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

.price small {
  font-size: 14px;
}

.old-price {
  color: #a2a9b2;
  text-decoration: line-through;
  font-size: 13px;
}

.buy-btn {
  width: 100%;
  height: 38px;
  margin-top: 14px;
  border: 1px solid var(--red);
  background: #fff;
  color: var(--red);
}

.buy-btn:hover,
.outline-btn:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.product-badge {
  position: absolute;
  right: 18px;
  top: 18px;
  border-radius: 50%;
  width: 58px;
  height: 58px;
  justify-content: center;
  text-align: center;
}

.buyer-grid {
  background: #fff;
  border: 1px solid var(--line);
}

.buyer-top {
  display: grid;
  grid-template-columns: minmax(0, 3fr) repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.buyer-bottom {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.buyer-hero {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background: #f2f2f2;
}

.buyer-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f2f2f2;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.buyer-hero img.active {
  opacity: 1;
}

.buyer-grid .product-card {
  border: 0;
  border-left: 1px solid var(--line);
}

.buyer-top .product-card {
  min-height: 360px;
}

.buyer-bottom .product-card {
  border-top: 1px solid var(--line);
}

.buyer-bottom .product-card:first-child {
  border-left: 0;
}

.buyer-grid .product-card .buy-btn {
  margin-top: auto;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.brand-card {
  padding: 16px;
}

.brand-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.brand-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.brand-card p {
  margin: 0;
  color: var(--muted);
}

.brand-pics {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.brand-pics img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.brand-pics .mini-stack {
  display: grid;
  gap: 8px;
}

.brand-pics .mini-stack img {
  height: 106px;
}

.factory-list {
  display: grid;
  gap: 16px;
}

.factory-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 22px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

.factory-info h2 {
  margin: 0 0 8px;
}

.factory-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  margin: 16px 0;
  color: var(--muted);
}

.factory-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.factory-products img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

.footer {
  margin-top: 34px;
  background: #272727;
  color: #8f969d;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(230px, 1.35fr);
  gap: 18px;
  padding: 38px 0;
  border-bottom: 1px solid #3a3a3a;
}

.footer h4 {
  margin: 0 0 18px;
  color: #c9d0d8;
  font-weight: 500;
}

.footer a,
.footer p {
  display: block;
  margin: 12px 0;
}

.footer-phone b {
  display: block;
  margin: 12px 0;
  color: var(--red);
  font-size: 24px;
  white-space: nowrap;
}

.footer-bottom {
  padding: 25px 0 32px;
  text-align: center;
}

.footer-bottom a {
  display: inline;
  margin: 0;
}

.footer-bottom strong {
  color: #fff;
  font-weight: 700;
}

.auth-page {
  min-height: 100vh;
  background: #fff;
}

.auth-simple-head {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-hero {
  min-height: 610px;
  background: url("assets/login-bg.png") center / cover no-repeat;
  display: flex;
  align-items: center;
}

.auth-panel {
  width: 410px;
  margin-left: auto;
  padding: 34px 32px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs a {
  padding: 0 12px 16px;
  color: var(--muted);
  font-size: 18px;
}

.auth-tabs a.active {
  color: var(--red);
  border-bottom: 3px solid var(--red);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #58616f;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d8dde5;
  padding: 10px 12px;
  outline: 0;
  background: #fff;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.check-row input {
  margin-top: 5px;
}

.primary-btn,
.danger-btn {
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  color: #fff;
  font-weight: 800;
}

.primary-btn {
  background: var(--red);
}

.danger-btn {
  background: var(--orange);
}

.ghost-btn,
.outline-btn {
  min-height: 40px;
  padding: 0 18px;
}

.ghost-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.layout-two {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.side-menu {
  background: #fff;
  border: 1px solid var(--line);
  padding: 22px;
}

.side-menu h3 {
  margin: 0 0 14px;
}

.side-menu a {
  display: block;
  padding: 10px 0;
  color: #5f6876;
}

.side-menu a.active,
.side-menu a:hover {
  color: var(--gold);
}

.page-panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 470px minmax(0, 1fr) 260px;
  gap: 20px;
  margin-top: 24px;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
}

.thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.thumbs img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border: 2px solid transparent;
}

.thumbs img.active {
  border-color: var(--red);
}
.detail-image-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 22px;
}

.detail-image-row {
  margin: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.detail-image-row img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
}

.detail-image-row figcaption {
  padding: 12px 16px;
  color: #1c2b3a;
  font-size: 16px;
}

.detail-info h1 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.45;
}

.detail-info .sub {
  color: var(--red);
  margin-bottom: 18px;
}

.price-block {
  padding: 22px;
  margin-bottom: 18px;
  background: linear-gradient(110deg, #fff1ed, #fff);
}

.price-block .price {
  font-size: 38px;
}

.detail-table {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  color: #536071;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}

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

.sku-options button {
  min-width: 70px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
}

.sku-options button.active {
  border-color: var(--red);
  color: var(--red);
}

.qty-box {
  display: inline-flex;
  border: 1px solid var(--line);
}

.qty-box button {
  width: 34px;
  border: 0;
  background: #f7f8fa;
}

.qty-box input {
  width: 54px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
}

.action-row {
  display: flex;
  gap: 14px;
  margin-top: 26px;
}

.action-row button {
  flex: 1;
  height: 56px;
  font-size: 18px;
}

.merchant-side {
  border: 4px solid #ff4a4f;
  background: #fff;
}

.merchant-side-head {
  padding: 18px;
  background: #f7f7f7;
}

.merchant-side h3 {
  margin: 0;
  font-size: 22px;
}

.merchant-side-body {
  padding: 18px;
  color: #596575;
}

.merchant-side-body p {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
}

.merchant-side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  border-top: 1px dashed var(--line);
}

.detail-tabs {
  margin-top: 24px;
}

.tab-head {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--red);
}

.tab-head span {
  padding: 13px 22px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.detail-content {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
}

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

.feature-box {
  padding: 18px;
  background: #f7fafc;
  border: 1px solid #edf0f4;
}

.feature-box b {
  display: block;
  margin-bottom: 8px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 20px;
  margin-top: 24px;
}

.checkout-steps,
.order-steps {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.step {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.step::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dcdfe5;
}

.step:last-child::after {
  display: none;
}

.step i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-style: normal;
}

.step.done,
.step.active {
  color: var(--gold);
  font-weight: 800;
}

.step.done i,
.step.active i {
  background: var(--gold);
  color: #fff;
}

.item-line {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.item-line img {
  width: 86px;
  height: 86px;
  object-fit: cover;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
}

.summary-total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 20px;
}

.order-tabs {
  display: flex;
  gap: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.order-tabs button {
  border: 0;
  background: transparent;
  color: #3d4960;
}

.order-tabs button.active {
  color: var(--gold);
}

.order-card {
  margin-top: 18px;
}

.order-head {
  display: flex;
  gap: 28px;
  padding: 14px 18px;
  background: #f0f2f5;
  color: #657084;
}

.order-body {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 160px 150px 170px;
  align-items: stretch;
}

.order-body > div {
  padding: 18px;
  border-left: 1px solid var(--line);
}

.order-body > div:first-child {
  border-left: 0;
}

.order-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
}

.order-item img {
  width: 82px;
  height: 82px;
  object-fit: cover;
}

.order-actions {
  display: grid;
  gap: 10px;
  align-content: start;
}

.timeline {
  margin: 0;
  padding: 8px 0 0 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 22px 28px;
  border-left: 1px solid #d8dde5;
  color: #5f6876;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
}

.timeline b {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.modal {
  width: min(760px, calc(100vw - 36px));
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
}

.modal-body {
  padding: 24px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  font-size: 26px;
  color: #8b929c;
}

.agreement {
  line-height: 1.9;
  color: #3f4855;
}

.agreement h1 {
  margin-top: 0;
}

.agreement h2 {
  margin-top: 28px;
  font-size: 20px;
}


.agreement-signature {
  margin-top: 34px;
  text-align: right;
  color: #1c2b3a;
  font-weight: 700;
}

.agreement-signature p {
  margin: 8px 0;
}
.license-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
}

.license-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

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

.customer-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 94px;
  z-index: 75;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--ink);
  color: #fff;
}

.chat-body {
  height: 320px;
  overflow: auto;
  padding: 14px;
  background: #f7f8fa;
}

.faq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.faq-chips button {
  min-height: 30px;
  border: 1px solid #d8dde5;
  background: #fff;
  color: #536071;
}

.msg {
  max-width: 82%;
  padding: 9px 11px;
  margin: 8px 0;
  line-height: 1.55;
}

.msg.bot {
  background: #fff;
  border: 1px solid #e5e8ed;
}

.msg.user {
  margin-left: auto;
  background: var(--red);
  color: #fff;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr 74px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-input input {
  min-width: 0;
  border: 1px solid #d8dde5;
  padding: 0 10px;
}

.empty {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #d8dde5;
}

.toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 120;
  transform: translateX(-50%);
  padding: 12px 18px;
  background: rgba(30, 39, 50, 0.92);
  color: #fff;
}

.hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .home-hero,
  .detail-layout,
  .checkout-grid,
  .factory-card,
  .license-grid {
    grid-template-columns: 1fr;
  }

  .category-tab,
  .category-panel,
  .merchant-side {
    width: auto;
  }

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

  .footer-top {
    grid-template-columns: repeat(3, 1fr);
  }

  .brand-grid {
    grid-template-columns: 1fr;
  }

  .buyer-top,
  .buyer-bottom {
    grid-template-columns: 1fr;
  }

  .buyer-grid .product-card {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .topbar,
  .wechat-head,
  .nav-row {
    display: none;
  }

  .masthead .container,
  .layout-two,
  .order-body {
    display: block;
  }

  .brand,
  .search-area,
  .cart-btn {
    margin: 12px 0;
  }

  .merchant-showcase {
    grid-template-columns: 1fr;
  }

  .merchant-products,
  .product-grid,
  .factory-products,
  .merchant-product-list,
  .brand-grid,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    width: 100%;
    margin: 0 16px;
  }
}

