/* ───────────────────────────────────────────────────────────
   SHOPTOOLHP — dark mode marketplace, built on VNETWORK tokens
   ─────────────────────────────────────────────────────────── */

:root {
  /* Dark surface system (overrides while in dark mode) */
  --shop-bg-0:    #07080C;   /* page outside cards */
  --shop-bg-1:    #0D0F16;   /* main content surface */
  --shop-bg-2:    #12151F;   /* card surface */
  --shop-bg-3:    #1A1E2B;   /* elevated card */
  --shop-bg-4:    #232838;   /* input / hover */
  --shop-line:    rgba(255,255,255,0.06);
  --shop-line-2:  rgba(255,255,255,0.10);
  --shop-line-3:  rgba(255,255,255,0.16);

  --shop-fg-1:    #F5F6F8;
  --shop-fg-2:    #C6C9D2;
  --shop-fg-3:    #8A8FA0;
  --shop-fg-4:    #5A6072;

  --shop-red:     #E8202A;
  --shop-red-2:   #FF3B43;
  --shop-orange:  #F47920;
  --shop-amber:   #FFB547;
  --shop-green:   #22C55E;
  --shop-blue:    #3B82F6;
  --shop-violet:  #8B5CF6;
  --shop-cyan:    #06B6D4;

  --shop-grad-red:   linear-gradient(135deg, #E8202A 0%, #FF2323 50%, #FF7033 100%);
  --shop-grad-card:  linear-gradient(180deg, rgba(232,32,42,0.10) 0%, rgba(232,32,42,0) 60%);
  --shop-grad-hero:  radial-gradient(120% 80% at 0% 0%, rgba(232,32,42,0.25) 0%, rgba(232,32,42,0) 50%),
                     radial-gradient(80% 80% at 100% 100%, rgba(244,121,32,0.18) 0%, rgba(244,121,32,0) 55%),
                     linear-gradient(180deg, #1A1E2B 0%, #0D0F16 100%);

  --shop-radius:   14px;
  --shop-radius-l: 20px;
  --shop-radius-s: 8px;

  --shop-shadow:   0 10px 30px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.03) inset;
  --shop-shadow-red: 0 12px 40px rgba(232,32,42,0.35);
}

/* Light-mode token overrides (Tweak) */
[data-theme="light"] {
  --shop-bg-0:    #F4F5F8;
  --shop-bg-1:    #FFFFFF;
  --shop-bg-2:    #FFFFFF;
  --shop-bg-3:    #FFFFFF;
  --shop-bg-4:    #F1F2F6;
  --shop-line:    #ECEEF3;
  --shop-line-2:  #E2E5EC;
  --shop-line-3:  #C9CDD6;

  --shop-fg-1:    #0F1320;
  --shop-fg-2:    #2A3142;
  --shop-fg-3:    #5C657A;
  --shop-fg-4:    #8A93A5;

  --shop-grad-hero:  radial-gradient(120% 80% at 0% 0%, rgba(232,32,42,0.12) 0%, rgba(232,32,42,0) 55%),
                     radial-gradient(80% 80% at 100% 100%, rgba(244,121,32,0.10) 0%, rgba(244,121,32,0) 55%),
                     linear-gradient(180deg, #FFFFFF 0%, #F7F8FA 100%);
  --shop-shadow:   0 8px 24px rgba(15,19,32,0.06), 0 1px 0 rgba(15,19,32,0.04) inset;
}

/* ───────────────────────────────────────────────────────────
   Page chrome
   ─────────────────────────────────────────────────────────── */

.shop-root {
  width: 100%;
  height: 100%;
  font: var(--vn-font-body);
  letter-spacing: var(--vn-tracking-normal);
  color: var(--shop-fg-2);
  background: var(--shop-bg-0);
  display: grid;
  grid-template-columns: var(--sidebar-w, 248px) 1fr;
  overflow: hidden;
  box-sizing: border-box;
}
.shop-root *, .shop-root *::before, .shop-root *::after { box-sizing: border-box; }
.shop-root.collapsed { --sidebar-w: 76px; }

/* ── Sidebar ── */
.shop-sidebar {
  background: linear-gradient(180deg, var(--shop-bg-1) 0%, var(--shop-bg-0) 100%);
  border-right: 1px solid var(--shop-line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 4px;
  overflow: hidden;
}
.shop-sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid var(--shop-line);
  margin-bottom: 10px;
}
.shop-sidebar .brand .mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--shop-grad-red);
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 16px;
  letter-spacing: -0.04em;
  box-shadow: 0 6px 18px rgba(232,32,42,0.40);
  flex-shrink: 0;
}
.shop-sidebar .brand .wordmark {
  display: flex; flex-direction: column;
  min-width: 0;
}
.shop-sidebar .brand .wordmark .t1 {
  font-size: 13px; font-weight: 700; color: var(--shop-fg-1);
  letter-spacing: 0.04em;
}
.shop-sidebar .brand .wordmark .t2 {
  font-size: 10px; color: var(--shop-fg-4);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.collapsed .shop-sidebar .brand .wordmark { display: none; }

.shop-nav-group { padding-top: 14px; }
.shop-nav-group .label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--shop-fg-4);
  padding: 8px 10px 6px;
}
.collapsed .shop-nav-group .label { opacity: 0; height: 12px; }

