:root {
  --ink: #151515;
  --muted: #686868;
  --line: #dededb;
  --soft: #f4f4f1;
  --white: #ffffff;
  --accent: #e44d39;
  --green: #267a57;
  --blue: #2859a8;
  --yellow: #f0b429;
  --shadow: 0 16px 50px rgba(20, 20, 20, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 4vw;
  border-bottom: 1px solid rgba(222, 222, 219, 0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font-size: 20px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  font-size: 15px;
}

.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 100%;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.header-nav a {
  display: grid;
  height: 100%;
  place-items: center;
  border-bottom: 2px solid transparent;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.cart-button {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-button {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.account-button:hover {
  border-color: var(--ink);
}

.account-button svg {
  width: 17px;
}

.wallet-button {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
}

.wallet-button[hidden] {
  display: none;
}

.orders-button {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.orders-button:hover {
  border-color: var(--ink);
}

.orders-button svg {
  width: 17px;
}

.orders-button[hidden] {
  display: none;
}

.wallet-button:hover {
  border-color: var(--ink);
}

.wallet-button svg {
  width: 17px;
}

.wallet-button strong {
  color: var(--green);
  font-size: 13px;
}

.cart-button:hover {
  color: var(--white);
  background: var(--ink);
}

.cart-button svg,
.primary-link svg,
.checkout-button svg {
  width: 18px;
  height: 18px;
}

.cart-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 10px;
  color: var(--white);
  background: var(--accent);
  font-size: 11px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 72px));
  overflow: hidden;
  background: #efefec;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(245, 245, 242, 0.98) 0%, rgba(245, 245, 242, 0.87) 37%, rgba(245, 245, 242, 0.04) 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 650px;
  min-height: min(680px, calc(100vh - 144px));
  margin-left: 8vw;
  padding: 9vh 0 120px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(48px, 6.2vw, 86px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 500px;
  margin: 28px 0 34px;
  color: #555;
  font-size: 17px;
  line-height: 1.8;
}

.primary-link {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  border-radius: 4px;
  color: var(--white);
  background: var(--ink);
  font-weight: 600;
}

.primary-link:hover {
  background: var(--accent);
}

.hero-trust {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 7vw;
  border-top: 1px solid rgba(21, 21, 21, 0.12);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  color: #444;
  font-size: 13px;
  font-weight: 600;
}

.hero-trust span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-trust svg {
  width: 18px;
}

.catalog,
.process,
.notice {
  padding: 100px 8vw;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}

.section-heading h2,
.notice h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.15;
  letter-spacing: 0;
}

.section-heading > p {
  max-width: 470px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  text-align: right;
}

.catalog-heading-copy {
  max-width: 470px;
  text-align: right;
}

.catalog-heading-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.api-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.api-status.connected {
  color: var(--green);
}

.api-status.failure {
  color: var(--accent);
}

.api-status.loading svg {
  animation: spin 1s linear infinite;
}

.api-status svg {
  width: 13px;
  height: 13px;
}

.catalog-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.catalog-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-search {
  display: flex;
  width: 270px;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
}

.catalog-search:focus-within {
  border-color: var(--ink);
}

.catalog-search svg {
  width: 16px;
  color: var(--muted);
}

.catalog-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.region-select-wrap {
  position: relative;
  display: flex;
  width: 160px;
  height: 38px;
  align-items: center;
}

.region-select-wrap select {
  width: 100%;
  height: 100%;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
  background: var(--white);
  cursor: pointer;
  appearance: none;
  font-size: 13px;
}

.region-select-wrap select:focus {
  border-color: var(--ink);
}

.region-select-wrap svg {
  position: absolute;
  right: 10px;
  width: 15px;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.segmented-control {
  display: flex;
  gap: 6px;
}

.segmented-control button {
  min-height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.segmented-control button:hover,
.segmented-control button.selected {
  color: var(--white);
  background: var(--ink);
}

.stock-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.stock-toggle input {
  position: absolute;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 12px;
  background: #c9c9c5;
  transition: 0.2s ease;
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  content: "";
  transition: 0.2s ease;
}

.stock-toggle input:checked + .toggle-track {
  background: var(--green);
}

.stock-toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}

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

.catalog-error {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid #efc5bf;
  border-radius: 6px;
  background: #fff8f6;
}

.catalog-error > div,
.catalog-error span {
  display: flex;
}

.catalog-error > div {
  align-items: center;
  gap: 12px;
}

.catalog-error span {
  flex-direction: column;
  gap: 4px;
}

.catalog-error svg {
  width: 24px;
  color: var(--accent);
}

.catalog-error small {
  color: var(--muted);
  line-height: 1.5;
}

.catalog-error button {
  min-width: 94px;
  min-height: 38px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--white);
  background: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.product-skeleton {
  pointer-events: none;
}

.skeleton-visual,
.skeleton-info span,
.skeleton-info strong,
.skeleton-info i {
  display: block;
  background: linear-gradient(90deg, #efefec 25%, #f8f8f6 45%, #efefec 65%);
  background-size: 220% 100%;
  animation: skeleton-loading 1.4s ease-in-out infinite;
}

.skeleton-visual {
  min-height: 225px;
}

.skeleton-info {
  padding: 20px;
}

.skeleton-info span,
.skeleton-info strong,
.skeleton-info i {
  height: 12px;
  margin-bottom: 12px;
  border-radius: 3px;
}

.skeleton-info span { width: 42%; }
.skeleton-info strong { width: 74%; height: 18px; }
.skeleton-info i { width: 55%; height: 26px; margin-bottom: 0; }

@keyframes skeleton-loading {
  to { background-position: -220% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.product-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.product-visual {
  position: relative;
  display: grid;
  min-height: 225px;
  place-items: center;
  overflow: hidden;
  background: var(--soft);
}

.product-visual::before {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 45px solid var(--card-color);
  border-radius: 50%;
  opacity: 0.14;
  content: "";
  transform: translate(65px, -60px);
}

.gift-card {
  position: relative;
  z-index: 1;
  width: min(72%, 210px);
  aspect-ratio: 1.58;
  padding: 18px;
  border-radius: 8px;
  color: var(--white);
  background: var(--card-color);
  box-shadow: 0 18px 35px rgba(20, 20, 20, 0.2);
  transform: rotate(-5deg);
}

.gift-card .card-logo {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.gift-card strong {
  position: absolute;
  right: 18px;
  bottom: 17px;
  font-size: 24px;
}

.country-card-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.35)),
    var(--region-soft);
}

.country-card-art::after {
  position: absolute;
  right: -35px;
  bottom: -65px;
  width: 230px;
  height: 230px;
  border: 48px solid var(--card-color);
  border-radius: 50%;
  opacity: 0.13;
  content: "";
}

.region-symbol {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 24px;
  display: grid;
  min-width: 54px;
  height: 38px;
  padding: 0 9px;
  place-items: center;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 3px;
  background: var(--white);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(20, 20, 20, 0.08);
}

.country-gift-card {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(72%, 220px);
  aspect-ratio: 1.58;
  padding: 20px;
  border-radius: 8px;
  color: var(--white);
  background: var(--card-color);
  box-shadow: 0 18px 35px rgba(20, 20, 20, 0.2);
  transform: rotate(-5deg);
  flex-direction: column;
  justify-content: space-between;
}

.country-gift-card span {
  width: max-content;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.country-gift-card strong {
  align-self: flex-end;
  font-size: 25px;
}

.amount-count {
  color: var(--green);
  font-weight: 700;
}

.stock-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  border-radius: 3px;
  color: var(--green);
  background: #e8f3ed;
  font-size: 11px;
  font-weight: 700;
}

.stock-badge.low {
  color: #8a5a00;
  background: #fff2cc;
}

.stock-badge.out {
  color: #777;
  background: #e9e9e6;
}

.product-info {
  padding: 20px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.product-info h3 {
  margin: 0 0 13px;
  font-size: 17px;
  line-height: 1.4;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
}

.sale-price {
  font-size: 26px;
  font-weight: 700;
}

.face-value {
  color: #888;
  font-size: 12px;
  text-decoration: line-through;
}

.add-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.add-button:hover:not(:disabled) {
  color: var(--white);
  background: var(--ink);
}

.add-button:disabled {
  border-color: var(--line);
  color: #aaa;
  background: var(--soft);
  cursor: not-allowed;
}

.add-button svg {
  width: 17px;
}

.empty-state {
  padding: 90px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 38px;
  height: 38px;
}

.process {
  background: var(--soft);
}

.process-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  border-top: 1px solid #cececa;
  list-style: none;
}

.process-list li {
  position: relative;
  min-height: 250px;
  padding: 34px 36px;
  border-right: 1px solid #cececa;
}

.process-list li:last-child {
  border-right: 0;
}

.step-number {
  position: absolute;
  top: 34px;
  right: 32px;
  color: #a8a8a2;
  font-size: 12px;
  font-weight: 700;
}

.process-list svg {
  width: 32px;
  height: 32px;
  margin: 18px 0 35px;
  color: var(--accent);
}

.process-list h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.process-list p {
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10vw;
  color: var(--white);
  background: var(--ink);
}

.notice-copy {
  padding-top: 24px;
}

.notice-copy p {
  margin: 0 0 20px;
  color: #c6c6c1;
  font-size: 14px;
  line-height: 1.85;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 100px;
  align-items: center;
  gap: 30px;
  padding: 0 8vw;
  color: var(--muted);
  font-size: 12px;
}

footer > span {
  justify-self: end;
}

.footer-brand {
  font-size: 17px;
}

.footer-brand .brand-mark {
  width: 29px;
  height: 29px;
  font-size: 12px;
}

.footer-brand .brand-avatar {
  width: 30px;
  height: 30px;
}

.drawer-backdrop {
  position: fixed;
  z-index: 29;
  inset: 0;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: 0.25s ease;
}

.drawer-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  display: flex;
  width: min(440px, 100vw);
  height: 100vh;
  padding: 30px;
  flex-direction: column;
  background: var(--white);
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.14);
  transform: translateX(105%);
  transition: transform 0.3s ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.drawer-header,
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2,
.dialog-header h2 {
  margin: 0;
  font-size: 28px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--white);
  background: var(--ink);
}

.icon-button svg {
  width: 19px;
}

.cart-items {
  overflow-y: auto;
  padding: 4px 0;
  flex: 1;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item-visual {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 4px;
  color: var(--white);
  background: var(--item-color);
  font-size: 13px;
  font-weight: 700;
}

.cart-item h3 {
  margin: 1px 0 5px;
  font-size: 14px;
}

.cart-item-price {
  color: var(--muted);
  font-size: 12px;
}

.quantity-control {
  display: flex;
  width: max-content;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.quantity-control button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.quantity-control button:hover {
  background: var(--soft);
}

.quantity-control span {
  display: grid;
  width: 30px;
  place-items: center;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}

.remove-button {
  align-self: start;
  padding: 4px;
  border: 0;
  color: #999;
  background: transparent;
  cursor: pointer;
}

.remove-button:hover {
  color: var(--accent);
}

.remove-button svg {
  width: 17px;
}

.cart-empty {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
}

.cart-empty > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
}

.text-button {
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.cart-summary {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.cart-summary > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.cart-summary .total-row {
  margin: 18px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
}

.total-row strong {
  font-size: 24px;
}

.checkout-button,
.secondary-button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.checkout-button {
  color: var(--white);
  background: var(--ink);
}

.checkout-button:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.secondary-button {
  background: var(--white);
}

.secondary-button:hover {
  background: var(--soft);
}

.summary-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: #8b8b87;
  font-size: 11px;
}

.summary-note svg {
  width: 13px;
}

.order-dialog,
.product-dialog,
.auth-dialog,
.recharge-dialog,
.alipay-dialog,
.wallet-dialog,
.orders-dialog {
  width: min(560px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px;
  border: 0;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.order-dialog::backdrop,
.product-dialog::backdrop,
.auth-dialog::backdrop,
.recharge-dialog::backdrop,
.alipay-dialog::backdrop,
.wallet-dialog::backdrop,
.orders-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

.auth-dialog {
  width: min(430px, calc(100vw - 30px));
}

.wallet-dialog {
  width: min(480px, calc(100vw - 30px));
}

.recharge-dialog {
  width: min(460px, calc(100% - 28px));
}

.alipay-dialog {
  width: min(420px, calc(100% - 28px));
}

.orders-dialog {
  width: min(700px, calc(100vw - 30px));
}

.orders-tabs {
  display: flex;
  gap: 6px;
  margin: 20px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.orders-tabs button {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: var(--soft);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.orders-tabs button.selected {
  color: var(--white);
  background: var(--ink);
}

.orders-loading,
.orders-empty {
  padding: 55px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.orders-empty svg {
  width: 34px;
  height: 34px;
}

.order-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.order-card-header,
.order-card-total,
.order-item-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.order-card-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.order-card-id {
  font-size: 13px;
  font-weight: 700;
}

.order-card-time {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.order-status {
  padding: 5px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}

.order-status.unpaid {
  color: #956100;
  background: #fff2cc;
}

.order-status.paid {
  color: var(--green);
  background: #e8f3ed;
}

.order-items {
  padding: 12px 0;
}

.order-item-line {
  margin: 7px 0;
  color: var(--muted);
  font-size: 12px;
}

.order-card-total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.order-deliveries {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #efb4ad;
  background: #fff5f3;
}

.order-deliveries strong {
  color: #c63f32;
  font-size: 12px;
}

.order-deliveries code {
  overflow-wrap: anywhere;
  padding: 8px;
  color: #171717;
  background: #fff;
  font-size: 12px;
}

.order-failure {
  display: block;
  margin-top: 10px;
  color: #c63f32;
}

.order-card-total strong {
  font-size: 18px;
}

.wallet-overview {
  margin: 22px 0 14px;
  padding: 26px;
  color: var(--white);
  background: var(--ink);
}

.wallet-overview span,
.wallet-overview strong,
.wallet-overview small {
  display: block;
}

.wallet-overview span {
  margin-bottom: 14px;
  color: #c8c8c4;
  font-size: 12px;
}

.wallet-overview strong {
  margin-bottom: 9px;
  font-size: 38px;
}

.wallet-overview small {
  color: #969691;
  font-size: 11px;
}

.wallet-dialog > .checkout-button svg {
  width: 17px;
}

.wallet-history {
  margin-top: 28px;
}

.recharge-heading {
  margin-top: 0;
}

.wallet-recharges {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.wallet-recharge {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.wallet-recharge strong,
.wallet-recharge small {
  display: block;
}

.wallet-recharge small {
  color: var(--muted);
  font-size: 10px;
}

.recharge-status {
  align-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 10px;
  font-weight: 800;
}

.recharge-status.approved {
  color: var(--green);
  background: #e8f3ed;
}

.recharge-status.rejected {
  color: var(--accent);
  background: #f9e8e6;
}

.wallet-empty.compact {
  min-height: auto;
  margin: -10px 0 28px;
  padding: 16px;
}

.recharge-form {
  display: grid;
  gap: 16px;
  padding-top: 22px;
}

.amount-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.amount-presets button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.amount-presets button.selected {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.recharge-form textarea {
  min-height: 88px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  resize: vertical;
  font: inherit;
}

.alipay-button {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  border: 1px solid #1677ff;
  border-radius: 5px;
  color: #fff;
  background: #1677ff;
  cursor: pointer;
  text-align: left;
}

.alipay-button.secondary {
  border-color: var(--ink);
  background: var(--ink);
}

.alipay-button span {
  font-size: 10px;
  opacity: .85;
}

.alipay-button:disabled {
  color: var(--muted);
  border-color: var(--line);
  background: var(--soft);
  cursor: not-allowed;
}

.payment-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.payment-divider::before,
.payment-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.alipay-checkout {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-top: 20px;
  text-align: center;
}

.alipay-amount {
  font-size: 34px;
}

.alipay-pay-detail {
  max-width: 310px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #7a4b00;
  background: #fff6df;
  font-size: 12px;
  line-height: 1.6;
}

.alipay-qr-frame {
  display: grid;
  width: 250px;
  height: 250px;
  place-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.alipay-qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alipay-checkout p,
.alipay-checkout small {
  margin: 0;
}

.alipay-checkout small {
  color: var(--muted);
  font-size: 10px;
}

.alipay-checkout .checkout-button {
  width: 100%;
}

.alipay-checkout .alipay-launch-button {
  background: #1677ff;
}

.recharge-notice {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  line-height: 1.7;
}

.wallet-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.wallet-section-heading h3 {
  margin: 0;
  font-size: 16px;
}

.wallet-section-heading span {
  color: var(--muted);
  font-size: 11px;
}

.wallet-empty {
  padding: 38px 10px 25px;
  color: var(--muted);
  text-align: center;
}

.wallet-empty svg {
  width: 28px;
  height: 28px;
}

.wallet-empty p {
  margin: 9px 0 0;
  font-size: 12px;
}

.wallet-transaction {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.wallet-transaction strong {
  font-size: 13px;
}

.wallet-transaction .credit {
  color: var(--green);
}

.wallet-transaction .debit {
  color: var(--accent);
}

.wallet-transaction small {
  color: var(--muted);
  font-size: 10px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 20px 0;
  padding: 4px;
  border-radius: 5px;
  background: var(--soft);
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.auth-tabs button.selected {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 2px 10px rgba(20, 20, 20, 0.08);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 48px;
}

.password-field button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.password-field button svg {
  width: 17px;
}

.forgot-password-button {
  justify-self: end;
  margin: -4px 0 2px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.forgot-password-button:hover {
  color: var(--accent);
}

.auth-error {
  min-height: 20px;
  margin: -4px 0 10px;
  color: var(--accent);
  font-size: 12px;
}

.account-panel {
  padding: 28px 0 4px;
  text-align: center;
}

.account-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
}

.account-avatar svg {
  width: 28px;
  height: 28px;
}

.account-panel strong,
.account-panel span {
  display: block;
}

.account-panel strong {
  margin-bottom: 5px;
  font-size: 20px;
}

.account-panel span {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}

.account-panel .secondary-button {
  gap: 9px;
}

.account-panel .secondary-button svg {
  width: 17px;
}

.product-dialog {
  width: min(980px, calc(100vw - 30px));
}

.region-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.region-flag {
  display: grid;
  min-width: 54px;
  height: 40px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
}

.product-dialog-note {
  margin: 20px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.product-purchase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.denomination-section {
  min-width: 0;
}

.denomination-section-title,
.quantity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.denomination-section-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.denomination-section-title small,
.quantity-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.denomination-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 5px;
}

.denomination-option {
  position: relative;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
}

.denomination-option:hover:not(:disabled),
.denomination-option.selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.denomination-option:disabled {
  color: #aaa;
  background: var(--soft);
  cursor: not-allowed;
}

.denomination-option strong,
.denomination-option span {
  display: block;
}

.denomination-option strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.denomination-option span {
  color: var(--muted);
  font-size: 11px;
}

.denomination-option .option-stock {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: var(--green);
}

.denomination-option:disabled .option-stock {
  color: #999;
}

.selected-product-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: var(--soft);
}

.selected-product-summary span,
.selected-product-summary strong {
  display: block;
}

.selected-product-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.selected-product-summary strong {
  font-size: 15px;
}

.selected-price {
  text-align: right;
}

.selected-price strong {
  font-size: 22px;
}

.purchase-panel {
  position: sticky;
  top: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.purchase-panel h3 {
  margin: 0 0 18px;
  font-size: 20px;
}

.purchase-quantity {
  margin-bottom: 18px;
}

.quantity-heading {
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 700;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.quantity-stepper button,
.quantity-stepper input {
  min-width: 0;
  border: 0;
  background: var(--white);
  text-align: center;
}

.quantity-stepper button {
  cursor: pointer;
  font-size: 20px;
}

.quantity-stepper button:hover:not(:disabled) {
  background: var(--soft);
}

.quantity-stepper button:disabled,
.quantity-stepper input:disabled {
  color: #aaa;
  background: var(--soft);
  cursor: not-allowed;
}

.quantity-stepper input {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  outline: 0;
  font-weight: 700;
  appearance: textfield;
}

.quantity-stepper input::-webkit-inner-spin-button,
.quantity-stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.purchase-total {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.purchase-total span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-total strong {
  font-size: 25px;
}

.purchase-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.purchase-hint svg {
  width: 13px;
}

.checkout-button:disabled {
  border-color: #c8c8c4;
  color: #999;
  background: #e9e9e6;
  cursor: not-allowed;
}

.order-review {
  margin: 20px 0;
  padding: 18px;
  background: var(--soft);
}

.review-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
}

.review-line:last-child {
  margin: 15px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.delivery-notice {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #e2ded7;
  background: #faf9f7;
}

.delivery-notice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.delivery-notice-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.delivery-notice ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.delivery-notice li + li {
  margin-top: 5px;
}

.form-field {
  display: block;
  margin-bottom: 17px;
}

.form-field span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
}

.form-field input:focus {
  border-color: var(--ink);
}

.agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.agreement input {
  margin-top: 3px;
  accent-color: var(--ink);
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 28px;
  left: 50%;
  visibility: hidden;
  min-width: 260px;
  padding: 14px 20px;
  border-radius: 4px;
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  text-align: center;
  transform: translate(-50%, 15px);
  transition: 0.25s ease;
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1020px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-content {
    margin-left: 6vw;
  }

  .hero-image {
    object-position: 60% center;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
    height: 64px;
    padding: 0 18px;
  }

  .header-nav {
    display: none;
  }

  .cart-label {
    display: none;
  }

  .account-button span {
    display: none;
  }

  .cart-button,
  .account-button,
  .wallet-button,
  .orders-button {
    min-height: 40px;
    padding: 0 10px;
  }

  .wallet-label {
    display: none;
  }

  .wallet-button strong {
    display: none;
  }

  .orders-button span {
    display: none;
  }

  .hero {
    display: grid;
    min-height: 0;
    grid-template-rows: auto auto auto;
  }

  .hero-image {
    position: relative;
    inset: auto;
    grid-row: 2;
    height: auto;
    aspect-ratio: 16 / 10;
    object-position: 58% center;
  }

  .hero-shade {
    display: none;
  }

  .hero-content {
    grid-row: 1;
    min-height: 0;
    margin: 0;
    padding: 54px 24px 42px;
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: clamp(42px, 13vw, 54px);
  }

  .hero-copy {
    margin: 22px 0 26px;
    font-size: 15px;
  }

  .hero-trust {
    position: relative;
    grid-row: 3;
    min-height: 58px;
    gap: 18px;
    padding: 0 12px;
    font-size: 10px;
  }

  .hero-trust svg {
    display: none;
  }

  .catalog,
  .process,
  .notice {
    padding: 72px 20px;
  }

  .section-heading {
    align-items: flex-start;
    margin-bottom: 30px;
    flex-direction: column;
  }

  .section-heading > p {
    text-align: left;
  }

  .catalog-heading-copy {
    text-align: left;
  }

  .catalog-toolbar {
    align-items: flex-start;
    padding: 12px 0;
    flex-direction: column;
  }

  .catalog-error {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-error button {
    width: 100%;
  }

  .catalog-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-search,
  .region-select-wrap {
    width: 100%;
  }

  .segmented-control {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .segmented-control button {
    flex: 0 0 auto;
  }

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

  .product-visual {
    min-height: 245px;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .process-list li {
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid #cececa;
  }

  .notice {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  footer {
    display: flex;
    padding: 32px 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  footer > span {
    align-self: flex-start;
  }

  .cart-drawer {
    padding: 22px 18px;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .denomination-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

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

  .purchase-panel {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
