/* ==========================================================
   Limka Knitters - Global styles (home page)
   ========================================================== */

:root {
  --brand: #0f4c3a;        /* deep green */
  --brand-dark: #0a3528;
  --brand-light: #e7f2ee;
  --accent: #f2a900;       /* warm gold */
  --accent-dark: #d99500;
  --text: #1f2933;
  --muted: #5f6b76;
  --bg: #ffffff;
  --bg-alt: #f6f8f7;
  --border: #e1e6e4;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(15, 76, 58, 0.08);
  --shadow-hover: 0 12px 28px rgba(15, 76, 58, 0.16);
  --max-width: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--accent); color: #1b1b1b; }
.btn-primary:hover { background: var(--accent-dark); }

.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--brand); }

.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { background: var(--accent); color: #1b1b1b; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--brand-dark);
  color: #fff;
  text-align: center;
  font-size: 0.82rem;
  padding: 8px 16px;
}
.topbar strong { color: var(--accent); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}
.logo-text {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--brand);
  line-height: 1.1;
}
.logo-text span { color: var(--accent-dark); }

/* Search */
.search {
  flex: 1;
  display: flex;
  max-width: 460px;
  min-width: 0;
}
.search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: 999px 0 0 999px;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.search input:focus { border-color: var(--brand); }
.search button {
  padding: 0 22px;
  border: 2px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.search button:hover { background: var(--brand-dark); }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 500;
  font-size: 0.92rem;
}
.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--text);
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.nav a:hover, .nav a.active { color: var(--brand); }
.nav a:hover::after, .nav a.active::after { width: 100%; }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.cart-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--brand);
  transition: background 0.2s ease;
}
.cart-link:hover { background: var(--brand-light); }
.cart-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #1b1b1b;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(242, 169, 0, 0.18), transparent 45%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 80px 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero p {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 540px;
  margin-bottom: 30px;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(4px);
}
.hero-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  font-weight: 500;
  font-size: 0.97rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.hero-card-row:last-child { border-bottom: none; }
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--brand);
  margin-bottom: 10px;
}
.section-head p { color: var(--muted); }

/* ---------- Schools grid ---------- */
.schools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.school-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.school-card:hover,
.school-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
  outline: none;
}

.school-badge {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}
.school-badge.has-logo { background: #fff; padding: 6px; border: 1px solid var(--border, #e3e6e4); overflow: hidden; box-shadow: none; }
.school-badge.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%; }
.school-card h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 4px;
}
.school-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.school-cta {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand);
}
.school-card:hover .school-cta { color: var(--accent-dark); }

.no-results {
  text-align: center;
  color: var(--muted);
  padding: 30px 0;
}

/* Extra product lines shown on a school card */
.school-lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: -6px 0 16px;
}
.school-lines span {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 500;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 22px;
  border: 1px solid var(--border);
  text-align: center;
}
.step-number {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.02rem; margin-bottom: 8px; color: var(--brand); }
.step p { font-size: 0.9rem; color: var(--muted); }

/* ---------- Wholesale banner ---------- */
.wholesale-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 44px 48px;
  border-radius: 18px;
  background: linear-gradient(120deg, var(--brand) 0%, #146a52 100%);
  color: #fff;
}
.wholesale-banner h2 { font-size: 1.7rem; margin-bottom: 8px; }
.wholesale-banner p { color: rgba(255, 255, 255, 0.86); max-width: 560px; }
.wholesale-banner .btn { flex-shrink: 0; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.feature h3 { font-size: 1.05rem; color: var(--brand); margin-bottom: 8px; }
.feature p { font-size: 0.92rem; color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  background: var(--brand-dark);
  color: rgba(255, 255, 255, 0.8);
  padding-top: 56px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
}
.logo-light .logo-text { color: #fff; }
.logo-light .logo-text span { color: var(--accent); }
.logo-light .logo-mark { background: #fff; color: var(--brand); }
.footer-col p { margin-top: 14px; font-size: 0.92rem; max-width: 320px; }
.footer-col h4 { color: #fff; margin-bottom: 14px; font-size: 1rem; }
.footer-col li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 18px 20px;
  font-size: 0.84rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding: 56px 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }

  .header-inner { flex-wrap: wrap; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .search { order: 3; flex: 1 0 100%; max-width: none; }
  .menu-toggle { display: flex; }

  .nav {
    display: none;
    order: 4;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-top: 6px;
    border-top: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
}

@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .wholesale-banner { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .schools-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .school-card { padding: 24px 12px 18px; }
  .school-badge { width: 62px; height: 62px; font-size: 1.25rem; }
  .school-card h3 { font-size: 0.95rem; }
  .logo-text { font-size: 1.05rem; }
}

/* ---------- Product library (home page) ---------- */
.library {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 36px; padding: 24px 28px; border-radius: var(--radius);
  background: var(--brand-light); border: 1px solid var(--border);
}
.library h3 { color: var(--brand); font-size: 1.15rem; margin-bottom: 4px; }
.library p { color: var(--muted); font-size: 0.92rem; max-width: 520px; }
.library-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-ghost-dark { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-ghost-dark:hover { background: var(--brand); color: #fff; }
@media (max-width: 600px) { .library { padding: 20px 18px; } .library-actions .btn { flex: 1 1 140px; text-align: center; } }
