@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

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

:root {
  --bg: #0a0a0a;
  --surface: #111;
  --border: #222;
  --text: #f0f0f0;
  --muted: #888;
  --accent: #f0b429;
  --accent-hover: #f5c842;
  --green-lcd: #6aad00;
  --blue-lcd: #0057b8;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

/* Product layout */
.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 2rem;
}

/* Screen preview */
.product-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  aspect-ratio: 1 / 1;
  max-width: 520px;
}

.screen-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}

.img-nav {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-nav:hover { background: rgba(255,255,255,0.15); }

.img-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 0.75rem;
}

.img-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.img-dot.active { background: var(--accent); }

.screen-preview img {
  max-width: 100%;
  max-height: 300px;
  width: auto;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
}

.lcd {
  border-radius: 5px;
  padding: 10px 18px;
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 2rem;
  letter-spacing: 0.06em;
  line-height: 1.25;
  box-shadow: 0 0 40px rgba(0,0,0,0.6), inset 0 0 12px rgba(0,0,0,0.3);
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
  border: 2px solid rgba(0,0,0,0.4);
  min-width: 320px;
}

.lcd.green {
  background: #4a7c00;
  color: #0a1a00;
  box-shadow: 0 0 40px rgba(106,173,0,0.3), inset 0 0 12px rgba(0,0,0,0.3);
}

.lcd.blue {
  background: #003a8c;
  color: #ffffff;
  box-shadow: 0 0 40px rgba(0,87,184,0.4), inset 0 0 12px rgba(0,0,0,0.3);
}

.lcd-row {
  white-space: pre;
  line-height: 1.1;
  text-align: center;
}

/* Product details */
.product-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.product-description {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.specs span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Variant selector */
.variant-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.variants {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.variant {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text);
}

.variant:hover { border-color: #444; }

.variant.active {
  border-color: var(--accent);
  background: rgba(240, 180, 41, 0.05);
}

.variant span { font-size: 0.9rem; font-weight: 500; }
.variant small { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.5rem; }

.variant-swatch {
  width: 36px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
}

.variant-swatch.green { background: #4a7c00; }
.variant-swatch.blue  { background: #003a8c; }

/* Quantity */
.quantity-control {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0.75rem;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  background: var(--surface);
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover { background: #222; }

.qty-display {
  width: 48px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 40px;
}

/* Price */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.price-note {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Payment buttons */
.payment-btns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Buy button */
.buy-btn {
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-bottom: 1rem;
}

.buy-btn:hover { background: var(--accent-hover); }
.buy-btn:active { transform: scale(0.99); }
.buy-btn:disabled { background: #444; color: #666; cursor: not-allowed; }

.crypto-btn {
  background: #1a1a1a;
  color: var(--text);
  border: 1px solid #f7931a;
}
.crypto-btn:hover:not(:disabled) { background: #f7931a; color: #000; }
.crypto-btn:disabled { background: #1a1a1a; color: #555; border-color: #333; cursor: not-allowed; }

.note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Shop mode notices */
.shop-notice[hidden] { display: none; }

.shop-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(240, 180, 41, 0.08);
  border: 1px solid rgba(240, 180, 41, 0.3);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.notice-tag {
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.out-of-stock-msg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.oos-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.oos-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.oos-body a {
  color: var(--accent);
  text-decoration: none;
}

.oos-body a:hover { text-decoration: underline; }

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
  .product-page {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem auto;
  }

  .product-image { min-height: 240px; }
  h1 { font-size: 1.5rem; }
}