.shop-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--shop-fg-2);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s;
}
.shop-nav-item .icon {
  width: 20px; height: 20px; flex-shrink: 0;
  display: grid; place-items: center;
  color: var(--shop-fg-3);
}
.shop-nav-item:hover { background: var(--shop-bg-2); color: var(--shop-fg-1); }
.shop-nav-item.active {
  background: linear-gradient(90deg, rgba(232,32,42,0.16), rgba(232,32,42,0.04));
  color: var(--shop-fg-1);
}
.shop-nav-item.active::before {
  content: "";
  position: absolute; left: -14px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--shop-red);
}
.shop-nav-item.active .icon { color: var(--shop-red); }
.shop-nav-item .chev { margin-left: auto; color: var(--shop-fg-4); }
.shop-nav-item .badge {
  margin-left: auto;
  font-size: 10px; font-weight: 700;
  background: var(--shop-red); color: white;
  padding: 2px 6px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.collapsed .shop-nav-item .label-txt,
.collapsed .shop-nav-item .chev,
.collapsed .shop-nav-item .badge { display: none; }

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--shop-line);
  padding-top: 12px;
}
.wallet-card {
  background: linear-gradient(135deg, rgba(232,32,42,0.10), rgba(244,121,32,0.06));
  border: 1px solid var(--shop-line-2);
  border-radius: 12px;
  padding: 12px;
}
.wallet-card .row1 {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--shop-fg-3); letter-spacing: 0.06em;
  text-transform: uppercase;
}
.wallet-card .amount {
  font-size: 20px; font-weight: 700; color: var(--shop-fg-1);
  margin-top: 4px; letter-spacing: -0.02em;
}
.wallet-card .topup {
  margin-top: 10px;
  background: var(--shop-grad-red); color: white;
  border: 0; border-radius: 8px;
  padding: 8px 0; width: 100%;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
}
.collapsed .wallet-card { display: none; }

/* ── Top bar ── */
.shop-main {
  background: var(--shop-bg-0);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.shop-topbar {
  height: 68px;
  padding: 0 28px;
  display: flex; align-items: center; gap: 18px;
  border-bottom: 1px solid var(--shop-line);
  background: var(--shop-bg-1);
  flex-shrink: 0;
}
.shop-topbar .hambtn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--shop-line);
  background: transparent;
  color: var(--shop-fg-2);
  display: grid; place-items: center;
  cursor: pointer;
}
.shop-topbar .crumbs {
  font-size: 12.5px; color: var(--shop-fg-3); letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 8px;
}
.shop-topbar .crumbs strong { color: var(--shop-fg-1); font-weight: 600; }
.shop-search {
  flex: 1;
  max-width: 520px;
  height: 40px;
  background: var(--shop-bg-2);
  border: 1px solid var(--shop-line);
  border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  color: var(--shop-fg-3);
  font-size: 13.5px;
}
.shop-search .kbd {
  margin-left: auto;
  font-size: 10.5px;
  background: var(--shop-bg-4);
  border: 1px solid var(--shop-line);
  color: var(--shop-fg-3);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}
