@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');

:root {
  --paper: #f8f6f0;
  --paper-deep: #f0ede4;
  --ink: #1e352d;
  --ink-soft: #456057;
  --muted: #7a8881;
  --line: #e5e6dd;
  --forest: #2c5b47;
  --forest-dark: #214737;
  --sage: #dce9dc;
  --mint: #eaf2e7;
  --sun: #f0ba4d;
  --sun-soft: #fff2d3;
  --coral: #e66f53;
  --coral-soft: #fde7df;
  --lavender: #dedcf1;
  --white: #ffffff;
  --shadow-soft: 0 14px 40px rgba(45, 74, 60, 0.08);
  --shadow-card: 0 8px 24px rgba(45, 74, 60, 0.07);
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(230, 111, 83, 0.45);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Touch polish: remove the 300ms tap delay and the default OS tap highlight so
   presses feel immediate; overscroll containment stops scroll chaining and
   keeps the custom pull-to-refresh from fighting the native rubber-band. Active
   states add tactile press feedback on the primary actions. */
html {
  -webkit-tap-highlight-color: transparent;
}

body {
  overscroll-behavior-y: contain;
}

button,
a,
[role="button"],
input,
select,
textarea {
  touch-action: manipulation;
}

.primary-button:active,
.secondary-button:active,
.small-button:active,
.account-button:active,
.install-button:active,
.location-pill:active,
.nav-link:active {
  transform: translateY(0) scale(0.97);
}

.bottom-tab:active {
  transform: scale(0.97);
  background: var(--paper-deep);
}

.app-shell {
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, calc(100% - 64px));
  min-height: 82px;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand {
  font-size: 20px;
}

.brand-direct {
  color: var(--coral);
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: var(--forest);
  color: var(--sun);
}

.brand-mark.small {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 600;
  transition: 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--white);
  color: var(--forest);
  box-shadow: 0 2px 10px rgba(30, 53, 45, 0.05);
}

.nav-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  place-items: center;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.location-pill,
.account-button,
.install-button,
.mobile-menu-button {
  border: 0;
  border-radius: 999px;
}

.location-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--ink-soft);
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 600;
}

.location-pill:hover {
  background: var(--white);
}

.install-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #ead8ab;
  background: var(--sun-soft);
  color: #95651c;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  transition: 160ms ease;
}

.install-button:hover {
  border-color: var(--sun);
  background: #ffedbd;
  transform: translateY(-1px);
}

.install-button span {
  color: var(--coral);
  font-size: 15px;
  line-height: 0.7;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  white-space: nowrap;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(240, 186, 77, 0.15);
}

.sync-status.online {
  color: var(--forest);
}

.sync-status.online .sync-dot {
  background: #5db36c;
  box-shadow: 0 0 0 3px rgba(93, 179, 108, 0.14);
}

.pin-icon {
  color: var(--coral);
  font-size: 17px;
  line-height: 1;
  transform: rotate(180deg);
}

.chevron {
  color: var(--muted);
  font-size: 16px;
  line-height: 0.6;
}

.account-button {
  background: var(--forest);
  color: var(--white);
  padding: 11px 15px 11px 17px;
  font-size: 12px;
  font-weight: 700;
  transition: 160ms ease;
}

.account-button:hover {
  background: var(--forest-dark);
  transform: translateY(-1px);
}

.account-button span {
  margin-left: 8px;
  color: var(--sun);
  font-size: 15px;
}

.mobile-menu-button {
  display: none;
  width: 38px;
  height: 38px;
  background: var(--white);
  color: var(--forest);
  font-size: 18px;
}

/* Mobile bottom tab bar. Hidden on desktop (default), revealed at <=780px.
   Replaces the hamburger dropdown so primary navigation stays thumb-reachable
   and the account action is always available on phones. Sits below modals
   (z-index 6 < 10) so an open sheet covers it like a native app. */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: none;
  align-items: stretch;
  gap: 0;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(30, 53, 45, 0.08);
}

.bottom-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1 1 0;
  min-height: 52px;
  padding: 6px 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  transition: 160ms ease;
}

.bottom-tab-icon {
  font-size: 20px;
  line-height: 1;
  transition: 160ms ease;
}

.bottom-tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.bottom-tab-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(10px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--coral);
  color: var(--white);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 700;
}

.bottom-tab.active {
  color: var(--forest);
}

.bottom-tab.active .bottom-tab-icon {
  transform: translateY(-1px) scale(1.06);
}

/* Pull-to-refresh indicator. Fixed at the top edge, hidden above the viewport
   until a downward pull translates it into view. Desktop never triggers the
   touch gesture, so this stays invisible there. */
