/* public/css/app.css — AssetMapper entry (imported from assets/app.js) */

/* =========================================================
   АГРОПЛЮС — shared styles
   ========================================================= */
:root {
  --green-nav: #1B4D3E;
  --green-dark: #0E4F24;
  --green-action: #2A7441;
  --green-action-hover: #236338;
  --green-footer: #003018;
  --cta-orange: #E29800;
  --cta-orange-hover: #c98400;
  --text: #1a1a1a;
  --text-muted: #666;
  --text-light: #888;
  --border: #e5e5e5;
  --bg-soft: #F5F5F5;
  --white: #fff;
  --container: 1320px;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --shadow-card: 0 1px 4px rgba(0,0,0,.08);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; }


img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea, select { font: inherit; }
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn-green {
  background: var(--green-action);
  color: var(--white);
  border-color: var(--green-action);
}
.btn-green:hover { background: var(--green-action-hover); border-color: var(--green-action-hover); }

.btn-outline-green {
  background: transparent;
  color: var(--green-nav);
  border-color: var(--green-nav);
}
.btn-outline-green:hover { background: var(--green-nav); color: var(--white); }

.btn-orange {
  background: var(--cta-orange);
  color: var(--white);
  border-color: var(--cta-orange);
}
.btn-orange:hover { background: var(--cta-orange-hover); border-color: var(--cta-orange-hover); }

.btn-white {
  background: var(--white);
  color: var(--green-nav);
  border-color: var(--white);
}
.btn-white:hover { background: var(--bg-soft); }

.btn-sm { padding: 10px 18px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------- Top header ---------- */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}
@media (min-width: 1025px) {
  .logo { min-width: 180px; }
}
.logo img { width: 42px; height: 42px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--green-action);
  letter-spacing: .02em;
}
.logo-text span {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 2px;
}

.search {
  flex: 1;
  display: flex;
  max-width: 480px;
  margin: 0 auto;
}
.search input {
  flex: 1;
  border: 1px solid #e0e0e0;
  background: var(--bg-soft);
  padding: 11px 16px;
  border-radius: var(--radius) 0 0 var(--radius);
  border-right: none;
  outline: none;
  color: var(--text);
}
.search input::placeholder { color: #aaa; }
.search button {
  background: var(--green-action);
  border: none;
  color: white;
  padding: 0 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.search button:hover { background: var(--green-action-hover); }
.search svg { width: 18px; height: 18px; }

.topbar-contacts {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.contact-item {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.contact-item a {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}
.contact-item a:hover { color: var(--green-action); }
.contact-item small {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}
.contact-email {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.contact-email svg { width: 16px; height: 16px; color: var(--green-action); flex-shrink: 0; }

.topbar .btn-callback-home {
  background: transparent;
  color: var(--green-nav);
  border: 2px solid var(--green-nav);
  padding: 10px 16px;
  font-size: 12px;
}
.topbar .btn-callback-home:hover { background: var(--green-nav); color: #fff; }

.topbar .btn-callback-inner {
  background: var(--cta-orange);
  color: #fff;
  border: 2px solid var(--cta-orange);
  padding: 10px 16px;
  font-size: 12px;
}
.topbar .btn-callback-inner:hover { background: var(--cta-orange-hover); }

/* ---------- Main nav ---------- */
.main-nav {
  background: var(--green-nav);
  position: relative;
  z-index: 100;
}
.main-nav ul {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.main-nav > .container > ul > li { position: relative; }
.main-nav > .container > ul > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 15px 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .15s;
}
.main-nav > .container > ul > li > a:hover,
.main-nav > .container > ul > li.active > a,
.main-nav > .container > ul > li.open > a {
  background: rgba(255,255,255,.1);
}
.main-nav .chevron {
  width: 10px; height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translateY(-2px);
  opacity: .85;
}

/* Mega menu */
.mega-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  border-radius: 0 0 6px 6px;
  padding: 28px 32px;
  min-width: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 200;
}
@media (min-width: 1025px) {
  .mega-menu {
    width: auto;
    min-width: 920px;
    max-width: min(1100px, calc(100vw - 32px));
  }
}
.mega-menu.open,
li.open > .mega-menu,
.page-home .nav-catalog.open > .mega-menu {
  display: block;
}
.mega-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.mega-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-nav);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f0eb;
}
.mega-col a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  color: #333;
  transition: color .15s;
}
.mega-col a:hover { color: var(--green-action); }
.mega-col .mi {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #e8f5ec;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green-action);
  font-size: 12px;
}
.mega-col .arrow { margin-left: auto; color: #ccc; font-size: 12px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  background: var(--bg-soft);
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-light);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--green-action); }
.breadcrumbs span { margin: 0 8px; color: #ccc; }
.breadcrumbs strong { color: var(--text); font-weight: 500; }

.page-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 28px 0 24px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-footer);
  color: rgba(255,255,255,.85);
  padding: 48px 0 0;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 1.3fr;
  gap: 28px;
  padding-bottom: 36px;
}
.footer-brand .logo-text strong { color: #fff; }
.footer-brand .logo-text span { color: rgba(255,255,255,.55); }
.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin: 14px 0 18px;
  line-height: 1.5;
}
.socials { display: flex; gap: 10px; }
.socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.socials a:hover { background: var(--green-action); }
.socials svg { width: 16px; height: 16px; fill: #fff; }

.footer-col h5 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #fff;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 13.5px;
  color: rgba(255,255,255,.65);
  padding: 5px 0;
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }

