:root {
  --indigo: #4F46E5;
  --indigo-dark: #3730A3;
  --orange: #FF7A29;
  --orange-dark: #E8630F;
  --navy: #111827;
  --gray: #6B7280;
  --bg: #F5F6FA;
  --card: #FFFFFF;
  --green: #16C784;
  --red: #E23B3B;
  --border: #E5E7EB;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg);
  color: var(--navy);
  line-height: 1.5;
}

/* Brand type: Space Grotesk for the logotype and headings — distinctive,
   geometric, not one of the overused defaults. Body copy stays on system
   sans for maximum readability at small sizes. */
.brand, h1, h2, h3, h4, .price {
  font-family: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
}

a { color: inherit; }

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

/* Header */
header.site-header {
  background: var(--navy);
  color: white;
  padding: 16px 0;
}
header.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.2px;
  text-decoration: none;
  color: white;
}
.brand .badge {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--indigo), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}
.brand:hover .badge {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
}
.brand .badge img { display: block; }
.brand small {
  display: block;
  font-weight: 400;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: #C7CCDA;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 60%);
  color: white;
  padding: 64px 0 56px;
}
.hero h1 {
  font-size: 40px;
  margin: 0 0 16px;
  font-weight: 800;
  max-width: 640px;
}
.hero p.lead {
  font-size: 18px;
  max-width: 560px;
  color: #E4E2FF;
  margin-bottom: 32px;
}
.pill-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.pill {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.pill.accent { background: var(--orange); border-color: var(--orange); }

/* School picker card */
.picker-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(17,24,39,0.25);
  color: var(--navy);
}
.picker-card h3 { margin: 0 0 6px; font-size: 16px; }
.picker-card p { margin: 0 0 14px; color: var(--gray); font-size: 14px; }

select, input, button {
  font-family: inherit;
  font-size: 15px;
}

.select-wrap select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  color: var(--navy);
  margin-bottom: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .05s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--orange); color: white; width: 100%; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { background: var(--indigo); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--navy); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Sections */
.section { padding: 56px 0; }
.section h2 { font-size: 28px; margin-bottom: 8px; }
.section .sub { color: var(--gray); margin-bottom: 32px; max-width: 600px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature-card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: #EEF0FE;
  color: var(--indigo);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.feature-card h4 { margin: 0 0 8px; font-size: 16px; }
.feature-card p { margin: 0; color: var(--gray); font-size: 14px; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card .photo {
  aspect-ratio: 4/3;
  background: #EEF0FE;
  display: flex; align-items: center; justify-content: center;
  color: var(--indigo);
  font-size: 40px;
  overflow: hidden;
}
.product-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card h4 { margin: 0; font-size: 16px; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #EEF0FE;
  color: var(--indigo-dark);
}
.tag.stock-ok { background: #E4F9F0; color: #0A9463; }
.tag.stock-out { background: #FCE8E8; color: var(--red); }
.price { font-size: 22px; font-weight: 800; margin-top: auto; }
.price small { font-size: 12px; color: var(--gray); font-weight: 500; }

/* Warranty banner */
.warranty-banner {
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.warranty-banner .num { font-size: 40px; font-weight: 800; color: var(--orange); }

footer {
  padding: 32px 0;
  text-align: center;
  color: var(--gray);
  font-size: 13px;
}

/* Admin */
.admin-shell { min-height: 100vh; }
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy);
}
.login-box {
  background: white;
  padding: 32px;
  border-radius: var(--radius);
  width: 320px;
}
.login-box h2 { margin-top: 0; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.error-text { color: var(--red); font-size: 13px; margin-top: 8px; }

.admin-header {
  background: var(--navy);
  color: white;
  padding: 16px 0;
}
.admin-header .container { display: flex; justify-content: space-between; align-items: center; }

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px 0;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.panel h3 { margin-top: 0; }
.school-list-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.school-list-item:hover { background: var(--bg); }
.school-list-item.active { background: #EEF0FE; }
.school-list-item img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

table.catalog-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.catalog-table th, table.catalog-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border);
}
table.catalog-table tr.selected { background: #FFF6EE; }
.curation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.curation-fields input { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); font-size: 12px; }
.count-badge {
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--indigo); color: white;
}
.count-badge.over { background: var(--red); }

.muted { color: var(--gray); font-size: 13px; }
.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--navy); color: white; padding: 12px 18px; border-radius: 10px;
  font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
