:root {
  --ink: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.75rem; font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; font-weight: 600; margin-top: 2rem; }

.muted { color: var(--muted); }
.notice { padding: 0.75rem 1rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; }
.notice.error { border-color: #fca5a5; background: #fef2f2; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; padding-bottom: 1rem; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--accent); }
.site-nav a { margin-left: 1.25rem; color: var(--ink); }
.site-main { min-height: 60vh; padding: 2rem 0 3rem; }
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; color: var(--muted); font-size: 0.875rem; }

/* Storefront */
.hero { margin-bottom: 2rem; }
.hero h1 { margin-bottom: 0.25rem; }

.part-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.part-card {
  display: flex; flex-direction: column; gap: 0.35rem;
  border: 1px solid var(--border); border-radius: 8px; padding: 1.1rem;
  color: var(--ink); transition: border-color 0.15s;
}
.part-card:hover { border-color: var(--accent); text-decoration: none; }
.part-card h2 { margin: 0; font-size: 1rem; }
.part-category { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.part-desc { font-size: 0.875rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.part-footer { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 0.5rem; font-size: 0.875rem; }
.part-price { font-weight: 650; font-size: 1.05rem; }

.part-detail { max-width: 560px; }
.part-detail .part-price { font-size: 1.5rem; }

/* Buttons & forms */
.btn-primary {
  display: inline-block; background: var(--ink); color: #fff; border: none;
  padding: 0.6rem 1.4rem; border-radius: 6px; font-size: 0.95rem; cursor: pointer;
}
.btn-primary:hover { background: #000; text-decoration: none; color: #fff; }
.btn-link { background: none; border: none; color: var(--accent); cursor: pointer; padding: 0; font-size: inherit; }
.btn-link:hover { text-decoration: underline; }
.inline-form { display: inline; }

input, textarea, select {
  font: inherit; padding: 0.45rem 0.6rem; border: 1px solid var(--border);
  border-radius: 6px; width: 100%; max-width: 420px;
}
label { display: block; margin-bottom: 0.75rem; font-size: 0.9rem; }
label.inline { display: flex; align-items: center; gap: 0.5rem; }
label.inline input { width: auto; }

/* Tables */
.cart-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.925rem; }
.cart-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cart-table th, .cart-table td { padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--border); }

.cart-summary { margin-top: 1.5rem; }

/* Confirmation */
.confirmation-number { font-size: 1.15rem; }

/* Admin */
.admin-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; margin-bottom: 1.5rem; }
.admin-nav { display: flex; align-items: baseline; gap: 1rem; }
.admin-form { max-width: 480px; margin-bottom: 1rem; }
.admin-login { max-width: 360px; margin: 3rem auto; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.stat { border: 1px solid var(--border); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; }
.stat-value { font-size: 1.5rem; font-weight: 650; }
/* Reviews */
.review-summary { display: flex; gap: 2.5rem; flex-wrap: wrap; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem 0; }
.review-average { display: flex; flex-direction: column; align-items: center; }
.review-average-num { font-size: 2.25rem; font-weight: 650; }
.review-stars { color: #e8a413; letter-spacing: 0.1em; }
.review-breakdown { flex: 1; min-width: 220px; }
.review-bar-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; margin-bottom: 0.25rem; }
.review-bar { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.review-bar-fill { height: 100%; background: #e8a413; }
.review-list { margin: 1.5rem 0; }
.review-card { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.review-card header { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.5rem; }
.review-form { max-width: 480px; margin-top: 2rem; }
.validation-summary { color: #b00020; font-size: 0.85rem; }

/* Screenshots */
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
.screenshot-item { margin: 0; }
.screenshot-item img { width: 100%; border: 1px solid var(--border); border-radius: 8px; display: block; }
.screenshot-item figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }

/* Test results */
.test-results { background: #f6f6f6; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; font-size: 0.85rem; white-space: pre-wrap; }


/* Order status */
.order-status-card { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.25rem; margin-top: 1.5rem; max-width: 560px; }