.footer-contacts li {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13.5px;
  color: rgba(255,255,255,.75);
  line-height: 1.4;
}
.footer-contacts .ico {
  width: 18px; flex-shrink: 0; color: var(--green-action); margin-top: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: rgba(255,255,255,.45);
}
.footer-bottom a:hover { color: #fff; }

/* ---------- CTA bar ---------- */
.cta-bar {
  background: var(--green-nav);
  padding: 28px 0;
}
.cta-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-bar-text {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fff;
}
.cta-bar-text .phone-ico {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cta-bar-text h3 {
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.cta-bar-text p {
  font-size: 14px;
  opacity: .8;
  margin-top: 4px;
}

/* =========================================================
   HOMEPAGE
   ========================================================= */
.hero {
  position: relative;
  min-height: 460px;
  background: #1a3d2e url('/mockup/hero.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.78) 42%, rgba(255,255,255,.15) 70%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 60px 0;
}
.hero-content h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--green-nav);
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 18px;
}
.hero-content p {
  font-size: 15px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 420px;
}

.features {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 600px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); }
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.feature-item img { width: 48px; height: 48px; flex-shrink: 0; }
.feature-item h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--green-nav);
  margin-bottom: 4px;
}
.feature-item p { font-size: 13px; color: var(--text-muted); line-height: 1.4; }

.section { padding: 56px 0; }
.section-alt { background: var(--bg-soft); }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text);
}
.section-head .link-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-action);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.section-head .link-all:hover { text-decoration: underline; }

/* Machinery carousel */
.carousel-wrap { position: relative; }
.carousel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  overflow: hidden;
  max-width: 100%;
}
@media (min-width: 600px) {
  .carousel { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .carousel { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .carousel { grid-template-columns: repeat(6, 1fr); }
}
.mach-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, border-color .2s;
}
.mach-card:hover { box-shadow: var(--shadow); border-color: #cfe0d4; }
.mach-card .img-wrap {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: #fafafa;
}
.mach-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mach-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.mach-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
  margin-bottom: 14px;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--green-action);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 2;
}
.carousel-nav:hover { background: var(--green-action-hover); }
.carousel-nav.prev { left: -16px; }
.carousel-nav.next { right: -16px; }

