:root {
  --ink: #101210;
  --ink-2: #1a1d1a;
  --paper: #f3efe6;
  --paper-dim: #e7e1d4;
  --mute: #8b9086;
  --line: rgba(243, 239, 230, 0.12);
  --accent: #d6ff4b;
  --accent-ink: #12150a;
  --warn: #ff7a45;
  --ok: #6dcea0;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font-display: "Syne", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--paper);
  background: var(--ink);
  line-height: 1.5;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(214, 255, 75, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(255, 122, 69, 0.12), transparent 50%),
    linear-gradient(180deg, #141714 0%, #0c0d0c 45%, #101210 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(14px);
  background: rgba(16, 18, 16, 0.72);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; flex-direction: column; gap: 0.1rem; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  line-height: 1;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--mute);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--mute);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav a:hover { color: var(--paper); }
.nav a.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 700;
}

.shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.hero {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem 0 2rem;
  animation: rise 0.7s ease both;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  max-width: 12ch;
}
.hero h1 span { color: var(--accent); }
.hero p {
  margin: 0;
  max-width: 36rem;
  color: var(--paper-dim);
  font-size: 1.05rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--paper-dim);
  background: rgba(255,255,255,0.03);
}
.chip strong { color: var(--accent); font-weight: 700; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--mute); font-size: 0.9rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.6s ease both;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 255, 75, 0.35);
  box-shadow: var(--shadow);
}
.card-media {
  aspect-ratio: 4 / 5;
  background: #1c1f1c;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 0.9rem 1rem 1.1rem; }
.card-store {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.25rem;
}
.card-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.15;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.price { font-weight: 700; font-size: 1.05rem; }
.price-was {
  color: var(--mute);
  text-decoration: line-through;
  font-size: 0.85rem;
}
.badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  font: inherit;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: rgba(243,239,230,0.35); }
.btn-danger { background: var(--warn); color: #1a0b05; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }

.panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255,255,255,0.03);
  padding: 1.25rem;
}

.product-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 860px) {
  .product-layout { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
}

.product-media {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #181b18;
  aspect-ratio: 4 / 5;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-copy h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
}
.meta-list {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
  color: var(--paper-dim);
  font-size: 0.95rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

.form-grid { display: grid; gap: 0.9rem; }
.form-row { display: grid; gap: 0.35rem; }
.form-row.two {
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
label { font-size: 0.82rem; color: var(--mute); }
input, select, textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  color: var(--paper);
  padding: 0.75rem 0.85rem;
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(214, 255, 75, 0.35);
  border-color: transparent;
}
textarea { min-height: 110px; resize: vertical; }

.cart-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .cart-layout { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}

.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-item img {
  width: 88px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  background: #1c1f1c;
}
.cart-item h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1rem;
}
.muted { color: var(--mute); }
.tiny { font-size: 0.8rem; }

.tryon-stage {
  min-height: 320px;
  border-radius: var(--radius);
  border: 1px dashed rgba(214, 255, 75, 0.35);
  background:
    linear-gradient(180deg, rgba(214,255,75,0.05), transparent 40%),
    rgba(0,0,0,0.25);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.tryon-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
  animation: fade 0.5s ease;
}
.tryon-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--paper-dim);
  max-width: 22rem;
}
.notice {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(214, 255, 75, 0.08);
  border: 1px solid rgba(214, 255, 75, 0.2);
  color: var(--paper-dim);
  font-size: 0.86rem;
}
.notice.error {
  background: rgba(255, 122, 69, 0.1);
  border-color: rgba(255, 122, 69, 0.3);
}
.notice.ok {
  background: rgba(109, 206, 160, 0.1);
  border-color: rgba(109, 206, 160, 0.3);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}
.stat {
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
}
.stat span { color: var(--mute); font-size: 0.75rem; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th, .table td {
  text-align: left;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table th { color: var(--mute); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

.footer {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  color: var(--mute);
  font-size: 0.82rem;
}
.footer strong { color: var(--paper-dim); }

.empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--paper-dim);
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  z-index: 50;
  transition: transform 0.25s ease;
  box-shadow: var(--shadow);
}
.toast.is-on { transform: translateX(-50%) translateY(0); }

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(243,239,230,0.2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

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

@media (max-width: 640px) {
  .topbar { padding: 0.85rem 1rem; }
  .nav a { padding: 0.4rem 0.55rem; font-size: 0.78rem; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item .remove { grid-column: 2; justify-self: start; }
  .stat-row { grid-template-columns: 1fr; }
  .form-row.two { grid-template-columns: 1fr; }
}

.auth-split {
  display: grid;
  gap: 1rem;
  align-items: start;
}
@media (min-width: 820px) {
  .auth-split { grid-template-columns: 1.1fr 0.9fr; }
}
.auth-side h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
}
.auth-side .btn { margin-top: 0.65rem; margin-right: 0.5rem; }

.list-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .list-layout { grid-template-columns: 0.95fr 1.05fr; align-items: start; }
}

.dropzone {
  display: block;
  position: relative;
  min-height: 320px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px dashed rgba(214, 255, 75, 0.45);
  background:
    linear-gradient(180deg, rgba(214,255,75,0.06), transparent 45%),
    rgba(0,0,0,0.28);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--accent);
  background: rgba(214,255,75,0.08);
}
.dropzone.has-file { border-style: solid; }
.dropzone-inner {
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.45rem;
  text-align: center;
  padding: 1.5rem;
}
.dropzone-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.dropzone-preview {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}
