:root {
  --bg: #f7f7f9;
  --surface: #ffffff;
  --text: #1a1a1e;
  --muted: #6b6b74;
  --border: #e7e7ec;
  --accent: #16171c;
  --accent-hover: #34363f;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 8px 24px rgba(20, 20, 30, 0.06);
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 2.5rem 1.5rem 4rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.listing, .product, .legal-page { max-width: 1100px; margin: 0 auto; }

.legal-page { max-width: 760px; }

.legal-page > .back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.legal-page > .back:hover { color: var(--text); }

.legal-page > h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}

.legal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.legal-content h2 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.75rem;
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content p, .legal-content ul, .legal-content ol { margin: 0 0 1rem; }

.legal-content ul, .legal-content ol { padding-left: 1.4rem; }

.legal-content a { color: var(--text); }

.legal-content a.buy-button {
  color: #fff;
  text-decoration: none;
  margin-top: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  .legal-content a.buy-button { color: #101012; }
}

.legal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.listing h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 1.75rem;
  letter-spacing: -0.01em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(20, 20, 30, 0.06), 0 14px 32px rgba(20, 20, 30, 0.1);
}

.card img {
  max-width: 100%;
  height: 140px;
  object-fit: contain;
  margin-bottom: 0.85rem;
}

.card-title {
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.card-price {
  color: var(--muted);
  font-size: 0.9rem;
}

.product { max-width: 480px; }

.product .back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.product .back:hover { color: var(--text); }

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.product-image {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  margin-bottom: 1.25rem;
}

.product h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}

.price {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.sku {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}

.buy-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.buy-button:hover { background: var(--accent-hover); }

.site-footer {
  max-width: 1100px;
  margin: 3.5rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--text); }

.footer-company { margin: 0 0 0.75rem; }

.footer-payments { margin: 0 0 1rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-bottom: 1rem;
}

.footer-copy { margin: 0; }

.footer-legal-band {
  margin: 1.5rem -1.5rem -4rem;
  padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}

.footer-legal-band span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101012;
    --surface: #1a1a1e;
    --text: #f2f2f4;
    --muted: #9a9aa2;
    --border: #2a2a30;
    --accent: #f2f2f4;
    --accent-hover: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
  .buy-button { color: #101012; }
}