.ptr-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 0 0 14px 14px;
  background: var(--white);
  box-shadow: 0 6px 16px rgba(30, 53, 45, 0.12);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  transform: translate(-50%, -100%);
  transition: opacity 160ms ease;
}

.ptr-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--sage);
  border-top-color: var(--forest);
  border-radius: 50%;
}

.ptr-indicator.is-refreshing .ptr-spinner {
  animation: ptr-spin 700ms linear infinite;
}

@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}

main {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  align-items: center;
  gap: 55px;
  min-height: 485px;
  padding: 46px 0 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 19px;
  color: var(--coral);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 1px;
  background: currentColor;
  content: '';
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.055em;
}

.hero h1 {
  max-width: 640px;
  margin-bottom: 20px;
  font-size: clamp(47px, 6vw, 77px);
  line-height: 0.99;
}

.hero h1 em {
  color: var(--coral);
  font-style: normal;
}

.hero-copy {
  max-width: 505px;
  margin-bottom: 27px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
}

.primary-button,
.secondary-button,
.text-button,
.reserve-button,
.small-button {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  transition: 160ms ease;
}

.primary-button {
  background: var(--forest);
  color: var(--white);
  padding: 14px 20px;
  font-size: 13px;
}

.primary-button:hover,
.reserve-button:hover:not(:disabled),
.small-button:hover {
  background: var(--forest-dark);
  box-shadow: 0 8px 18px rgba(44, 91, 71, 0.18);
  transform: translateY(-1px);
}

.primary-button span {
  display: inline-block;
  margin-left: 12px;
  color: var(--sun);
  font-size: 16px;
  transform: translateY(1px);
}

.secondary-button {
  background: transparent;
  color: var(--forest);
  padding: 13px 16px;
  font-size: 13px;
}

.secondary-button:hover {
  background: var(--white);
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 27px;
  color: var(--muted);
  font-size: 11px;
}

.avatar-stack {
  display: flex;
  padding-left: 7px;
}