.shop-topbar .spacer { flex: 1; }
.shop-topbar .top-actions { display: flex; align-items: center; gap: 8px; }
.shop-topbar .iconbtn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--shop-line);
  background: transparent;
  color: var(--shop-fg-2);
  display: grid; place-items: center;
  cursor: pointer;
  position: relative;
}
.shop-topbar .iconbtn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--shop-red);
  border: 2px solid var(--shop-bg-1);
}
.shop-topbar .lang {
  font-size: 12px; font-weight: 600;
  padding: 0 10px; height: 38px;
  border: 1px solid var(--shop-line); border-radius: 10px;
  color: var(--shop-fg-2);
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.shop-topbar .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #FF7033, #E8202A);
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  border: 2px solid var(--shop-line-2);
}

/* Content scroll */
.shop-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 36px;
  background: var(--shop-bg-0);
}
.shop-content::-webkit-scrollbar { width: 8px; }
.shop-content::-webkit-scrollbar-thumb { background: var(--shop-bg-4); border-radius: 4px; }

/* ───────────────────────────────────────────────────────────
   Common atoms
   ─────────────────────────────────────────────────────────── */

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.025em;
  color: var(--shop-fg-1); margin: 0;
}
.section-head .eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--shop-red);
  margin-bottom: 6px;
}
.section-head .sub { font-size: 13px; color: var(--shop-fg-3); margin-top: 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  border-radius: 999px;
  background: var(--shop-bg-2);
  border: 1px solid var(--shop-line);
  font-size: 12px; font-weight: 500;
  color: var(--shop-fg-2);
  cursor: pointer;
  white-space: nowrap;
}
.chip.active {
  background: var(--shop-fg-1); color: var(--shop-bg-1);
  border-color: var(--shop-fg-1);
}
.chip.red {
  background: rgba(232,32,42,0.12);
  color: var(--shop-red-2);
  border-color: rgba(232,32,42,0.25);
}

.btn-primary {
  background: var(--shop-grad-red); color: white;
  border: 0; border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 16px rgba(232,32,42,0.35);
  letter-spacing: 0.01em;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: var(--shop-bg-2);
  color: var(--shop-fg-1);
  border: 1px solid var(--shop-line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-ghost:hover { background: var(--shop-bg-3); border-color: var(--shop-line-2); }

.btn-buy {
  background: var(--shop-grad-red); color: white;
  border: 0; border-radius: 10px;
  width: 100%; height: 40px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: 0.01em;
}
.btn-buy.outline {
  background: transparent;
  border: 1px solid rgba(232,32,42,0.35);
  color: var(--shop-red-2);
  box-shadow: none;
}
.btn-buy.outline:hover {
  background: rgba(232,32,42,0.08);
}

/* Stats bar */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--shop-bg-1);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
}
.stat-card .glow {
  position: absolute; right: -20px; top: -20px;
  width: 90px; height: 90px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: .35;
}
.stat-card .stat-label {
  font-size: 11px; font-weight: 600;
  color: var(--shop-fg-3); letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-card .stat-value {
  font-size: 26px; font-weight: 800; color: var(--shop-fg-1);
  letter-spacing: -0.03em;
}
.stat-card .stat-delta {
  font-size: 12px; color: var(--shop-green); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.stat-card .stat-delta.down { color: var(--shop-red-2); }

/* ───────────────────────────────────────────────────────────
   Product cards (the main attraction)
   ─────────────────────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 16px;
}

.product-card {
  background: var(--shop-bg-1);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s var(--vn-ease), border-color .25s, box-shadow .25s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--shop-line-3);
  box-shadow: var(--shop-shadow);
}

.product-art {
  height: 156px;
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
  border-bottom: 1px solid var(--shop-line);
}
.product-art .mesh {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
}
.product-art .badge-pill {
  position: absolute; top: 12px; left: 12px;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: white;
  display: inline-flex; align-items: center; gap: 5px;
}
.product-art .badge-pill.trending { color: #FFB547; border-color: rgba(255,181,71,0.4); }
.product-art .badge-pill.new { color: #6EE7B7; border-color: rgba(110,231,183,0.4); }
.product-art .badge-pill.hot { color: #FF7B81; border-color: rgba(255,123,129,0.4); }

.product-art .corner-tag {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.14);
  color: white;
  font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 4px;
}

.product-card .body {
  padding: 14px 16px 12px;
  display: flex; flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-card .cat-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--shop-fg-3);
  letter-spacing: 0.04em;
}
.product-card .cat-row .cat {
  color: var(--shop-fg-2); font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10.5px;
}
.product-card .cat-row .ver {
  color: var(--shop-fg-4);
  font-weight: 500;
}
.product-card h3 {
  margin: 0;
  font-size: 16px; font-weight: 700; color: var(--shop-fg-1);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.product-card .meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--shop-fg-3);
}
.product-card .meta .item { display: inline-flex; align-items: center; gap: 4px; }
.product-card .meta .item svg { color: var(--shop-fg-4); }
.product-card .meta .item.rating { color: var(--shop-amber); font-weight: 600; }

.price-block {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 0 4px;
  border-top: 1px dashed var(--shop-line);
  margin-top: auto;
}
.price-block .vnd {
  font-size: 17px; font-weight: 800; color: var(--shop-fg-1);
  letter-spacing: -0.02em;
}
.price-block .usd {
  font-size: 11.5px; color: var(--shop-fg-3);
  font-weight: 500;
}
.price-block .lifetime {
  margin-left: auto;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--shop-fg-4);
}
.product-card .cta-row { padding: 0 16px 16px; }

/* Art types — abstract product graphics */
.art-bg { position: absolute; inset: 0; }
.art-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: white;
}
.art-glyph {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.20);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
}
.art-glyph svg { color: white; }
.art-name {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}

