/* ============================================
   MiGron-electronics :: Retro PC Theme
   Beige-box PC / DOS / vintage hardware vibe.
   No terminal, no CRT, no Linux.
   ============================================ */

:root {
  /* Beige PC palette: warm cream backgrounds, dark brown text,
     amber/green accents from old monitor phosphor & case LEDs. */
  --bg:         #e8dcc4;   /* vintage beige */
  --bg-elev:    #d8c9ad;   /* slightly darker beige for elevated areas */
  --bg-card:    #f1e7d2;   /* lighter beige for cards */
  --bg-dark:    #2b2218;   /* CRT off-state, used for dark text on amber */
  --border:     #b89e72;   /* mid beige border */
  --border-bright: #8a7044; /* darker beige, used for emphasis */
  --amber:      #b56a1a;   /* old monitor amber, used for accents */
  --amber-bright: #d97f1a;
  --green:      #2d6b3a;   /* old monitor green (logo accent) */
  --green-glow: rgba(45, 107, 58, 0.4);
  --red:        #a02828;   /* power LED red, used sparingly */
  --text:       #2b2218;   /* dark brown — primary text on beige */
  --text-dim:   #6b5a44;   /* lighter brown for secondary text */
  --text-bright:#1a1208;   /* near-black for headlines */
  --font-mono:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-courier: 'Courier New', 'Consolas', 'Courier', monospace;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

body {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(139, 110, 70, 0.04) 3px,
      rgba(139, 110, 70, 0.04) 4px
    );
}

a { color: var(--amber); }
a:hover { color: var(--amber-bright); }

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Nav ===== */
.site-header {
  border-bottom: 2px solid var(--border-bright);
  background: var(--bg-elev);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 0 var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-bright);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.logo img {
  height: 44px;
  width: auto;
  display: block;
  border: 1px solid var(--border);
}

.logo-bracket { color: var(--amber); }

.logo-blink {
  display: inline;
  color: var(--amber);
  font-weight: 700;
}

@keyframes blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

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

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: all 0.15s;
  font-weight: 700;
}

.nav a:hover,
.nav a.active {
  color: var(--text-bright);
  border-color: var(--border-bright);
  background: var(--bg-card);
  font-weight: 700;
}

.cart-link {
  position: relative;
  color: var(--text-bright) !important;
  border-color: var(--border-bright) !important;
  background: var(--bg);
  font-weight: 700;
}

.cart-link:hover {
  background: var(--amber) !important;
  color: var(--bg) !important;
  border-color: var(--amber) !important;
}

.cart-count {
  display: inline-block;
  background: var(--red);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 1px;
  min-width: 18px;
  text-align: center;
}
/* When the cart has at least one item, flip the badge to green */
.cart-count:not([data-empty]) {
  background: var(--green);
  color: var(--bg);
}

/* ===== Hero ===== */
.hero {
  padding: 80px 0 60px;
  border-bottom: 2px solid var(--border-bright);
  background:
    radial-gradient(ellipse at center top, rgba(181, 106, 26, 0.10), transparent 60%),
    var(--bg-elev);
  text-align: center;
}

.hero-pre {
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  color: var(--text-bright);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1;
}

.hero h1 .accent { color: var(--amber); }

.hero-tag {
  color: var(--text);
  font-size: 18px;
  margin-bottom: 32px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cursor {
  display: inline-block;
  width: 12px;
  height: 22px;
  background: var(--text-bright);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s steps(2) infinite;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--bg);
  color: var(--text-bright);
  border: 2px solid var(--border-bright);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 700;
}

.btn:hover {
  background: var(--amber);
  color: var(--bg);
  border-color: var(--amber);
}

.btn-amber {
  background: var(--amber);
  color: var(--bg);
  border-color: var(--amber);
}

.btn-amber:hover {
  background: var(--bg);
  color: var(--text-bright);
  border-color: var(--amber);
}

.btn::before { content: '> '; opacity: 0.7; }

.btn-big { padding: 16px 40px; font-size: 16px; }