.avatar {
  display: inline-grid;
  width: 27px;
  height: 27px;
  margin-left: -7px;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.avatar.a1 { background: #f0c4a9; }
.avatar.a2 { background: #d8c8a5; }
.avatar.a3 { background: #bdd7c6; }
.avatar.a4 { background: #d9c7e7; }

.hero-visual {
  position: relative;
  min-height: 368px;
  border-radius: 38px;
  background: var(--sage);
  isolation: isolate;
  overflow: hidden;
}

.hero-visual::before,
.hero-visual::after {
  position: absolute;
  border-radius: 50%;
  content: '';
  z-index: -1;
}

.hero-visual::before {
  width: 290px;
  height: 290px;
  right: -73px;
  bottom: -108px;
  background: rgba(255, 250, 225, 0.56);
}

.hero-visual::after {
  width: 165px;
  height: 165px;
  left: -50px;
  top: -51px;
  background: rgba(44, 91, 71, 0.08);
}

.hero-sticker {
  position: absolute;
  top: 27px;
  left: 29px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(44, 91, 71, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--forest);
  padding: 8px 11px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5db36c;
  box-shadow: 0 0 0 4px rgba(93, 179, 108, 0.15);
}

.hero-basket {
  position: absolute;
  right: 17%;
  bottom: 37px;
  display: grid;
  width: 68%;
  height: 215px;
  place-items: center;
  border-radius: 43% 43% 22% 22%;
  background: #bc7b49;
  box-shadow: inset 0 13px 0 rgba(255, 255, 255, 0.1), 0 18px 30px rgba(95, 65, 33, 0.16);
  transform: rotate(-4deg);
}

.hero-basket::before {
  position: absolute;
  top: -40px;
  width: 93%;
  height: 73px;
  border: 12px solid #9c663f;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  content: '';
}

.hero-basket::after {
  position: absolute;
  inset: 22px 16px 12px;
  border: 2px dashed rgba(90, 54, 26, 0.2);
  border-radius: 30px;
  content: '';
}

.produce-cluster {
  position: relative;
  display: flex;
  align-items: end;
  gap: 4px;
  margin-top: -57px;
  transform: rotate(4deg);
  z-index: 1;
}

.produce-cluster span {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  font-size: 49px;
  line-height: 1;
  filter: drop-shadow(0 8px 4px rgba(50, 40, 20, 0.13));
}

.produce-cluster span:nth-child(1) { background: #e67356; transform: translateY(22px) rotate(-13deg); }
.produce-cluster span:nth-child(2) { background: #f0c04f; }
.produce-cluster span:nth-child(3) { background: #b8d56d; transform: translateY(19px) rotate(12deg); }
.produce-cluster span:nth-child(4) { background: #e8a55c; transform: translateY(9px) rotate(-5deg); }

.hero-card-note {
  position: absolute;
  right: 24px;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 15px;
  background: var(--white);
  padding: 12px 13px;
  box-shadow: var(--shadow-soft);
}

.hero-card-note strong,
.hero-card-note small {
  display: block;
}

.hero-card-note strong {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 15px;
  letter-spacing: -0.03em;
}

.hero-card-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.mini-leaf {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 11px;
  background: var(--sun-soft);
  font-size: 18px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 79px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 23px;
  border-right: 1px solid var(--line);
}

.trust-item:first-child {
  padding-left: 0;
}

.trust-item:last-child {
  border-right: 0;
}

.trust-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 10px;
  background: var(--white);
  color: var(--coral);
  font-size: 16px;
}

.trust-item strong,
.trust-item span {
  display: block;
}

.trust-item strong {
  color: var(--ink);
  font-size: 13px;
}

.trust-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.section-heading h2 {
  margin-bottom: 8px;
  font-size: 37px;
  line-height: 1;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-kicker {
  color: var(--coral);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 21px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(390px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 11px 14px;
  color: var(--muted);
}

.search-box:focus-within {
  border-color: rgba(44, 91, 71, 0.45);
  box-shadow: 0 0 0 3px rgba(44, 91, 71, 0.08);
}

.search-box span {
  font-size: 17px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.search-box input::placeholder {
  color: #a4aca5;
}

.nearby-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.nearby-note strong {
  color: var(--forest);
}

.category-row {
  display: flex;
  gap: 7px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
}

.category-chip:hover,
.category-chip.active {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  min-width: 0;
  border: 1px solid rgba(229, 230, 221, 0.92);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transition: 180ms ease;
}

.product-card:hover {
  border-color: rgba(44, 91, 71, 0.2);
  box-shadow: 0 14px 30px rgba(45, 74, 60, 0.11);
  transform: translateY(-3px);
}

.product-card.sold-out {
  opacity: 0.75;
}

.product-visual {
  position: relative;
  display: grid;
  min-height: 176px;
  place-items: center;
  background: var(--crop-bg, var(--sage));
  isolation: isolate;
  overflow: hidden;
}

.product-visual::before,
.product-visual::after {
  position: absolute;
  border-radius: 50%;
  content: '';
  z-index: -1;
}

.product-visual::before {
  width: 145px;
  height: 145px;
  right: -37px;
  bottom: -58px;
  background: rgba(255, 255, 255, 0.28);
}

.product-visual::after {
  width: 88px;
  height: 88px;
  left: -24px;
  top: 30px;
  background: rgba(255, 255, 255, 0.22);
}

.product-emoji {
  display: grid;
  width: 106px;
  height: 106px;
  place-items: center;
  border-radius: 38% 62% 52% 48%;
  background: rgba(255, 255, 255, 0.46);
  font-size: 68px;
  line-height: 1;
  filter: drop-shadow(0 14px 8px rgba(48, 65, 38, 0.12));
  transform: rotate(-5deg);
}

.product-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.availability-badge,
.origin-note {
  position: absolute;
  border-radius: 999px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
}

.availability-badge {
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--forest);
  padding: 7px 9px;
}

.availability-badge .live-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.availability-badge.sold {
  color: var(--coral);
}

.availability-badge.sold .live-dot {
  background: var(--coral);
}

.origin-note {
  right: 13px;
  bottom: 13px;
  background: rgba(30, 53, 45, 0.72);
  color: var(--white);
  padding: 6px 8px;
}

.favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--forest);
  font-size: 15px;
}

.favorite-button.is-favorite {
  background: var(--coral);
  color: var(--white);
}

.product-content {
  padding: 16px 16px 15px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.product-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rating {
  flex-shrink: 0;
  color: #d28a23;
  font-weight: 700;
}

.product-content h3 {
  margin-bottom: 5px;
  font-size: 21px;
  line-height: 1.05;
}

.product-location {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
}

.product-location::before {
  margin-right: 4px;
  color: var(--coral);
  content: '⌖';
}

.product-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
}

.price {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.price small {
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.reserve-button {
  background: var(--forest);
  color: var(--white);
  padding: 10px 12px;
  font-size: 10px;
  white-space: nowrap;
}

.reserve-button:disabled {
  cursor: not-allowed;
  background: #dfe2dc;
  color: #98a098;
}

.stock-area {
  margin-bottom: 13px;
}

.stock-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
}

.stock-label strong {
  color: var(--forest);
  font-weight: 500;
}

.stock-track {
  height: 5px;
  border-radius: 999px;
  background: var(--paper-deep);
  overflow: hidden;
}

.stock-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 24px;
  border: 1px dashed #d6dcd3;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.46);
  text-align: center;
}

.empty-state span {
  display: block;
  margin-bottom: 10px;
  font-size: 35px;
}

.empty-state h3 {
  margin-bottom: 7px;
  font-size: 24px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.pickup-section,
.reviews-section,
.how-section {
  margin-top: 94px;
}

.pickup-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
}

.pickup-panel,
.promise-panel,
.how-card,
.dashboard-panel,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.pickup-panel {
  padding: 21px;
}

.activity-panel {
  margin-top: 20px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.activity-list {
  display: grid;
  gap: 8px;
}

.activity-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 12px;
  background: var(--mint);
}

.activity-item.is-read {
  background: var(--paper);
}

.activity-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--sun-soft);
  color: var(--coral);
  font-size: 17px;
}

.activity-copy {
  min-width: 0;
}

.activity-copy strong,
.activity-copy p,
.activity-copy small {
  display: block;
}

.activity-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.activity-copy p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.activity-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
}

.activity-status {
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  white-space: nowrap;
}

.activity-empty {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 7px 4px;
}

.activity-empty > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--sun-soft);
  color: var(--coral);
  font-size: 20px;
}

.activity-empty strong,
.activity-empty p {
  display: block;
}

.activity-empty strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.activity-empty p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 10px;
}

.pickup-reminders {
  margin-top: 20px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.reminder-list {
  display: grid;
  gap: 9px;
}

.reminder-card {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 12px;
  background: var(--mint);
}

.reminder-copy {
  min-width: 0;
}

.reminder-copy strong,
.reminder-copy small {
  display: block;
}

.reminder-copy strong {
  font-size: 12px;
}

.reminder-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.reminder-badge {
  display: inline-block;
  margin: 6px 0 2px;
  border-radius: 999px;
  background: var(--sun-soft);
  color: var(--coral);
  padding: 5px 10px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.panel-title h3 {
  margin-bottom: 0;
  font-size: 24px;
}

.panel-title span {
  color: var(--muted);
  font-size: 10px;
}

.pickup-list {
  display: grid;
  gap: 9px;
}

.pickup-row {
  display: grid;
  grid-template-columns: 45px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border-radius: 12px;
  background: var(--paper);
}

.pickup-thumb {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 12px;
  background: var(--sage);
  font-size: 25px;
}

.pickup-row strong,
.pickup-row small {
  display: block;
}

.pickup-row strong {
  font-size: 12px;
}

.pickup-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--forest);
  padding: 7px 9px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  white-space: nowrap;
}

.status-tag::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5db36c;
  content: '';
}

.pickup-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.pickup-row.is-past {
  opacity: 0.72;
}

.past-handoffs {
  margin-top: 16px;
}

.empty-pickups {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 13px;
  padding: 7px 5px;
}

.empty-pickups > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: var(--sun-soft);
  font-size: 27px;
}

