:root {
  --orange: #ff8a00;
  --gold: #ffc63a;
  --dark: #111216;
  --panel: #202128;
  --panel2: #2b2c35;
  --line: #5c5b6c;
  --text: #eeeeee;
  --muted: #b5b5b5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 138, 0, .18), transparent 24%),
    radial-gradient(circle at 80% 70%, rgba(49, 132, 197, .16), transparent 26%),
    #020202;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  display: grid;
  place-items: center;
  overflow-x: hidden;
}

.scanlines, .noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.scanlines {
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035), rgba(255,255,255,.035) 1px, transparent 2px, transparent 5px);
  mix-blend-mode: overlay;
  opacity: .35;
}

.noise {
  background-image: url("assets/backgrounds/grunge.svg");
  opacity: .08;
}

.site-shell {
  width: min(1180px, 96vw);
  padding: 10px;
  background: linear-gradient(180deg, #08080b, #15151a);
  border: 2px solid #09090c;
  box-shadow: 0 0 0 1px #30303a, 0 0 35px rgba(255, 138, 0, .18);
}

.top-window, .main-window, .side-window, .music-panel {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: inset 0 0 0 2px #101116;
}

.top-window { margin-bottom: 8px; }

.window-title, .side-title {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(#2c2d36, #171820);
  border-bottom: 1px solid #4c4b59;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.side-title.second { border-top: 1px solid #4c4b59; }

.tiny-icon, .round-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  background: #3184c5;
  color: white;
  border: 1px solid #6fb6e9;
  font-size: 12px;
}

.round-icon {
  border-radius: 50%;
  background: #6b5c00;
  border-color: #d1b100;
}

.byline { color: var(--muted); font-weight: 400; }
.byline b { color: var(--gold); }
.window-buttons { margin-left: auto; display: flex; gap: 4px; }
.window-buttons span {
  width: 17px;
  height: 17px;
  background: linear-gradient(#ffce3a, #ff7800);
  border: 1px solid #5f2600;
}

.nav-area {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 8px 6px;
}

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

.cart-btn {
  flex-shrink: 0;
  background: linear-gradient(#ffcf42, #ff8500);
  border: 1px solid #813600;
  color: #1b1300;
  font-weight: 900;
  cursor: pointer;
  padding: 7px 14px;
  font-size: clamp(10px, 1.3vw, 13px);
  border-radius: 6px 6px 2px 2px;
  white-space: nowrap;
  position: relative;
}

.cart-btn:hover { filter: brightness(1.15); }

#cartBadge {
  font-weight: 900;
}

.nav-bar button, .enter-shop, .buy-button, .music-panel button, .cart-btn {
  background: linear-gradient(#ffcf42, #ff8500);
  border: 1px solid #813600;
  color: #1b1300;
  font-weight: 900;
  cursor: pointer;
  text-shadow: 0 1px rgba(255,255,255,.35);
}

.nav-bar button {
  font-size: clamp(10px, 1.3vw, 13px);
  border-radius: 6px 6px 2px 2px;
  padding: 7px 12px;
}

.nav-bar button.active { filter: brightness(1.25); transform: translateY(1px); }

.page-section { display: none; }
.page-section.active { display: block; }

.window-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
}

.full-window { min-height: 500px; }
.hero-window {
  min-height: 505px;
  background:
    linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.72)),
    radial-gradient(circle at 20% 70%, transparent 0 50px, #181818 52px 56px, transparent 58px),
    radial-gradient(circle at 83% 70%, transparent 0 55px, #181818 57px 61px, transparent 63px),
    url("assets/backgrounds/grunge.svg"),
    #b8873d;
  background-size: auto, auto, auto, cover;
}

.hero-copy {
  min-height: 460px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 30px;
}

.kicker {
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 12px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  color: white;
  font-size: clamp(40px, 8vw, 86px);
  line-height: .9;
  text-shadow: 4px 4px #000, 0 0 18px rgba(255, 138, 0, .45);
}

.hero-copy p { max-width: 560px; }
.enter-shop, .buy-button { padding: 10px 16px; margin-top: 12px; }

.mini-card-list { padding: 12px; display: grid; gap: 10px; }
.mini-card {
  padding: 12px;
  border: 1px solid #555366;
  background: #171820;
}
.mini-card h3 { color: var(--gold); margin: 0 0 6px; }
.mini-card p { margin: 0; font-size: 13px; }

.product-detail-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
  padding: 16px;
}

.hero-stage {
  min-height: 455px;
  display: grid;
  place-items: center;
  background-color: #c9b479;
  background-image:
    radial-gradient(circle at 18% 72%, transparent 0 50px, #181818 52px 56px, transparent 58px),
    radial-gradient(circle at 83% 70%, transparent 0 55px, #181818 57px 61px, transparent 63px),
    radial-gradient(circle at 20% 76%, #1e1e1e 0 8px, transparent 9px),
    radial-gradient(circle at 80% 75%, #1e1e1e 0 8px, transparent 9px),
    linear-gradient(135deg, transparent 0 30%, rgba(0,0,0,.7) 30% 35%, transparent 36%),
    radial-gradient(circle at 50% 20%, rgba(0,0,0,.45), transparent 26%),
    url("assets/backgrounds/grunge.svg");
  background-size: auto, auto, auto, auto, auto, auto, cover;
  border: 1px solid #444451;
  overflow: hidden;
}

.product-image {
  width: min(520px, 84%);
  max-height: 400px;
  object-fit: contain;
  filter: drop-shadow(0 24px 20px rgba(0,0,0,.45));
  animation: floaty 4s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% { transform: rotate(-1deg) translateY(0); }
  50% { transform: rotate(1deg) translateY(-10px); }
}

.product-info-box {
  background: #171820;
  border: 1px solid #555366;
  padding: 16px;
}
.product-info-box h2 { color: var(--gold); margin-top: 0; }
.product-info-box p { line-height: 1.5; }
.size-label { color: var(--muted); font-size: 11px; letter-spacing: 2px; margin: 14px 0 4px; }

.size-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.size-list span {
  border: 1px solid #747186;
  background: #2b2c35;
  padding: 8px 10px;
  color: white;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  user-select: none;
}
.size-list span:hover { background: #3a3b47; border-color: var(--gold); }
.size-list span.selected {
  background: var(--orange);
  border-color: var(--gold);
  color: #000;
  font-weight: 900;
}

.add-msg {
  margin-top: 8px;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 1px;
}

.product-list { padding: 12px; display: grid; gap: 8px; }
.product-card {
  width: 100%;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--gold);
  background: transparent;
  text-align: left;
}
.product-card:hover, .product-card.active {
  background: #555366;
  border-color: #747186;
}
.product-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #eeeeee;
  border: 3px solid #111;
}
.product-card h3 { margin: 0; font-size: 13px; }
.product-card p { margin: 3px 0 0; color: white; font-size: 11px; }
.compact .product-card { grid-template-columns: 46px 1fr; padding: 7px; }
.compact .product-card img { width: 42px; height: 42px; }

.lookbook-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.lookbook-card {
  position: relative;
  border: 1px solid #555366;
  background: #111216;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.lookbook-card img { width: 92%; height: 230px; object-fit: contain; }
.lookbook-card span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  color: var(--gold);
  background: rgba(0,0,0,.72);
  padding: 5px 8px;
  font-size: 12px;
}

.text-window { padding-bottom: 40px; }
.text-window h2, .text-window p { margin-left: 18px; margin-right: 18px; }
.text-window h2 { color: var(--gold); }
.text-window p { max-width: 720px; line-height: 1.6; }

.music-panel {
  margin-top: 8px;
  padding: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--gold);
}
.music-panel button { padding: 8px 12px; }

@media (max-width: 900px) {
  body { place-items: start center; }
  .window-layout, .product-detail-grid { grid-template-columns: 1fr; }
  .hero-stage { min-height: 330px; }
  .lookbook-grid { grid-template-columns: repeat(2, 1fr); }
  .product-image { width: 84%; }
  .nav-area { flex-wrap: wrap; }
  .cart-btn { margin-left: auto; }
}

@media (max-width: 520px) {
  .lookbook-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 40px; }
  .checkout-layout { grid-template-columns: 1fr; }
  .address-row { grid-template-columns: 1fr; }
}

/* ── OVERLAYS ── */

.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  backdrop-filter: blur(2px);
}

.overlay-window {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: inset 0 0 0 2px #101116, 0 0 40px rgba(255,138,0,.22);
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* CART WINDOW */
.cart-window { max-width: 440px; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
  min-height: 80px;
}

.cart-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #171820;
  border: 1px solid #555366;
}
.cart-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #eee;
  border: 2px solid #111;
}
.cart-item-info h4 { margin: 0 0 2px; font-size: 13px; color: var(--gold); }
.cart-item-info p { margin: 0; font-size: 11px; color: var(--muted); }
.cart-item-price { color: white; font-weight: 700; font-size: 13px; text-align: right; }
.cart-item-remove {
  display: block;
  font-size: 10px;
  color: #ff4444;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  text-align: right;
}
.cart-item-remove:hover { text-decoration: underline; }

.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 0;
  font-size: 13px;
  letter-spacing: 2px;
}

