:root {
  --forest: #014421;
  --deep: #08351e;
  --leaf: #6fa832;
  --honey: #c99a2e;
  --pomelo: #f9ffe3;
  --rice: #fffdf4;
  --paper: #ffffff;
  --ink: #152015;
  --muted: #66745f;
  --line: #dfe9d2;
  --danger: #b83a2f;
  --shadow: 0 18px 54px rgba(8, 53, 30, .14);
  --r: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -8%, rgba(201,154,46,.18), transparent 28%),
    linear-gradient(135deg, rgba(249,255,227,.96), rgba(255,253,244,.96));
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(255, 253, 244, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--forest);
  color: var(--pomelo);
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  color: var(--forest);
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46vw;
}

.topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.cart-link,
.wa-link,
.btn {
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--forest);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.cart-link {
  background: white;
  border-color: var(--line);
  color: var(--forest);
}

.cart-link span {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--forest);
  color: white;
  font-size: 11px;
}

.cart-link.has-items {
  border-color: rgba(1,68,33,.28);
  box-shadow: 0 8px 22px rgba(1,68,33,.1);
}

.wa-link:hover,
.btn:hover { background: var(--deep); }

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 54px;
}

.intro {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: end;
  padding: clamp(24px, 5vw, 54px);
  background:
    radial-gradient(circle at 88% 18%, rgba(249,255,227,.18), transparent 28%),
    linear-gradient(120deg, rgba(1,68,33,.97), rgba(8,53,30,.9));
  color: white;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.intro::after {
  content: "";
  position: absolute;
  inset: auto -80px -130px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(249,255,227,.18);
  box-shadow: 0 0 0 44px rgba(249,255,227,.05), 0 0 0 88px rgba(249,255,227,.025);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: #f7d987;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(28px, 5vw, 58px);
  line-height: .98;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255,255,255,.83);
  font-size: 16px;
}

.intro__panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
}

.panel-label {
  color: #f7d987;
  font-size: 12px;
  font-weight: 800;
}

.intro__panel strong {
  font-size: 24px;
}

.intro__panel small {
  color: rgba(255,255,255,.75);
}

.banner-strip {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  grid-auto-rows: 118px;
  gap: 8px;
  margin: 18px 0 18px;
}

.banner-strip.is-empty { display: none; }

.banner-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #ef4d37, #f7a63d);
  color: white;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(8, 53, 30, .09);
}

.banner-card:first-child,
.banner-card--main {
  grid-row: span 2;
  min-height: 244px;
}

.banner-card:nth-child(2) {
  background: linear-gradient(135deg, #8b1f38, #e03655);
}

.banner-card:nth-child(3) {
  background: linear-gradient(135deg, #014421, #6fa832);
}

.banner-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(1,68,33,.52), rgba(1,68,33,.08));
}

.banner-card__copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  display: grid;
  gap: 3px;
}

.banner-card__copy strong {
  font-size: 17px;
  line-height: 1.15;
}

.banner-card__copy small {
  color: rgba(255,255,255,.86);
}

.banner-fallback {
  min-height: 118px;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 900;
  color: rgba(255,255,255,.72);
}

.banner-card:first-child .banner-fallback,
.banner-card--main .banner-fallback {
  min-height: 244px;
}

.category-showcase {
  margin: 26px 0 20px;
  padding: clamp(18px, 3vw, 26px);
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(223,233,210,.9);
  border-radius: 18px;
  box-shadow: 0 16px 44px rgba(8,53,30,.08);
}

.section-copy {
  max-width: 760px;
  margin-bottom: 18px;
}

