:root {
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #111827;
}
* { 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);
}

/* Header / nav */
#site-header {
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.nav-inner .brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  text-decoration: none;
}
.nav-inner nav {
  display: flex;
  gap: 24px;
}
.nav-inner nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-inner nav a:hover,
.nav-inner nav a.active {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 64px 24px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}
.hero h1 { margin: 0 0 8px; font-size: 2.25rem; }
.hero p.tagline { margin: 0 0 16px; color: var(--muted); font-size: 1.05rem; }
.hero p.description { max-width: 640px; margin: 0 auto; color: var(--muted); line-height: 1.6; }

/* Simple page hero (About / Contact) */
.page-hero {
  padding: 56px 24px 32px;
  text-align: center;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { margin: 0 0 12px; font-size: 2rem; }

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
main.narrow {
  max-width: 720px;
}
main.narrow p { color: var(--muted); line-height: 1.7; font-size: 1.05rem; }

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eef0f2;
}
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-body h3 { margin: 0; font-size: 1.05rem; }
.card-body p.desc { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.4; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 600; }
.badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.badge.in { background: #dcfce7; color: #166534; }
.badge.out { background: #f3f4f6; color: #6b7280; }

.empty, .error { text-align: center; color: var(--muted); padding: 40px 0; grid-column: 1 / -1; }

/* Product detail page */
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back-link:hover { color: var(--accent); }

.product-detail {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.product-detail img {
  flex: 1 1 280px;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #eef0f2;
}
.product-detail-body {
  flex: 2 1 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-detail-body h1 { margin: 0; font-size: 1.75rem; }
.product-detail-body .price { font-size: 1.4rem; font-weight: 700; margin: 0; }
.product-detail-body .badge { align-self: flex-start; }
.product-detail-body .detail-desc { color: var(--muted); line-height: 1.7; margin: 8px 0 0; }

/* Contact card */
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.contact-card a.email-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

/* Footer */
#site-footer {
  border-top: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}
.footer-col strong { display: block; color: var(--text); margin-bottom: 10px; }
.footer-col p { margin: 0; line-height: 1.5; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 24px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
}
.footer-bottom a { color: var(--muted); }