.empty-pickups strong,
.empty-pickups p {
  display: block;
}

.empty-pickups strong {
  margin-bottom: 4px;
  font-size: 12px;
}

.empty-pickups p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.promise-panel {
  position: relative;
  min-height: 190px;
  padding: 22px;
  background: var(--forest);
  color: var(--white);
  overflow: hidden;
}

.promise-panel::after {
  position: absolute;
  right: -33px;
  bottom: -50px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 19px rgba(255, 255, 255, 0.04), 0 0 0 38px rgba(255, 255, 255, 0.04);
  content: '';
}

.promise-panel .eyebrow {
  margin-bottom: 17px;
  color: var(--sun);
}

.promise-panel h3 {
  position: relative;
  max-width: 240px;
  margin-bottom: 10px;
  color: var(--white);
  font-size: 27px;
  line-height: 1.05;
  z-index: 1;
}

.promise-panel p {
  position: relative;
  max-width: 235px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  line-height: 1.55;
  z-index: 1;
}

.reviews-section {
  scroll-margin-top: 30px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.review-card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.review-rating {
  margin-bottom: 18px;
  color: #d28a23;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.review-rating span {
  color: #e7e3d7;
}

.review-card p {
  min-height: 67px;
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  line-height: 1.35;
}

.review-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.review-footer strong,
.review-footer small {
  display: block;
}

.review-footer strong {
  font-size: 11px;
}

.review-footer small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.review-product {
  max-width: 135px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--forest);
  padding: 6px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  line-height: 1.25;
  text-align: right;
}

