:root {
  --amazon-navy: #131a22;
  --amazon-blue: #232f3e;
  --amazon-accent: #f3a847;
  --amazon-accent-strong: #ff9900;
  --ink: #0f1720;
  --muted: #5d6b7a;
  --border: #d5d9dd;
  --card: #ffffff;
  --bg: #eaeded;
  --success: #067d62;
  --danger: #b12704;
  --shadow: 0 10px 26px rgba(19, 26, 34, 0.08);
  --radius: 18px;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[lang="zh-CN"] body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Inter, ui-sans-serif, system-ui, sans-serif;
}

body.has-mobile-footer {
  padding-bottom: 76px;
}

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

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

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

.topbar {
  background: var(--amazon-navy);
  color: white;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.topbar-inner,
.nav-secondary-inner,
.section,
.footer-inner,
.item-page,
.checkout-page {
  width: min(calc(100% - 24px), var(--max));
  margin: 0 auto;
}

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

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f7c5a, #1ea672);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.5rem;
}

.brand-copy strong {
  display: block;
  font-size: 1.02rem;
}

.brand-copy span {
  display: block;
  font-size: 0.78rem;
  color: #c7d2da;
}

.primary-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 12px;
  color: #d8e2e9;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.search-shell {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 14px;
  border: 2px solid transparent;
  background: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.search-shell:hover,
.search-shell:focus-within {
  border-color: var(--amazon-accent-strong);
  box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.14);
  transform: translateY(-1px);
}

.search-shell input {
  flex: 1;
  border: 0;
  padding: 0 16px;
  min-height: 46px;
  color: var(--ink);
}

.search-shell button {
  border: 0;
  background: var(--amazon-accent);
  min-width: 58px;
  cursor: pointer;
  font-size: 1.05rem;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  white-space: nowrap;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: #d8e2e9;
  font-size: 0.9rem;
  white-space: nowrap;
}

.language-switch select,
.language-select {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0 10px;
}

.language-select-flags {
  min-width: 88px;
  padding: 0 12px;
  font-weight: 700;
}

.language-select option {
  color: black;
}

.language-switch-label {
  color: #c6d0d7;
  font-size: 0.78rem;
}

.cart-link strong {
  display: block;
  font-size: 0.95rem;
}

.cart-link span {
  display: block;
  font-size: 0.78rem;
  color: #c6d0d7;
}


.cart-link.compact {
  gap: 8px;
  padding: 0 14px;
  font-weight: 700;
}

.cart-link.compact .cart-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.cart-link.compact .cart-count-inline {
  font-size: 0.95rem;
  color: white;
  font-weight: 800;
}

.cart-link.compact strong,
.cart-link.compact span:not(.cart-icon):not(.cart-count-inline),
.cart-link.compact div {
  display: none;
}

.nav-secondary {
  background: var(--amazon-blue);
  color: #e9eef2;
}

.nav-secondary-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  padding: 10px 0 12px;
  scrollbar-width: none;
}

.nav-secondary-inner::-webkit-scrollbar {
  display: none;
}

.category-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  color: inherit;
  white-space: nowrap;
}

.category-chip.active {
  background: var(--amazon-accent-strong);
  color: var(--amazon-navy);
  font-weight: 700;
}

.section {
  padding: 22px 0 34px;
}

.info-strip,
.product-card,
.panel,
.summary-card,
.checkout-card,
.empty-state {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.info-strip p {
  margin: 0;
  color: var(--muted);
}

.info-strip strong {
  color: var(--ink);
}


.mode-chooser {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.mode-chooser strong {
  display: block;
}

.active-mode {
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.2);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 18px;
}

.section-header h1,
.section-header h2,
.block-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.7vw, 2rem);
}

.section-header p,
.muted,
.small-note,
.eyebrow {
  color: var(--muted);
}


.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.catalog-sentinel {
  text-align: center;
  padding: 20px 0 8px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(19, 26, 34, 0.14);
}

.product-card-link {
  display: grid;
  height: 100%;
}

.product-card-link.stack-layout {
  grid-template-rows: auto 1fr;
}