/* ===== Section ===== */
.section { padding: 60px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 12px;
}

.section-head h2 {
  color: var(--text-bright);
  font-size: 24px;
  letter-spacing: 1px;
  font-weight: 700;
}

.section-head .prompt { color: var(--amber); font-weight: 700; }

.section-head .meta {
  color: var(--text-dim);
  font-size: 12px;
  margin-left: auto;
}

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

.product-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  padding: 0;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--border);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--amber);
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 2;
}

.product-card:hover::before { opacity: 1; }

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-elev);
  border-bottom: 2px solid var(--border);
  border-left: 2px solid var(--border);
  border-right: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.product-image img { width: 100%; height: 100%; object-fit: contain; }

.product-image-placeholder {
  text-align: center;
  padding: 20px;
}

.product-image-placeholder::before {
  content: '[ no image ]';
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 8px;
}

.product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.product-id {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.product-name {
  color: var(--text-bright);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  text-decoration: none;
  line-height: 1.3;
}

.product-name:hover { color: var(--amber); }
.product-rating { font-family: var(--font-mono); font-size: 12px; margin: 0 0 6px; }
.product-rating-num { color: var(--text-dim); margin-left: 4px; }

.product-desc {
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 12px;
  flex: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.product-price {
  color: var(--amber);
  font-size: 18px;
  font-weight: 700;
}

.product-status {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid;
  font-weight: 700;
}

.status-instock { color: var(--green); border-color: var(--green); }
.status-soon    { color: var(--amber); border-color: var(--amber); background: rgba(181, 106, 26, 0.08); }
.status-soldout { color: var(--red); border-color: var(--red); opacity: 0.7; }
.status-limited { color: var(--amber); border-color: var(--amber); background: rgba(181, 106, 26, 0.08); }

/* ===== Product Detail ===== */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 40px;
  padding: 40px 0;
  align-items: start;
}

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; }
}

.product-gallery {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.gallery-main {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  padding: 8px;
}
.gallery-main img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  height: auto;
  width: auto;
  object-fit: contain;
  background: var(--bg);
  cursor: zoom-in;
}
.gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
    .gallery-thumbs button {
      width: 72px;
      height: 72px;
      padding: 3px;
      background: var(--bg-card);
      border: 2px solid var(--border);
      cursor: pointer;
      overflow: hidden;
      box-sizing: border-box;
    }
    .gallery-thumbs button.active { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(181,106,26,0.3); }
    .gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; background: var(--bg); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 8, 0.95);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 100px;
  box-sizing: border-box;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: var(--bg);
  border: 2px solid var(--border-bright);
  color: var(--text-bright);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 700;
  z-index: 2;
}
.lightbox-close:hover { background: var(--amber); color: var(--bg); border-color: var(--amber); }
.lightbox-nav {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  align-items: center;
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
}
.lightbox-nav button {
  background: var(--bg);
  border: 2px solid var(--border-bright);
  color: var(--text-bright);
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 1px;
  font-weight: 700;
}
.lightbox-nav button:hover { background: var(--amber); color: var(--bg); border-color: var(--amber); }
.lightbox-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.lightbox-counter { color: var(--bg); letter-spacing: 1px; padding: 0 8px; }

/* Lightbox stage: wraps the image so prev/next can anchor to image edges */
.lightbox-stage {
  position: relative;
  display: inline-block;
  max-width: 90vw;
  max-height: 82vh;
  line-height: 0;
}

/* Lightbox has no on-screen prev/next buttons — click the photo or scroll
   the wheel to navigate. Prev/next CSS removed. */

.product-detail-info h1 {
  color: var(--text-bright);
  font-size: 28px;
  margin-bottom: 8px;
  font-weight: 700;
}

.product-detail-info .product-id { margin-bottom: 16px; }

.product-detail-info .product-price { font-size: 32px; }

.product-detail-info .product-price {
  color: var(--amber);
  font-weight: 700;
  text-shadow: none;
}