/* Parts split */
.parts-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  max-width: 100%;
}
@media (min-width: 900px) {
  .parts-split {
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
  }
}
.parts-split h2 {
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: .02em;
}
.parts-split > div > p {
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}
.checklist { margin-bottom: 24px; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 14.5px;
}
.checklist .check {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green-action);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  margin-top: 1px;
}
.parts-cats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 100%;
}
@media (min-width: 600px) {
  .parts-cats { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .parts-cats { grid-template-columns: repeat(3, 1fr); }
}
.part-cat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  transition: box-shadow .2s, border-color .2s;
}
.part-cat:hover { box-shadow: var(--shadow); border-color: #cfe0d4; }
.part-cat img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  border: 3px solid #e8f5ec;
}
.part-cat span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* About */
.about-banner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: linear-gradient(135deg, #eef5f0 0%, #f5f7f5 50%, #e8efe9 100%);
  border-radius: 8px;
  overflow: hidden;
  min-height: 0;
  max-width: 100%;
}
@media (min-width: 900px) {
  .about-banner {
    grid-template-columns: minmax(240px, 380px) 1fr;
    min-height: 360px;
  }
}
.about-banner .photo {
  position: relative;
  overflow: hidden;
}
.about-banner .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 360px;
}
.about-banner .text {
  padding: 48px 48px 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.about-banner .text::after {
  content: '';
  position: absolute;
  right: 20px; bottom: 20px;
  width: 180px; height: 120px;
  background: url('/mockup/machinery-tractors.jpg') center/cover;
  opacity: .08;
  border-radius: 8px;
}
.about-banner h2 {
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--green-nav);
  margin-bottom: 16px;
}
.about-banner p {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 12px;
  max-width: 560px;
}

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 100%;
}
@media (min-width: 700px) {
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}
.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.review-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.review-head img {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.review-head strong { display: block; font-size: 15px; }
.review-head span { font-size: 12.5px; color: var(--text-muted); }
.stars { color: var(--green-action); letter-spacing: 2px; font-size: 14px; margin-bottom: 10px; }
.review-card p { font-size: 14px; color: #555; line-height: 1.55; }

/* News cards home */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 100%;
}
@media (min-width: 700px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1025px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}
.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.news-card:hover { box-shadow: var(--shadow); }
.news-card .thumb {
  height: 180px;
  overflow: hidden;
}
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .thumb img { transform: scale(1.04); }
.news-card .body { padding: 18px 20px 22px; }
.news-card .date { font-size: 12.5px; color: var(--text-light); margin-bottom: 8px; }
.news-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.news-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.read-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-action);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.read-more:hover { text-decoration: underline; }

/* =========================================================
   CATALOG / PARTS
   ========================================================= */
.catalog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 56px;
}
@media (min-width: 901px) {
  .catalog-layout {
    grid-template-columns: 260px 1fr;
  }
}
.filters {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 16px;
}
.filters h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 14px;
  color: var(--text);
}
.filter-group {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.filter-group:last-of-type { border-bottom: none; }
.filter-group h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: .04em;
}
.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13.5px;
  cursor: pointer;
}
.filter-check input {
  width: 16px; height: 16px;
  accent-color: var(--green-action);
  cursor: pointer;
}
.range-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.range-row input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  font-size: 13px;
}
.range-row span { color: var(--text-light); font-size: 12px; }
input[type="range"] {
  width: 100%;
  accent-color: var(--green-action);
  margin: 6px 0;
}
.filter-actions { margin-top: 8px; }
.filter-actions .btn { margin-bottom: 10px; }
.reset-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: underline;
}
.reset-link:hover { color: var(--green-action); }

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.catalog-toolbar .found {
  font-size: 14px;
  color: var(--text-muted);
}
.catalog-toolbar .found strong { color: var(--text); }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.sort-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  font-size: 13px;
  color: var(--text);
}
.view-toggle { display: flex; gap: 4px; }
.view-toggle button {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.view-toggle button.active {
  background: var(--green-action);
  border-color: var(--green-action);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.product-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s;
}
.product-card:hover { box-shadow: var(--shadow); }
.product-card .img-wrap {
  height: 160px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 4px;
  overflow: hidden;
}
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-card .specs {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}
.product-card .sku {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.product-card .stock {
  font-size: 12px;
  color: var(--green-action);
  font-weight: 600;
  margin-bottom: 8px;
}
.product-card .price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
}
.product-card .btn { align-self: flex-start; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
}
.pagination a, .pagination span {
  min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  background: #fff;
}
.pagination a:hover { border-color: var(--green-action); color: var(--green-action); }
.pagination .active {
  background: var(--green-action);
  border-color: var(--green-action);
  color: #fff;
}
.pagination .dots { border: none; background: transparent; }

/* =========================================================
   NEWS LIST
   ========================================================= */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding-bottom: 56px;
}
.news-list-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.news-list-item:first-child { padding-top: 0; }
.news-list-item .thumb {
  height: 140px;
  border-radius: 6px;
  overflow: hidden;
}
.news-list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-list-item .date { font-size: 12.5px; color: var(--text-light); margin-bottom: 6px; }
.news-list-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}
.news-list-item h3 a:hover { color: var(--green-action); }
.news-list-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 10px;
}

