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

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

:root {
  --g: #ffe600;
  --n: #000;
  --g-chiaro: #fff59a;
  --g-scuro: #a89400;
}

body {
  font-family: Tahoma, Verdana, Geneva, sans-serif;
  background: var(--n);
  color: var(--g);
  line-height: 1.4;
  padding-bottom: 60px;
  min-height: 100vh;
}

/* pavimento a griglia (vapor) */
body::before {
  content: "";
  position: fixed;
  left: -20%;
  right: -20%;
  bottom: 36px;
  height: 60vh;
  z-index: -2;
  background:
    linear-gradient(to right, rgba(255, 230, 0, 0.65) 2px, transparent 2px) center / 80px 80px,
    linear-gradient(to bottom, rgba(255, 230, 0, 0.65) 2px, transparent 2px) center / 80px 80px;
  transform: perspective(380px) rotateX(64deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, #000 15%, transparent 100%);
  mask-image: linear-gradient(to top, #000 15%, transparent 100%);
}

/* striscia scorrevole */
.striscia {
  background: var(--n);
  color: var(--g);
  overflow: hidden;
  white-space: nowrap;
  font-family: VT323, "Courier New", monospace;
  font-size: 1.3rem;
  letter-spacing: 3px;
  padding: 2px 0;
}
.scorre { display: inline-flex; animation: scorri 30s linear infinite; }
.scorre span { flex: none; }
@keyframes scorri { to { transform: translateX(-50%); } }

/* nastro giallo e nero */
.nastro {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--g) 0 14px, var(--n) 14px 28px);
  border-top: 2px solid var(--g);
  border-bottom: 2px solid var(--g);
}

header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 32px;
  background: var(--n);
  border-bottom: 3px solid var(--g);
}
header h1 {
  font-family: VT323, "Courier New", monospace;
  font-weight: 400;
  text-align: center;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 8px;
  color: var(--g);
  text-shadow: 4px 4px 0 var(--g-scuro);
}
nav a {
  font-family: VT323, "Courier New", monospace;
  font-size: 1.5rem;
  color: var(--g);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-right: 22px;
  padding: 0 6px;
}
nav a:hover { background: var(--g); color: var(--n); }

.social-header { justify-self: end; display: flex; gap: 10px; }
.social-header a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g);
  color: var(--n);
  border: 2px solid var(--n);
  box-shadow: inset 2px 2px 0 var(--g-chiaro), inset -2px -2px 0 var(--g-scuro), 0 0 0 2px var(--g);
}
.social-header a:active { box-shadow: inset 2px 2px 0 var(--g-scuro), inset -2px -2px 0 var(--g-chiaro), 0 0 0 2px var(--g); }
.social-header svg { width: 20px; height: 20px; }

main { max-width: 1000px; margin: 0 auto; padding: 56px 24px 40px; }

.griglia {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 44px;
}

/* finestra stile vecchio Windows */
.finestra {
  display: block;
  text-decoration: none;
  color: var(--n);
  background: var(--g);
  border: 3px solid var(--n);
  outline: 3px solid var(--g);
  box-shadow: 9px 9px 0 3px var(--g-scuro);
  transition: transform 0.12s, box-shadow 0.12s;
}
.finestra:hover { transform: translate(-3px, -3px); box-shadow: 13px 13px 0 3px var(--g-scuro); }
.finestra:active { transform: translate(3px, 3px); box-shadow: 4px 4px 0 3px var(--g-scuro); }

.barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--n);
  color: var(--g);
  padding: 3px 6px 3px 10px;
  font-family: VT323, "Courier New", monospace;
  font-size: 1.35rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.finestra:hover .barra { background: var(--g-scuro); color: var(--n); }
.bottoni { display: flex; gap: 4px; }
.bottoni i {
  width: 20px;
  height: 20px;
  background: var(--g);
  color: var(--n);
  border: 2px solid var(--n);
  box-shadow: inset 2px 2px 0 var(--g-chiaro), inset -2px -2px 0 var(--g-scuro);
  font-style: normal;
  font-size: 1rem;
  line-height: 14px;
  text-align: center;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.corpo { padding: 14px 14px 12px; }

.vetrina {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 3px solid var(--n);
  box-shadow: inset 3px 3px 0 var(--g-scuro);
}
.vetrina img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.su-nero { background: var(--n) radial-gradient(rgba(255, 230, 0, 0.3) 1px, transparent 1.5px) 0 0 / 7px 7px; }
.su-giallo { background: var(--g) radial-gradient(rgba(0, 0, 0, 0.22) 1px, transparent 1.5px) 0 0 / 7px 7px; }

.etichetta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
  font-family: VT323, "Courier New", monospace;
  text-transform: uppercase;
}
.etichetta h3 { font-weight: 400; font-size: 1.9rem; letter-spacing: 2px; line-height: 1; }
.prezzo { font-size: 1.7rem; letter-spacing: 1px; }

/* finestra contatti */
.contatti-box { max-width: 420px; margin: 0 auto 48px; }
.contatti-box .corpo { text-align: center; padding: 18px 14px; font-family: VT323, "Courier New", monospace; font-size: 1.4rem; }
.contatti-box a { color: var(--n); text-decoration: underline; }
.contatti-box a:hover { background: var(--n); color: var(--g); }
.contatti-box p + p { margin-top: 4px; opacity: 0.7; font-size: 1.1rem; }
.contatti-box .finestra:hover { transform: none; box-shadow: 9px 9px 0 3px var(--g-scuro); }
.contatti-box .finestra:hover .barra { background: var(--n); color: var(--g); }