.product-specs {
  border: 2px solid var(--border);
  background: var(--bg-card);
  margin: 16px 0;
}

.product-specs .spec-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  padding: 8px 16px;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
}

.product-specs .spec-row:last-child { border-bottom: none; }

.product-specs .spec-label { color: var(--text-dim); }
.product-specs .spec-label.amber { color: var(--amber); }
.product-specs .spec-value { color: var(--text-bright); }

.product-specs .spec-row:nth-child(1) { background: var(--bg-elev); }

/* Reviews block on the product page */
.product-reviews {
  margin-top: 24px;
  border: 2px solid var(--border);
  background: var(--bg-card);
}
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px dashed var(--border);
}
.reviews-label, .reviews-avg {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 700;
}
.reviews-avg { color: var(--text); }
.reviews-numeric { color: var(--green); margin-left: 6px; }
.reviews-count { color: var(--text-dim); font-size: 11px; margin-left: 4px; }
.stars { letter-spacing: 1px; font-size: 14px; }
.star-on { color: var(--amber); }
.star-off { color: var(--text-dim); opacity: 0.4; }
.star-half {
  background: linear-gradient(to right, var(--amber) 50%, var(--text-dim) 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.7;
}
.reviews-list { padding: 8px 16px; }
.review {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.review:last-child { border-bottom: none; }
.review-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
}
.review-name { color: var(--text-bright); font-weight: 700; }
.review-rating { font-size: 13px; }
.review-date { font-size: 11px; }
.review-text {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.review-user { background: rgba(51, 255, 102, 0.03); }
/* Review submission form */
.review-form {
  padding: 16px;
  border-top: 1px dashed var(--border);
  background: var(--bg);
}
.review-form .form-group { margin-bottom: 12px; }
.review-form .form-group label { display: block; }
.review-form textarea {
  min-height: 70px;
  overflow: hidden;
}
.rating-input { display: flex; gap: 6px; flex-wrap: wrap; }
.rating-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 2px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.rating-chip input { position: absolute; opacity: 0; pointer-events: none; }
.rating-chip:hover { border-color: var(--amber); }
.rating-chip:has(input:checked) {
  border-color: var(--green);
  color: var(--green);
  background: rgba(51, 255, 102, 0.1);
  box-shadow: 0 0 6px var(--green-glow);
}
.review-thanks {
  margin: 10px 0 0;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Configurable options form (Type, Color, Jumper) for products like Any_Clk */
.opt-form {
  margin: 16px 0 8px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  background: var(--bg-card);
}
.opt-group { margin-bottom: 10px; }
.opt-group:last-child { margin-bottom: 0; }
/* Free-text opt group (e.g. BIOS/ROM info field). */
.opt-group-text input,
.opt-group-text textarea {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-bright);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  box-sizing: border-box;
  resize: vertical;
}
.opt-group-text input:focus,
.opt-group-text textarea:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--bg-card);
}
.opt-group-text textarea {
  min-height: 70px;
  max-height: 160px;
  overflow: auto;
}
.opt-label {
  display: block;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 700;
}
.opt-values { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 2px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
}
.opt-chip input[type=radio] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.opt-chip:hover { border-color: var(--border-bright); color: var(--text-bright); }
.opt-chip:has(input:checked) {
  border-color: var(--green);
  background: rgba(51, 255, 102, 0.08);
  color: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}
.opt-chip.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--bg);
  color: var(--text-dim);
  text-decoration: line-through;
}
.opt-error {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: rgba(255, 60, 60, 0.08);
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 12px;
  font-family: var(--font-mono);
}

.qty-cart {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 24px 0;
}

.qty-input {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-bright);
  background: var(--bg);
}

