:root {
  --bg: #0f1115;
  --bg-alt: #161923;
  --card-bg: #1b1f2a;
  --text: #f2f2f5;
  --text-muted: #9aa0ad;
  --accent: #e63946;
  --accent-2: #2ec27e;
  --border: #2a2f3d;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

main { flex: 1 0 auto; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.logo span { color: var(--accent); }

.main-nav {
  display: flex;
  gap: 8px;
  flex: 1;
}

.nav-link {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  background: var(--accent);
  color: #fff;
}

.header-actions input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  min-width: 220px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #1b1f2a, #0f1115);
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero h1 { font-size: 2.1rem; margin: 0 0 12px; }
.hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* Toolbar */
.toolbar {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 28px 0 20px;
}
.toolbar-group { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-muted); }
.toolbar-group select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
}

.empty-state { color: var(--text-muted); padding: 40px 0; text-align: center; }

/* Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding-bottom: 60px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, border-color .15s;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0b0d12;
}
.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-preordine { background: #e6394622; color: var(--accent); border: 1px solid var(--accent); }
.badge-disponibile { background: #2ec27e22; color: var(--accent-2); border: 1px solid var(--accent-2); }
.badge-esaurito { background: #6c72801f; color: var(--text-muted); border: 1px solid var(--border); }

.product-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-category { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.product-title { font-size: 1rem; margin: 0; line-height: 1.3; min-height: 2.6em; }
.product-description { font-size: 0.85rem; color: var(--text-muted); margin: 0; flex: 1; }
.product-release { font-size: 0.8rem; color: var(--text-muted); margin: 4px 0 0; }
.product-deadline { font-size: 0.78rem; color: var(--accent); font-weight: 600; margin: 2px 0 0; }

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.product-price { font-size: 1.15rem; font-weight: 700; }
.product-price:empty { display: none; }

.product-cta {
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
}
.product-cta:hover { filter: brightness(1.1); }
.product-cta.disabled {
  pointer-events: none;
  opacity: .5;
  background: var(--border);
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 28px;
}

.footer-col h2, .footer-col h3 { color: var(--text); margin: 0 0 8px; }
.footer-title { font-size: 1.1rem; }
.footer-col p { margin: 0 0 6px; line-height: 1.5; }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  font-size: 0.8rem;
  text-align: center;
}

/* Legal pages */
.legal-content {
  max-width: 760px;
  padding-top: 40px;
  padding-bottom: 60px;
}
.legal-content h1 { font-size: 1.8rem; margin: 0 0 4px; }
.legal-updated { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 32px; }
.legal-content h2 { font-size: 1.15rem; margin: 28px 0 8px; color: var(--text); }
.legal-content p { color: var(--text-muted); line-height: 1.7; margin: 0 0 4px; }
.legal-content a { color: var(--accent); text-decoration: underline; }
.legal-note {
  margin-top: 32px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: stretch; }
  .header-actions input { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
