:root {
  --blue: #006fff;
  --blue-dark: #0056cc;
  --blue-soft: #e8f2ff;
  --orange: #ff7a1a;
  --orange-dark: #e86a10;
  --text: #222;
  --muted: #575757;
  --line: #e6e8ee;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --ok: #16a34a;
  --danger: #ef4444;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(15, 40, 80, 0.08);
  --font: "Plus Jakarta Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--muted);
  background:
    radial-gradient(1200px 480px at 12% -10%, rgba(0, 111, 255, 0.06), transparent 55%),
    radial-gradient(900px 420px at 92% 0%, rgba(58, 160, 255, 0.05), transparent 50%),
    var(--bg);
  min-height: 100%;
  scroll-behavior: auto;
  overflow-x: hidden;
}

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

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

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

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
}

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

/* Header */
.topbar {
  border-bottom: 1px solid rgba(230, 232, 238, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #006fff, #3aa0ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(0, 111, 255, 0.35);
}

.brand-text strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.brand-text span {
  font-size: 12px;
  color: #8a93a3;
}

.search {
  flex: 1;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}

.search select,
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 14px;
}

.search select {
  border-right: 1px solid var(--line);
  color: var(--text);
  max-width: 90px;
}

.search input {
  flex: 1;
  min-width: 0;
}

.search button {
  border: 0;
  background: var(--blue);
  color: #fff;
  width: 48px;
  cursor: pointer;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-btn,
.ghost-btn,
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  transition: 0.15s ease;
}

.lang-btn {
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13px;
}

.btn {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.btn:hover {
  background: var(--blue-dark);
}

.btn-outline {
  background: #fff;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn-outline:hover {
  background: var(--blue-soft);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}

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

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 12px;
  flex-wrap: wrap;
}

.cat-trigger {
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge-new {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  background: var(--blue);
  color: #fff;
  border-radius: 4px;
  padding: 1px 4px;
  vertical-align: super;
}

.cat-panel {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 40, 80, 0.12);
  margin-top: 6px;
  z-index: 60;
  max-height: 72vh;
  overflow: auto;
}

.cat-panel.open {
  display: block;
}

.cat-panel-inner {
  padding: 18px 20px 22px;
}

.cat-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cat-panel-head strong {
  color: var(--text);
  font-size: 15px;
}

.cat-panel-head a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

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

.cat-col {
  min-width: 0;
}

.cat-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.cat-col-title:hover {
  color: var(--blue);
}

.cat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cat-sub {
  display: block;
  padding: 4px 0 4px 17px;
  font-size: 13px;
  color: #7b8494;
  border-radius: 6px;
}

.cat-sub:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

main#view {
  flex: 1;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 111, 255, 0.12), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(58, 160, 255, 0.16), transparent 35%),
    linear-gradient(180deg, #f3f8ff 0%, #ffffff 70%);
  padding: 48px 0 36px;
}

.hero-float {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-float span {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  animation: floaty 6s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow);
}

.pill strong {
  color: var(--ok);
}

.hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--text);
  box-shadow: inset 0 -10px 0 rgba(0, 111, 255, 0.25);
}

.hero-sub {
  margin: 0 0 18px;
  font-size: 16px;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(230, 232, 238, 0.95);
  color: #3a4250;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(15, 40, 80, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.chip:hover {
  border-color: #9ec2ff;
  color: var(--blue);
  transform: translateY(-1px);
  background: #fff;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-cta .btn {
  min-width: 140px;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
}

/* Sections */
.section {
  padding: 36px 0;
}

.section.alt {
  background: var(--bg-soft);
}

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

.section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
}

.section-head p {
  margin: 4px 0 0;
  font-size: 13px;
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.card-product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.card-product:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(15, 40, 80, 0.1);
  border-color: #cfe0ff;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.catalog-layout > * {
  min-width: 0;
}

.catalog-aside {
  position: sticky;
  top: 86px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7fc 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 12px 16px;
  box-shadow: 0 10px 28px rgba(15, 40, 80, 0.04);
}