.card-image-wrap {
  position: relative;
  background: linear-gradient(135deg, #f5f7f9, #eef2f5);
  aspect-ratio: 4 / 3;
  padding: 14px;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.badge-row {
  position: absolute;
  inset: 12px 12px auto 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.badge.gold {
  background: #fff3d9;
  color: #8a5a00;
}

.badge.green {
  background: #dbf6ed;
  color: #136f55;
}

.product-card-body {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.product-card-body.stack-body {
  align-content: start;
}

.card-status-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.product-card h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.28;
}

.price-stack {
  display: grid;
  gap: 4px;
}

.hidden-price {
  font-size: 1rem;
  color: var(--danger);
  font-weight: 700;
}

.btn,
.btn-secondary,
.btn-ghost,
.btn-amazon {
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
}

.btn-amazon,
.btn {
  background: linear-gradient(180deg, #ffd978, #f3a847);
  color: #222b36;
}

.btn-secondary {
  background: #ff9900;
  color: #17202a;
}

.btn-ghost {
  background: #eef2f5;
  color: #243241;
}

.btn[disabled],
.btn-secondary[disabled],
.btn-ghost[disabled] {
  opacity: 0.52;
  cursor: not-allowed;
}

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


.product-card-link.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.card-image-wrap.square-crop {
  aspect-ratio: 1 / 1;
  padding: 0;
  min-height: 100%;
}

.card-image-wrap.square-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.product-card-body.split-body {
  display: grid;
  align-content: start;
  gap: 10px;
}

.card-divider {
  height: 1px;
  background: var(--border);
}

.card-price-ref {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

.card-bottom-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.card-qr-wrap {
  display: grid;
  place-items: center;
}

.card-qr {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: white;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.card-price-current {
  font-size: 1rem;
  font-weight: 800;
  color: var(--danger);
  line-height: 1.3;
}

.item-page {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
  padding: 22px 0 34px;
}

.media-panel,
.detail-panel,
.guess-panel,
.cart-panel,
.checkout-card,
.about-panel {
  padding: 20px;
}

.media-frame {
  background: linear-gradient(135deg, #f5f7f9, #edf2f4);
  border-radius: 22px;
  padding: 22px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-strip {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
}

.gallery-thumb {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f7f9, #edf2f4);
  padding: 8px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

.gallery-thumb.active {
  border-color: var(--amazon-accent-strong);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.item-meta {
  display: grid;
  gap: 14px;
}

.item-meta h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  line-height: 1.05;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-label {
  min-width: 140px;
  color: var(--muted);
}

.reference-link {
  color: #0a63b0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guess-box {
  display: grid;
  gap: 14px;
}

.plain-purchase-box {
  display: grid;
  gap: 16px;
}

.plain-price-line {
  font-size: 1.12rem;
  color: var(--ink);
  font-weight: 700;
}

.plain-price-line strong {
  color: var(--danger);
}

.plain-actions {
  justify-content: flex-start;
}

.guess-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.guess-input-row input,
.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0 14px;
  background: white;
}

.checkout-form textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

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

.wechat-contact-card {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f9fbfc;
}

.wechat-contact-card h3 {
  margin: 0;
}

.wechat-contact-image {
  width: 100%;
  max-width: 320px;
  justify-self: center;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: white;
}

.wechat-contact-id {
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

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

.status-box {
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 600;
}

.status-box.info {
  background: #eef6ff;
  color: #0d4f91;
}

.status-box.good {
  background: #e2f6ee;
  color: #0b7256;
}

.status-box.warn {
  background: #fff3db;
  color: #8a5a00;
}

.status-box.bad {
  background: #fde8e3;
  color: #9c2f16;
}

.reveal-price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--danger);
}

.checkout-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 20px;
  padding: 24px 0 40px;
}

.cart-list,
.about-stack {
  display: grid;
  gap: 14px;
}

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

.cart-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f7f9, #edf1f4);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.price-line {
  font-weight: 800;
  font-size: 1.15rem;
}

.progress {
  width: 100%;
  height: 12px;
  background: #eef2f5;
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffb54d, #ff9900);
}

.checkout-summary-rows {
  display: grid;
  gap: 12px;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.about-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.about-list li + li {
  margin-top: 10px;
}

.footer {
  background: var(--amazon-blue);
  color: #d8e0e6;
  padding: 26px 0 34px;
}

.footer-inner {
  display: grid;
  gap: 8px;
}

.footer a {
  color: #ffd07b;
}

.mobile-footer-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  background: rgba(19, 26, 34, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px max(8px, env(safe-area-inset-bottom));
}

.mobile-footer-nav-inner {
  width: min(calc(100% - 16px), 520px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mobile-tab {
  min-height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #dbe4ea;
  gap: 4px;
  padding: 6px 0;
}

.mobile-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.mobile-tab-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.mobile-tab-label {
  font-size: 0.73rem;
}

.empty-state {
  padding: 28px;
  text-align: center;
}

.hide {
  display: none !important;
}

@media (max-width: 1140px) {
  .topbar-inner {
    grid-template-columns: auto minmax(180px, 1fr) auto auto auto;
  }

  .brand-copy span {
    display: none;
  }
}

@media (max-width: 980px) {
  .item-page,
  .checkout-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .brand-lockup,
  .cart-link,
  .primary-links {
    display: none;
  }

  .language-switch {
    display: inline-flex;
    justify-self: end;
    order: 2;
  }

  .language-switch-label {
    display: inline;
  }

  .search-shell {
    grid-column: auto;
    order: 1;
  }

  .section,
  .item-page,
  .checkout-page {
    padding-top: 16px;
  }

  .info-strip,
  .media-panel,
  .detail-panel,
  .guess-panel,
  .cart-panel,
  .checkout-card,
  .about-panel {
    padding: 18px;
  }

  .form-grid,
  .guess-input-row,
  .cart-item,
  .spec-list li,
  .card-bottom-row {
    grid-template-columns: 1fr;
  }

  .product-card-link.split-layout {
    grid-template-columns: 1fr 1fr;
  }

  .cart-item {
    text-align: left;
  }

  .cart-thumb {
    max-width: 180px;
  }

  .mobile-footer-nav {
    display: block;
  }
}
