:root {
  --bg: #0c0809;
  --panel: #151011;
  --panel-2: #1c1516;
  --line: #2b2022;
  --text: #f1ecec;
  --muted: #9c9091;
  --red: #e3261a;
  --red-dark: #b81c12;
  --orange: #ff7a1a;
  --radius: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Barlow, system-ui, sans-serif;
}

h1, h2, h3, .hero-text strong, .button, .crumb, .price, .total {
  font-family: "Barlow Condensed", Barlow, sans-serif;
  letter-spacing: .4px;
}

a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
[hidden] { display: none !important; }

/* ---- header ---------------------------------------------------------------------------- */

.hero {
  border-top: 3px solid var(--red);
  background:
    linear-gradient(180deg, rgba(12, 8, 9, 0) 40%, var(--bg)),
    linear-gradient(115deg, #120a0b 30%, #3a0c08 75%, #5a1a08);
  margin-bottom: 24px;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 16px 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.hero-link {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  background: none;
  border: 0;
  padding: 4px;
  text-align: left;
  text-decoration: none;
}
.hero-link.right { justify-self: end; text-align: right; }
.hero-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  transition: background .15s;
}
.hero-link:hover .hero-icon { background: var(--orange); }
.hero-text strong { display: block; font-size: 21px; text-transform: uppercase; line-height: 1.1; }
.hero-text small { color: var(--muted); font-size: 13px; }
.logo img {
  display: block;
  width: 190px;
  height: 190px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* ---- layout ---------------------------------------------------------------------------- */

.layout {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 48px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  align-items: start;
  flex: 1;
}

.sidebar { display: grid; gap: 16px; }

.box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.box-title {
  margin: 0;
  padding: 12px 16px;
  font-size: 17px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--red);
}

.menu { display: grid; padding: 6px; }
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 4px;
  background: none;
  text-align: left;
  font-weight: 500;
  color: var(--muted);
}
.menu button svg { width: 18px; height: 18px; }
.menu button:hover { background: var(--panel-2); color: var(--text); }
.menu button.active { background: var(--red); color: #fff; }

.recent { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; }
.recent img { width: 100%; height: auto; border-radius: 4px; image-rendering: pixelated; display: block; }
.recent .empty { grid-column: 1 / -1; margin: 0; font-size: 13px; }

.content { display: grid; gap: 16px; min-width: 0; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
}
.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: var(--panel-2);
}
.icon-button svg { width: 20px; height: 20px; }
.icon-button:hover { color: var(--orange); }
.crumb { font-size: 18px; font-weight: 600; text-transform: uppercase; }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.user {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  text-align: left;
  padding: 4px 8px;
  border-radius: 4px;
}
.user:hover { background: var(--panel-2); }
.user img { border-radius: 4px; image-rendering: pixelated; }
.user strong { display: block; font-size: 14px; }
.user small { color: var(--muted); font-size: 12px; }

.cart-button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 4px;
  padding: 0 14px;
  height: 38px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
}
.cart-button:hover { background: var(--red-dark); }
.cart-button svg { width: 20px; height: 20px; }

.notice {
  border-radius: var(--radius);
  padding: 12px 16px;
  background: #2a1a0c;
  border: 1px solid #5a3a14;
  color: #ffc98a;
}