.catalog-aside-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 6px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(230, 232, 238, 0.9);
}

.catalog-aside-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0.01em;
}

.catalog-aside-count {
  font-size: 12px;
  color: #8a93a3;
}

.cat-side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding-right: 2px;
}

.cat-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 11px;
  color: #3a4250;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cat-side-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-side-num {
  font-size: 11px;
  color: #9aa3b2;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  flex-shrink: 0;
}

.cat-side-link:hover {
  background: #fff;
  color: var(--blue);
  transform: translateX(2px);
}

.cat-side-link.active {
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 111, 255, 0.1);
}

.cat-side-link.active .cat-side-num {
  color: var(--blue);
  border-color: #cfe0ff;
  background: var(--blue-soft);
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8fbff, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.catalog-toolbar .page-title {
  margin-bottom: 4px;
}

.catalog-toolbar .page-desc {
  margin: 0;
}

.subcat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px 0 2px;
}

.subcat-chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: #6b7382;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.subcat-chip:hover,
.subcat-chip.active {
  border-color: #9ec2ff;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 600;
}

.thumb {
  height: 168px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
  background: #eef3fb;
}

.thumb-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

.thumb-fallback {
  font-size: 28px;
  font-weight: 800;
}

.thumb .tag {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(15, 23, 42, 0.55);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  z-index: 1;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 12px 14px 14px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  min-height: 60px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

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

.price {
  color: var(--blue);
  font-weight: 800;
  font-size: 18px;
}

.stock {
  font-size: 12px;
  color: #8a93a3;
}

/* Steps / stats */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
}

.step .n {
  width: 34px;
  height: 34px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.step h4 {
  margin: 0 0 6px;
  color: var(--text);
}

.step p {
  margin: 0;
  font-size: 13px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat {
  background: linear-gradient(135deg, #006fff, #3aa0ff);
  color: #fff;
  border-radius: 16px;
  padding: 22px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 32px;
  margin-bottom: 4px;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
}

.blog-card:hover {
  border-color: #cfe0ff;
}

.blog-card time {
  font-size: 12px;
  color: #8a93a3;
}

.blog-card h3 {
  margin: 8px 0;
  color: var(--text);
  font-size: 16px;
}

/* Footer */
.footer {
  margin-top: auto;
  background: #0f172a;
  color: #cbd5e1;
  padding: 36px 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 20px;
}

.footer h4 {
  color: #fff;
  margin: 0 0 12px;
}

.footer a {
  display: block;
  padding: 4px 0;
  color: #94a3b8;
  font-size: 14px;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 24px;
  padding-top: 14px;
  font-size: 12px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Page shells */
.page {
  padding: 28px 0 48px;
}

.page-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 26px;
}

.page-desc {
  margin: 0 0 20px;
}

.breadcrumb {
  font-size: 13px;
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--blue);
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.layout-2 {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
}

.side-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  margin-bottom: 4px;
}

.side-nav a.active,
.side-nav a:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}

.table th {
  color: #8a93a3;
  font-weight: 600;
}

.status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #dcfce7;
  color: #166534;
}

.status.warn {
  background: #fef3c7;
  color: #92400e;
}

.status.muted {
  background: #e2e8f0;
  color: #475569;
}

/* Product detail */
.detail {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

.detail-thumb {
  height: 320px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 48px;
  font-weight: 800;
  overflow: hidden;
}

.detail-thumb .thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.detail h1 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.35;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.meta-chip {
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.buy-box {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.qty {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.qty button {
  width: 36px;
  border: 0;
  background: var(--bg-soft);
  cursor: pointer;
}

.qty input {
  width: 64px;
  border: 0;
  text-align: center;
  outline: 0;
}

/* Auth */
.auth-wrap {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding: 40px 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 111, 255, 0.1), transparent 40%),
    var(--bg-soft);
}

.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 24px;
}

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  outline: 0;
  background: #fff;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 111, 255, 0.12);
}

.form-tip {
  font-size: 12px;
  color: #8a93a3;
  margin: 0 0 14px;
}

