/* STADO.KZ — оформление */

:root {
  --green-900: #123524;
  --green-700: #1E4A32;
  --green-500: #2F6B45;
  --cream:     #FAF7F0;
  --sand:      #EFE7D6;
  --sand-2:    #E3D8C2;
  --ink:       #262620;
  --ink-2:     #5C5B50;
  --muted:     #8A897C;
  --accent:    #E08A2B;
  --line:      #E7E0D2;
  --white:     #FFFFFF;
  --radius:    16px;
  --radius-sm: 12px;
  --shadow:    0 2px 8px rgba(30, 40, 25, .06);
  --shadow-lg: 0 10px 30px rgba(30, 40, 25, .10);
  --serif:     Georgia, 'Times New Roman', 'PT Serif', serif;
  --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

img, svg { max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--green-500); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; color: var(--green-900); }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2, .h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 18px; }

p { margin: 0 0 1em; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 20px; }
.section.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border: 0; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; white-space: nowrap; transition: .15s ease;
}
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #C9761F; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--green-500); color: var(--green-700); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn .ic { font-size: 15px; }

.more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green-700); font-weight: 600; font-size: 15px;
}
.more span { transition: transform .15s ease; }
.more:hover span { transform: translateX(3px); }

/* ---------- шапка ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 74px; }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 34px; height: 26px; fill: var(--green-700); flex: none; }
.logo-text { font-family: var(--serif); font-size: 23px; font-weight: 700; color: var(--green-900); letter-spacing: .3px; }
.logo-dot { color: var(--accent); }
.logo--light .logo-mark { fill: #fff; }
.logo--light .logo-text { color: #fff; }

.main-nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.main-nav a { color: var(--ink-2); font-weight: 500; }
.main-nav a:hover { color: var(--green-700); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.main-nav + .header-actions { margin-left: 0; }

.burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 22px; height: 2px; background: var(--ink); display: block; }

/* ---------- герой ---------- */

.hero { position: relative; padding: 0 0 46px; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 75% 20%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(180deg, #CFE0EC 0%, #DCE7DC 42%, #E8DFC8 78%, var(--cream) 100%);
}
.hero-bg::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 32%; height: 40%;
  background:
    linear-gradient(105deg, transparent 40%, rgba(122,142,110,.35) 41%, transparent 42%),
    linear-gradient(75deg, transparent 60%, rgba(105,125,95,.30) 61%, transparent 62%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; align-items: center; min-height: 340px; padding-top: 40px;
}
.hero-text h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: .35em; }
.hero-text p { font-size: clamp(15px, 1.6vw, 18px); color: var(--ink-2); margin: 0; }

.hero-art { position: relative; height: 260px; }
.hero-art .art { position: absolute; filter: drop-shadow(0 6px 10px rgba(0,0,0,.12)); }
.hero-art .a1 { font-size: 108px; left: 4%;  top: 12%; }
.hero-art .a2 { font-size: 100px; left: 42%; top: 2%;  transform: scaleX(-1); }
.hero-art .a3 { font-size: 76px;  left: 30%; top: 52%; }
.hero-art .a4 { font-size: 54px;  left: 64%; top: 50%; }
.hero-art .a5 { font-size: 50px;  left: 82%; top: 60%; }
.hero-art .a6 { font-size: 54px;  left: 2%;  top: 62%; }

/* ---------- поисковая строка ---------- */

.searchbar {
  position: relative;
  display: grid; grid-template-columns: 1fr 240px 220px auto;
  gap: 8px; align-items: center;
  background: var(--white); border-radius: 999px;
  padding: 8px 8px 8px 10px; box-shadow: var(--shadow-lg);
}
.searchbar--inline { box-shadow: var(--shadow); margin-bottom: 28px; }
.sb-field { display: flex; align-items: center; gap: 8px; padding: 6px 12px; min-width: 0; }
.sb-field + .sb-field { border-left: 1px solid var(--line); }
.sb-ic { color: var(--muted); flex: none; font-size: 15px; }
.sb-field input, .sb-field select {
  width: 100%; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
}
.sb-field select { cursor: pointer; appearance: none; }
.sb-field input::placeholder { color: var(--muted); }
.sb-submit { justify-content: center; }

/* ---------- лента категорий ---------- */