.how-section {
  margin-bottom: 100px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.how-card {
  min-height: 175px;
  padding: 22px;
}

.step-number {
  display: grid;
  width: 27px;
  height: 27px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 9px;
  background: var(--coral-soft);
  color: var(--coral);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
}

.how-card:nth-child(2) .step-number { background: var(--sage); color: var(--forest); }
.how-card:nth-child(3) .step-number { background: var(--sun-soft); color: #ad741a; }

.how-card h3 {
  margin-bottom: 7px;
  font-size: 21px;
}

.how-card p {
  max-width: 265px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

/* Farmer hub */

.farmer-view {
  padding: 50px 0 100px;
}

.dashboard-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.dashboard-hero h1 {
  max-width: 620px;
  margin-bottom: 14px;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1;
}

.dashboard-hero p {
  max-width: 540px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 130px;
  padding: 19px;
}

.stat-card.featured {
  position: relative;
  background: var(--forest);
  color: var(--white);
  overflow: hidden;
}

.stat-card.featured::after {
  position: absolute;
  right: -22px;
  bottom: -42px;
  width: 125px;
  height: 125px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.04), 0 0 0 32px rgba(255, 255, 255, 0.04);
  content: '';
}

.stat-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured .stat-label {
  color: rgba(255, 255, 255, 0.58);
}

.stat-value {
  display: block;
  margin-bottom: 7px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.stat-caption {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.featured .stat-caption {
  color: rgba(255, 255, 255, 0.68);
}

.dashboard-panel {
  padding: 22px;
}

.inventory-list {
  display: grid;
  gap: 9px;
}

.inventory-row {
  display: grid;
  grid-template-columns: 47px minmax(150px, 1fr) minmax(110px, 0.65fr) minmax(150px, 0.82fr) auto;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-radius: 13px;
  background: var(--paper);
}

.inventory-art {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border-radius: 13px;
  background: var(--sage);
  font-size: 26px;
}

.inventory-main strong,
.inventory-main small,
.inventory-status strong,
.inventory-status small {
  display: block;
}

.inventory-main strong,
.inventory-status strong {
  font-size: 12px;
}

.inventory-main small,
.inventory-status small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.inventory-price {
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
}

.inventory-price small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
}

.quantity-control button {
  display: grid;
  width: 30px;
  height: 29px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--forest);
  font-size: 16px;
}

.quantity-control button:hover {
  background: var(--mint);
}

.quantity-control span {
  min-width: 29px;
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  text-align: center;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--forest);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  white-space: nowrap;
}

.live-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5db36c;
  box-shadow: 0 0 0 3px rgba(93, 179, 108, 0.12);
  content: '';
}

.dashboard-lower {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 20px;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.schedule-date {
  display: grid;
  width: 42px;
  height: 42px;
  place-content: center;
  border-radius: 11px;
  background: var(--coral-soft);
  color: var(--coral);
  text-align: center;
}

.schedule-date strong,
.schedule-date small {
  display: block;
}

.schedule-date strong {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  line-height: 0.9;
}

.schedule-date small {
  margin-top: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  text-transform: uppercase;
}

.schedule-row strong,
.schedule-row small {
  display: block;
}

.schedule-row strong {
  font-size: 11px;
}

.schedule-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.schedule-count {
  color: var(--forest);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  text-align: right;
}

.farmer-tip {
  min-height: 100%;
  background: var(--sun-soft);
}

.farmer-tip .eyebrow {
  color: #a77120;
}

.farmer-tip h3 {
  max-width: 320px;
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1.06;
}

.farmer-tip p {
  max-width: 325px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.text-button {
  background: transparent;
  color: var(--forest);
  padding: 0;
  font-size: 11px;
}

.text-button:hover {
  color: var(--coral);
}

.small-button {
  background: var(--forest);
  color: var(--white);
  padding: 10px 14px;
  font-size: 11px;
}

.small-button.outline {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--forest);
}

.small-button.outline:hover {
  border-color: var(--forest);
  background: var(--mint);
}

.dashboard-hero.has-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 32px;
  isolation: isolate;
}

.dashboard-hero.has-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 53, 45, 0.28) 0%, rgba(30, 53, 45, 0.62) 100%);
  z-index: 0;
  content: '';
}

.dashboard-hero.has-cover > div,
.dashboard-hero.has-cover > button {
  position: relative;
  z-index: 1;
}

.dashboard-hero.has-cover .eyebrow,
.dashboard-hero.has-cover h1 {
  color: var(--white);
}

.dashboard-hero.has-cover p {
  color: rgba(255, 255, 255, 0.84);
}

.farm-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.farm-website {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--forest);
  font-size: 11px;
  font-weight: 600;
}

.farm-website:hover {
  color: var(--coral);
}

.farm-profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 14px;
}

.farm-profile-meta small {
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: 10px;
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  color: var(--ink);
  font-size: 13px;
}

.footer-brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
}

.footer-note {
  color: #a3aaa4;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
}

.footer-reset {
  border: 0;
  background: transparent;
  color: var(--coral);
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Modals and feedback */

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(24, 43, 35, 0.45);
  padding: 20px;
  z-index: 10;
  animation: fade-in 150ms ease;
}