.art-bg.red    { background: radial-gradient(80% 80% at 30% 20%, #FF3B43 0%, #8A0F14 70%, #2A0407 100%); }
.art-bg.orange { background: radial-gradient(80% 80% at 30% 20%, #FF9A3D 0%, #B5430B 60%, #321203 100%); }
.art-bg.blue   { background: radial-gradient(80% 80% at 30% 20%, #3B82F6 0%, #1D4ED8 60%, #0B1F4D 100%); }
.art-bg.violet { background: radial-gradient(80% 80% at 30% 20%, #A78BFA 0%, #6D28D9 55%, #1E1147 100%); }
.art-bg.cyan   { background: radial-gradient(80% 80% at 30% 20%, #22D3EE 0%, #0E7490 60%, #062E36 100%); }
.art-bg.green  { background: radial-gradient(80% 80% at 30% 20%, #34D399 0%, #047857 55%, #04221A 100%); }
.art-bg.pink   { background: radial-gradient(80% 80% at 30% 20%, #F472B6 0%, #BE185D 55%, #3B0820 100%); }
.art-bg.dark   { background: radial-gradient(80% 80% at 30% 20%, #4B5365 0%, #232838 70%, #0D0F16 100%); }

/* tiny stripe noise overlay for art */
.art-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent 0 6px, rgba(255,255,255,0.04) 6px 7px
  );
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ───────────────────────────────────────────────────────────
   Featured / hero blocks
   ─────────────────────────────────────────────────────────── */

.hero-feature {
  position: relative;
  border-radius: var(--shop-radius-l);
  overflow: hidden;
  border: 1px solid var(--shop-line);
  background: var(--shop-grad-hero);
  padding: 28px 32px;
  margin-bottom: 24px;
  min-height: 200px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
}
.hero-feature .eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--shop-red-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.hero-feature h1 {
  font-size: 30px; font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.1;
  color: var(--shop-fg-1);
  margin: 10px 0 8px;
}
.hero-feature p {
  font-size: 14px; color: var(--shop-fg-3);
  max-width: 480px;
  margin: 0 0 16px;
  line-height: 1.55;
}
.hero-feature .actions { display: flex; gap: 10px; }

.hero-mini {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--shop-grad-red);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shop-shadow-red);
}
.hero-mini .window {
  position: absolute; inset: 14px;
  background: rgba(10,10,15,0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  padding: 10px;
}
.hero-mini .titlebar {
  display: flex; gap: 5px; margin-bottom: 8px;
}
.hero-mini .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); }
.hero-mini .row {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.10);
  margin-bottom: 6px;
}
.hero-mini .row.short { width: 60%; }
.hero-mini .row.tall { height: 38px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); }

/* ───────────────────────────────────────────────────────────
   List / table layout for Variation C
   ─────────────────────────────────────────────────────────── */

.tool-table {
  background: var(--shop-bg-1);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius-l);
  overflow: hidden;
}
.tt-head, .tt-row {
  display: grid;
  grid-template-columns: 56px 2.4fr 1.2fr 1fr 1fr 1.2fr 140px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}
.tt-head {
  background: var(--shop-bg-2);
  border-bottom: 1px solid var(--shop-line);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--shop-fg-4);
}
.tt-row {
  border-bottom: 1px solid var(--shop-line);
  transition: background .15s;
}
.tt-row:hover { background: var(--shop-bg-2); }
.tt-row:last-child { border-bottom: 0; }
.tt-thumb {
  width: 44px; height: 44px;
  border-radius: 10px;
  position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.tt-thumb svg { color: white; width: 22px; height: 22px; position: relative; z-index: 2; }
.tt-name { display: flex; flex-direction: column; gap: 2px; }
.tt-name .n1 { font-size: 14px; font-weight: 700; color: var(--shop-fg-1); letter-spacing: -0.015em; }
.tt-name .n2 { font-size: 11.5px; color: var(--shop-fg-3); }
.tt-cat { font-size: 12px; }
.tt-cat .badge-cat {
  display: inline-flex; align-items: center; padding: 3px 8px;
  border-radius: 6px; border: 1px solid var(--shop-line-2);
  background: var(--shop-bg-2);
  font-size: 11px; font-weight: 600;
  color: var(--shop-fg-2);
}
.tt-metric { font-size: 13px; color: var(--shop-fg-2); font-weight: 600; }
.tt-metric .lbl { display: block; font-size: 10px; color: var(--shop-fg-4); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.tt-rating { font-size: 13px; font-weight: 700; color: var(--shop-amber); display: inline-flex; align-items: center; gap: 6px; }
.tt-price { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.tt-price .vnd { font-size: 14px; font-weight: 800; color: var(--shop-fg-1); letter-spacing: -0.015em; }
.tt-price .usd { font-size: 11px; color: var(--shop-fg-3); }
.tt-action {
  background: rgba(232,32,42,0.12);
  border: 1px solid rgba(232,32,42,0.30);
  color: var(--shop-red-2);
  border-radius: 10px;
  height: 38px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tt-action:hover { background: rgba(232,32,42,0.20); }

/* ───────────────────────────────────────────────────────────
   Small utilities
   ─────────────────────────────────────────────────────────── */
.row { display: flex; align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.muted { color: var(--shop-fg-3); }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--shop-fg-4); display: inline-block; }

/* ───────────────────────────────────────────────────────────
   Variation D — Purchase History page
   ─────────────────────────────────────────────────────────── */

.history-hero {
  position: relative;
  border-radius: var(--shop-radius-l);
  overflow: hidden;
  border: 1px solid var(--shop-line);
  background:
    radial-gradient(50% 80% at 100% 50%, rgba(59,130,246,0.18) 0%, transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(232,32,42,0.18) 0%, transparent 60%),
    linear-gradient(180deg, #1A1E2B 0%, #0F121A 100%);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.history-hero .hh-bg {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 60px);
  mask-image: radial-gradient(ellipse at 60% 50%, black 30%, transparent 80%);
  pointer-events: none;
}
.history-hero > * { position: relative; z-index: 1; }
.history-hero .hh-left {
  display: flex; align-items: center; gap: 20px;
}
.history-hero .hh-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59,130,246,0.30), rgba(232,32,42,0.30));
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.10) inset;
  flex-shrink: 0;
}
.history-hero h1 {
  margin: 4px 0 4px;
  font-size: 28px; font-weight: 800;
  color: var(--shop-fg-1);
  letter-spacing: -0.03em; line-height: 1.15;
}
.history-hero .hh-eyebrow {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--shop-line-2);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: var(--shop-fg-2);
  letter-spacing: 0.04em;
}
.history-hero p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--shop-fg-3);
  max-width: 460px;
  line-height: 1.55;
}

.history-hero .hh-stats {
  display: flex; align-items: stretch; gap: 24px;
  padding-left: 24px;
}
.history-hero .hh-stat .hh-stat-v {
  font-size: 32px; font-weight: 800;
  color: var(--shop-fg-1);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.history-hero .hh-stat.warn .hh-stat-v { color: var(--shop-amber); }
.history-hero .hh-stat .hh-stat-l {
  font-size: 11px; font-weight: 600;
  color: var(--shop-fg-3);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 2px;
}
.history-hero .hh-divider {
  width: 1px;
  background: var(--shop-line-2);
}

/* Quick action grid */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.qa-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--shop-bg-1);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
  color: var(--shop-fg-2);
}
.qa-card:hover {
  border-color: var(--shop-line-3);
  background: var(--shop-bg-2);
  transform: translateY(-1px);
}
.qa-card > svg:last-child { color: var(--shop-fg-4); }
.qa-card .qa-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.qa-card[data-accent="green"]  .qa-icon { background: rgba(34,197,94,0.12);  color: #34D399; border: 1px solid rgba(34,197,94,0.25); }
.qa-card[data-accent="blue"]   .qa-icon { background: rgba(59,130,246,0.12); color: #60A5FA; border: 1px solid rgba(59,130,246,0.25); }
.qa-card[data-accent="red"]    .qa-icon { background: rgba(232,32,42,0.12);  color: #FF7B81; border: 1px solid rgba(232,32,42,0.25); }
.qa-card[data-accent="orange"] .qa-icon { background: rgba(244,121,32,0.12); color: #FFB05F; border: 1px solid rgba(244,121,32,0.25); }
.qa-card .qa-text { flex: 1; min-width: 0; }
.qa-card .qa-label {
  font-size: 14px; font-weight: 600;
  color: var(--shop-fg-1);
  letter-spacing: -0.01em;
}
.qa-card .qa-sub {
  font-size: 11.5px;
  color: var(--shop-fg-3);
  margin-top: 1px;
}
.qa-card .qa-value {
  font-size: 22px; font-weight: 800;
  color: var(--shop-fg-1);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', monospace;
}

/* History toolbar */
.hist-toolbar {
  display: flex; align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.hist-search {
  display: flex; align-items: center; gap: 10px;
  height: 38px;
  padding: 0 12px;
  background: var(--shop-bg-1);
  border: 1px solid var(--shop-line);
  border-radius: 10px;
  width: 320px;
  color: var(--shop-fg-3);
  font-size: 13px;
}
.hist-search input {
  background: transparent;
  border: 0; outline: 0;
  color: var(--shop-fg-1);
  font: inherit;
  flex: 1;
}
.hist-search input::placeholder { color: var(--shop-fg-4); }
.hist-search .kbd {
  font-size: 10.5px;
  background: var(--shop-bg-4);
  border: 1px solid var(--shop-line);
  color: var(--shop-fg-3);
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

/* History table */
.hist-table {
  background: var(--shop-bg-1);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius-l);
  overflow: hidden;
  margin-bottom: 14px;
}
.ht-head, .ht-row {
  display: grid;
  grid-template-columns: 130px 2.2fr 1.8fr 110px 110px 130px 230px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}
.ht-head {
  background: var(--shop-bg-2);
  border-bottom: 1px solid var(--shop-line);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--shop-fg-4);
}
.ht-row {
  border-bottom: 1px solid var(--shop-line);
  transition: background .15s;
}
.ht-row:hover { background: var(--shop-bg-2); }
.ht-row:last-child { border-bottom: 0; }

.code-pill {
  display: inline-flex; align-items: center;
  padding: 4px 9px;
  background: var(--shop-bg-2);
  border: 1px solid var(--shop-line-2);
  border-radius: 6px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 11.5px; font-weight: 600;
  color: var(--shop-fg-1);
  letter-spacing: 0.02em;
}
.ht-code { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ht-note {
  font-size: 11px;
  color: var(--shop-fg-3);
  font-style: italic;
}

.ht-tool { display: flex; align-items: center; gap: 12px; }
.ht-tool .tt-thumb { border-radius: 10px; }
.ht-tool .tt-thumb svg { color: white; width: 18px; height: 18px; position: relative; z-index: 2; }
.ht-tool-text { min-width: 0; }
.ht-tool-text .n1 {
  font-size: 13.5px; font-weight: 700;
  color: var(--shop-fg-1);
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 280px;
}
.ht-tool-text .n2 {
  font-size: 11.5px;
  color: var(--shop-fg-3);
}

.key-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #93C5FD;
  letter-spacing: 0.02em;
  max-width: 100%;
}
.key-pill svg { color: #60A5FA; flex-shrink: 0; }
.key-pill .head { color: var(--shop-fg-1); }
.key-pill .ellip { color: var(--shop-fg-4); margin: 0 1px; }
.key-pill .tail { color: var(--shop-fg-2); }

.key-empty {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(255,181,71,0.08);
  border: 1px dashed rgba(255,181,71,0.40);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--shop-amber);
  font-weight: 500;
}

.ht-days .dval {
  font-size: 13.5px; font-weight: 700;
  color: var(--shop-fg-1);
  font-variant-numeric: tabular-nums;
}
.ht-days .dval span {
  font-size: 11px; color: var(--shop-fg-3); font-weight: 500; margin-left: 2px;
}
.ht-days .dleft {
  font-size: 10.5px;
  color: var(--shop-fg-4);
  margin-top: 1px;
}

.ht-date .dt {
  font-size: 13px; font-weight: 600;
  color: var(--shop-fg-1);
  font-variant-numeric: tabular-nums;
}
.ht-date .tm {
  font-size: 11px;
  color: var(--shop-fg-3);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.02em;
}
.status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  box-shadow: 0 0 0 3px currentColor;
  opacity: .35;
}
.status-pill.ok   { background: rgba(34,197,94,0.10);  color: #34D399; border: 1px solid rgba(34,197,94,0.25);  }
.status-pill.warn { background: rgba(255,181,71,0.10); color: #FFB547; border: 1px solid rgba(255,181,71,0.30); }
.status-pill.err  { background: rgba(232,32,42,0.10);  color: #FF7B81; border: 1px solid rgba(232,32,42,0.30);  }
.status-pill.ok .dot { background: #22C55E; color: #22C55E; }
.status-pill.warn .dot { background: #FFB547; color: #FFB547; }
.status-pill.err .dot { background: #E8202A; color: #E8202A; }

.ht-actions {
  display: flex; align-items: center; gap: 6px;
  justify-content: flex-end;
}
.ia-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 10px;
  background: var(--shop-bg-2);
  border: 1px solid var(--shop-line-2);
  color: var(--shop-fg-2);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.ia-btn:hover { background: var(--shop-bg-3); border-color: var(--shop-line-3); color: var(--shop-fg-1); }
.ia-btn.primary {
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.30);
  color: #93C5FD;
}
.ia-btn.primary:hover { background: rgba(59,130,246,0.18); color: #BFDBFE; }
.ia-btn.accent {
  background: rgba(232,32,42,0.10);
  border-color: rgba(232,32,42,0.30);
  color: #FF7B81;
}
.ia-btn.accent:hover { background: rgba(232,32,42,0.18); }
.ia-btn.icon-only {
  padding: 7px;
  width: 30px; justify-content: center;
}

/* History footer */
.hist-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 4px;
}
.hf-text { font-size: 12.5px; color: var(--shop-fg-3); }
.hf-text strong { color: var(--shop-fg-1); font-weight: 700; }
.hf-pager { display: flex; align-items: center; gap: 4px; }
.pg-btn {
  min-width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--shop-line);
  background: var(--shop-bg-1);
  color: var(--shop-fg-2);
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 8px;
}
.pg-btn:hover { background: var(--shop-bg-2); border-color: var(--shop-line-2); color: var(--shop-fg-1); }
.pg-btn.active {
  background: var(--shop-grad-red);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(232,32,42,0.30);
}
.pg-dots { color: var(--shop-fg-4); padding: 0 4px; }

/* Featured carousel card variant — for hero stage in Variation B */
.feature-stage {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.fs-main {
  position: relative;
  border-radius: var(--shop-radius-l);
  overflow: hidden;
  border: 1px solid var(--shop-line);
  min-height: 320px;
  background:
    radial-gradient(60% 80% at 90% 0%, rgba(232,32,42,0.30) 0%, rgba(232,32,42,0) 60%),
    radial-gradient(50% 60% at 10% 100%, rgba(244,121,32,0.20) 0%, rgba(244,121,32,0) 60%),
    linear-gradient(180deg, #1A1E2B 0%, #0A0B12 100%);
  padding: 28px 32px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.fs-main .row-top {
  display: flex; align-items: center; gap: 10px;
}
.fs-main h1 {
  font-size: 38px; font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--shop-fg-1);
  margin: 14px 0 10px;
  line-height: 1.05;
}
.fs-main p {
  font-size: 14px; color: var(--shop-fg-3);
  max-width: 440px;
  margin: 0;
}
.fs-main .price-line {
  font-size: 32px; font-weight: 800; color: var(--shop-fg-1);
  letter-spacing: -0.03em;
}
.fs-main .price-line .usd { font-size: 14px; color: var(--shop-fg-3); margin-left: 8px; font-weight: 500; }
.fs-main .actions { display: flex; gap: 10px; margin-top: 14px; }

.fs-side {
  display: flex; flex-direction: column; gap: 12px;
}
.fs-side-card {
  background: var(--shop-bg-1);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  padding: 14px;
  display: flex; align-items: center; gap: 14px;
}
.fs-side-card .thumb {
  width: 52px; height: 52px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative; overflow: hidden;
}
.fs-side-card .thumb svg { color: white; position: relative; z-index: 2; }
.fs-side-card .info { flex: 1; min-width: 0; }
.fs-side-card .n1 { font-size: 13.5px; font-weight: 700; color: var(--shop-fg-1); letter-spacing: -0.01em; }
.fs-side-card .n2 { font-size: 11.5px; color: var(--shop-fg-3); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.fs-side-card .pr { font-size: 13px; font-weight: 800; color: var(--shop-fg-1); letter-spacing: -0.01em; }
.fs-side-card .pr .usd { display: block; font-size: 10.5px; color: var(--shop-fg-3); font-weight: 500; }

/* Trending right rail (Variation C) */
.split {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.rail-card {
  background: var(--shop-bg-1);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius-l);
  padding: 18px;
}
.rail-card h3 {
  margin: 0 0 14px;
  font-size: 14px; font-weight: 700; color: var(--shop-fg-1);
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 8px;
}
.rail-card h3 .pill {
  font-size: 10px; padding: 2px 7px; background: rgba(232,32,42,0.15);
  color: var(--shop-red-2); border-radius: 999px; font-weight: 700;
  letter-spacing: 0.08em;
}
.rail-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed var(--shop-line);
}
.rail-row:first-of-type { border-top: 0; padding-top: 4px; }
.rail-row .rank {
  font-size: 13px; font-weight: 800;
  color: var(--shop-fg-3);
  letter-spacing: -0.02em;
  width: 18px;
  font-variant-numeric: tabular-nums;
}
.rail-row .rank.top { color: var(--shop-red-2); }
.rail-row .thumb-sm {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.rail-row .thumb-sm svg { color: white; position: relative; z-index: 2; width: 18px; height: 18px;}
.rail-row .meta { flex: 1; min-width: 0; }
.rail-row .meta .n1 { font-size: 13px; font-weight: 600; color: var(--shop-fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-row .meta .n2 { font-size: 11px; color: var(--shop-fg-3); }
.rail-row .pr { font-size: 12px; font-weight: 700; color: var(--shop-red-2); letter-spacing: -0.01em; }

/* Promo banner */
.promo {
  display: flex; align-items: center; gap: 16px;
  background:
    radial-gradient(60% 80% at 0% 50%, rgba(232,32,42,0.30) 0%, rgba(232,32,42,0) 70%),
    linear-gradient(90deg, #1A1E2B 0%, #0E1018 100%);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.promo .badge {
  background: var(--shop-grad-red);
  color: white;
  font-size: 11px; font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.promo .text { font-size: 13.5px; color: var(--shop-fg-2); }
.promo .text strong { color: var(--shop-fg-1); }
.promo .timer {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.promo .timer .seg {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--shop-line-2);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px; font-weight: 700;
  color: var(--shop-fg-1);
  min-width: 32px;
  text-align: center;
}
.promo .timer .colon { color: var(--shop-fg-4); font-weight: 700; }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-bar .sort {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--shop-fg-3);
  padding: 6px 12px;
  border: 1px solid var(--shop-line);
  border-radius: 999px;
  cursor: pointer;
}
.filter-bar .sort strong { color: var(--shop-fg-1); font-weight: 600; }