/* ---- content --------------------------------------------------------------------------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.panel h1, .panel h2 { margin: 0 0 8px; line-height: 1.15; text-transform: uppercase; }
.panel h1 { font-size: 32px; }
.panel h2 { font-size: 24px; }
.panel p { color: var(--muted); margin: 0 0 10px; }
.panel p:last-child { margin-bottom: 0; }
.panel strong { color: var(--text); }

.info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.info div { background: var(--panel-2); border-radius: 4px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.info b { display: block; color: var(--text); font-weight: 600; }

.section-title {
  margin: 6px 0 -4px;
  font-size: 20px;
  text-transform: uppercase;
}

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

.product {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s;
}
.product:hover { border-color: #4a2b2c; }
.product-art {
  height: 150px;
  width: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.product-art img { height: 110px; width: auto; image-rendering: pixelated; }
.product-art svg { width: 64px; height: 64px; }
.product-art.glow { position: relative; overflow: hidden; }
.product-art.glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, var(--tint), transparent 60%);
  opacity: .28;
}
.product-art svg.pixel-key { position: relative; width: 120px; height: auto; }
.details-head .product-art svg.pixel-key { width: 76px; }
.line-art svg.pixel-key { width: 36px; height: auto; }
.product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-body h3 { margin: 0; font-size: 19px; text-transform: uppercase; }
.price { font-size: 20px; font-weight: 700; color: var(--orange); }
.product-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 14px;
  background: var(--panel-2);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
}
.button:hover { background: #251c1d; }
.button.primary { border-color: var(--red); background: var(--red); color: #fff; }
.button.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.button.primary:disabled { background: #3a2a2b; border-color: #3a2a2b; color: var(--muted); cursor: not-allowed; }
.button.wide { width: 100%; }

.empty { color: var(--muted); }

/* ---- cart and modals ------------------------------------------------------------------- */

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 10; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 11;
  display: flex;
  flex-direction: column;
}
.drawer-head, .drawer-foot { padding: 16px 18px; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 22px;
  text-transform: uppercase;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 18px; display: grid; align-content: start; gap: 8px; }
.drawer-foot { border-top: 1px solid var(--line); display: grid; gap: 10px; }
.total { display: flex; justify-content: space-between; font-size: 22px; text-transform: uppercase; }
.fine { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }

.line {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 2px 12px;
  align-items: center;
  background: var(--panel-2);
  border-radius: 4px;
  padding: 10px;
}
.line-art { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; }
.line-art img { width: 36px; image-rendering: pixelated; }
.line-art svg { width: 28px; height: 28px; }
.line strong { font-size: 14px; }
.line-price { font-weight: 600; text-align: right; }
.qty { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.qty button, .remove {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  line-height: 1;
  padding: 0;
}
.remove { justify-self: end; color: var(--muted); }
.remove:hover { color: var(--red); border-color: var(--red); }

.close { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); }
.close:hover { color: var(--text); }

.modal { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; padding: 16px; }
.modal-card {
  position: relative;
  width: min(360px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}
.modal-card.wide-card { width: min(480px, 100%); text-align: left; }
.modal-card .close { position: absolute; top: 10px; right: 12px; }
.modal-card h2 { margin: 12px 0 4px; font-size: 26px; text-transform: uppercase; }
.modal-card p { color: var(--muted); margin: 0 0 16px; }
.login-head { border-radius: 6px; image-rendering: pixelated; }
input {
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
input:focus { outline: 2px solid var(--red); outline-offset: 0; }
.error { color: #ff6b5f !important; font-size: 13px; margin-top: -6px !important; }

.details-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.details-head .product-art { width: 96px; height: 96px; border: 1px solid var(--line); border-radius: 4px; flex: none; }
.details-head .product-art img { height: 72px; }
.details-head .product-art svg { width: 44px; height: 44px; }
.details-head h2 { margin: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  padding: 10px 16px;
  border-radius: 4px;
  z-index: 20;
}

/* ---- footer and text pages ------------------------------------------------------------- */

.footer {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 16px 36px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}
.footer strong { color: var(--text); }
.footer p { margin: 4px 0 0; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

.page { max-width: 760px; width: 100%; margin: 0 auto; padding: 0 16px 48px; flex: 1; }
.page .panel h2 { font-size: 20px; margin-top: 22px; }
.page ul { color: var(--muted); padding-left: 20px; }
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; color: var(--orange); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .logo { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .logo img { width: 150px; height: 150px; }
  .layout { grid-template-columns: 1fr; }
  .menu { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .recent { grid-template-columns: repeat(8, 1fr); }
  .info { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .hero-icon { width: 40px; height: 40px; }
  .hero-text strong { font-size: 18px; }
  .user span { display: none; }
  .panel { padding: 18px; }
  .recent { grid-template-columns: repeat(6, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-art { height: 120px; }
  .product-art img { height: 84px; }
  .product-actions { grid-template-columns: 1fr; }
  .product-actions .button:first-child { display: none; }
}
