/* ==========================================================================
   Тема «Агродеталь» для OpenCart 4 — повтор дизайна agrd.com.ua (2014–2025)
   Размеры и цвета сняты с архивной копии сайта.
   ========================================================================== */
:root {
  --agrd-bg: #dededc;
  --agrd-red: #cc3333;
  --agrd-red-dark: #b32b2b;
  --agrd-yellow: #e3d050;
  --agrd-green: #53e518;
  --agrd-border-green: #3bb54a;
  --agrd-line: rgba(0, 0, 0, .25);
  --agrd-muted: #9a9a9a;
  --agrd-width: 1291px;
}

html { font-size: 14px; }
body.agrd {
  background: var(--agrd-bg);
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
}
.agrd a { color: #000; text-decoration: none; }
.agrd a:hover { color: var(--agrd-red); }
.agrd .link,
.agrd .agrd-u { border-bottom: 1px solid var(--agrd-line); }
.agrd .link:hover,
.agrd .agrd-u:hover { border-bottom-color: var(--agrd-red); }
.agrd h1, .agrd h2, .agrd h3, .agrd h4, .agrd .h1, .agrd .h2, .agrd .h3 { color: #000; }
.agrd h1, .agrd .h1 { font-size: 32px; font-weight: 400; line-height: 1.15; margin: 0 0 20px; }
.agrd h2, .agrd .h2 { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.agrd h3, .agrd .h3 { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.agrd .agrd-container { max-width: calc(var(--agrd-width) + 60px); margin: 0 auto; padding: 0 30px; box-sizing: border-box; }
.agrd .container { max-width: calc(var(--agrd-width) + 60px); padding-left: 30px; padding-right: 30px; }
.agrd img { max-width: 100%; }

/* ---------- Зелёная строка ---------- */
.agrd-ribbon { min-height: 30px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; color: #000; padding: 4px 30px; box-sizing: border-box; }

/* ---------- Верхняя строка ---------- */
.agrd-topbar { display: flex; align-items: center; justify-content: space-between; height: 32px; font-size: 12px; }
.agrd-topbar__menu { display: flex; flex-wrap: wrap; gap: 0 15px; align-items: center; }
.agrd-topbar__menu a { font-size: 12px; }
.agrd-lang { display: flex; gap: 10px; margin-left: 10px; }
.agrd-lang .active { font-weight: 700; }
.agrd-userbar { display: flex; align-items: center; gap: 0; font-size: 12px; }
.agrd-userbar__item { width: 104px; text-align: center; color: var(--agrd-muted); }
.agrd-userbar__item.has-items, .agrd-userbar__item.has-items a { color: #000; }
.agrd-userbar__item a { color: var(--agrd-muted); }
.agrd-userbar__count { display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 3px; border-radius: 8px; background: var(--agrd-red); color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.agrd-userbar__login { padding-left: 22px; margin-left: 6px; max-width: 162px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.agrd-userbar__login:before { content: ''; position: absolute; left: 2px; top: 1px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #000; box-sizing: border-box; clip-path: polygon(0 0, 100% 0, 100% 60%, 0 60%); }
.agrd-userbar__login:after { content: ''; position: absolute; left: 0; top: 10px; width: 18px; height: 8px; border-radius: 9px 9px 0 0; border: 2px solid #000; border-bottom: 0; box-sizing: border-box; }

/* ---------- Шапка ---------- */
.agrd-header { display: grid; grid-template-columns: 252px 748px 1fr auto; align-items: start; padding: 17px 0 10px; }
.agrd-header__logo { padding-top: 16px; }
.agrd-header__logo img { width: 180px; height: auto; display: block; }
.agrd-header__logo .agrd-name { font-size: 22px; font-weight: 700; color: var(--agrd-red); }
.agrd-phones { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 36px; padding: 6px 0 0 23px; }
.agrd-phones a { font-size: 16px; }
.agrd-phones .agrd-phones__callback, .agrd-contacts .agrd-phones__callback { font-size: 12px; color: var(--agrd-red) !important; border-bottom: 1px dotted var(--agrd-red); cursor: pointer; margin-left: -18px; }
.agrd-search { position: relative; margin: 8px 56px 0 0; }
.agrd-search input { width: 100%; height: 30px; border: 1px solid #000; border-radius: 4px; background: #fff; padding: 0 36px 0 12px; font-size: 14px; box-sizing: border-box; outline: none; }
.agrd-search input::placeholder { color: #aaa; }
.agrd-search button { position: absolute; right: 0; top: 0; width: 34px; height: 30px; border: 0; background: transparent; cursor: pointer; color: #777; }
.agrd-timetable { font-size: 13px; padding-top: 6px; }
.agrd-timetable__title { margin-bottom: 7px; }
.agrd-timetable__row { line-height: 18px; }
.agrd-timetable__row b { display: inline-block; min-width: 66px; }
.agrd-basket { position: relative; text-align: right; padding-top: 24px; }
.agrd-basket__toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 0; background: none; padding: 0; }
.agrd-basket__count { display: inline-block; min-width: 18px; color: #fff; font-weight: 700; font-size: 12px; text-align: center; }
.agrd-basket__count.full { background: var(--agrd-red); border-radius: 9px; padding: 1px 5px; }
.agrd-basket__title { color: var(--agrd-red); font-size: 17px; font-weight: 700; white-space: nowrap; }
.agrd-basket__drop { display: none; position: absolute; right: 0; top: 52px; z-index: 50; width: 420px; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .2); border-radius: 5px; padding: 15px; text-align: left; }
.agrd-basket.open .agrd-basket__drop { display: block; }
.agrd-basket__drop table { width: 100%; font-size: 13px; }
.agrd-basket__drop td { padding: 5px 4px; border-bottom: 1px solid #eee; vertical-align: middle; }
.agrd-basket__drop .agrd-btn { margin-top: 10px; }

/* ---------- Красное меню ---------- */
.agrd-menu { position: relative; display: flex; background: var(--agrd-red); border-radius: 5px; height: 40px; margin-bottom: 40px; z-index: 40; }
.agrd-menu__item { flex: 1 1 auto; position: static; }
.agrd-menu__item + .agrd-menu__item { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .25), inset 2px 0 0 rgba(0, 0, 0, .08); }
.agrd-menu__link { display: block; text-align: center; color: #fff !important; font-weight: 700; font-size: 15px; padding: 11px 15px 12px; height: 40px; box-sizing: border-box; white-space: nowrap; }
.agrd-menu__item:first-child .agrd-menu__link { border-radius: 5px 0 0 5px; }
.agrd-menu__item:last-child .agrd-menu__link { border-radius: 0 5px 5px 0; }
.agrd-menu__item:hover > .agrd-menu__link { background: linear-gradient(#c22e2e, #ad2626); }
.agrd-menu__item.active > .agrd-menu__link { background: var(--agrd-yellow); }
.agrd-mega { display: none; position: absolute; left: 0; right: 0; top: 40px; background: #fff; border-radius: 0 0 5px 5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 30px 20px 25px; }
.agrd-menu__item.has-mega:hover .agrd-mega,
.agrd-menu__item.has-mega.open .agrd-mega { display: block; }
.agrd-mega__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 20px; }
.agrd-mega__col { min-width: 0; }
.agrd-mega__group { break-inside: avoid; margin-bottom: 20px; }
.agrd-mega__head { display: flex; align-items: center; min-height: 50px; gap: 10px; }
.agrd-mega__head img { width: 50px; flex: 0 0 50px; object-fit: contain; }
.agrd-mega__head a { font-size: 15px; font-weight: 700; line-height: 20px; }
.agrd-mega__list { list-style: none; margin: 8px 0 0; padding: 0 0 0 60px; }
.agrd-mega__list li { margin: 0 0 7px; line-height: 19px; }
.agrd-mega__list a { font-size: 13px; border-bottom: 1px solid var(--agrd-line); }

/* ---------- Хлебные крошки ---------- */
.agrd-breadcrumbs { display: flex; flex-wrap: wrap; gap: 0 14px; list-style: none; padding: 0; margin: -8px 0 14px; font-size: 11px; color: var(--agrd-muted); }
.agrd-breadcrumbs a { color: var(--agrd-muted); }
.agrd-breadcrumbs li:last-child a { pointer-events: none; }

/* ---------- Главная ---------- */
.agrd-slider { position: relative; border-radius: 5px; overflow: hidden; margin-bottom: 25px; }
.agrd-slider__track { display: flex; transition: transform .5s; }
.agrd-slider__slide { flex: 0 0 100%; }
.agrd-slider__slide img { display: block; width: 100%; height: auto; aspect-ratio: 1291 / 387; object-fit: cover; }
.agrd-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px 10px; margin-bottom: 40px; }
.agrd-tiles a, .agrd-tiles div { display: block; border-radius: 4px; overflow: hidden; background: #c9c9c7; }
.agrd-tiles img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; transition: opacity .2s; }
.agrd-tiles a:hover img { opacity: .9; }
.agrd-brands { background: #fff; padding: 40px 50px; margin: 0 -30px 40px; position: relative; }
.agrd-brands__viewport { overflow: hidden; }
.agrd-brands__track { display: flex; gap: 40px; align-items: center; transition: transform .4s; }
.agrd-brands__item { flex: 0 0 115px; height: 60px; display: flex; align-items: center; justify-content: center; }
.agrd-brands__item img { max-width: 115px; max-height: 60px; object-fit: contain; filter: none; }
.agrd-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 1px solid #333; border-radius: 4px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.agrd-arrow:before { content: ''; width: 9px; height: 9px; border: solid #000; border-width: 0 3px 3px 0; }
.agrd-arrow--prev { left: 10px; }
.agrd-arrow--prev:before { transform: rotate(135deg); margin-left: 4px; }
.agrd-arrow--next { right: 10px; }
.agrd-arrow--next:before { transform: rotate(-45deg); margin-right: 4px; }
.agrd-blog { position: relative; margin-bottom: 10px; }
.agrd-blog__track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; }
.agrd-blog__img { display: block; border-radius: 5px; overflow: hidden; background: #ccc; aspect-ratio: 3 / 2; margin-bottom: 18px; }
.agrd-blog__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agrd-blog__date { font-size: 12px; color: var(--agrd-muted); margin-bottom: 8px; }
.agrd-blog__title a { font-size: 14px; border-bottom: 1px solid var(--agrd-line); line-height: 20px; }

/* ---------- Категория ---------- */
.agrd-cat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 30px; margin-bottom: 18px; }
.agrd-cat-head h1 { margin: 0; }
.agrd-cat-controls { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.agrd-sort { display: flex; align-items: center; gap: 8px; }
.agrd-sort__group { display: flex; border: 1px solid var(--agrd-border-green); border-radius: 3px; overflow: hidden; background: #fff; }
.agrd-sort__group a { padding: 7px 10px; font-size: 13px; border-left: 1px solid #ccc; white-space: nowrap; }
.agrd-sort__group a:first-child { border-left: 0; }
.agrd-sort__group a.active { background: var(--agrd-red); color: #fff; }
.agrd-view { display: flex; align-items: center; gap: 8px; }
.agrd-view__group { display: flex; border: 1px solid var(--agrd-border-green); border-radius: 3px; overflow: hidden; }
.agrd-view__group button { width: 27px; height: 30px; border: 0; background: #fff; cursor: pointer; padding: 0; }
.agrd-view__group button.active { background: var(--agrd-red); }
.agrd-view__group button[data-view=list]:before, .agrd-view__group button[data-view=grid]:before { content: ''; display: block; margin: auto; width: 13px; height: 11px; background: linear-gradient(currentColor 0 0) 0 0/100% 3px no-repeat, linear-gradient(currentColor 0 0) 0 4px/100% 3px no-repeat, linear-gradient(currentColor 0 0) 0 8px/100% 3px no-repeat; color: #999; }
.agrd-view__group button[data-view=grid]:before { background: linear-gradient(currentColor 0 0) 0 0/5px 5px no-repeat, linear-gradient(currentColor 0 0) 8px 0/5px 5px no-repeat, linear-gradient(currentColor 0 0) 0 6px/5px 5px no-repeat, linear-gradient(currentColor 0 0) 8px 6px/5px 5px no-repeat; }
.agrd-view__group button.active:before { color: #fff; }
.agrd-catalog { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: start; }
.agrd-catalog.no-side { grid-template-columns: 1fr; }
.agrd-side { border: 1px solid var(--agrd-border-green); border-radius: 3px; background: #fff; padding: 14px 16px 18px; font-size: 14px; }
.agrd-side__toggle { display: none; width: 100%; align-items: center; justify-content: space-between; border: 0; background: none; padding: 0; font-weight: 700; font-size: 14px; cursor: pointer; }
.agrd-side__toggle:after { content: ''; width: 8px; height: 8px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-right: 4px; transition: transform .2s; }
.agrd-side.open .agrd-side__toggle:after { transform: rotate(-135deg); }
.agrd-side.open .agrd-side__toggle { margin-bottom: 12px; }
.agrd-side__cats { list-style: none; margin: 0 0 6px; padding: 0; }
.agrd-side__cats li { margin: 0 0 7px; line-height: 18px; }
.agrd-side__cats a { border-bottom: 1px solid var(--agrd-line); }
.agrd-side__cats a.active { display: inline-block; background: var(--agrd-red); color: #fff; border: 0; padding: 1px 8px 2px; border-radius: 4px; margin-left: -8px; }
.agrd-side__modules > * + * { margin-top: 14px; }
.agrd-filter__section { margin-top: 18px; }
.agrd-filter__title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.agrd-filter__item { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 0 0 6px; cursor: pointer; }
.agrd-filter__item input { width: 13px; height: 13px; margin: 0; accent-color: var(--agrd-red); }
.agrd-filter__item sup { color: var(--agrd-muted); font-size: 9px; margin-left: 2px; }
.agrd-cat-desc { margin: 30px 0 10px; font-size: 13px; line-height: 1.5; }
.agrd-cat-desc h2 { font-size: 16px; margin: 18px 0 8px; }
.agrd-seo__text { position: relative; }
.agrd-seo.is-clipped .agrd-seo__text { max-height: 160px; overflow: hidden; }
.agrd-seo.is-clipped .agrd-seo__text:after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(rgba(222, 222, 220, 0), var(--agrd-bg)); }
.agrd-seo__more { display: none; margin-top: 8px; cursor: pointer; font-size: 13px; }
.agrd-seo.is-long .agrd-seo__more { display: inline-block; }
.agrd-subcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin-bottom: 30px; }
.agrd-subcats a { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 4px; padding: 10px 12px; min-height: 60px; }
.agrd-subcats img { width: 40px; height: 40px; object-fit: contain; }
.agrd-empty { padding: 10px 0 30px; }

/* Таблица товаров (вид «список») */
.agrd-products { width: 100%; }
.agrd-products__head { display: grid; font-size: 12px; color: var(--agrd-muted); padding: 0 6px 12px; border-bottom: 1px solid #ccc; }
.agrd-products__head, .agrd-row { grid-template-columns: 130px 50px minmax(200px, 1fr) 112px 100px 92px 110px 50px; column-gap: 0; }
.agrd-row { display: grid; align-items: center; padding: 7px 6px; border-bottom: 1px solid #ccc; min-height: 51px; box-sizing: border-box; font-size: 14px; }
.agrd-row__img img { width: 32px; height: 32px; object-fit: contain; display: block; }
.agrd-row__name a { border-bottom: 1px solid var(--agrd-line); line-height: 18px; }
.agrd-row__name { padding-right: 20px; }
.agrd-row__desc { display: none; }
.agrd-row__stock.out { color: var(--agrd-muted); }
.agrd-row__price .old { display: block; text-decoration: line-through; color: var(--agrd-muted); font-size: 12px; }
.agrd-row__qty input { width: 70px; height: 26px; border: 1px solid #aaa; border-radius: 3px; text-align: center; font-size: 14px; background: #fff; box-sizing: border-box; }
.agrd-row__buy button { width: 34px; height: 26px; border: 0; border-radius: 3px; background: var(--agrd-yellow); cursor: pointer; position: relative; }
.agrd-row__buy button:before { content: ''; position: absolute; left: 9px; top: 7px; width: 14px; height: 9px; border: 2px solid #fff; border-top: 0; border-radius: 0 0 3px 3px; box-sizing: border-box; }
.agrd-row__buy button:after { content: ''; position: absolute; left: 6px; top: 5px; width: 4px; height: 2px; background: #fff; }
.agrd-row__buy button:hover { background: #d6c13a; }
.agrd-row__label { display: none; }
.agrd-wholesale { color: var(--agrd-muted); font-size: 12px; }

/* Вид «плитка» */
.agrd-products.view-grid .agrd-products__head { display: none; }
.agrd-products.view-grid .agrd-products__body { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding-top: 12px; }
.agrd-products.view-grid .agrd-row { display: flex; flex-direction: column; align-items: stretch; background: #fff; border: 0; border-radius: 4px; padding: 14px; gap: 6px; }
.agrd-products.view-grid .agrd-row__img { order: -1; }
.agrd-products.view-grid .agrd-row__img img { width: 100%; height: 150px; }
.agrd-products.view-grid .agrd-row__code { font-size: 11px; color: var(--agrd-muted); }
.agrd-products.view-grid .agrd-row__name { padding: 0; min-height: 54px; }
.agrd-products.view-grid .agrd-row__price { font-size: 18px; }
.agrd-products.view-grid .agrd-row__wholesale:empty { display: none; }
.agrd-products.view-grid .agrd-row__qty { display: flex; gap: 6px; }

/* Пагинация */
.agrd-pagination-wrap { display: flex; justify-content: center; margin: 40px 0 50px; }
.agrd-pagination { display: flex; list-style: none; margin: 0; padding: 0; border: 1px solid var(--agrd-border-green); border-radius: 3px; background: #fff; overflow: hidden; font-size: 12px; }
.agrd-pagination li { border-left: 1px solid #ddd; }
.agrd-pagination li:first-child { border-left: 0; }
.agrd-pagination a, .agrd-pagination span { display: block; min-width: 23px; padding: 6px 7px; text-align: center; box-sizing: border-box; }
.agrd-pagination .wide a, .agrd-pagination .wide span { padding: 6px 18px; }
.agrd-pagination .active span { background: var(--agrd-red); color: #fff; font-weight: 700; }
.agrd-pagination .disabled span { color: #bbb; }

/* ---------- Карточка товара ---------- */
.agrd-product__meta { display: flex; flex-wrap: wrap; gap: 0 15px; font-size: 12px; margin: -10px 0 30px; }
.agrd-product__meta .out { color: var(--agrd-muted); }
.agrd-product { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.agrd-gallery__main { display: block; background: #fff; border-radius: 4px; text-align: center; padding: 20px; min-height: 260px; }
.agrd-gallery__main img { max-height: 500px; }
.agrd-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.agrd-gallery__thumbs a { display: block; background: #fff; border-radius: 4px; padding: 4px; }
.agrd-gallery__thumbs img { width: 70px; height: 70px; object-fit: contain; display: block; }
.agrd-gallery__empty { min-height: 290px; }
.agrd-price { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 0; }
.agrd-price__value { font-size: 28px; }
.agrd-price__old { font-size: 16px; text-decoration: line-through; color: var(--agrd-muted); margin-left: 10px; }
.agrd-price__fav { width: 37px; height: 37px; border: 1px solid #888; border-radius: 50%; background: transparent; cursor: pointer; position: relative; }
.agrd-price__fav:before { content: '\2661'; font-size: 20px; line-height: 35px; color: #888; }
.agrd-price__fav:hover:before { color: var(--agrd-red); }
.agrd-discount { display: flex; align-items: center; gap: 15px; font-size: 12px; padding: 22px 0 28px; border-bottom: 1px solid #c8c8c6; }
.agrd-discount__icon { width: 26px; height: 26px; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.agrd-discount a { border-bottom: 1px dotted #000; }
.agrd-discount-table { font-size: 13px; margin-top: 10px; }
.agrd-buy { display: flex; align-items: center; gap: 20px; padding: 40px 0; border-bottom: 1px solid #c8c8c6; flex-wrap: wrap; }
.agrd-buy__qty { width: 60px; height: 38px; border: 1px solid #aaa; border-radius: 4px; text-align: center; font-size: 16px; }
.agrd-btn { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 4px; border: 0; font-size: 18px; cursor: pointer; font-family: inherit; line-height: 1; text-decoration: none; }
.agrd-btn--buy { background: var(--agrd-yellow); color: #fff !important; }
.agrd-btn--buy:hover { background: #d6c13a; }
.agrd-btn--outline { background: #fff; border: 1px solid #000; color: #000 !important; }
.agrd-btn--outline:hover { background: #f4f4f4; }
.agrd-btn--small { height: 32px; font-size: 14px; }
.agrd-btn--block { display: flex; width: 100%; }
.agrd-terms { padding: 25px 0; border-bottom: 1px solid #c8c8c6; }
.agrd-terms__tabs { display: flex; gap: 20px; margin-bottom: 16px; }
.agrd-terms__tabs button { font-size: 16px; font-weight: 700; border: 0; background: none; padding: 0; cursor: pointer; color: #000; border-bottom: 2px solid transparent; }
.agrd-terms__tabs button.active { border-bottom-color: #000; }
.agrd-terms__pane { display: none; font-size: 14px; line-height: 30px; }
.agrd-terms__pane.active { display: block; }
.agrd-specs { padding: 25px 0; }
.agrd-specs table { border-collapse: collapse; font-size: 13px; }
.agrd-specs td { padding: 6px 30px 6px 0; vertical-align: top; }
.agrd-specs td:first-child { color: var(--agrd-muted); font-size: 12px; min-width: 138px; }
.agrd-description { font-size: 14px; line-height: 1.5; padding: 0 0 25px; }
.agrd-reviews { margin-top: 30px; border-top: 1px solid #c8c8c6; padding-top: 20px; }
.agrd-reviews h3 { font-size: 16px; }
.agrd-reviews .form-control { border-radius: 3px; border: 1px solid #ccc; }
.agrd-reviews .btn-primary { background: var(--agrd-yellow); border: 0; color: #fff; font-size: 18px; padding: 6px 16px; }
.agrd-related { margin-top: 40px; }

/* ---------- Информационные страницы ---------- */
.agrd-page { background: transparent; font-size: 14px; line-height: 1.55; margin-bottom: 50px; max-width: 1000px; }
.agrd-page img { height: auto; border-radius: 4px; }
.agrd-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.agrd-contacts__block { margin-bottom: 20px; }
.agrd-contacts__label { color: var(--agrd-muted); font-size: 12px; margin-bottom: 4px; }

/* ---------- Подвал ---------- */
.agrd .agrd-footer { border-top: 4px solid #000; margin-top: 30px; padding: 30px 0 40px; font-size: 12px; background: var(--agrd-bg); color: #000; }
.agrd .agrd-footer a { color: #000; }
.agrd .agrd-footer a:hover { color: var(--agrd-red); }
.agrd-footer__grid { display: grid; grid-template-columns: 440px 220px 220px 215px 1fr; }
.agrd-footer__logo img { width: 165px; display: block; margin-bottom: 30px; }
.agrd-footer__copy { font-size: 12px; margin-bottom: 20px; line-height: 16px; }
.agrd-footer__pay img { height: 20px; margin-top: 8px; }
.agrd-footer__heading { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.agrd-footer__list { list-style: none; padding: 0; margin: 0; }
.agrd-footer__list li { margin-bottom: 8px; }
.agrd-footer__list a { font-size: 13px; border-bottom: 1px solid var(--agrd-line); }
.agrd-footer__contacts li { margin-bottom: 12px; font-size: 13px; }
.agrd-footer__address { font-size: 12px; line-height: 16px; margin: 30px 0 6px; }
.agrd-footer__address + a { font-size: 12px; }
.agrd-footer__email { margin-top: 12px; }

/* ---------- Всплывающие окна ---------- */
.agrd-popup { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1100; display: none; align-items: center; justify-content: center; }
.agrd-popup.open { display: flex; }
.agrd-popup__box { background: #fff; border-radius: 5px; width: 360px; max-width: calc(100vw - 30px); padding: 30px; position: relative; }
.agrd-popup__close { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 26px; cursor: pointer; line-height: 1; }
.agrd-popup__title { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.agrd-popup input[type=text], .agrd-popup input[type=tel] { width: 100%; height: 36px; border: 1px solid #aaa; border-radius: 4px; padding: 0 10px; margin-bottom: 12px; box-sizing: border-box; font-size: 14px; }
.agrd-popup .agrd-error { color: var(--agrd-red); font-size: 12px; margin: -8px 0 10px; }
.agrd-popup .agrd-success { color: #2a7d2e; }

/* ---------- Совместимость со стандартными страницами OpenCart (корзина, оформление, кабинет) ---------- */
.agrd #alert { z-index: 1200; }
.agrd .btn-primary { background: var(--agrd-yellow); background-image: none; border-color: var(--agrd-yellow); color: #fff; text-shadow: none; box-shadow: none; }
.agrd .btn-primary:hover, .agrd .btn-primary:focus, .agrd .btn-primary:active { background: #d6c13a; background-image: none; border-color: #d6c13a; color: #fff; }
.agrd .btn-light, .agrd .btn-default { background-image: none; }
.agrd #content > h1, .agrd #content > h2 { font-size: 32px; font-weight: 400; }
.agrd .breadcrumb { font-size: 11px; background: none; padding: 0; margin: 0 0 14px; }
.agrd .breadcrumb a { color: var(--agrd-muted); }
.agrd .card { border-radius: 4px; }
.agrd .table { background: #fff; }
.agrd main { min-height: 300px; }
.agrd #content { min-height: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 1200px) {
  .agrd-header { grid-template-columns: 210px 1fr 190px auto; }
  .agrd-menu__link { font-size: 13px; padding-left: 6px; padding-right: 6px; }
  .agrd-footer__grid { grid-template-columns: 1fr 1fr 1fr; gap: 25px; }
  .agrd-products__head, .agrd-row { grid-template-columns: 110px 44px minmax(160px, 1fr) 100px 95px 0 90px 44px; }
  .agrd-row__wholesale, .agrd-products__head .agrd-row__wholesale { overflow: hidden; }
}
@media (max-width: 992px) {
  .agrd .agrd-container, .agrd .container { padding: 0 15px; }
  .agrd-ribbon { font-size: 12px; padding: 4px 12px; line-height: 1.35; }
  .agrd-topbar__menu > a { display: none; }
  .agrd-lang { margin-left: 0; font-size: 13px; }
  .agrd-userbar__item { width: auto; padding: 0 7px; }
  .agrd-phones .agrd-phones__callback { margin-left: 0; }
  .agrd-brands { margin: 0 -15px 30px; padding: 25px 50px; }
  .agrd-cat-controls { flex-wrap: wrap; max-width: 100%; gap: 10px 20px; }
  .agrd-sort { flex-wrap: wrap; max-width: 100%; }
  .agrd-sort__group { max-width: 100%; overflow-x: auto; }
  .agrd-side__toggle { display: flex !important; }
  .agrd-side:not(.open) .agrd-side__body { display: none; }
  .agrd-topbar { height: auto; flex-wrap: wrap; padding: 6px 0; gap: 6px; }
  .agrd-userbar__login { margin-left: 10px; }
  .agrd-header { grid-template-columns: 1fr auto; gap: 12px; }
  .agrd-phones { padding-left: 0; gap: 0 18px; }
  .agrd-phones__callback { margin-left: 0; }
  .agrd-header__center { grid-column: 1 / -1; order: 3; }
  .agrd-search { margin-right: 0; }
  .agrd-timetable { display: none; }
  .agrd-menu { height: auto; flex-wrap: wrap; }
  .agrd-menu__item { flex: 1 1 33%; }
  .agrd-menu__item + .agrd-menu__item { box-shadow: none; }
  .agrd-menu__link { border-radius: 0 !important; }
  .agrd-mega { top: 100%; max-height: 70vh; overflow: auto; }
  .agrd-mega__cols { grid-template-columns: repeat(2, 1fr); }
  .agrd-catalog { grid-template-columns: 1fr; }
  .agrd-product { grid-template-columns: 1fr; }
  .agrd-blog__track { grid-template-columns: repeat(2, 1fr); }
  .agrd-tiles { grid-template-columns: repeat(2, 1fr); }
  .agrd-contacts { grid-template-columns: 1fr; }
  /* таблица превращается в карточки */
  .agrd-products__head { display: none; }
  .agrd-row { grid-template-columns: 50px 1fr auto; grid-template-areas: "img name name" "img code stock" "img price buy"; row-gap: 4px; }
  .agrd-row__img { grid-area: img; }
  .agrd-row__name { grid-area: name; padding: 0; }
  .agrd-row__code { grid-area: code; font-size: 11px; color: var(--agrd-muted); }
  .agrd-row__stock { grid-area: stock; font-size: 12px; text-align: right; }
  .agrd-row__price { grid-area: price; font-weight: 700; }
  .agrd-row__wholesale { display: none; }
  .agrd-row__qty { grid-area: buy; justify-self: end; display: flex; gap: 6px; }
  .agrd-row__qty input { width: 50px; }
  .agrd-row__buy { display: none; }
  .agrd-row__qty .agrd-row__buy-inline { display: inline-block; }
}
@media (max-width: 576px) {
  .agrd h1 { font-size: 24px; }
  .agrd-sort > span, .agrd-view > span { display: none; }
  .agrd-userbar__item { padding: 0 4px; }
  .agrd-userbar__login { max-width: 120px; }
  .agrd-menu__item { flex: 1 1 50%; }
  .agrd-mega__cols { grid-template-columns: 1fr; }
  .agrd-tiles { grid-template-columns: 1fr; }
  .agrd-blog__track { grid-template-columns: 1fr; }
  .agrd-footer__grid { grid-template-columns: 1fr; }
  .agrd-cat-controls { flex-wrap: wrap; }
  .agrd-basket__drop { width: calc(100vw - 30px); }
}
.agrd-row__buy-inline { display: none; }