.catstrip-wrap { padding: 26px 0 6px; }
.catstrip {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 14px; box-shadow: var(--shadow);
}
.cat {
  flex: 0 0 auto; width: 88px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 6px 4px; border-radius: var(--radius-sm); position: relative;
  transition: background .15s ease;
}
.cat:hover { background: #F6F2E8; }
.cat.is-active { background: #EDF3EC; }
.cat.is-active .cat-icon { box-shadow: 0 0 0 2px var(--green-500); }
.cat.is-active .cat-name { color: var(--green-700); font-weight: 700; }
.cat-icon {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--sand); display: grid; place-items: center;
  font-size: 30px; line-height: 1; transition: transform .15s ease;
}
.cat:hover .cat-icon { transform: translateY(-2px); }
.cat-name { font-size: 13px; color: var(--ink-2); text-align: center; line-height: 1.25; }
.cat-count {
  position: absolute; top: 2px; right: 10px;
  background: var(--green-700); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 6px; border-radius: 999px;
}

/* оттенки кружков по категориям */
.cat-krs, .cat-goats     { background: #EADFC8; }
.cat-horses, .cat-camels { background: #E7D9C4; }
.cat-sheep               { background: #ECE6D6; }
.cat-poultry             { background: #F0DFC9; }
.cat-rabbits             { background: #E9E3D5; }
.cat-milk                { background: #E4EAF0; }
.cat-kumys               { background: #E7EDE6; }
.cat-honey               { background: #F3E3C2; }
.cat-eggs                { background: #F1E7D2; }
.cat-meat                { background: #EFD9D2; }

/* ---------- секции и карточки ---------- */

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h1, .section-head h2 { margin: 0; }

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

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: inherit; }

.card-photo {
  position: relative; aspect-ratio: 4 / 3;
  display: grid; place-items: center;
}
.card-emoji { font-size: 62px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.12)); }
.card-emoji--xl { font-size: 140px; }

.fav {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: 0; cursor: pointer;
  color: #C9C3B4; font-size: 15px; line-height: 1; transition: .15s ease;
}
.fav:hover { color: #B0463A; }
.fav.on { color: #C0392B; }

.card-body { padding: 12px 14px 16px; }
.card-title { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.card-region { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.pin { font-size: 11px; }
.card-price { font-size: 15px; font-weight: 700; color: var(--green-900); margin: 0; }

/* фоновые градиенты плашек */
.ph-krs      { background: linear-gradient(160deg, #DCC9A6, #C4A97F); }
.ph-horses   { background: linear-gradient(160deg, #D8C09B, #B79269); }
.ph-sheep    { background: linear-gradient(160deg, #DFD8C4, #C3BAA2); }
.ph-poultry  { background: linear-gradient(160deg, #E5C79E, #CBA574); }
.ph-rabbits  { background: linear-gradient(160deg, #DED8CA, #C0B8A5); }
.ph-camels   { background: linear-gradient(160deg, #DCC6A2, #BC9E72); }
.ph-goats    { background: linear-gradient(160deg, #DDD2B8, #BEB090); }
.ph-milk     { background: linear-gradient(160deg, #DDE6ED, #B9C9D6); }
.ph-kumys    { background: linear-gradient(160deg, #DCE5DA, #B7C6B4); }
.ph-honey    { background: linear-gradient(160deg, #F0D89F, #D9AE55); }
.ph-eggs     { background: linear-gradient(160deg, #EFE1C6, #D6C29A); }
.ph-meat     { background: linear-gradient(160deg, #E5C3B8, #C9948A); }
.ph-default  { background: linear-gradient(160deg, #E2DCCC, #C6BEA8); }
.ph-farm     { background: linear-gradient(160deg, #CBD9C8, #9DB59C); }

/* ---------- фермы ---------- */

.farms-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 18px; align-items: stretch; }

.map-panel {
  background: #EFEADC; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; display: grid; place-items: center;
}
.map-svg { width: 100%; height: auto; }
.map-land { fill: #DCE4D4; stroke: #BFCBB4; stroke-width: 1.5; }
.map-pin circle { fill: var(--green-700); }
.map-pin text { font-size: 10px; text-anchor: middle; }
.map-labels text { font-size: 8.5px; fill: #6E6D5F; text-anchor: middle; font-family: var(--sans); }
.map-caption { font-size: 13px; fill: #A6A08D; letter-spacing: 2px; text-anchor: middle; font-family: var(--sans); font-weight: 600; }

.farm-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
}
.farm-photo { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.farm-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.farm-body h3 { margin: 0 0 2px; font-size: 16px; }
.farm-desc { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }

.badge-verified {
  position: absolute; top: 10px; left: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--green-700); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.badge-inline { position: static; display: inline-grid; vertical-align: middle; }

/* ---------- преимущества ---------- */

.features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px;
}
.feature h3 { font-family: var(--sans); font-size: 15px; margin: 10px 0 6px; color: var(--ink); }
.feature p { font-size: 13px; color: var(--ink-2); margin: 0; }
.feature-ic { font-size: 34px; line-height: 1; }

/* ---------- CTA ---------- */

.cta {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px;
  background: linear-gradient(120deg, var(--green-900), var(--green-700));
  border-radius: var(--radius); padding: 34px 36px; color: #fff;
}
.cta h2, .cta h3 { color: #fff; }
.cta p { color: rgba(255,255,255,.86); }
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.store {
  display: inline-flex; align-items: center; gap: 8px;
  background: #111; color: #fff; border-radius: 10px;
  padding: 10px 18px; font-size: 14px; font-weight: 600;
}
.cta-note { font-size: 12px; color: rgba(255,255,255,.6); margin: 0; }
.cta-right { background: rgba(255,255,255,.08); border-radius: var(--radius-sm); padding: 22px 24px; align-self: center; }
.cta-right p { margin-bottom: 16px; font-size: 14px; }

/* ---------- страницы объявления и фермы ---------- */

.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--green-700); }

.detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.detail-photo { border-radius: var(--radius); aspect-ratio: 4 / 3; display: grid; place-items: center; }
.detail-info h1 { margin-bottom: .25em; }
.detail-price { font-size: 28px; font-weight: 700; color: var(--green-900); font-family: var(--serif); margin: 10px 0 18px; }

.contact-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  margin-bottom: 20px;
}
.contact-name { margin: 0; font-size: 14px; color: var(--ink-2); }

.meta { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.meta li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.meta li span { color: var(--muted); }

.description { margin-top: 32px; max-width: 760px; }
.description p { white-space: pre-line; color: var(--ink-2); }

.farm-hero { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.farm-hero-photo { border-radius: var(--radius); aspect-ratio: 4 / 3; display: grid; place-items: center; }
.farm-about { color: var(--ink-2); max-width: 620px; }

/* ---------- формы ---------- */

.form { display: flex; flex-direction: column; gap: 16px; max-width: 680px; margin-top: 8px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.form label b { color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form input, .form select, .form textarea {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--ink);
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); outline: 0;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--green-500); }
.form textarea { resize: vertical; }
.form .btn { align-self: flex-start; }

.notice {
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--green-500);
  border-radius: var(--radius); padding: 24px 26px;
}
.notice--ok { border-left-color: var(--green-500); }
.notice--err { border-left-color: #C0392B; }
.notice ul { margin: 0; padding-left: 20px; }

.list { color: var(--ink-2); padding-left: 20px; }
.list li { margin-bottom: 8px; }

/* ---------- пусто / пагинация ---------- */

.empty { text-align: center; padding: 50px 20px; color: var(--ink-2); }
.empty-ic { font-size: 52px; display: block; margin-bottom: 12px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; font-size: 15px; }
.pager a { color: var(--green-700); font-weight: 600; }
.pager-info { color: var(--muted); }

/* ---------- подвал ---------- */

.site-footer { background: var(--green-900); color: rgba(255,255,255,.75); margin-top: 40px; padding: 44px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 28px; }
.footer-grid h4 { color: #fff; font-family: var(--sans); font-size: 14px; margin: 0 0 12px; }
.footer-grid > div a, .footer-grid > div span { display: block; font-size: 14px; margin-bottom: 8px; color: rgba(255,255,255,.75); }
.footer-grid > div a:hover { color: #fff; }
.footer-brand p { font-size: 14px; max-width: 300px; margin-top: 14px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.14);
  margin-top: 30px; padding-top: 18px; font-size: 13px;
}
.footer-legal { display: flex; gap: 22px; flex-wrap: wrap; }

/* ---------- адаптив ---------- */

@media (max-width: 1080px) {
  .cards-6 { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(3, 1fr); }
  .farms-row { grid-template-columns: repeat(3, 1fr); }
  .map-panel { grid-column: 1 / -1; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-actions { margin-left: auto; }
  body.nav-open .main-nav {
    display: flex; flex-direction: column; gap: 14px;
    position: absolute; top: 74px; left: 0; right: 0;
    background: #fff; padding: 18px 22px; border-bottom: 1px solid var(--line);
  }
  .searchbar { grid-template-columns: 1fr; border-radius: var(--radius); padding: 10px; }
  .sb-field + .sb-field { border-left: 0; border-top: 1px solid var(--line); }
  .sb-submit { width: 100%; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { height: 190px; opacity: .95; }
  .detail, .farm-hero { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .cards-6, .cards-4, .farms-row { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-ghost { display: none; }
  .header-inner { gap: 12px; }
  .cat { width: 76px; }
  .cat-icon { width: 50px; height: 50px; font-size: 26px; }
}