.sidebar-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-box h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.cat-list a {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #444;
  border-bottom: 1px solid #f0f0f0;
}
.cat-list a:hover { color: var(--green-action); }
.cat-list a span { color: var(--text-light); font-size: 12.5px; }
.cat-list a.active { color: var(--green-action); font-weight: 600; }

.sidebar-cta {
  background: var(--green-nav);
  color: #fff;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.sidebar-cta h4 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: .03em;
}
.sidebar-cta p {
  font-size: 13.5px;
  opacity: .85;
  line-height: 1.5;
  margin-bottom: 14px;
}
.sidebar-cta .phones {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.sidebar-cta .email {
  font-size: 13px;
  opacity: .8;
  margin-bottom: 16px;
  display: block;
}

.recent-news-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.recent-news-item:last-child { border-bottom: none; }
.recent-news-item img {
  width: 64px; height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.recent-news-item a {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.recent-news-item a:hover { color: var(--green-action); }
.recent-news-item .date { font-size: 11.5px; color: var(--text-light); margin-top: 4px; }

/* =========================================================
   NEWS ARTICLE
   ========================================================= */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  padding-bottom: 56px;
}
.article-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}
.article-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.article-hero {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
}
.article-hero img { width: 100%; height: 400px; object-fit: cover; }
.article-body {
  font-size: 15.5px;
  line-height: 1.75;
  color: #333;
}
.article-body p { margin-bottom: 16px; }
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--green-nav);
}
.article-body ul {
  margin: 12px 0 20px 4px;
  list-style: disc;
  padding-left: 22px;
}
.article-body ul li {
  margin-bottom: 8px;
  padding-left: 4px;
}

/* =========================================================
   CONTACTS
   ========================================================= */
.contacts-top {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 40px;
}
.contact-info-list { display: flex; flex-direction: column; gap: 22px; }
.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-info-item .ico {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #e8f5ec;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--green-action);
}
.contact-info-item h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.contact-info-item p, .contact-info-item a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}
.contact-info-item a:hover { color: var(--green-action); }

.map-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 100%;
  min-height: 340px;
  background: #e8eee9;
}
.map-wrap img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }

.contact-form-section {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 36px;
  margin-bottom: 56px;
}
.contact-form-section h2 {
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.contact-form-section > p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 14.5px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.form-group input,
.form-group textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--green-action); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

@media (max-width: 1100px) {
  .carousel { grid-template-columns: repeat(3, 1fr); }
  .product-grid, .product-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  /* mega min-width removed — mobile-first */
}