.section-copy h2 {
  margin: 0;
  color: var(--forest);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-copy p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.category-card {
  min-height: 190px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, rgba(255,253,244,.92));
  color: var(--forest);
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(8,53,30,.06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.category-card:hover,
.category-card.is-active {
  transform: translateY(-3px);
  border-color: rgba(111,168,50,.55);
  background: linear-gradient(180deg, #fbfff1, #fff);
  box-shadow: 0 18px 38px rgba(8,53,30,.12);
}

.category-ico {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--pomelo);
  color: var(--forest);
  font-weight: 900;
  font-size: 13px;
}

.category-card.is-active .category-ico {
  background: var(--leaf);
  color: white;
}

.category-card strong {
  font-size: 15px;
  line-height: 1.25;
}

.category-card small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.category-card em {
  margin-top: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef6df;
  color: var(--forest);
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.toolbar {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 24px 0 14px;
  padding: 14px;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(223,233,210,.82);
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(8,53,30,.06);
}

.search {
  display: grid;
  gap: 6px;
  color: var(--forest);
  font-weight: 800;
  font-size: 12px;
}

.search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: white;
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  outline: none;
}

.search input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(1,68,33,.12);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--forest);
  height: 36px;
  padding: 0 13px;
  font-weight: 800;
  cursor: pointer;
}

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