.cart-footer {
  border-top: 1px solid #4c4b59;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(#2c2d36, #171820);
}
.cart-total { color: var(--gold); font-weight: 700; font-size: 14px; }
.price-val { color: white; }

/* CHECKOUT WINDOW */
.checkout-window { max-width: 760px; }

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  overflow-y: auto;
  flex: 1;
}

.checkout-summary {
  padding: 16px;
  border-right: 1px solid #4c4b59;
  background: #171820;
  overflow-y: auto;
}

.section-label {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 3px;
  margin: 0 0 12px;
  font-weight: 700;
}

.checkout-summary-items { display: grid; gap: 8px; margin-bottom: 16px; }

.checkout-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #2b2c35;
}
.checkout-summary-item-name { color: var(--gold); }
.checkout-summary-item-detail { color: var(--muted); font-size: 11px; }
.checkout-summary-item-price { color: white; font-weight: 700; white-space: nowrap; margin-left: 8px; }

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: var(--gold);
  font-size: 14px;
  padding: 10px 0 0;
  border-top: 1px solid #4c4b59;
}

.checkout-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 12px;
}

.checkout-form {
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
  overflow-y: auto;
}

.checkout-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}

.checkout-form input {
  background: #111216;
  border: 1px solid #5c5b6c;
  color: var(--text);
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.checkout-form input:focus { border-color: var(--gold); }
.checkout-form input::placeholder { color: #555; }

.address-row {
  display: grid;
  grid-template-columns: 1fr 64px 90px;
  gap: 8px;
}

.address-row .short { }

.form-error {
  color: #ff4444;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px;
  border: 1px solid #ff4444;
  background: rgba(255,68,68,.08);
}

.place-order-btn {
  padding: 12px;
  font-size: 14px;
  letter-spacing: 2px;
  margin-top: 4px;
}

.place-order-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* CONFIRM WINDOW */
.confirm-window { max-width: 440px; }

.confirm-body {
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.confirm-glitch {
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  text-shadow: 3px 3px #ff0000, -3px -3px #0000ff;
  animation: glitch 2.5s infinite;
}

@keyframes glitch {
  0%, 90%, 100% { text-shadow: 3px 3px #ff0000, -3px -3px #0000ff; }
  92% { text-shadow: -3px 3px #0000ff, 3px -3px #ff0000; transform: translate(2px, 0); }
  94% { text-shadow: 3px -3px #ff0000, -3px 3px #0000ff; transform: translate(-2px, 0); }
  96% { text-shadow: 2px 2px #ff0000, -2px -2px #0000ff; transform: translate(0); }
}

.confirm-sub { color: var(--muted); font-size: 13px; margin: 0; }

.confirm-order-box {
  background: #171820;
  border: 1px solid var(--gold);
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.confirm-label { font-size: 10px; color: var(--muted); letter-spacing: 2px; }
.confirm-order-num { font-size: 16px; font-weight: 700; color: var(--gold); letter-spacing: 2px; }

.confirm-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }
#confirmEmail { color: var(--gold); }

/* TOAST */
.toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(#2c2d36, #171820);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 999;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(255,138,0,.4);
  pointer-events: none;
}
.toast.error { border-color: #ff4444; color: #ff4444; }

