:root {
  --ink: #f4f8ff;
  --ink-soft: rgba(232, 240, 255, 0.78);
  --navy: #07111f;
  --navy-mid: #0d1b2e;
  --blue: #1f8cff;
  --blue-deep: #0c5fbf;
  --line: rgba(255, 255, 255, 0.14);
  --foam: rgba(255, 255, 255, 0.06);
  --panel: rgba(13, 27, 46, 0.82);
  --display: "DM Sans", "Segoe UI", sans-serif;
  --display-tight: "Syne", "DM Sans", sans-serif;
  --santiago: #3db7e0;
  --moto: #ff8a4c;
  --mycity: #9ccc5a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--navy);
  font-family: var(--display);
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; }

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 18% 12%, rgba(31, 140, 255, 0.28), transparent 58%),
    radial-gradient(ellipse 55% 45% at 86% 18%, rgba(12, 95, 191, 0.22), transparent 55%),
    linear-gradient(165deg, #050b14 0%, #0a1628 46%, #07111f 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  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: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}
.orbit {
  position: absolute;
  inset: 8% 10% auto;
  height: 42vh;
  border: 1px solid rgba(31, 140, 255, 0.22);
  border-radius: 50%;
  animation: spin 48s linear infinite;
}
.orbit-inner {
  position: absolute;
  inset: 18%;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: spin 36s linear infinite reverse;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.mast,
.wrap,
.auth-shell,
.foot { position: relative; z-index: 1; }

.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  line-height: 0;
}
.brand-lockup .brand-icon,
.brand-lockup .brand-wordmark {
  display: block;
  height: auto;
}
.brand-lockup--mast .brand-icon {
  width: clamp(42px, 7vw, 54px);
}
.brand-lockup--mast .brand-wordmark {
  width: clamp(118px, 20vw, 168px);
}
.brand-lockup--foot .brand-icon {
  width: 42px;
}
.brand-lockup--foot .brand-wordmark {
  width: 140px;
}
.brand-lockup--auth {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}
.brand-lockup--auth .brand-icon {
  width: 72px;
}
.brand-lockup--auth .brand-wordmark {
  width: min(220px, 70vw);
}

.mast-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nav-btn {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 11px 16px;
  border: 1px solid var(--line);
  background: var(--foam);
  color: var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.nav-btn:hover {
  background: rgba(31, 140, 255, 0.18);
  border-color: rgba(31, 140, 255, 0.55);
  transform: translateY(-1px);
}
.nav-btn.solid {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.nav-btn.solid:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}
.nav-user {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 0 4px;
}
.balance {
  background: rgba(31, 140, 255, 0.18);
  color: #dff0ff;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  border: 1px solid rgba(31, 140, 255, 0.4);
}

.wrap {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 56px;
  animation: rise 0.7s ease both;
}

.shop-hero {
  padding: clamp(28px, 6vh, 48px) 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  align-items: end;
}
.shop-hero h1 {
  margin: 0;
  font-family: var(--display-tight);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.shop-eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--blue);
}
.shop-lede {
  margin: 14px 0 0;
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.65;
}
.hero-stat {
  justify-self: end;
  width: min(100%, 240px);
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(31, 140, 255, 0.2), transparent 55%),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.hero-stat .label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  font-weight: 700;
}
.hero-stat .value {
  margin: 8px 0 0;
  font-family: var(--display-tight);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: #fff;
}
.hero-stat .hint {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid transparent;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 14px 20px;
  min-height: 48px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover, button:hover:not(:disabled) {
  background: var(--blue-deep);
  transform: translateY(-1px);
}
.btn.ghost, button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn.ghost:hover, button.ghost:hover:not(:disabled) {
  border-color: rgba(31, 140, 255, 0.6);
  background: rgba(31, 140, 255, 0.12);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.alert {
  background: rgba(255, 90, 120, 0.12);
  border: 1px solid rgba(255, 90, 120, 0.35);
  color: #ffb3c1;
  padding: 12px 14px;
  margin: 0 0 18px;
}
.alert.ok {
  background: rgba(31, 140, 255, 0.14);
  border-color: rgba(31, 140, 255, 0.4);
  color: #c8e5ff;
}

.section-label {
  margin: 8px 0 14px;
  font-family: var(--display-tight);
  font-weight: 800;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -0.03em;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(13, 27, 46, 0.96), rgba(7, 17, 31, 0.92));
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, border-color 0.28s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 140, 255, 0.45);
}
.card-media {
  position: relative;
  height: 160px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(31, 140, 255, 0.22), rgba(12, 95, 191, 0.1) 45%, rgba(255, 255, 255, 0.04));
}
.product-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.emoji {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3.4rem;
  line-height: 1;
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 18px;
}
.card h2 {
  margin: 0;
  font-family: var(--display-tight);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.98rem;
}
.price {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.chip {
  background: rgba(31, 140, 255, 0.16);
  color: #cfe8ff;
  padding: 5px 10px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.muted { color: var(--ink-soft); }
.card .btn,
.card button {
  width: 100%;
  margin-top: 12px;
}

.empty {
  grid-column: 1 / -1;
  padding: 36px 28px;
  border: 1.5px dashed var(--line);
  background: var(--panel);
  text-align: center;
}
.empty h2 {
  margin: 0;
  font-family: var(--display-tight);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.empty p {
  margin: 10px auto 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.4;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(8px);
}
.panel h2 {
  margin: 0 0 14px;
  font-family: var(--display-tight);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.rows { display: grid; gap: 0; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.row:last-child { border-bottom: 0; }
.row strong {
  font-family: var(--display-tight);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #cfe8ff;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px 48px;
  animation: rise 0.7s ease both;
}
.auth-card {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(31, 140, 255, 0.14), transparent 42%),
    var(--panel);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.35);
  padding: 32px 28px;
  backdrop-filter: blur(12px);
}
.auth-card h1 {
  margin: 0;
  font-family: var(--display-tight);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.6rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.auth-card .intro {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}
.stack {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}
label {
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 700;
}
input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus {
  outline: none;
  border-color: rgba(31, 140, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(31, 140, 255, 0.18);
}
.auth-card button {
  width: 100%;
  margin-top: 4px;
  min-height: 52px;
}
.auth-links {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.auth-links a {
  color: #9fd0ff;
  font-weight: 700;
  text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

.foot {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 36px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

@media (max-width: 900px) {
  .shop-hero { grid-template-columns: 1fr; }
  .hero-stat { justify-self: stretch; width: auto; }
  .grid, .split { grid-template-columns: 1fr; }
  .mast { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit, .orbit-inner, .wrap, .auth-shell, .card { animation: none !important; }
  .card:hover { transform: none; }
}