.status-line {
  min-height: 24px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 390px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(8, 53, 30, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(111,168,50,.42);
  box-shadow: 0 16px 36px rgba(8, 53, 30, .13);
}

.card__media {
  height: 154px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, #eef8d6, #fff9df),
    linear-gradient(45deg, rgba(1,68,33,.08), transparent);
  color: var(--forest);
  font-size: 38px;
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.media-fallback {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.card__media img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  flex: 1;
}

.card h2 {
  margin: 0;
  min-height: 42px;
  font-size: 16px;
  line-height: 1.28;
  color: var(--deep);
}

.card__summary {
  min-height: 42px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.price {
  color: var(--forest);
  font-size: 21px;
  font-weight: 900;
}

.badge {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef6df;
  color: var(--forest);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.low { background: #fff1c7; color: #8a5f00; }
.badge.out { background: #ffe0da; color: var(--danger); }

.unit-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.unit-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.btn.secondary {
  background: white;
  border-color: var(--line);
  color: var(--forest);
}

.btn.secondary:hover {
  background: var(--pomelo);
}

.btn.is-done {
  background: var(--leaf);
  color: white;
}

.empty {
  grid-column: 1 / -1;
  padding: 38px 20px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
}

.detail {
  width: min(720px, calc(100% - 26px));
  border: none;
  border-radius: 12px;
  padding: 0;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.detail::backdrop {
  background: rgba(8, 53, 30, .48);
}

.detail__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.detail-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 24px;
}

.detail-visual {
  min-height: 230px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eef8d6, #fff9df);
  border-radius: var(--r);
  color: var(--forest);
  font-size: 58px;
  font-weight: 900;
  overflow: hidden;
}

.detail-visual img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 230px;
  display: block;
  object-fit: cover;
  border-radius: var(--r);
}

.detail h3 {
  margin: 0 40px 8px 0;
  color: var(--deep);
  font-size: 26px;
  line-height: 1.1;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.detail-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.detail-table td:last-child {
  text-align: right;
  font-weight: 800;
  color: var(--forest);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cart-dialog {
  width: min(860px, calc(100% - 26px));
  border: none;
  border-radius: 16px;
  padding: 0;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.cart-dialog::backdrop {
  background: rgba(8, 53, 30, .5);
}

.cart-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 0;
  background: var(--rice);
}

.cart-copy {
  grid-column: 1 / -1;
  padding: 22px 24px 14px;
  background: white;
  border-bottom: 1px solid var(--line);
}

.cart-copy h3 {
  margin: 0;
  color: var(--forest);
  font-size: 24px;
}

.cart-copy p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
}

.eyebrow.dark {
  color: var(--honey);
}

.cart-items {
  display: grid;
  gap: 10px;
  align-content: start;
  max-height: 430px;
  overflow: auto;
  padding: 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cart-item strong,
.cart-item small {
  display: block;
}

.cart-item strong {
  color: var(--deep);
  line-height: 1.25;
}

.cart-item small {
  color: var(--muted);
  font-size: 12px;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 30px minmax(38px, 1fr) 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--pomelo);
}

.qty-stepper button,
.qty-stepper input {
  height: 34px;
  border: none;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 800;
  color: var(--forest);
}

.qty-stepper button {
  cursor: pointer;
}

.cart-line {
  color: var(--forest);
  font-weight: 900;
  white-space: nowrap;
}

.order-form {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--pomelo);
  border-left: 1px solid var(--line);
}

.order-form label {
  display: grid;
  gap: 5px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 900;
}

.order-form input,
.order-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: white;
  color: var(--muted);
}

.cart-total strong {
  color: var(--forest);
  font-size: 18px;
}

#orderStatus {
  min-height: 18px;
  color: var(--muted);
}

.empty.mini {
  padding: 24px 14px;
}

.market-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.filter-panel {
  position: sticky;
  top: 76px;
  padding: 16px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(8,53,30,.07);
}

.filter-title {
  color: var(--danger);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .04em;
  margin-bottom: 12px;
}

.filter-block {
  display: grid;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.filter-block:first-of-type {
  border-top: none;
  padding-top: 0;
}

.filter-block strong {
  color: var(--deep);
  font-size: 14px;
}

.filter-block label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.filter-block input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.filter-cats {
  display: grid;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
}

.filter-cats--focused {
  max-height: min(620px, calc(100vh - 170px));
  padding-right: 4px;
}

.filter-cats button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 7px 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.filter-cats button.is-active {
  color: var(--forest);
  font-weight: 900;
}

.filter-cats em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}

.price-filter {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}

.price-filter input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font: inherit;
}

.filter-apply,
.filter-reset {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 900;
  cursor: pointer;
}

.filter-apply {
  background: #ef4d37;
  color: white;
  border-color: #ef4d37;
}

.filter-reset {
  background: white;
  color: var(--forest);
}

.market-results {
  min-width: 0;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #f2f2f2;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.result-copy {
  display: grid;
  gap: 2px;
}

.result-copy span {
  color: var(--muted);
  font-size: 12px;
}

.result-copy strong {
  color: var(--deep);
  font-size: 15px;
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.sort-box select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 34px 0 12px;
  color: var(--ink);
  font: inherit;
}

.market-results .toolbar {
  margin: 0 0 10px;
}

.market-results .grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.market-results .card {
  min-height: 336px;
  border-radius: 8px;
}

.market-results .card__media {
  height: 178px;
}

.market-results .card__body {
  gap: 6px;
  padding: 10px;
}

.market-results .card h2 {
  min-height: 38px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-results .card__summary,
.market-results .unit-list {
  display: none;
}

.market-results .price {
  font-size: 18px;
}

.market-results .btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .topbar { align-items: flex-start; }
  .topbar__actions { flex-wrap: wrap; justify-content: flex-end; }
  .cart-link,
  .wa-link { min-width: 94px; padding: 0 10px; font-size: 12px; }
  .intro { grid-template-columns: 1fr; border-radius: 0 0 12px 12px; }
  .banner-strip {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .banner-card,
  .banner-card:first-child,
  .banner-card--main {
    grid-row: auto;
    min-height: 128px;
  }
  .banner-card:first-child .banner-fallback,
  .banner-card--main .banner-fallback {
    min-height: 128px;
  }
  .market-shell { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .filter-cats--focused { max-height: 310px; }
  .results-bar { align-items: stretch; flex-direction: column; }
  .sort-box { justify-content: space-between; }
  .sort-box select { flex: 1; }
  .toolbar { grid-template-columns: 1fr; }
  .chips { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .chip { flex: 0 0 auto; }
  .detail-card { grid-template-columns: 1fr; }
  .detail-visual { min-height: 150px; }
  .cart-shell { grid-template-columns: 1fr; }
  .cart-items { max-height: 330px; }
  .order-form { border-left: none; border-top: 1px solid var(--line); }
  .cart-item { grid-template-columns: 1fr; align-items: stretch; }
  .cart-line { text-align: right; }
  .market-results .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-results .card { min-height: 300px; }
  .market-results .card__media { height: 142px; }
}
