:root {
  --pure-50: #ecfdf5;
  --pure-100: #d1fae5;
  --pure-300: #6ee7b7;
  --pure-500: #10b981;
  --pure-600: #059669;
  --pure-700: #047857;
  --pure-900: #064e3b;

  --sure-400: #fbbf24;
  --sure-500: #f59e0b;
  --sure-600: #d97706;

  --ink-400: #94a3b8;
  --ink-500: #64748b;
  --ink-600: #475569;
  --ink-700: #334155;
  --ink-800: #1e293b;
  --ink-900: #0f172a;

  --paper: #fbfaf7;
  --mist: #f1f5f2;
  --white: #ffffff;
  --radius: 1rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}
.brand { display: flex; flex-direction: column; line-height: 1; flex-shrink: 0; }
.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--pure-700); }
.brand-tagline { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-500); }

.search-form { flex: 1; max-width: 28rem; display: none; }
.search-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.1);
  background: var(--mist);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  outline: none;
}
.search-input:focus { border-color: var(--pure-500); box-shadow: 0 0 0 2px var(--pure-100); }
.search-form-mobile { display: block; padding-bottom: 0.75rem; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.header-actions a { font-size: 0.875rem; font-weight: 500; color: var(--ink-700); }
.header-actions a:hover { color: var(--pure-700); }
.cart-link { position: relative; }
.cart-badge {
  position: absolute; top: -0.6rem; right: -0.9rem;
  background: var(--sure-500); color: var(--ink-900);
  font-size: 0.7rem; font-weight: 700;
  min-width: 1.15rem; height: 1.15rem; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 0.2rem;
}
.menu-toggle { display: none; background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--ink-700); }

.site-nav { border-top: 1px solid rgba(15,23,42,0.05); background: var(--mist); }
.nav-list { display: flex; gap: 1.5rem; padding: 0.6rem 0; list-style: none; margin: 0; padding-left: 1.25rem; }
.nav-list a { font-size: 0.875rem; font-weight: 500; color: var(--ink-700); }
.nav-list a:hover { color: var(--pure-700); }

@media (max-width: 767px) {
  .search-form { display: none !important; }
  .menu-toggle { display: block; }
  .nav-list { flex-direction: column; gap: 0.25rem; padding: 0.5rem 1.25rem; }
  .site-nav.collapsed { display: none; }
}
@media (min-width: 768px) {
  .search-form { display: block; }
  .search-form-mobile { display: none; }
  .site-nav { display: block !important; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(to bottom, var(--pure-50), var(--paper));
  text-align: center;
  padding: 3.5rem 1.25rem;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--pure-600); color: white;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.4rem 1rem; border-radius: 999px;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 1rem 0 0.5rem; }
.hero p.tagline { max-width: 34rem; margin: 0 auto; color: var(--ink-600); font-size: 1.05rem; }
.hero p.meta { font-size: 0.85rem; color: var(--ink-500); font-weight: 500; margin-top: 0.75rem; }
.btn-cta {
  display: inline-block; margin-top: 1.25rem;
  background: var(--sure-500); color: var(--ink-900);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem;
  padding: 0.85rem 2rem; border-radius: 999px; border: none; cursor: pointer;
}
.btn-cta:hover { background: var(--sure-400); }
@media (min-width: 640px) { .hero h1 { font-size: 3.5rem; } }