/* ---- Polish ---- */
.topbar-inner { flex-wrap: nowrap; }
.topbar-contacts { flex-wrap: nowrap; justify-content: flex-end; }
@media (max-width: 1100px) {
  .topbar-inner { flex-wrap: wrap; }
  .topbar-contacts { flex-wrap: wrap; }
}
.product-card .img-wrap img { object-fit: cover; }
.page-parts .product-card .img-wrap {
  background: linear-gradient(180deg, #f7f7f7, #eee);
}
.page-parts .product-card .img-wrap img { object-fit: contain; padding: 8px; }
.mega-col h4 { color: var(--green-action); }
.main-nav > .container > ul > li.active > a {
  background: rgba(0,0,0,.18);
}
.hero { min-height: 480px; }
@media (max-width: 1280px) {
  .topbar-contacts .contact-email { display: none; }
  .search { max-width: 320px; }
}
@media (max-width: 1200px) {
  .topbar-contacts .max-logo-link { display: none; }
  .search { max-width: 280px; }
}

/* ---------- Symfony-only extras ---------- */
.page-body { padding: 8px 0 64px; }
.page-body .page-title { margin-top: 20px; }
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.service-grid article {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  background: #fff;
}
.service-grid article h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--green-nav);
}
.service-grid article p {
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 14.5px;
}
.prose { max-width: 820px; }
.prose p { margin-bottom: 14px; line-height: 1.65; color: var(--text); }
.prose h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 28px 0 14px;
  color: var(--text);
}
.plain-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.plain-table th, .plain-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.plain-table th { width: 240px; color: var(--text-muted); font-weight: 600; }
@media (max-width: 720px) {
  .service-grid { grid-template-columns: 1fr; }
  .plain-table th { width: 140px; }
}
.flash {
  max-width: var(--container);
  margin: 16px auto;
  padding: 12px 16px;
  border-radius: var(--radius);
}
.flash-success { background: #e8f6ec; color: #14532d; }
.flash-error { background: #fde8e8; color: #9b1c1c; }
.form-errors { color: #9b1c1c; margin: 4px 0 0; padding-left: 18px; list-style: disc; }
.form-row.is-invalid input,
.form-row.is-invalid textarea,
.form-group.is-invalid input,
.form-group.is-invalid textarea { border-color: #c0392b; }
.form-help { color: var(--text-muted); font-size: 13px; }
.cart-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 13px; color: var(--green-nav);
  white-space: nowrap;
}
.cart-link b {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--cta-orange); color: #fff;
  font-size: 12px; display: inline-grid; place-items: center;
}
.product-page {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px;
  padding: 24px 0 48px;
}
.product-page .product-gallery img {
  width: 100%; border-radius: var(--radius); background: var(--bg-soft);
}
.product-info .muted { color: var(--text-muted); margin-bottom: 8px; }
.product-info h1 { font-size: 28px; margin-bottom: 12px; }
.product-info .price,
.product-info .product-card__price {
  font-size: 28px; font-weight: 800; color: var(--green-action); margin: 12px 0;
}
.spec-list { margin: 12px 0 16px; padding-left: 18px; }
.spec-list li { margin: 4px 0; }
.buy-row { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.buy-row input[type=number] { width: 72px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.cart-page { padding: 24px 0 48px; }
.cart-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 32px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { border-bottom: 1px solid var(--border); padding: 12px 8px; text-align: left; }
.cart-total { font-size: 1.2rem; font-weight: 700; }
.modal[hidden] { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,20,10,.45); }
.modal-card {
  position: relative; background: #fff; width: min(440px, calc(100% - 32px));
  border-radius: 8px; padding: 28px; z-index: 1; box-shadow: var(--shadow);
}
.modal-close { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 1.6rem; cursor: pointer; }
.callback-form { display: grid; gap: 12px; margin-top: 12px; }
.callback-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.callback-form input,
.callback-form textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
}
.empty { color: var(--text-muted); padding: 24px 0; }
.product-grid.is-list { grid-template-columns: 1fr; }
@media (max-width: 900px) {
  .product-page, .cart-layout { grid-template-columns: 1fr; }
}


/* ---------- TZ redline additions (АГРОПЛЮС56) ---------- */
.btn-max {
  background: #0a66c2;
  color: #fff;
  border-color: #0a66c2;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}
.btn-max:hover { background: #084f96; border-color: #084f96; color: #fff; }

.nav-bu { margin-left: auto; }
.nav-bu-btn {
  background: var(--cta-orange) !important;
  color: #fff !important;
  border-radius: 4px;
  padding: 8px 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.nav-bu-btn:hover { background: var(--cta-orange-hover) !important; color: #fff !important; }
.main-nav > .container > ul > li.nav-bu.active > a.nav-bu-btn,
.main-nav > .container > ul > li.nav-bu > a.nav-bu-btn:hover {
  background: var(--cta-orange-hover) !important;
  color: #fff !important;
}

.mega-cta {
  border-top: 1px solid #e5efe8;
  padding: 16px 20px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.mega-cta-note {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.features-grid-5 {
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .features-grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .features-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .features-grid-5 { grid-template-columns: repeat(5, 1fr); }
}
.hero-tagline {
  font-weight: 700;
  color: #fff;
  margin-top: 8px !important;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.cta-hint {
  font-size: 12px;
  color: rgba(255,255,255,.75);
  margin-top: 10px;
}
.section .cta-hint,
.parts-split .cta-hint,
.machinery-half .cta-hint {
  color: var(--text-muted);
}
.hero-content h1 { font-size: 32px; max-width: 640px; }
.hero-content .btn-outline-green {
  border-color: #fff;
  color: #fff;
}
.hero-content .btn-outline-green:hover {
  background: #fff;
  color: var(--green-nav);
}

.machinery-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .machinery-split { grid-template-columns: 1fr; }
}
.machinery-half h3 {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.used-grid,
.used-marketplace-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mach-card .img-wrap { position: relative; }
.badge-used {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--cta-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.director-sign {
  font-weight: 700;
  margin-top: 8px !important;
  color: var(--green-nav);
}
.page-lead {
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 28px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.social-max {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 40px;
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  background: #0a66c2;
  color: #fff !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.social-max:hover { background: #084f96; }

/* AI bot stub (disabled) — full assistant like lbr.ru planned later */
.ai-bot-stub {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.ai-bot-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #9aa7a0;
  color: #fff;
  font-weight: 800;
  opacity: .85;
  cursor: not-allowed;
}
.ai-bot-hint {
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 200px;
}

@media (max-width: 1100px) {
  .features-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .used-grid, .used-marketplace-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-bu { margin-left: 0; }
}
@media (max-width: 720px) {
  .features-grid-5 { grid-template-columns: 1fr; }
  .used-grid, .used-marketplace-grid { grid-template-columns: 1fr; }
  .ai-bot-hint { display: none; }
}


/* =========================================================
   Responsive: tablet ≤1024 + mobile ≤720 / ≤480
   Burger nav, stacked grids, overflow fixes
   ========================================================= */

/* Burger — hidden on desktop */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--green-nav);
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
body.nav-open .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-burger span:nth-child(2) {
  opacity: 0;
}
body.nav-open .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-contacts {
  display: none;
}

.nav-mobile-callback {
  margin-top: 6px;
  min-height: 44px;
}
.nav-catalog.open > a .chevron {
  transform: rotate(225deg) translateY(-1px);
}

@media (max-width: 1024px) {
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .container { padding: 0 16px; }

  .nav-burger { display: inline-flex; }

  .topbar { padding: 10px 0; }
  .topbar-inner {
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }
  .logo { min-width: 0; }
  .logo-text strong { font-size: 17px; }
  .search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin: 0;
  }
  .topbar-contacts {
    gap: 10px;
    margin-left: auto;
  }
  .topbar-contacts .contact-item,
  .topbar-contacts .contact-email,
  .topbar-contacts .max-logo-link {
    display: none;
  }
  .topbar .btn {
    padding: 10px 12px;
    font-size: 11px;
    min-height: 44px;
  }
  .cart-link { min-height: 44px; align-items: center; }

  /* Slide-down nav panel */
  .main-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 150;
    background: var(--green-nav);
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  header { position: relative; z-index: 120; }
  body.nav-open .main-nav { display: block; }
  body.nav-open { overflow: hidden; }

  .main-nav > .container { padding-top: 8px; padding-bottom: 16px; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
  }
  .main-nav > .container > ul > li > a {
    padding: 14px 12px;
    min-height: 48px;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .nav-bu {
    margin-left: 0 !important;
    padding: 10px 0 4px;
  }
  .nav-bu-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 14px 16px !important;
    min-height: 48px;
  }

  .nav-mobile-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 4px 16px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    margin-bottom: 4px;
  }
  .nav-mobile-contacts a {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 4px 8px;
  }

  /* Mega-menu as inline accordion */
  .mega-menu {
    position: static !important;
    left: auto;
    top: auto;
    min-width: 0 !important;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    padding: 12px 8px 16px;
    background: #f7faf8;
  }
  .mega-cols {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .mega-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 8px;
  }
  .mega-cta .btn { width: 100%; min-height: 44px; }

  /* Grids */
  .product-grid,
  .product-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .used-grid,
  .used-marketplace-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .machinery-split { grid-template-columns: 1fr; }
  .carousel { grid-template-columns: repeat(2, 1fr); }
  .parts-split { grid-template-columns: 1fr; gap: 24px; }
  .catalog-layout { grid-template-columns: 1fr; }

  /* Hero tightened */
  .hero { min-height: 360px; }
  .hero-content { padding: 28px 0; }
  .hero-content h1 { font-size: 26px; max-width: 100%; }
  .hero-content p { font-size: 14px; margin-bottom: 20px; }
  .section { padding: 40px 0; }
  .page-title { font-size: 26px; margin: 20px 0 18px; }
}

@media (max-width: 720px) {
  .logo img { width: 36px; height: 36px; }
  .logo-text strong { font-size: 15px; }
  .logo-text span { font-size: 9px; }

  .topbar-contacts .btn[data-open-callback],
  .topbar .btn-callback-home,
  .topbar .btn-callback-inner {
    display: none;
  }

    .mega-cols { grid-template-columns: 1fr; gap: 12px; }
  .mega-col a { min-height: 44px; padding: 10px 0; }

  .product-grid,
  .product-grid.cols-4,
  .features-grid,
  .features-grid-5,
  .used-grid,
  .used-marketplace-grid,
  .footer-grid,
  .service-grid,
  .carousel { grid-template-columns: 1fr; }

  .footer-grid { gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .site-footer { padding-top: 36px; }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .hero { min-height: 300px; }
  .hero-content h1 { font-size: 22px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; min-height: 44px; }

  .carousel-nav { display: none; }
  .section { padding: 32px 0; }
  .page-title { font-size: 22px; }

  .buy-row { flex-wrap: wrap; }
  .buy-row .btn { flex: 1 1 100%; min-height: 44px; }

  .filters { margin-bottom: 16px; }
  .plain-table th,
  .plain-table td { display: block; width: 100%; }
  .plain-table th { border-bottom: none; padding-bottom: 2px; }
  .plain-table tr { display: block; margin-bottom: 12px; border-bottom: 1px solid var(--border); }

  .cart-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ai-bot-stub { right: 12px; bottom: 12px; }
  .ai-bot-hint { display: none; }

  /* Touch-friendly nav + buttons */
  .main-nav > .container > ul > li > a,
  .btn,
  .cart-link,
  .nav-burger { min-height: 44px; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .logo-text span { display: none; }
  .hero-content h1 { font-size: 20px; }
  .hero { min-height: 260px; }
  .product-info h1 { font-size: 22px; }
  .product-info .price,
  .product-info .product-card__price { font-size: 22px; }
  .topbar-contacts { gap: 6px; }
  .cart-link { font-size: 12px; }
}


/* =========================================================
   Overflow / fit fixes (tablet + mobile) — 2026-09-09
   ========================================================= */
html {
  overflow-x: clip;
}
body {
  overflow-x: clip;
  max-width: 100%;
}
img, svg, video, iframe {
  max-width: 100%;
  height: auto;
}
/* SVG icons that need fixed size keep it via width/height attrs or class */
.logo img,
.feature-item img,
.part-cat img,
.review-head img,
.search svg,
.contact-email svg,
.socials svg {
  height: auto;
}

/* Kill desktop mega min-width that causes page-wide scroll */
@media (max-width: 1100px) {
  .mega-menu {
    min-width: 0 !important;
    max-width: calc(100vw - 24px);
    width: auto;
  }
}

@media (max-width: 1024px) {
  /* Homepage: do not leave mega open / sized for desktop */
  .page-home .nav-catalog.open > .mega-menu,
  .mega-menu.open,
  li.open > .mega-menu {
    /* still shown only inside open drawer; size for viewport */
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .about-banner {
    grid-template-columns: 1fr !important;
  }
  .about-banner .photo {
    min-height: 220px;
    max-height: 260px;
  }
  .about-banner .photo img {
    min-height: 220px;
    max-height: 260px;
  }
  .about-banner .text {
    padding: 28px 20px;
  }

  .news-grid,
  .reviews-grid,
  .parts-cats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .section-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .section-head h2 {
    font-size: 22px;
    max-width: 100%;
  }

  .carousel {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .carousel-nav.prev { left: 4px; }
  .carousel-nav.next { right: 4px; }

  .topbar-inner {
    flex-wrap: wrap !important;
  }
  .logo {
    min-width: 0 !important;
    flex: 1 1 auto;
  }
  .btn {
    white-space: normal;
  }

  /* Prevent any absolute flyout from expanding the page */
  .main-nav {
    max-width: 100vw;
  }
}

@media (max-width: 720px) {
  .news-grid,
  .reviews-grid,
  .parts-cats,
  .features-grid,
  .features-grid-5,
  .carousel {
    grid-template-columns: 1fr !important;
  }

  .about-banner .text {
    padding: 22px 16px;
  }
  .about-banner h2 {
    font-size: 22px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Compact topbar: logo + burger + cart only */
  .topbar-contacts {
    order: 2;
    margin-left: 0;
    gap: 8px;
  }
  .nav-burger {
    order: 3;
    margin-left: 0;
  }
  .search {
    order: 4;
  }

  .hero-content {
    max-width: 100%;
    padding: 36px 0;
  }
  .hero-content h1 {
    font-size: 22px !important;
    word-break: break-word;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .mach-card,
  .product-card,
  .news-card,
  .review-card {
    max-width: 100%;
  }
}