.modal {
  position: relative;
  width: min(470px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 24px 80px rgba(24, 43, 35, 0.2);
  overflow: auto;
  animation: rise-in 180ms ease;
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
  padding: 24px 25px 8px;
}

.modal-header .eyebrow {
  margin-bottom: 12px;
}

.modal-header h2 {
  margin-bottom: 7px;
  font-size: 30px;
  line-height: 1;
}

.modal-header p {
  max-width: 330px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.close-button {
  display: grid;
  width: 31px;
  height: 31px;
  flex-shrink: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest);
  font-size: 18px;
}

.close-button:hover {
  background: var(--coral-soft);
  color: var(--coral);
}

.modal-body {
  padding: 18px 25px 25px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 41px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 11px;
  font-size: 12px;
}

.form-field textarea {
  min-height: 92px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--forest);
  background: var(--white);
}

.form-help {
  margin: 16px 0 18px;
  border-radius: 10px;
  background: var(--mint);
  color: var(--forest);
  padding: 10px 11px;
  font-size: 10px;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 9px;
  margin-top: 19px;
}

.reserve-summary {
  display: grid;
  grid-template-columns: 59px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--paper);
  padding: 11px;
}

.reserve-summary-art {
  display: grid;
  width: 59px;
  height: 59px;
  place-items: center;
  border-radius: 15px;
  background: var(--sage);
  font-size: 32px;
}

img.reserve-summary-art {
  display: block;
  object-fit: cover;
}

.reserve-summary strong,
.reserve-summary small {
  display: block;
}

.reserve-summary strong {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  letter-spacing: -0.04em;
}

.reserve-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.reserve-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
}

.reserve-price-row > span {
  color: var(--muted);
  font-size: 11px;
}

.reserve-total {
  color: var(--forest);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
}

.reserve-total small {
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
}

.modal .quantity-control {
  margin-bottom: 18px;
}

.modal .quantity-control button {
  width: 34px;
  height: 32px;
}

.modal .quantity-control span {
  min-width: 34px;
}

/* --- Product detail sheet --- */
.detail-hero {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  background: var(--crop-bg, var(--sage));
  overflow: hidden;
  border-radius: 22px 22px 0 0;
}

.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-emoji {
  display: grid;
  width: 120px;
  height: 120px;
  place-items: center;
  border-radius: 38% 62% 52% 48%;
  background: rgba(255, 255, 255, 0.46);
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 14px 8px rgba(48, 65, 38, 0.12));
  transform: rotate(-5deg);
}

.detail-badge {
  top: 14px;
  left: 14px;
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.detail-info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
}

.detail-info-row .rating {
  color: var(--forest);
  font-weight: 600;
}

.detail-category {
  display: inline-block;
  border-radius: 999px;
  background: var(--mint);
  color: var(--forest);
  padding: 4px 9px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  text-transform: capitalize;
}

.detail-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.detail-harvest-note {
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--sun-soft);
  color: var(--ink-soft);
  padding: 8px 11px;
  font-size: 10px;
  line-height: 1.45;
}

.detail-pickup {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-bottom: 18px;
  border-radius: 13px;
  background: var(--paper);
  padding: 12px;
}

.detail-pickup-icon {
  font-size: 18px;
  line-height: 1;
}

