:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --border: #2a2e37;
  --text: #e8e9ec;
  --muted: #9aa0ac;
  --accent: #ffdb4d;
  --accent-text: #1a1a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 0 16px;
}

.site-header {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 0 24px;
}

.site-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.subtitle {
  color: var(--muted);
  margin: 0;
}

.catalog {
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}

.loading { color: var(--muted); }

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.product-card p {
  color: var(--muted);
  margin: 0;
  flex-grow: 1;
}

.price {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.hidden { display: none; }

.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  position: relative;
}

.modal-card h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.modal-card label {
  display: block;
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-card input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #11131a;
  color: var(--text);
  font-size: 1rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-error {
  color: #ff6b6b;
  font-size: 0.9rem;
}

.modal-error.hidden { display: none; }

.site-footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 0 48px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