/* ---------- Sections / grids ---------- */
.section { padding: 3rem 0; }
.section-mist { background: var(--mist); }
.section-dark { background: var(--ink-900); color: white; padding: 3.5rem 0; text-align: center; }
.section-title { text-align: center; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 0.25rem; }
.section-subtitle { text-align: center; color: var(--ink-500); font-size: 0.875rem; margin: 0 0 1.5rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: white;
  border: 1px solid rgba(15,23,42,0.05);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.thumb {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}
.thumb.thumb-lg { font-size: 4.5rem; }
.thumb.thumb-sm { font-size: 1.5rem; }

.badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 0.3rem 0.7rem;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-sure { background: var(--sure-400); color: var(--ink-900); }
.badge-pure { background: var(--pure-600); color: white; }
.badge-ink { background: var(--ink-500); color: white; }
.badge-float { position: absolute; top: 0.5rem; left: 0.5rem; }

.eyebrow { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); }
.card h3 { margin: 0.15rem 0; font-size: 0.9rem; font-weight: 700; }
.card p.desc { margin: 0; font-size: 0.78rem; color: var(--ink-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card p.price { margin: 0; font-size: 1.1rem; font-weight: 800; }

.btn-add {
  width: 100%; border: none; border-radius: 0.6rem;
  background: var(--pure-600); color: white; font-weight: 600; font-size: 0.85rem;
  padding: 0.55rem 0.75rem; cursor: pointer;
}
.btn-add:hover { background: var(--pure-700); }
.btn-add.added { background: var(--pure-700); }

/* ---------- Shop by need ---------- */
.need-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 640px) { .need-grid { grid-template-columns: repeat(4, 1fr); } }
.need-tile {
  background: white; border: 1px solid rgba(15,23,42,0.05); border-radius: var(--radius);
  padding: 1.25rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.need-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(15,23,42,0.08); }
.need-tile .icon { font-size: 1.8rem; }
.need-tile .label { font-size: 0.85rem; font-weight: 600; color: var(--ink-800); }

/* ---------- Next week teaser ---------- */
.teaser {
  border: 2px dashed var(--pure-300); background: var(--pure-50); border-radius: var(--radius);
  padding: 2.5rem 1.5rem; text-align: center;
}
.teaser .eyebrow { color: var(--pure-700); font-weight: 700; }
.teaser h2 { margin: 0.5rem 0; font-size: 1.75rem; font-weight: 800; }
.teaser .soon { font-size: 0.85rem; font-weight: 600; color: var(--ink-500); }

/* ---------- Weekly focus board ---------- */
.wf-header { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-bottom: 2rem; }
.wf-week-count { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--ink-500); }
.wf-header h1 { font-size: 2rem; font-weight: 800; margin: 0.25rem 0; }
.wf-header .meta { font-size: 0.85rem; font-weight: 600; color: var(--ink-500); margin: 0; }
.wf-columns { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 3rem; }
@media (min-width: 640px) { .wf-columns { grid-template-columns: 1fr 1fr; } }
.wf-column { background: white; border: 1px solid rgba(15,23,42,0.05); border-radius: var(--radius); padding: 1.5rem; }
.wf-column .label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.wf-column.household .label { color: var(--pure-700); }
.wf-column.commercial .label { color: var(--sure-600); }
.wf-column ul { margin: 0.75rem 0 0; padding: 0; list-style: none; }
.wf-column li { font-size: 0.9rem; color: var(--ink-600); padding: 0.15rem 0; }

.calendar-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; max-width: 42rem; margin: 1.5rem auto 0; }
@media (min-width: 640px) { .calendar-grid { grid-template-columns: 1fr 1fr; } }
.calendar-item {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid rgba(15,23,42,0.05); background: white; border-radius: 0.75rem;
  padding: 0.75rem 1rem; font-size: 0.875rem;
}
.calendar-item.active { border-color: var(--pure-600); background: var(--pure-50); }
.calendar-item .active-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--pure-700); }

/* ---------- Product detail ---------- */
.breadcrumb { font-size: 0.875rem; color: var(--ink-500); margin-bottom: 1.5rem; }
.breadcrumb a:hover { color: var(--pure-700); }
.product-detail { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 768px) { .product-detail { grid-template-columns: 1fr 1fr; } }
.product-detail .thumb-wrap { max-width: 28rem; }
.product-title { font-size: 1.9rem; font-weight: 800; margin: 0.5rem 0; }

