:root {
  color-scheme: light;
  --ink: #17251e;
  --muted: #66736d;
  --paper: #f5f2e9;
  --card: #fffdf8;
  --green: #1e5a43;
  --lime: #ddeb9d;
  --line: #dfe3d8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Tahoma, Arial, sans-serif;
}

.hero {
  min-height: 320px;
  padding: 56px max(6vw, 24px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  color: white;
  background: var(--green);
}

.hero-copy { max-width: 680px; position: relative; z-index: 1; }
h1 { margin: 12px 0 18px; font-size: clamp(42px, 8vw, 84px); line-height: 1.05; letter-spacing: -3px; }
.hero p { margin: 0; max-width: 560px; color: #d8e6df; font-size: 18px; line-height: 1.9; }
.hero .contact-copy { margin-top: 12px; font-size: 15px; }
.phone { display: inline-block; margin-top: 12px; color: var(--lime); font-size: 22px; font-weight: 700; text-decoration: none; }
.hero-mark { font: 700 260px/1 Georgia, serif; color: rgba(221, 235, 157, .13); transform: rotate(-8deg); }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 52px 0 80px; }
.toolbar { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 24px; }
.toolbar h2 { margin: 0; font-size: 28px; }
.toolbar p { margin: 0; color: var(--muted); }
.toolbar .error { color: #a13333; }
#catalog-navigation { margin-top: 10px; color: var(--muted); font-size: 13px; }
#catalog-navigation button { padding: 0; color: var(--green); background: none; border: 0; font: inherit; cursor: pointer; }

.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.category-card { position: relative; min-height: 210px; padding: 26px; overflow: hidden; color: white; text-align: right; background: var(--green); border: 0; border-radius: 22px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.category-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(23, 37, 30, .12); }
.category-index { position: absolute; left: -10px; bottom: -55px; color: rgba(221, 235, 157, .13); font: 700 180px/1 Georgia, serif; }
.category-title, .category-count, .category-arrow { position: relative; z-index: 1; display: block; }
.category-title { max-width: 80%; font-size: 23px; font-weight: 700; line-height: 1.6; }
.category-count { margin-top: 8px; color: #d8e6df; font-size: 13px; }
.category-arrow { position: absolute; right: 26px; bottom: 24px; color: var(--lime); font-size: 24px; }

.catalog { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card { min-width: 0; display: grid; grid-template-columns: 40% 1fr; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 22px; }
.image-wrap { min-height: 330px; background: #e7e7df; }
.image-wrap img { width: 100%; height: 100%; display: block; object-fit: contain; background: white; }
.card-body { padding: 25px; display: flex; flex-direction: column; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.category-name { color: var(--green); font-size: 13px; font-weight: 700; }
.title-link { color: inherit; text-decoration: none; }
.product-name { min-height: 56px; margin: 0 0 22px; font-size: 21px; line-height: 1.55; }
.price-label { margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.price-details { margin-bottom: 22px; }
.price-details > strong { color: var(--green); font-size: 22px; }
.variation-loading { color: var(--muted); font-size: 13px; }
.variation-names { max-height: 76px; margin: 0 0 10px; overflow: auto; color: var(--muted); font-size: 13px; line-height: 1.8; }
.price-details ul { max-height: 170px; margin: 0; padding: 0; overflow: auto; list-style: none; border-top: 1px solid var(--line); }
.price-details li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.price-details li strong { color: var(--green); white-space: nowrap; }
.action { margin-top: auto; color: var(--green); font-size: 13px; font-weight: 700; text-decoration: none; }
.action span { display: inline-block; transition: transform .2s; }
.action:hover span { transform: translateX(-5px); }

@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-mark { display: none; }
}

@media (max-width: 560px) {
  .hero { min-height: 280px; padding-block: 42px; }
  h1 { letter-spacing: -2px; }
  .toolbar { display: block; }
  .toolbar h2 { margin-bottom: 8px; }
  .product-card { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .image-wrap { min-height: 260px; aspect-ratio: 4 / 3; }
}