.detail-pickup strong {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.detail-pickup small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.location-button {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border: 1px solid rgba(44, 91, 71, 0.25);
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.location-button:hover {
  background: rgba(44, 91, 71, 0.06);
  border-color: rgba(44, 91, 71, 0.4);
}

.location-button:active {
  transform: scale(0.97);
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  max-width: min(340px, calc(100% - 44px));
  z-index: 20;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 13px;
  background: var(--forest-dark);
  color: var(--white);
  padding: 12px 14px;
  box-shadow: 0 14px 34px rgba(24, 43, 35, 0.2);
  font-size: 11px;
  line-height: 1.35;
  animation: rise-in 200ms ease;
}

.toast::before {
  display: grid;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 50%;
  background: var(--sun);
  color: var(--forest-dark);
  content: '✓';
  font-size: 12px;
  font-weight: 700;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile bottom sheets: modals slide up from the bottom edge, edge-to-edge,
   with a grab handle and home-indicator safe space. Desktop keeps the
   centered rise-in dialog. CSS-only so every existing modal becomes a
   sheet on phones without per-modal markup changes. */
@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (max-width: 780px) {
  .modal-backdrop {
    place-items: end center;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border: 0;
    border-radius: 26px 26px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -18px 60px rgba(24, 43, 35, 0.22);
    animation: sheet-up 240ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .modal::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    margin: 10px auto 4px;
    border-radius: 999px;
    background: var(--paper-deep);
  }

  .modal-header {
    padding-top: 4px;
  }
}

@media (max-width: 1100px) {
  .topbar,
  main,
  .site-footer {
    width: min(100% - 44px, 920px);
  }

  .top-nav {
    margin-left: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
    gap: 35px;
  }

  .hero h1 {
    font-size: clamp(46px, 6vw, 68px);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-grid .featured {
    grid-column: 1 / -1;
  }

  .inventory-row {
    grid-template-columns: 47px minmax(145px, 1fr) minmax(100px, 0.65fr) auto;
  }

  .inventory-status {
    display: none;
  }
}

@media (max-width: 780px) {
  .topbar,
  main,
  .site-footer {
    width: min(100% - 32px, 620px);
  }

  .topbar {
    position: relative;
    min-height: 70px;
    gap: 12px;
  }

  /* Keep form text >=16px on phones so iOS Safari does not auto-zoom on focus. */
  input,
  select,
  textarea {
    font-size: 16px;
  }

  .top-nav {
    position: absolute;
    top: 62px;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    padding: 7px;
    box-shadow: var(--shadow-soft);
    z-index: 5;
  }

  .top-nav.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 9px;
    text-align: left;
  }

  .location-pill,
  .account-button {
    display: none;
  }

  .sync-status {
    display: none;
  }

  .mobile-menu-button {
    display: none;
  }

  /* Reveal the bottom tab bar on phones and reserve space so the last
     content is not hidden behind the fixed bar (home indicator included). */
  .bottom-nav {
    display: flex;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .app-shell {
    padding-top: env(safe-area-inset-top);
  }

  .toast-region {
    bottom: calc(72px + env(safe-area-inset-bottom) + 12px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: auto;
    padding: 42px 0 48px;
  }

  .hero h1 {
    max-width: 560px;
    font-size: clamp(48px, 14vw, 70px);
  }

  .hero-visual {
    min-height: 315px;
  }

  .hero-basket {
    right: 14%;
    width: 71%;
    height: 180px;
  }

  .produce-cluster span {
    width: 61px;
    height: 61px;
    font-size: 41px;
  }

  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 64px;
  }

  .trust-item,
  .trust-item:first-child {
    padding: 14px 10px;
  }

  .trust-item:nth-child(2) {
    border-right: 0;
  }

  .trust-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .section-heading h2 {
    font-size: 33px;
  }

  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .nearby-note {
    margin-left: 0;
  }

  .pickup-layout,
  .dashboard-lower {
    grid-template-columns: 1fr;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .activity-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .activity-item .small-button,
  .activity-status {
    grid-column: 2;
    justify-self: start;
  }

  .reminder-card {
    grid-template-columns: 41px minmax(0, 1fr);
  }

  .reminder-card .small-button {
    grid-column: 2;
    justify-self: start;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .how-card {
    min-height: auto;
  }

  .dashboard-hero {
    align-items: start;
    flex-direction: column;
  }

  .dashboard-hero h1 {
    font-size: clamp(43px, 12vw, 60px);
  }

  .dashboard-hero.has-cover {
    padding: 24px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid .featured {
    grid-column: 1 / -1;
  }

  .inventory-row {
    grid-template-columns: 47px 1fr auto;
    gap: 11px;
  }

  .inventory-price {
    display: none;
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .topbar,
  main,
  .site-footer {
    width: min(100% - 24px, 400px);
  }

  .brand {
    font-size: 18px;
  }

  .hero h1 {
    font-size: 49px;
  }

  .hero-copy {
    font-size: 14px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    text-align: center;
  }

  .hero-visual {
    min-height: 275px;
    border-radius: 25px;
  }

  .hero-sticker {
    top: 18px;
    left: 18px;
  }

  .hero-basket {
    right: 10%;
    width: 78%;
    height: 154px;
  }

  .hero-basket::before {
    top: -30px;
    border-width: 8px;
  }

  .produce-cluster span {
    width: 51px;
    height: 51px;
    font-size: 34px;
  }

  .hero-card-note {
    right: 12px;
    bottom: 12px;
    padding: 9px;
  }

  .hero-card-note strong {
    font-size: 13px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-visual {
    min-height: 185px;
  }

  .trust-item {
    gap: 8px;
  }

  .trust-item strong {
    font-size: 11px;
  }

  .trust-item span {
    font-size: 9px;
  }

  .pickup-row {
    grid-template-columns: 41px 1fr;
  }

  .pickup-thumb {
    width: 41px;
    height: 41px;
    font-size: 22px;
  }

  .pickup-reminders {
    padding: 14px;
  }

  .pickup-row .status-tag {
    grid-column: 2;
    width: max-content;
  }

  .pickup-row-meta {
    grid-column: 2;
    align-items: flex-end;
  }

  .dashboard-grid {
    gap: 9px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 24px;
  }

  .dashboard-panel {
    padding: 14px;
  }

  .dashboard-hero.has-cover {
    padding: 18px;
  }

  .farm-profile-meta {
    gap: 8px;
  }

  .panel-title h3 {
    font-size: 21px;
  }

  .inventory-row {
    grid-template-columns: 40px 1fr auto;
    padding: 9px;
  }

  .inventory-art {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .inventory-main strong {
    font-size: 11px;
  }

  .inventory-main small {
    font-size: 9px;
  }

  .modal-header,
  .modal-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.full {
    grid-column: auto;
  }
}

/* Reporting tools — consumer flag button and admin report queue */
.report-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  padding: 7px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.report-button:hover {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--coral);
}

.photo-capture-button {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(44, 91, 71, 0.25);
  border-radius: 999px;
  background: transparent;
  color: var(--forest);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.photo-capture-button:hover {
  background: rgba(44, 91, 71, 0.06);
  border-color: rgba(44, 91, 71, 0.4);
}

.photo-capture-button:active {
  transform: scale(0.97);
}

.report-panel {
  border-top: 2px solid var(--coral-soft);
}

.report-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--paper);
}

.report-row-main strong {
  font-size: 12px;
  color: var(--coral);
}

.report-row-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.report-row-main p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.report-meta {
  margin-top: 6px !important;
  font-family: 'DM Mono', monospace;
  font-size: 9px !important;
}

.report-row .form-actions {
  justify-content: flex-end;
}

.report-form .form-help {
  margin-bottom: 14px;
}

/* — Audit log panel — */
.audit-panel {
  border-top: 2px solid var(--coral-soft);
}

.audit-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper);
}

.audit-row + .audit-row {
  margin-top: 8px;
}

.audit-row-action {
  font-size: 12px;
  font-weight: 700;
  color: var(--coral);
}

.audit-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-family: 'DM Mono', monospace;
}

/* — Sort panel — */
.sort-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}

.sort-panel label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.sort-panel select {
  padding: 6px 12px;
  border: 1px solid rgba(229, 230, 221, 0.92);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

/* — Favorites filter chip — */
.category-chip.favorite-chip {
  color: #c0392b;
}

.category-chip.favorite-chip.active {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.3);
  color: #c0392b;
}

/* — Saved harvests panel — */
.saved-harvests {
  margin-bottom: 22px;
}

.saved-harvests .text-button {
  margin-top: 12px;
}

/* — Profile page — */
.profile-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--forest);
  color: white;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
}

.profile-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  margin-bottom: 4px;
}

.profile-role {
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 2px;
}

.profile-email {
  color: var(--muted);
  font-size: 12px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.profile-stat {
  text-align: center;
  padding: 16px;
  border: 1px solid rgba(229, 230, 221, 0.92);
  border-radius: var(--radius-md);
}

.profile-stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Fraunces', Georgia, serif;
}

.profile-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-section {
  margin-bottom: 24px;
}

.profile-section h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  margin-bottom: 12px;
}

