* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: #333;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  background: #f4f4f4;
}

a {
  color: #777;
  text-decoration: none;
}

.home-wrap {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
}

.home-banner {
  width: 100%;
  display: block;
}

.home-main {
  padding: 28px 32px 40px;
}

.exchange-tabs {
  display: flex;
  width: 100%;
  height: 40px;
  margin: 0 0 24px;
  overflow: hidden;
  border: 2px solid #53ad19;
}

.exchange-tab {
  flex: 1 1 0;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--home-accent, #53ad19);
  font-size: 14px;
  background: #fff;
  border: 0;
  cursor: pointer;
}

.exchange-tab img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.exchange-tab.is-active {
  color: #fff;
  background: var(--home-accent, #53ad19);
}

.home-form {
  display: none;
}

.home-form.is-active {
  display: block;
}

.home-input,
.home-select,
.home-textarea {
  width: 100%;
  height: 40px;
  margin: 0 0 16px;
  padding: 8px 10px;
  color: #333;
  font: inherit;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  outline: none;
}

.home-input:focus,
.home-select:focus,
.home-textarea:focus {
  border-color: #53ad19;
}

.home-textarea {
  min-height: 72px;
  resize: vertical;
}

.region-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.region-line .home-select {
  margin-bottom: 0;
}

.captcha-line {
  display: grid;
  grid-template-columns: 40% 25% 35%;
  align-items: center;
  margin-bottom: 16px;
}

.captcha-line .home-input {
  margin: 0;
}

.captcha-box {
  width: 60px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  color: #2c68b1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 1px;
  background:
    linear-gradient(13deg, transparent 43%, rgba(73, 125, 199, 0.55) 44%, rgba(73, 125, 199, 0.55) 49%, transparent 50%),
    linear-gradient(-16deg, transparent 42%, rgba(212, 115, 79, 0.55) 43%, rgba(212, 115, 79, 0.55) 48%, transparent 49%),
    #f8f3df;
  cursor: pointer;
  user-select: none;
}

.captcha-link {
  justify-self: center;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.home-button {
  width: 100%;
  height: 40px;
  color: #fff;
  font: inherit;
  font-size: 14px;
  background: var(--home-accent, #53ad19);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.home-button:hover {
  filter: brightness(.92);
}

.home-notice {
  margin-top: 20px;
  color: #333;
  font-size: 14px;
  line-height: 2.05;
}

.home-footer {
  min-height: 36px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 12px;
}

.home-footer a {
  color: #777;
}

.home-service-phone {
  margin-top: 4px;
  text-decoration: none;
}

.home-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 800px);
  margin: 0 auto;
  border-top: 1px solid #e5e5e5;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .08);
}

body.has-bottom-nav {
  padding-bottom: 49px;
}

.home-bottom-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  text-decoration: none;
}

.home-bottom-nav a.is-active {
  color: var(--home-accent, #53ad19);
  font-weight: 700;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  background: rgba(0, 0, 0, 0.3);
}

.modal-mask.is-visible {
  display: block;
}

.home-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1001;
  width: 360px;
  max-width: calc(100vw - 32px);
  display: none;
  background: #fff;
  box-shadow: 1px 1px 50px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
}

.home-dialog.is-visible {
  display: block;
}

.dialog-title {
  height: 42px;
  padding: 0 48px 0 16px;
  color: #333;
  font-size: 14px;
  line-height: 42px;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
}

.dialog-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 18px;
  height: 18px;
  color: #999;
  font-size: 20px;
  line-height: 16px;
  text-align: center;
  background: none;
  border: 0;
  cursor: pointer;
}

.dialog-content {
  max-height: min(68vh, 560px);
  overflow: auto;
  padding: 20px;
  color: #222;
  font-size: 14px;
  line-height: 1.8;
}

.dialog-actions {
  padding: 0 16px 16px;
  text-align: right;
}

