:root {
  --bg: #080808;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --bg-hover: #1a1a1a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --faint: #5c5c5c;
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.12);
  --badge: #1e1e1e;
  --badge-text: #d4d4d4;
  --danger: #e05c5c;
  --radius: 2px;
  --radius-lg: 4px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --container: min(1200px, calc(100% - 48px));
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea, button {
  font: inherit;
  color: inherit;
}
.hidden { display: none !important; }

/* ── Gate / Auth ── */
.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,255,255,0.06), transparent),
    var(--bg);
}

.gate-card {
  width: min(440px, 100%);
  padding: 40px 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.gate-brand {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.gate-sub, .auth-title {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 14px;
}

.auth-title {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.field input,
.field select,
.field textarea,
.sell-fields input,
.sell-fields textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.sell-fields input:focus,
.sell-fields textarea:focus {
  border-color: var(--line-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #0a0a0a;
}

.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 28px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  padding: 8px;
}

.btn-text:hover { color: var(--text); }

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.btn-row .btn-primary { width: auto; }

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin: 10px 0 0;
}

/* ── Shell ── */
.shop-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
  height: 64px;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .brand {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  color: var(--text);
  padding: 0;
}

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--muted);
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--accent-soft);
}

/* ── Hero ── */
.hero {
  padding: 72px 24px 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(255,255,255,0.04), transparent),
    var(--bg);
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.hero-lead {
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

/* ── Sections ── */
.page { flex: 1; }

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px;
}

.section-head {
  margin-bottom: 32px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px;
}

.section-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  max-width: 520px;
}

.section-actions {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}

.product-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.product-image {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #0c0c0c;
  overflow: hidden;
}

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

.product-image .placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 13px;
}

.product-body {
  padding: 16px;
}

.product-brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-size {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.product-title {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--badge);
  color: var(--badge-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.product-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.fav-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  padding: 0;
  letter-spacing: 0.02em;
}

.fav-btn:hover,
.fav-btn.on { color: var(--text); }

/* ── CTA band ── */
.cta-band {
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 64px 24px;
}

.cta-inner {
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}

.cta-inner h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  margin: 0 0 16px;
}

.cta-inner p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.cta-inner .btn-primary {
  width: auto;
  display: inline-flex;
  min-width: 200px;
}

/* ── Sell form ── */
.sell-section { padding-top: 48px; }

.notice {
  padding: 14px 16px;
  background: rgba(224, 92, 92, 0.1);
  border: 1px solid rgba(224, 92, 92, 0.25);
  color: #f0a0a0;
  font-size: 14px;
  margin-bottom: 24px;
}

.sell-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.upload-box {
  display: block;
  cursor: pointer;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  aspect-ratio: 3 / 4;
  background: var(--bg-card);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
}

.upload-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sell-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-full { grid-column: 1 / -1; }

.sell-fields textarea {
  min-height: 100px;
  resize: vertical;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sell-fields .btn-primary {
  grid-column: 1 / -1;
  width: auto;
  justify-self: start;
  min-width: 180px;
}

/* ── Profile ── */
.profile-hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 32px;
  border-bottom: 1px solid var(--line);
}

.profile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.profile-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 8px;
}

.profile-hero h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  margin: 0 0 8px;
}

.profile-meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  flex-shrink: 0;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
}

.stat-rating {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-rating .star { color: #c9a227; font-size: 16px; }

.profile-tabs-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  overflow-x: auto;
}

.profile-tab {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 20px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.profile-tab:hover { color: var(--text); }

.profile-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 24px;
}

.sub-tab {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 0;
  transition: color 0.15s;
}

.sub-tab:hover,
.sub-tab.active { color: var(--text); }

.sub-tab-cta {
  margin-left: auto;
  padding: 8px 16px !important;
  background: var(--accent);
  color: #0a0a0a !important;
  font-weight: 600;
  border-radius: var(--radius);
}

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

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 48px 24px;
  margin-top: auto;
}

.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .brand {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.footer-copy {
  margin-top: 20px !important;
  color: var(--faint) !important;
}

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 14px;
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.footer-col a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header { gap: 12px; padding: 0 16px; }
  .main-nav { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 11px; }
  .hero { padding: 48px 16px 40px; }
  .section { padding: 40px 16px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sell-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .profile-top { flex-direction: column-reverse; align-items: flex-start; }
  .sub-tab-cta { margin-left: 0; width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .btn-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