.qty-input button {
  background: transparent;
  border: none;
  color: var(--text-bright);
  width: 32px;
  height: 40px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.qty-input button:hover { background: var(--bg-elev); }

.qty-input input {
  background: transparent;
  border: none;
  color: var(--text-bright);
  width: 40px;
  height: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.qty-input input:focus { outline: none; }

/* Hide the browser's native up/down spinner arrows on number inputs.
   The site has its own − / + buttons, the native ones are redundant and
   visually inconsistent with the retro theme. */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== Video block (now lives in left column under gallery) ===== */
.video-block {
  margin-top: 12px;
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}
.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  min-width: 100%;
  align-self: stretch;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
}
.video-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 8, 0.30);
  transition: background 0.15s;
}
.video-thumb:hover::after { background: rgba(20, 15, 8, 0.10); }
.video-thumb .play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 80px;
  height: 56px;
  background: var(--red);
  border: 2px solid var(--bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.15s;
}
.video-thumb:hover .play-btn { transform: translate(-50%, -50%) scale(1.1); }
.video-thumb .play-btn::before {
  content: '';
  border-left: 22px solid var(--bg);
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  margin-left: 5px;
}
.video-thumb .label {
  position: absolute;
  bottom: 6px; left: 0; right: 0;
  z-index: 1;
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0,0,0,0.95);
  padding: 0 12px;
  text-align: center;
}
.video-thumb .yt-badge {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 1;
  background: var(--red);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 1px;
  letter-spacing: 1px;
}
.video-embed {
  position: relative;
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
  aspect-ratio: 16 / 9;
  background: var(--bg-dark);
  border: 2px solid var(--border);
}
.video-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.video-caption {
  display: inline-block;
  margin-top: 6px;
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.video-caption::before { content: '> '; }

/* ===== Contact form ===== */
.contact-cta {
  border: 2px solid var(--amber);
  background: rgba(181, 106, 26, 0.06);
  padding: 16px;
  margin: 16px 0;
}

.contact-cta .label {
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

/* ===== Cart ===== */
.cart-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .cart-container { grid-template-columns: 1fr; }
}

.cart-list {
  border: 2px solid var(--border);
  background: var(--bg-card);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px dashed var(--border);
}
.cart-item .cart-item-info {
  flex: 1 1 0;
  min-width: 0;
  margin-right: auto; /* push qty/price/remove to the right edge of the row */
}
.cart-item .cart-item-qty {
  flex: 0 0 auto;
}

.cart-item:last-child { border-bottom: none; }

.cart-item-thumb {
  width: 80px;
  height: 80px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-dim);
}

.cart-item-name {
  color: var(--text-bright);
  font-weight: 700;
  /* Long product names: truncate with ellipsis on a single line so the
     cart row stays one line tall and the qty/price stay in a stable
     position. Full name is still readable on the product page. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-name a {
  color: var(--amber);
  text-decoration: none;
}
.cart-item-name a:hover {
  color: var(--green);
  text-decoration: underline;
}
.cart-item-id { color: var(--text-dim); font-size: 11px; }
.cart-item-opts { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.cart-opt-chip {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
}
.cart-opt-chip b { color: var(--green); font-weight: 700; }
.cart-item-price {
  color: var(--amber);
  font-weight: 700;
  font-family: var(--font-mono);
  text-align: right;
  white-space: nowrap;
  flex: 0 0 60px; /* fixed width — narrow so qty box is right-aligned */
}
.cart-item-remove {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 4px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}
.cart-item-remove:hover { background: var(--red); color: var(--bg); }

.cart-summary {
  border: 2px solid var(--border-bright);
  background: var(--bg-card);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.cart-summary h3 {
  color: var(--text-bright);
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 8px;
  font-weight: 700;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  font-size: 14px;
}

.summary-row.total {
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  margin-top: 16px;
  font-size: 18px;
  color: var(--amber);
  font-weight: 700;
}

.summary-row.total span:last-child { font-weight: 700; }

.empty-cart {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-cart pre {
  color: var(--text-bright);
  font-size: 12px;
  margin-bottom: 20px;
  font-family: var(--font-courier);
  font-weight: 700;
}

/* ===== Filter bar ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 12px;
  background: var(--bg-elev);
  border: 2px solid var(--border);
}

.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.15s;
  font-weight: 700;
}

.filter-chip:hover {
  color: var(--text-bright);
  border-color: var(--border-bright);
}

.filter-chip.active {
  color: var(--bg);
  border-color: var(--amber);
  background: var(--amber);
  font-weight: 700;
}

.search-box {
  flex: 1;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-bright);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.search-box:focus {
  outline: none;
  border-color: var(--amber);
}

/* ===== Forms ===== */
.form { max-width: 600px; }

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  color: var(--text-bright);
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

.form-group label::before { content: '> '; color: var(--amber); }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-bright);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--bg-card);
}