/* barra delle applicazioni */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  background: var(--n);
  border-top: 3px solid var(--g);
}
.start {
  font-family: VT323, "Courier New", monospace;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--n);
  text-decoration: none;
  background: var(--g);
  padding: 4px 14px 3px;
  border: 2px solid var(--n);
  box-shadow: inset 2px 2px 0 var(--g-chiaro), inset -2px -2px 0 var(--g-scuro), 0 0 0 2px var(--g);
}
.start:active { box-shadow: inset 2px 2px 0 var(--g-scuro), inset -2px -2px 0 var(--g-chiaro), 0 0 0 2px var(--g); }
.orologio {
  font-family: VT323, "Courier New", monospace;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--g);
  padding: 4px 12px 3px;
  border: 2px solid var(--g);
  box-shadow: inset 2px 2px 0 var(--g-scuro);
}

@media (prefers-reduced-motion: reduce) {
  .scorre { animation: none; }
}

@media (max-width: 640px) {
  header { grid-template-columns: 1fr; gap: 10px; text-align: center; padding: 14px; }
  header h1 { font-size: 2.4rem; order: -1; }
  nav, .social-header { justify-self: center; }
  nav a { margin: 0 8px; }
}

@media (hover: hover) {
  body, a { cursor: none; }
}

.stella {
  position: fixed;
  top: -100px;
  left: -100px;
  width: 38px;
  height: 38px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='12,1.5 15,9 22.5,9 16.5,14 18.8,21.5 12,17 5.2,21.5 7.5,14 1.5,9 9,9' fill='%23ffe600' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.stella.grande { width: 56px; height: 56px; }

.etichetta { text-transform: none; flex-wrap: wrap; gap: 4px 12px; }

/* ===== pagina prodotto ===== */
body, a, button { cursor: auto; }
@media (hover: hover) {
  body, a, button { cursor: none; }
}

.finestra.fisso:hover { transform: none; box-shadow: 9px 9px 0 3px var(--g-scuro); }
.finestra.fisso:active { transform: none; box-shadow: 9px 9px 0 3px var(--g-scuro); }
.finestra.fisso:hover .barra { background: var(--n); color: var(--g); }

.scheda {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
@media (max-width: 820px) { .scheda { grid-template-columns: 1fr; } }

.info { font-family: VT323, "Courier New", monospace; padding: 18px 18px 16px; }
.info h2 { font-weight: 400; font-size: 2.6rem; line-height: 1; letter-spacing: 2px; text-transform: none; margin-bottom: 8px; }
.prezzo-grande { font-size: 2.2rem; line-height: 1; margin-bottom: 6px; }
.nota { font-size: 1.25rem; opacity: 0.75; margin-bottom: 18px; }
.sez { font-size: 1.4rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }

.taglie { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.taglia {
  font-family: VT323, "Courier New", monospace;
  font-size: 1.7rem;
  line-height: 1;
  min-width: 58px;
  height: 46px;
  padding: 0 12px;
  background: var(--g);
  color: var(--n);
  border: 3px solid var(--n);
  box-shadow: inset 2px 2px 0 var(--g-chiaro), inset -2px -2px 0 var(--g-scuro);
}
.taglia:hover { background: var(--g-chiaro); }
.taglia.scelta { background: var(--n); color: var(--g); box-shadow: none; }
.taglia.esaurita { text-decoration: line-through; opacity: 0.4; }

.compra {
  display: block;
  width: 100%;
  height: 58px;
  font-family: VT323, "Courier New", monospace;
  font-size: 2rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: var(--n);
  color: var(--g);
  border: 3px solid var(--n);
  box-shadow: 5px 5px 0 var(--g-scuro);
  transition: transform 0.1s, box-shadow 0.1s;
}
.compra:hover { background: #222; }
.compra:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--g-scuro); }

.msg { min-height: 1.6em; margin-top: 12px; font-size: 1.35rem; }

.descrizione { list-style: none; margin-top: 12px; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 1px; }
.descrizione li { margin-bottom: 6px; }
.descrizione li::before { content: "★ "; }

.azioni { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; font-size: 1.3rem; }
.azioni a { color: var(--n); text-decoration: underline; }
.azioni a:hover, .azioni button:hover { background: var(--n); color: var(--g); }
.azioni button {
  font-family: VT323, "Courier New", monospace;
  font-size: 1.3rem;
  background: transparent;
  color: var(--n);
  border: 0;
  text-decoration: underline;
  padding: 0 4px;
}
.errore { color: var(--g); font-family: VT323, "Courier New", monospace; font-size: 1.6rem; }
.errore a { color: var(--g); }

/* quantità */
.qta { display: flex; align-items: center; margin-bottom: 10px; }
.qta button {
  font-family: VT323, "Courier New", monospace;
  font-size: 1.9rem;
  line-height: 1;
  width: 46px;
  height: 46px;
  background: var(--g);
  color: var(--n);
  border: 3px solid var(--n);
  box-shadow: inset 2px 2px 0 var(--g-chiaro), inset -2px -2px 0 var(--g-scuro);
}
.qta button:hover:not(:disabled) { background: var(--g-chiaro); }
.qta button:disabled { opacity: 0.35; }
.qta span {
  font-size: 1.9rem;
  line-height: 40px;
  min-width: 64px;
  height: 46px;
  text-align: center;
  border-top: 3px solid var(--n);
  border-bottom: 3px solid var(--n);
}
.totale { font-size: 1.6rem; margin-bottom: 18px; }
