:root {
  color-scheme: light;
  --ink: #102822;
  --muted: #718079;
  --line: #e5e9e5;
  --soft: #f4f6f2;
  --paper: #fffefa;
  --green: #17845d;
  --green-dark: #116a4a;
  --lime: #d9efbd;
  --gold: #eabf67;
  --danger: #a33f36;
  --shadow: 0 12px 36px rgb(16 40 34 / 7%);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: #f7f8f4;
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.wrap { max-width: 1160px; margin: auto; padding: 28px 26px 112px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 15px; min-width: 0; text-decoration: none; }
.brand img, .brandmark {
  width: 60px; height: 60px; flex: 0 0 60px; border-radius: 18px; object-fit: cover;
  background: var(--lime); display: grid; place-items: center; font-weight: 800; color: var(--green-dark);
}
h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.15; letter-spacing: -.035em; margin: 0; }
h2 { font-size: 18px; letter-spacing: -.015em; margin: 0 0 12px; }
.muted { color: var(--muted); }
.button { display: inline-block; border: 0; border-radius: 13px; background: var(--ink); color: white; text-decoration: none; padding: 12px 18px; font-weight: 700; transition: transform .18s, background .18s; }
.button:hover { transform: translateY(-1px); background: #1c4035; }
.button.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.button.green { background: var(--green); }
.button.danger { background: #fff0ed; color: var(--danger); }
.panel { border: 1px solid var(--line); border-radius: 20px; background: white; padding: 22px; margin: 16px 0; box-shadow: 0 6px 22px rgb(16 40 34 / 4%); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.messages { padding: 0; list-style: none; }
.messages li { background: #eaf5ed; border: 1px solid #d3e8d8; border-radius: 12px; padding: 11px 14px; margin: 9px 0; }
.form-shell { max-width: 680px; margin: 24px auto; }
.form-shell form { border: 1px solid var(--line); border-radius: 20px; padding: 24px; background: white; box-shadow: var(--shadow); }
.form-shell label { display: block; font-weight: 650; margin: 16px 0 7px; }
.form-shell input:not([type=checkbox]), .form-shell textarea, .form-shell select { display: block; width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; color: var(--ink); }
.form-shell input:focus, .form-shell textarea:focus, .form-shell select:focus, .catalog-search:focus { outline: 3px solid rgb(23 132 93 / 14%); border-color: var(--green); }
.form-shell textarea { min-height: 100px; }
.form-shell input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }
.helptext, .helptext ul { font-size: 13px; color: var(--muted); padding-left: 0; }
.errorlist { color: #b42318; font-size: 14px; padding-left: 20px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; border-bottom: 1px solid var(--line); padding: 12px 9px; vertical-align: middle; }
.table th { color: var(--muted); font-size: 13px; font-weight: 650; }
.thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; background: var(--soft); }
.row-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.inline { display: inline; }
.inline button { border: 0; background: none; text-decoration: underline; color: var(--danger); padding: 3px; }
.foot { position: fixed; bottom: 0; left: 0; right: 0; background: rgb(255 254 250 / 96%); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 12px max(24px, calc((100vw - 1108px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 3; box-shadow: 0 -8px 24px rgb(16 40 34 / 4%); }
.foot .button { flex: 1; text-align: center; }
.catalog-search { width: 100%; border: 1.5px solid var(--line); border-radius: 15px; padding: 15px 17px; background: white; color: var(--ink); box-shadow: 0 4px 16px rgb(16 40 34 / 3%); }
.cats { display: flex; overflow: auto; gap: 10px; padding: 16px 0; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; background: white; color: #52635b; padding: 9px 17px; transition: .18s; }
.cat:hover { border-color: #bbd4c4; color: var(--green-dark); }
.cat.active { background: var(--ink); border-color: var(--ink); color: white; font-weight: 700; }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.catalog-tools select, .catalog-tools button { border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; background: white; color: var(--ink); }
.catalog-tools button:hover, .catalog-tools button:focus { border-color: var(--green); }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.product { border: 1px solid var(--line); border-radius: 20px; padding: 13px; min-width: 0; background: white; box-shadow: 0 5px 18px rgb(16 40 34 / 3%); transition: transform .2s, box-shadow .2s; }
.product:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; background: var(--soft); display: grid; place-items: center; font-size: 38px; color: #9aabb3; }
.product h2 { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 16px; margin: 13px 2px 3px; }
.product-desc { height: 22px; overflow: hidden; color: var(--muted); font-size: 14px; padding: 0 2px; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin: 12px 2px 1px; }
.price { font-weight: 780; letter-spacing: -.02em; }
.qty { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; padding: 3px; background: var(--paper); }
.qty button, .add { border: 0; background: #eef4ee; color: var(--green-dark); border-radius: 9px; padding: 7px 11px; font-weight: 750; }
.qty button:hover, .add:hover { background: var(--lime); }
.products.list { grid-template-columns: 1fr; }
.products.list .product { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; }
.products.list .product-photo { grid-row: span 2; }
.products.list .product-bottom { grid-column: 2; }
.cart-row { display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-row .product-photo { width: 82px; }
.clear-cart { display: block; margin-left: auto; border: 0; background: transparent; color: var(--danger); text-decoration: underline; padding: 8px; }
.empty { text-align: center; padding: 52px 14px; color: var(--muted); }
.wa-button { border: 1.5px solid #d7e6dc; background: white; color: var(--ink); border-radius: 18px; padding: 19px; display: flex; width: 100%; align-items: center; gap: 14px; text-align: left; font-size: 19px; box-shadow: var(--shadow); }
.wa-button:hover { border-color: var(--green); }
.wa-float { position: fixed; right: 24px; bottom: 88px; width: 58px; height: 58px; border: 0; border-radius: 50%; background: #18a66a; color: white; font-size: 25px; box-shadow: 0 8px 22px rgb(24 166 106 / 30%); }
.wa-float svg { width: 27px; height: 27px; fill: currentColor; vertical-align: middle; }
.wa-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #e4f4e9; color: var(--green); flex: 0 0 42px; }
.wa-icon svg { width: 24px; height: 24px; fill: currentColor; }
.error-note { background: #fff6e5; padding: 12px; border-radius: 10px; }
#catalog-screen > .shop-address { margin: 4px 0 19px; font-size: 14px; }
#catalog-screen > .catalog-heading { margin: 21px 0 13px; }
.catalog-heading span { color: var(--green); font-weight: 800; font-size: 11px; letter-spacing: .15em; }
.catalog-heading h2 { margin: 4px 0 0; font-size: clamp(21px, 3vw, 26px); letter-spacing: -.035em; }
#catalog-screen > .top { margin-bottom: 16px; }
#cart-screen, #contact-screen, #send-screen { max-width: 760px; margin: 0 auto; }

@media (min-width: 760px) {
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .products.list { grid-template-columns: 1fr; }
  #catalog-screen > .top { padding: 10px 0; }
}
@media (min-width: 1080px) { .products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .wrap { padding: 18px 15px 104px; }
  .brand { gap: 11px; }
  .brand img, .brandmark { width: 50px; height: 50px; flex-basis: 50px; border-radius: 15px; }
  h1 { font-size: 23px; }
  .top { gap: 10px; }
  .products { gap: 11px; }
  .product { padding: 9px; border-radius: 16px; }
  .product-photo { border-radius: 11px; }
  .product h2 { font-size: 14px; }
  .product-desc { font-size: 12px; }
  .price { font-size: 14px; }
  .foot { padding: 10px 14px; gap: 10px; font-size: 14px; }
  .foot .button { padding: 12px 10px; }
  .wa-float { right: 16px; bottom: 80px; }
  .cart-row { grid-template-columns: 64px 1fr auto; gap: 9px; }
  .cart-row .product-photo { width: 64px; }
  .form-shell form { padding: 18px; }
}
