:root {
  --ink: #221613;
  --muted: #74625b;
  --line: #ead7c8;
  --paper: #fff7ec;
  --white: #ffffff;
  --red: #c71916;
  --deep-red: #8f1110;
  --gold: #e5b44f;
  --soft-gold: #fff0b8;
}

* {
  box-sizing: border-box;
}

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

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

img {
  max-width: 100%;
}

.top-strip {
  padding: 8px 5vw;
  text-align: center;
  color: #fff;
  background: var(--deep-red);
  font-size: 14px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(240px, 520px) auto;
  align-items: center;
  gap: 18px;
  padding: 14px 5vw;
  background: rgba(255, 247, 236, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  font-size: 24px;
  font-weight: 800;
  color: var(--deep-red);
  white-space: nowrap;
}

.top-search,
.search-row {
  display: flex;
  min-width: 0;
}

.top-search input,
.search-row input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 2px solid var(--red);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
}

.top-search button,
.search-row button {
  height: 42px;
  border: 0;
  border-radius: 0 6px 6px 0;
  padding: 0 18px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

nav {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  white-space: nowrap;
}

.cart-link {
  color: var(--red);
  font-weight: 700;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
}

.tag-cloud,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
}

.tag-cloud a,
.tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #ead5c2;
  border-radius: 999px;
  background: #fffaf2;
  color: var(--red);
  font-size: 13px;
}

.product-card .tag-list {
  margin: 6px 0 0;
}

.product-card .tag-list a {
  min-height: 22px;
  padding: 0 7px;
  font-size: 12px;
}

.page-head,
.section,
.product-detail,
.footer {
  max-width: 1240px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.18;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 24px;
}

.section,
.page-head {
  padding: 22px 5vw;
}

.section.compact {
  padding-top: 12px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 14px;
  border-left: 6px solid var(--red);
  padding-left: 12px;
}

.section-title p,
.summary,
.breadcrumb,
.product-card p {
  color: var(--muted);
}

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

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.card-image {
  position: relative;
  background: #f7efe5;
}

.card-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.sale-tag {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 10px;
}

.card-body h3 {
  height: 42px;
  margin: 0 0 6px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.4;
}

.card-body p {
  height: 38px;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 13px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-foot strong {
  color: var(--red);
  font-size: 16px;
}

.card-foot span {
  color: var(--deep-red);
  font-size: 13px;
  font-weight: 700;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  gap: 30px;
  padding: 28px 5vw;
}

.product-title {
  max-width: none;
  margin: 10px 0 18px;
  font-size: 30px;
  line-height: 1.28;
}

.gallery-carousel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gallery-main {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  user-select: none;
  touch-action: pan-y;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 54px;
  transform: translateY(-50%);
  border: 1px solid #e7e0d8;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #111;
  font-size: 30px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

.gallery-carousel:hover .gallery-arrow {
  opacity: 1;
}

.gallery-prev {
  left: 18px;
}

.gallery-next {
  right: 18px;
}

.gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  font-size: 13px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.spec-table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  background: #fff;
}

.spec-table th,
.spec-table td {
  padding: 11px;
  border: 1px solid var(--line);
  text-align: left;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 6px;
  color: #fff;
  background: var(--red);
  font-weight: 700;
}

.button.muted {
  background: #6f6f6f;
}

.cart-add {
  margin-right: 10px;
  background: #ff5a00;
}

.cart-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto 40px;
  padding: 0 5vw;
}

.cart-items,
.cart-summary {
  display: grid;
  gap: 12px;
  align-content: start;
}

.cart-item,
.cart-summary,
.cart-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cart-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.cart-item img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.cart-item-info h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.cart-item-info p {
  margin: 2px 0;
  color: var(--muted);
}

.cart-item-info strong,
.cart-total strong {
  color: #ff5a00;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.cart-qty button {
  width: 34px;
  height: 34px;
  border: 0;
  background: #f6f3ed;
  cursor: pointer;
}

.cart-qty input {
  width: 46px;
  height: 34px;
  border: 0;
  text-align: center;
}

.remove-cart {
  border: 0;
  color: var(--red);
  background: transparent;
  cursor: pointer;
}

.cart-summary {
  padding: 18px;
}

.cart-summary h2 {
  font-size: 22px;
}

.cart-summary textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  resize: vertical;
}

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

.cart-empty {
  padding: 22px;
  color: var(--muted);
}

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

.sku-panel {
  display: grid;
  gap: 16px;
  margin: 20px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.price-line {
  font-size: 18px;
  color: var(--muted);
}

.price-line strong {
  color: #ff5a00;
  font-size: 34px;
}

.sku-group h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.sku-styles,
.sku-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sku-style,
.sku-size {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  background: #f8f8f8;
  font: inherit;
  cursor: pointer;
}

.sku-style {
  min-width: 78px;
  padding: 0 18px;
}

.sku-style.active,
.sku-size.active {
  border-color: #ff5a00;
  color: #ff5a00;
  background: #fff7f1;
  box-shadow: inset 0 0 0 1px #ff5a00;
}

.sku-note {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.prose {
  max-width: 920px;
  font-size: 17px;
}

.rich-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px 0;
  border-radius: 8px;
}

.rich-content h2,
.rich-content h3 {
  margin: 22px 0 10px;
}

.rich-content p {
  margin: 0 0 12px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 34px 5vw;
  border-top: 1px solid var(--line);
  background: #fff;
}

.wechat {
  color: var(--red);
  font-size: 20px;
  font-weight: 800;
}

.qr {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.copyright {
  padding: 16px 5vw;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

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

@media (max-width: 760px) {
  .top-strip {
    font-size: 12px;
  }

  .site-header {
    gap: 10px;
    padding: 12px 4vw;
  }

  .brand {
    font-size: 21px;
  }

  h1 {
    font-size: 30px;
  }

  .section,
  .page-head,
  .product-detail,
  .footer {
    padding-left: 3vw;
    padding-right: 3vw;
  }

  .section-title,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card-body {
    padding: 8px;
  }

  .card-body h3 {
    height: 40px;
    font-size: 14px;
  }

  .card-body p {
    height: 34px;
    font-size: 12px;
  }

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

  .cart-wrap,
  .cart-item {
    grid-template-columns: 1fr;
  }

  .cart-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .spec-table {
    min-width: 620px;
  }
}
