/* Dead Internet Archive — static demo storefront */

:root {
  --void: #050505;
  --ink: #11110f;
  --paper: #efede5;
  --signal: #dfff00;
  --line: rgba(17, 17, 15, 0.24);
  --hint: rgba(255, 255, 255, 0.58);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--void);
  color: var(--paper);
  font-family: "Courier New", ui-monospace, monospace;
}
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
.crt-page { position: relative; width: 100%; min-height: 100vh; }
.eyebrow { margin: 0 0 0.55rem; font-size: 0.64rem; letter-spacing: 0.17em; text-transform: uppercase; }

/* Landing */
.crt-landing {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 44%, #171717 0, #080808 37%, #030303 76%);
  transition: opacity 0.8s ease, transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.crt-monitor-stack {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: min(55vw, 820px, calc(75vh * 631 / 713));
  width: min(55vw, 820px, calc(75svh * 631 / 713));
  aspect-ratio: 631 / 713;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.crt-monitor-stack:hover, .crt-monitor-stack:focus-visible { transform: scale(1.02); }
.crt-monitor-stack:focus-visible { outline: none; }
.crt-monitor-stack:focus-visible .crt-outline-layer {
  filter: drop-shadow(0 28px 70px rgba(0,0,0,.92)) drop-shadow(0 0 3px rgba(255,255,255,.55));
}
.crt-screen-viewport {
  position: absolute;
  z-index: 1;
  /* Register to the 631 × 713 frame's opening, overlapping its bezel by 2px. */
  left: calc(100% * 100 / 631);
  top: calc(100% * 98 / 713);
  width: calc(100% * 433 / 631);
  height: calc(100% * 375 / 713);
  overflow: hidden;
  border-radius: 2px;
  background: #000;
  pointer-events: none;
}
.crt-screen-layer {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.08) contrast(1.12);
  animation: crt-flicker 0.1s infinite;
}
.crt-screen-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.crt-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.17) 0, rgba(0,0,0,.17) 1px, transparent 1px, transparent 3px);
  animation: crt-scan-flicker 0.08s infinite;
}
.crt-refresh-line {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.12), transparent);
  animation: crt-refresh 3s linear infinite;
}
.crt-glow { position: absolute; inset: 0; background: radial-gradient(ellipse, rgba(115,255,152,.08), transparent 55%, rgba(0,0,0,.36)); }
.crt-outline-layer {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 70px rgba(0,0,0,.92));
}
.crt-click-hint { margin: 30px 0 0; color: var(--hint); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; animation: pulse-hint 2s ease-in-out infinite; }
@keyframes crt-flicker { 0%,100% { opacity: 1; } 50% { opacity: .97; } }
@keyframes crt-scan-flicker { 0%,100% { opacity: .78; } 50% { opacity: .9; } }
@keyframes crt-refresh { 0% { transform: translateY(-100%); opacity: 1; } 100% { transform: translateY(1900%); opacity: .4; } }
@keyframes pulse-hint { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* Entered store */
.crt-page[data-zoomed="true"] .crt-landing { opacity: 0; pointer-events: none; transform: scale(2.45); }
.crt-zoomed { position: relative; z-index: 5; min-height: 100vh; opacity: 0; transition: opacity .8s ease .25s; }
.crt-page[data-zoomed="true"] .crt-zoomed { opacity: 1; }
.crt-border-frame { position: fixed; inset: 0; z-index: 60; background: url("assets/zoomed-new.webp") center / cover no-repeat; pointer-events: none; }
.crt-screen-content {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  padding: clamp(4rem, 8vh, 6rem) 12% 7rem;
  background: #fff;
  color: var(--ink);
  filter: contrast(1.1) brightness(.9) saturate(.85);
  image-rendering: pixelated;
}
.crt-content-effects { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.crt-content-scanlines { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.055) 0, rgba(0,0,0,.055) 1px, transparent 1px, transparent 3px); }
.crt-content-refresh { position: absolute; top: 0; right: 0; left: 0; height: 6px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.055), transparent); animation: crt-refresh 5s linear infinite; }
.overlay-image { position: fixed; inset: 0; z-index: 55; width: 100%; height: 100%; object-fit: cover; opacity: .42; mix-blend-mode: multiply; pointer-events: none; }
.screen-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  max-width: 1040px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.crt-back, .cart-trigger, .screen-cart-head button, .cart-empty button {
  padding: 6px 16px;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  background: #e0e0e0;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  filter: brightness(1.15);
}
.crt-back:hover, .crt-back:focus-visible, .cart-trigger:hover, .cart-trigger:focus-visible,
.screen-cart-head button:hover, .screen-cart-head button:focus-visible,
.cart-empty button:hover, .cart-empty button:focus-visible { background: #f0f0f0; filter: brightness(1.25); }
.crt-back:active, .cart-trigger:active, .screen-cart-head button:active, .cart-empty button:active {
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #c0c0c0;
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #fff;
}
.cart-trigger span { margin-left: .25rem; }
.cart-trigger.has-items { box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff, 0 0 5px #00ff00, 0 0 10px #00ff00; }
.store-view { display: flex; width: 100%; flex-direction: column; align-items: center; }

/* Catalog — follows the original Hydrogen screen layout */
.archive-head { max-width: 760px; margin: 0 0 2rem; text-align: center; }
.archive-title { margin: 0; color: var(--ink); font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 900; letter-spacing: .1em; line-height: 1.1; }
.archive-sub { margin: .65rem 0 0; color: #555; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.archive-section-title { width: 100%; max-width: 1040px; margin: 0 0 1rem; color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.archive-grid { display: grid; width: 100%; max-width: 1040px; margin: 0; padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 1rem; list-style: none; }
.product-card > button { display: flex; width: 100%; flex-direction: column; align-items: center; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.product-card-image { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: transparent; }
.product-card-image img { display: block; width: 100%; height: 100%; object-fit: contain; filter: none; transition: transform .25s ease, opacity .25s ease; }
.card-action { position: absolute; right: .35rem; bottom: .35rem; padding: .3rem .45rem; background: #e0e0e0; color: #000; font-size: .55rem; text-transform: uppercase; opacity: 0; }
.product-card button:hover img, .product-card button:focus-visible img { opacity: .9; transform: translateY(-4px); }
.product-card button:hover .card-action, .product-card button:focus-visible .card-action { opacity: 1; }
.product-card-copy { display: flex; width: 100%; min-height: 48px; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: .5rem .2rem; color: var(--ink); font-size: .72rem; text-transform: uppercase; }
.product-card-copy > span:first-child { display: flex; flex-direction: column; gap: .18rem; text-align: left; }
.product-card-copy strong { letter-spacing: .05em; }
.product-card-copy small { color: #555; font-size: .52rem; letter-spacing: .06em; }
.archive-foot { margin-top: 3rem; color: #4d4d45; font-size: .72rem; text-align: center; }
.social-buttons { display: flex; justify-content: center; gap: .65rem; margin-top: 1rem; }
.social-buttons a { padding: .35rem .75rem; border: 1px solid currentColor; color: var(--ink); font-size: .68rem; letter-spacing: .14em; text-decoration: none; }
.social-buttons a:hover, .social-buttons a:focus-visible { background: var(--ink); color: var(--paper); }

/* Product dialog — original Windows 95 popup */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 4vh 1rem;
  background: rgba(0,0,0,.72);
}
.product-modal-window {
  position: relative;
  display: flex;
  width: min(500px, 92vw);
  max-height: 90vh;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  background: #c0c0c0;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff, 4px 4px 0 rgba(0,0,0,.65);
  color: #000;
  image-rendering: pixelated;
}
.product-modal-window::-webkit-scrollbar { width: 16px; }
.product-modal-window::-webkit-scrollbar-track { border-left: 1px solid #808080; background: #c0c0c0; }
.product-modal-window::-webkit-scrollbar-thumb { border: 2px solid; border-top-color: #fff; border-left-color: #fff; border-right-color: #808080; border-bottom-color: #808080; background: #c0c0c0; }
.product-modal-titlebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 28px;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px 3px 8px;
  background: linear-gradient(to bottom, #003399, #002288);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}
.product-modal-close {
  display: grid;
  width: 20px;
  height: 20px;
  padding: 0;
  place-items: center;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  background: #e0e0e0;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.product-modal-close:active { border-top-color: #808080; border-left-color: #808080; border-right-color: #fff; border-bottom-color: #fff; background: #c0c0c0; }
.product-modal-crt-effects { position: absolute; inset: 28px 0 0; z-index: 10; overflow: hidden; pointer-events: none; }
.product-modal-crt-effects::before { content: ''; position: absolute; inset: 0; z-index: 3; background: repeating-linear-gradient(90deg, transparent 0 2px, rgba(0,0,0,.035) 2px 4px); opacity: .4; }
.product-modal-scanlines { position: absolute; inset: 0; z-index: 2; background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 2px); animation: crt-scan-flicker .08s infinite; }
.product-modal-refresh { position: absolute; top: 0; right: 0; left: 0; z-index: 3; height: 3px; background: linear-gradient(180deg, transparent, rgba(150,255,200,.28), transparent); animation: crt-refresh 3s linear infinite; }
.product-modal-glow { position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse, rgba(100,255,150,.05), transparent 40%, rgba(40,20,10,.22)); }
.product-modal-window > *:not(.product-modal-crt-effects):not(.product-modal-titlebar) { position: relative; z-index: 11; }
.product-modal-image-wrapper {
  width: calc(100% - 5.5rem);
  aspect-ratio: 1;
  flex: 0 0 auto;
  margin: 1.2rem auto 1rem;
  overflow: hidden;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #fff;
  box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #c0c0c0;
}
.product-modal-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-index { position: absolute; bottom: 0; left: 0; padding: .35rem .5rem; background: #000; color: #fff; font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; }
.product-modal-arrow {
  position: absolute !important;
  top: min(245px, 35vh);
  z-index: 15 !important;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  background: #e0e0e0;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
  color: #000;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}
.product-modal-arrow-left { left: 8px; }
.product-modal-arrow-right { right: 8px; }
.product-modal-arrow:active { border-top-color: #808080; border-left-color: #808080; border-right-color: #fff; border-bottom-color: #fff; background: #c0c0c0; }
.product-modal-price { width: fit-content; margin: 0 auto .5rem; padding: .4rem .6rem; border: 1px solid #808080; background: #fff; color: #000; font-size: 1rem; font-weight: 700; }
.product-modal-name { width: calc(100% - 2rem); margin: 0 auto .6rem; padding: .65rem 1rem; border: 1px solid #808080; background: #fff; color: #000; font-size: .85rem; font-weight: 700; letter-spacing: .05em; text-align: center; text-transform: uppercase; }
.product-modal-type { margin: 0 1rem .65rem; color: #333; font-size: .6rem; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
.product-modal-description { margin: 0 1rem .8rem; padding: .65rem; border: 2px inset #ddd; background: #fff; color: #222; font-size: .67rem; line-height: 1.55; }
.product-modal-specs { margin: 0 1rem 1rem; border: 2px inset #ddd; background: #fff; }
.product-modal-specs div { display: grid; padding: .38rem .5rem; grid-template-columns: 1fr 1.6fr; border-bottom: 1px solid #c0c0c0; font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; }
.product-modal-specs div:last-child { border-bottom: 0; }
.product-modal-specs dt { color: #666; }
.product-modal-specs dd { margin: 0; }
.product-modal-actions { display: flex; width: calc(100% - 2rem); justify-content: center; margin: 0 1rem; padding: 1rem 0; border-top: 2px solid #808080; }
.product-modal-actions button {
  width: min(200px, 100%);
  padding: 6px 20px;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  background: #e0e0e0;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.product-modal-actions button:hover, .product-modal-close:hover, .product-modal-arrow:hover { background: #f0f0f0; }
.product-modal-actions button:active { border-top-color: #808080; border-left-color: #808080; border-right-color: #fff; border-bottom-color: #fff; background: #c0c0c0; }
.product-modal-demo-note { margin: 0 1rem 1rem; color: #555; font-size: .54rem; text-align: center; text-transform: uppercase; }
.checkout-button { width: 100%; padding: .9rem 1rem; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.checkout-button:hover, .checkout-button:focus-visible { background: var(--signal); color: var(--ink); }

/* Cart stays inside the CRT screen, matching the original storefront */
.screen-cart { width: 100%; max-width: 1040px; min-height: 60vh; }
.screen-cart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.screen-cart-head > div { text-align: right; }
.screen-cart-head h2 { margin: 0; color: #000; font-size: 1.5rem; text-transform: uppercase; }
.cart-lines { width: 100%; }
.cart-line { display: grid; margin-bottom: .75rem; padding: .75rem; grid-template-columns: 82px 1fr auto; gap: .85rem; border: 2px solid; border-top-color: #fff; border-left-color: #fff; border-right-color: #808080; border-bottom-color: #808080; background: #fff; box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff; font-size: .72rem; }
.cart-line > img { width: 82px; height: 82px; object-fit: cover; background: #000; }
.cart-line-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: .2rem; }
.cart-line-copy strong { letter-spacing: .04em; text-transform: uppercase; }
.cart-line-copy small { color: #666; font-size: .56rem; text-transform: uppercase; }
.quantity-control { display: grid; margin-top: auto; grid-template-columns: 28px 30px 28px; align-items: center; border: 2px inset #ddd; text-align: center; }
.quantity-control button { height: 26px; padding: 0; border: 0; background: #e0e0e0; cursor: pointer; }
.quantity-control button:hover, .quantity-control button:focus-visible { background: #f0f0f0; }
.cart-empty { padding: 5rem 1rem; text-align: center; }
.cart-empty p { font-size: .78rem; letter-spacing: .12em; }
.cart-footer { margin-top: 1rem; padding: 1rem; border: 2px inset #ddd; background: #fff; }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: .78rem; text-transform: uppercase; }
.cart-footer > p { margin: .7rem 0 0; color: #666; font-size: .57rem; text-align: center; text-transform: uppercase; }

.toast { position: fixed; right: 50%; bottom: 2rem; z-index: 130; width: max-content; max-width: calc(100vw - 2rem); padding: .7rem 1rem; border: 1px solid var(--ink); background: var(--signal); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); font-size: .68rem; letter-spacing: .08em; text-align: center; text-transform: uppercase; transform: translateX(50%); }

@media (max-width: 760px) {
  .crt-monitor-stack {
    width: min(92vw, calc(75vh * 631 / 713));
    width: min(92vw, calc(75svh * 631 / 713));
  }
  .crt-screen-content { padding: 18vh 1rem 14vh; background: #d0d0d0; }
  .crt-border-frame { display: block; left: -50%; width: 200%; background-size: cover; }
  .screen-toolbar { margin-bottom: 1rem; }
  .crt-back, .cart-trigger { padding: 4px 12px; font-size: 10px; }
  .archive-title { color: #000; font-size: .9rem; letter-spacing: .1em; }
  .archive-section-title { color: #000; }
  .archive-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .product-card-copy { color: #000; }
  .product-card-copy small { color: #555; }
  .product-modal-overlay { place-items: start center; padding: 3vh .5rem; }
  .product-modal-window { width: 96vw; max-height: 94vh; }
  .product-modal-image-wrapper { width: calc(100% - 5rem); }
  .screen-cart-head { align-items: flex-start; }
  .cart-line { grid-template-columns: 64px 1fr; }
  .cart-line > img { width: 64px; height: 64px; }
  .cart-line > span:last-child { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