.profile-section h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.profile-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0;
}

/* — Radius options modal — */
.radius-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radius-option {
  padding: 14px 18px;
  border: 1px solid rgba(229, 230, 221, 0.92);
  border-radius: var(--radius-md);
  background: var(--paper);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}
.radius-option:hover {
  border-color: var(--forest);
  background: rgba(44, 91, 71, 0.04);
}
.radius-option.active {
  border-color: var(--forest);
  background: rgba(44, 91, 71, 0.08);
  color: var(--forest);
}

/* — Location modal — */
.modal-divider {
  border: none;
  border-top: 1px solid rgba(229, 230, 221, 0.92);
  margin: 18px 0;
}
.location-gps {
  text-align: center;
}

/* — Map view — */
.map-toggle {
  margin: 8px 0;
}
.map-toggle .text-button.active {
  color: var(--forest);
  font-weight: 700;
}
.map-container {
  border: 1px solid rgba(229, 230, 221, 0.92);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 12px 0;
}
.map-container iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: none;
}
.map-legend {
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(229, 230, 221, 0.5);
}
.map-legend-item:last-child {
  border-bottom: none;
}
.map-legend-item strong {
  display: block;
  font-size: 14px;
}
.map-legend-item small {
  color: var(--muted);
  font-size: 11px;
}

/* Leaflet map */
.product-map-marker { background: transparent !important; border: none !important; }
.map-legend-item { cursor: pointer; }
.map-legend-item:hover { background: rgba(44,91,71,0.04); }
.leaflet-popup-content { margin: 10px 14px; }
.leaflet-popup-content-wrapper { border-radius: 8px; }