.tier-panel { border: 1px solid rgba(15,23,42,0.05); background: white; border-radius: var(--radius); padding: 1.5rem; }
.tier-options { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tier-option {
  border: 1px solid rgba(15,23,42,0.1); border-radius: 0.75rem; padding: 0.65rem 1rem;
  cursor: pointer; text-align: left; background: white; font-size: 0.875rem;
}
.tier-option .t-label { display: block; font-weight: 700; }
.tier-option .t-price { display: block; color: var(--ink-600); }
.tier-option .t-note { display: block; font-size: 0.75rem; font-weight: 700; color: var(--pure-700); }
.tier-option.selected { border-color: var(--pure-600); background: var(--pure-50); box-shadow: 0 0 0 1px var(--pure-600); }

.qty-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.qty-stepper { display: flex; align-items: center; border: 1px solid rgba(15,23,42,0.1); border-radius: 0.5rem; }
.qty-stepper button { border: none; background: none; font-size: 1.1rem; padding: 0.5rem 0.75rem; cursor: pointer; color: var(--ink-600); }
.qty-stepper span { width: 2rem; text-align: center; font-weight: 700; font-size: 0.875rem; }
.btn-add-big {
  flex: 1; border: none; border-radius: 0.6rem; background: var(--sure-500); color: var(--ink-900);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.85rem;
  padding: 0.85rem 1rem; cursor: pointer;
}
.btn-add-big:hover { background: var(--sure-400); }
.btn-add-big.added { background: var(--pure-700); color: white; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .cart-layout { grid-template-columns: 1fr 20rem; } }
.cart-item {
  display: flex; align-items: center; gap: 1rem;
  border: 1px solid rgba(15,23,42,0.05); background: white; border-radius: var(--radius); padding: 1rem;
  margin-bottom: 1rem;
}
.cart-item .thumb { width: 4rem; height: 4rem; flex-shrink: 0; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info .name { font-weight: 700; }
.cart-item .info .tier { font-size: 0.75rem; color: var(--ink-500); }
.cart-item .line-total { width: 5rem; text-align: right; font-weight: 700; }
.remove-btn { border: none; background: none; color: var(--ink-400); font-size: 1.1rem; cursor: pointer; }
.remove-btn:hover { color: #dc2626; }

.summary-card { background: white; border: 1px solid rgba(15,23,42,0.05); border-radius: var(--radius); padding: 1.5rem; height: fit-content; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--ink-600); margin-top: 0.75rem; }
.summary-total { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 800; border-top: 1px solid rgba(15,23,42,0.1); margin-top: 0.75rem; padding-top: 0.75rem; }
.btn-disabled {
  width: 100%; margin-top: 1.25rem; border: none; border-radius: 999px;
  background: rgba(15,23,42,0.15); color: var(--ink-500); font-weight: 700; text-transform: uppercase; font-size: 0.8rem;
  padding: 0.85rem; cursor: not-allowed;
}
.empty-state { text-align: center; padding: 4rem 1.25rem; }

/* ---------- Forms (products/filters, admin) ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  background: white; border: 1px solid rgba(15,23,42,0.05); border-radius: var(--radius); padding: 1rem; margin-bottom: 2rem;
}
.filter-bar select, .filter-bar input[type="search"], .filter-bar input[type="text"] {
  border: 1px solid rgba(15,23,42,0.1); border-radius: 999px; padding: 0.5rem 0.9rem; font-size: 0.85rem; background: white;
}
.filter-select-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.page-header { text-align: center; margin-bottom: 2.5rem; }
.page-header h1 { font-size: 2rem; font-weight: 800; margin: 0.25rem 0; }
.page-header p { color: var(--ink-600); max-width: 34rem; margin: 0.4rem auto 0; font-size: 0.9rem; }
.page-header .kicker { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pure-700); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 4rem; background: var(--ink-900); color: #cbd5e1; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 0; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-grid h4 { color: white; font-size: 0.9rem; margin: 0 0 0.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.875rem; }
.footer-grid li a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); text-align: center; padding: 1rem 0; font-size: 0.75rem; color: #94a3b8; }

/* ---------- Admin ---------- */
.admin-bar {
  background: var(--ink-900); color: white; padding: 0.6rem 0; font-size: 0.8rem;
  position: sticky; top: 0; z-index: 50;
}
.admin-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.admin-bar a { color: var(--pure-300); font-weight: 600; }
.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid rgba(15,23,42,0.06); font-size: 0.85rem; }
.admin-table th { background: var(--mist); font-weight: 700; text-transform: uppercase; font-size: 0.7rem; color: var(--ink-600); }
.admin-table tbody tr:nth-child(even) { background: var(--paper); }
.admin-actions { white-space: nowrap; }
.admin-actions a, .admin-actions button { font-size: 0.8rem; margin-right: 0.4rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 0.4rem;
  border: 1px solid rgba(15,23,42,0.12); background: white;
  font-size: 0.9rem; line-height: 1; cursor: pointer;
  text-decoration: none; color: var(--ink-700); vertical-align: middle;
}
.icon-btn:hover { background: var(--mist); }
.icon-btn.icon-btn-primary { border-color: var(--pure-300); color: var(--pure-700); }
.icon-btn.icon-btn-primary:hover { background: var(--pure-50); }
.icon-btn.icon-btn-danger { border-color: #fecaca; color: #dc2626; }
.icon-btn.icon-btn-danger:hover { background: #fef2f2; }
.form-card { background: white; border: 1px solid rgba(15,23,42,0.05); border-radius: var(--radius); padding: 1.5rem; max-width: 40rem; }
.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--ink-700); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; border: 1px solid rgba(15,23,42,0.15); border-radius: 0.5rem; padding: 0.5rem 0.7rem; font-size: 0.875rem;
}
.tier-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr auto auto; gap: 0.5rem; margin-bottom: 0.5rem; align-items: center; }
.tier-active-label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--ink-600); white-space: nowrap; }
.tier-active-label input[type="checkbox"] { width: auto; }
.btn-primary { background: var(--pure-600); color: white; border: none; border-radius: 0.5rem; padding: 0.6rem 1.25rem; font-weight: 600; cursor: pointer; }
.btn-primary:hover { background: var(--pure-700); }
.btn-secondary { background: var(--mist); color: var(--ink-700); border: none; border-radius: 0.5rem; padding: 0.6rem 1.25rem; font-weight: 600; cursor: pointer; }
.btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; border-radius: 0.5rem; padding: 0.35rem 0.75rem; font-weight: 600; cursor: pointer; font-size: 0.8rem; }
.flash { padding: 0.75rem 1rem; border-radius: 0.5rem; margin-bottom: 1rem; font-size: 0.875rem; }
.flash-success { background: var(--pure-50); color: var(--pure-700); border: 1px solid var(--pure-300); }
.flash-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.login-card { max-width: 24rem; margin: 4rem auto; }

.empty-note { text-align: center; color: var(--ink-500); font-size: 0.875rem; padding: 2rem 0; }