.dialog-actions button {
  min-width: 60px;
  height: 28px;
  padding: 0 12px;
  color: #fff;
  background: #53ad19;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.address-panel {
  margin-top: 20px;
  padding: 16px;
  display: none;
  background: #fafafa;
  border: 1px solid #e6e6e6;
}

.address-panel.is-visible {
  display: block;
}

.address-title {
  margin: 0 0 12px;
  color: #333;
  font-size: 15px;
  font-weight: 700;
}

.product-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  min-height: 134px;
  margin: 0 0 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e3e3e3;
}

.product-preview-image-wrap {
  width: 132px;
  height: 110px;
  overflow: hidden;
  background: #f6f7f5;
}

.product-preview-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.product-preview-info {
  min-width: 0;
  padding: 3px 0;
}

.product-preview-info h3 {
  margin: 0 0 6px;
  color: #222;
  font-size: 16px;
  line-height: 1.45;
}

.product-preview-category {
  display: inline-block;
  min-height: 0;
  margin-bottom: 4px;
  padding: 1px 7px;
  color: #527a43;
  font-size: 12px;
  background: #eef7e9;
}

.product-preview-category:empty {
  display: none;
}

.product-preview-code {
  margin-bottom: 7px;
  color: var(--home-accent, #53ad19);
  font-size: 12px;
}

.product-preview-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #777;
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.product-choice[hidden] {
  display: none;
}

.product-choice span {
  display: block;
  margin-bottom: 6px;
  color: #555;
  font-size: 13px;
}

.product-choice .home-select {
  margin-bottom: 0;
}

.order-list {
  width: 100%;
  border-collapse: collapse;
}

.order-list th,
.order-list td {
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.order-list th {
  color: #666;
  font-weight: 400;
  background: #fafafa;
}

.tracking-result {
  margin: -4px 0;
}

.tracking-summary {
  margin-bottom: 12px;
  color: #666;
  font-size: 13px;
}

.tracking-card {
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #e5e5e5;
  background: #fff;
}

.tracking-card:last-child {
  margin-bottom: 0;
}

.tracking-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tracking-label {
  color: #999;
  font-size: 12px;
  line-height: 1.4;
}

.tracking-order-no {
  color: #111;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-all;
}

.tracking-status {
  flex: 0 0 auto;
  min-width: 58px;
  height: 24px;
  padding: 0 8px;
  color: #fff;
  font-size: 12px;
  line-height: 24px;
  text-align: center;
}

.tracking-status.is-shipped {
  background: #53ad19;
}

.tracking-status.is-pending {
  background: #f0a23a;
}

.tracking-product {
  margin-bottom: 8px;
  color: #333;
  font-weight: 700;
  line-height: 1.6;
}

.tracking-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: -2px 0 9px;
  color: #527a43;
  font-size: 12px;
}

.tracking-meta {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  color: #666;
  font-size: 13px;
  line-height: 1.6;
}

.tracking-express {
  padding: 10px;
  background: #f6fbf3;
  border-left: 3px solid #53ad19;
}

.tracking-express span {
  display: block;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}

.tracking-express strong {
  display: block;
  margin-top: 3px;
  color: #111;
  font-size: 18px;
  line-height: 1.4;
  word-break: break-all;
}

.tracking-pending {
  padding: 10px;
  color: #8a5b00;
  background: #fff8e8;
  border-left: 3px solid #f0a23a;
}

.tracking-time {
  margin-top: 8px;
  color: #777;
  font-size: 13px;
}

@media (max-width: 640px) {
  body {
    background: #fff;
  }

  .home-main {
    padding: 20px 16px 32px;
  }

  .exchange-tabs {
    margin-bottom: 18px;
  }

  .captcha-line {
    grid-template-columns: 40% 24% 36%;
  }

  .region-line {
    grid-template-columns: 1fr;
  }

  .product-preview {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    min-height: 104px;
    padding: 10px;
  }

  .product-preview-image-wrap {
    width: 96px;
    height: 84px;
  }

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

  .home-notice {
    font-size: 13px;
    line-height: 1.9;
  }
}