.form-group textarea {
  /* Auto-grows with content. The JS auto-resize handler below sets the
     height to match scrollHeight on every input event. */
  resize: none;
  min-height: 38px;
  overflow: hidden;
  line-height: 1.5;
}

.help-text { color: var(--text-dim); font-size: 12px; margin-top: 6px; }

/* ===== Info / ASCII art blocks ===== */
.ascii-block {
  font-family: var(--font-courier);
  color: var(--text-bright);
  font-size: 11px;
  line-height: 1.2;
  white-space: pre;
  margin: 20px 0;
  overflow-x: auto;
  font-weight: 700;
}

/* Retro terminal-style message box (used for empty cart, no results, 404).
   Uses real CSS borders instead of unicode box-drawing chars so the lines
   are solid and look the same in every font/browser. */
.retro-box {
  display: inline-block;
  border: 2px solid var(--text-bright);
  background: var(--bg);
  padding: 12px 20px;
  margin: 20px auto;
  font-family: var(--font-courier);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-bright);
  text-align: center;
  line-height: 1.5;
  letter-spacing: 1px;
}

.info-box {
  border: 2px solid var(--border-bright);
  background: var(--bg-card);
  padding: 20px;
  margin: 20px 0;
}

.info-box .label {
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
  font-weight: 700;
}

.info-box p { margin-bottom: 8px; }

.tag {
  display: inline-block;
  background: var(--bg);
  color: var(--text-bright);
  border: 1px solid var(--border);
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 1px;
  margin: 2px;
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 2px solid var(--border-bright);
  background: var(--bg-elev);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-simple {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 30px;
}

.footer-simple h4 {
  color: var(--text-bright);
  font-size: 16px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 700;
}

.footer-simple p {
  margin-bottom: 8px;
}

.footer-simple a {
  color: var(--amber);
  text-decoration: none;
  font-weight: 700;
}

.footer-simple a:hover { color: var(--amber-bright); text-decoration: underline; }

.footer-bottom {
  border-top: 1px dashed var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12px;
}

.status-line {
  color: var(--text-bright);
  font-size: 12px;
  font-weight: 700;
}

.status-line .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 6px var(--green-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== Toast notification ===== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-card);
  border: 2px solid var(--amber);
  color: var(--text-bright);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 4px 0 var(--border-bright);
  z-index: 2000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  font-weight: 700;
}

.toast.show { transform: translateX(0); }
.toast::before { content: '> '; color: var(--amber); }

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .nav-wrap { flex-wrap: wrap; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { padding: 6px 8px; font-size: 11px; }
  .cart-item { flex-wrap: wrap; gap: 8px; }
  .cart-item-thumb { width: 60px; height: 60px; }
  .cart-item .cart-item-info { flex: 1 1 100px; }
  .cart-item .cart-item-qty,
  .cart-item .cart-item-price,
  .cart-item .cart-item-remove {
    margin-left: 0;
  }
}

/* ===== Utility ===== */
.muted { color: var(--text-dim); }
.amber { color: var(--amber); }
.green { color: var(--green); }
.red { color: var(--red); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }

/* ===== Anti-spam helpers ===== */
/* Honeypot: visually + a11y hidden, real users can't see or fill it.
   Dumb bots that fill every field will fill this too. */
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.captcha-question {
  font-family: var(--font-mono);
  color: var(--amber);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.captcha-input {
  width: 80px !important;
  max-width: 80px;
}