.auth-switch {
  margin-top: 14px;
  font-size: 14px;
  text-align: center;
}

.auth-switch a {
  color: var(--blue);
  font-weight: 600;
}

/* Wallet */
.wallet-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.wallet-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.wallet-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 28px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filters input,
.filters select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  outline: 0;
  background: #fff;
}

.empty {
  text-align: center;
  padding: 48px 16px;
  color: #8a93a3;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  z-index: 100;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  pointer-events: none;
  max-width: min(360px, calc(100% - 36px));
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 70;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}

.mobile-nav a {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 6px 2px;
}

.mobile-nav a.active {
  color: var(--blue);
  font-weight: 700;
}

.fav-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.fav-btn.on {
  border-color: #fda4af;
  color: #e11d48;
  background: #fff1f2;
}

.prose h3 {
  color: var(--text);
}

.prose p {
  line-height: 1.7;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.feature-list div {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

@media (max-width: 980px) {
  .grid-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail,
  .layout-2,
  .about-grid,
  .footer-grid,
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .catalog-aside {
    position: static;
    display: block;
    padding: 10px !important;
    max-width: 100%;
    overflow: hidden;
  }
  .catalog-aside-head {
    display: none;
  }
  .cat-side-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    max-height: none;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .cat-side-link {
    white-space: nowrap;
    flex: 0 0 auto;
    transform: none;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--line);
  }
  .cat-side-link:hover {
    transform: none;
  }
  .cat-side-num {
    display: none;
    margin: 0;
  }
  .wallet-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100%, calc(100% - 20px));
  }
  .topbar-row {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }
  .search {
    order: 3;
    width: 100%;
  }
  .nav-links {
    display: none;
  }
  .mobile-nav {
    display: flex;
  }
  main#view {
    padding-bottom: 72px;
  }
  .page {
    padding: 14px 0 28px;
  }
  .page-title {
    font-size: 20px;
  }
  .breadcrumb {
    margin-bottom: 10px;
  }
  .catalog-layout {
    gap: 12px;
  }
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
  }
  .catalog-toolbar .filters {
    margin: 0;
    width: 100%;
  }
  .catalog-toolbar .filters input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .grid-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .thumb {
    height: 118px;
  }
  .thumb-fallback {
    font-size: 22px;
  }
  .card-body {
    padding: 10px;
  }
  .card-body h3 {
    font-size: 12.5px;
    min-height: 0;
    -webkit-line-clamp: 2;
    margin-bottom: 8px;
  }
  .price {
    font-size: 15px;
  }
  .stock {
    font-size: 11px;
  }
  .subcat-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 4px;
  }
  .subcat-chip {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 12px;
  }
  .detail {
    gap: 14px;
  }
  .detail-thumb {
    height: 220px;
  }
  .detail h1 {
    font-size: 18px;
  }
  .blog-grid,
  .stats,
  .feature-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding: 32px 0 24px;
  }
  .nav-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
  }
  .nav-row .cat-trigger,
  .nav-row .btn-orange {
    flex: 1 1 calc(50% - 4px);
    width: auto;
    justify-content: center;
    min-width: 0;
    font-size: 13px;
    padding: 10px 8px;
  }
  .toast {
    bottom: 76px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

/* USDT pay modal */
.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 25, 45, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
}

.pay-dialog {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(15, 40, 80, 0.22);
  position: relative;
}

.pay-dialog h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 20px;
}

.pay-sub {
  margin: 0 0 14px;
  font-size: 14px;
}

.pay-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #8a93a3;
}

.pay-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--bg-soft);
  border-radius: 14px;
}

.pay-qr {
  width: 180px;
  height: 180px;
  border-radius: 10px;
  background: #fff;
}

.pay-addr-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.pay-addr-box code {
  display: block;
  font-size: 12px;
  word-break: break-all;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
}

.pay-form .pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.usdt-preview {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: 12px;
}

.usdt-preview img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  background: #fff;
}

.usdt-preview code {
  font-size: 12px;
  word-break: break-all;
  color: var(--text);
}
