/* =====================================================================
   AGROALEM — мобильная и планшетная версия.
   Подключается ПОСЛЕДНИМ (после style.css и shop.css), чтобы перебить
   макетные десктопные значения. Брейкпоинты: 1100 (планшет), 760 (телефон), 380 (узкий телефон).
   ===================================================================== */

/* базовое для всех размеров: элементы, которые видны только на мобильных */
.tabbar, .buybar, .header__tel, .nav__extra, .filters__top, .filters__apply { display: none; }

html { -webkit-tap-highlight-color: transparent; --gut: 16px; }
a, button, input, select, textarea, label { touch-action: manipulation; }

/* ---------------------------------------------------------------------
   ≤ 1100px: планшеты и телефоны
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
  /* липкая навигация: верхняя строка уезжает, строка с поиском остаётся */
  .header { display: contents; }
  .header__top { background: #fff; }
  .header__nav { position: sticky; top: 0; z-index: 90; background: #fff; }
  .header__tel { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 128, 0, .08); }
  .header__right { gap: 10px; }
  .header__login { width: 40px; height: 40px; justify-content: center; gap: 0; }
  .header__login #loginLabel { display: none; }
  .header__login img { width: 24px; height: 24px; }

  /* бургер → крестик */
  .burger { width: 44px; height: 44px; margin: 0 -8px 0 0; align-items: center; gap: 5px; }
  .burger span { width: 22px; transition: transform .2s, opacity .2s; }
  body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .burger span:nth-child(2) { opacity: 0; }
  body.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* выпадающее меню */
  .nav { max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; }
  .nav a { font-size: 16px; line-height: 22px; }
  .nav__extra { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
  .nav .nav__tel { border: 0; padding: 6px 4px; font-weight: 700; color: var(--green); }
  .nav .nav__tel--2 { font-weight: 500; color: var(--ink); padding-top: 0; }
  .nav__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
  .nav .nav__btns .btn { display: inline-flex; height: 47px; padding: 0 12px; border-width: 1px; border-radius: 8px; font-size: 15px; }
  .nav .nav__btns .btn--green { border-color: var(--green); }

  /* фильтры каталога — выезжающая панель на весь экран */
  .filters-toggle { display: flex; position: sticky; top: 56px; z-index: 30; background: #fff; box-shadow: 0 6px 14px rgba(26, 26, 37, .08); }
  .filters { display: none; }
  body.filters-open { overflow: hidden; }
  /* шторка снизу: занимает ~62% высоты (верхний край чуть выше середины экрана), фон затемнён */
  body.filters-open::after { content: ''; position: fixed; inset: 0; z-index: 240; background: rgba(0, 0, 0, .45); animation: fade-in .2s ease-out; }
  body.filters-open .filters {
    display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 250; width: 100%; max-width: none;
    height: 62vh; height: 62dvh; padding: 0 16px calc(84px + env(safe-area-inset-bottom)); background: #fff;
    border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); overflow-y: auto; overscroll-behavior: contain; animation: sheet-up .25s ease-out;
  }
  .filters__top { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; margin: 0 -16px 8px; padding: 18px 16px 10px; background: #fff; border-bottom: 1px solid var(--line); border-radius: 18px 18px 0 0; font-size: 18px; }
  .filters__top::before { content: ''; position: absolute; left: 50%; top: 7px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(133, 143, 164, .4); }
  .filters__close { width: 40px; height: 40px; margin-right: -8px; border-radius: 50%; font-size: 18px; color: var(--gray); }
  .filters__apply { display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 3; height: 52px; box-shadow: 0 8px 24px rgba(0, 128, 0, .35); }
  body:not(.filters-open) .filters__apply { display: none; }
  .tree__row { min-height: 44px; }
  .check { padding: 9px 0; font-size: 15px; }
  .check i { width: 18px; height: 18px; border-radius: 4px; }
  .check input:checked + i::after { left: 5px; top: 1px; width: 4px; height: 9px; }
  .range-inputs input { height: 44px; font-size: 16px; }
  .dual input[type=range]::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -3px; }
  .dual input[type=range]::-moz-range-thumb { width: 18px; height: 18px; }
  .filters .btn--outline-green { height: 46px; }

  /* страница товара */
  .p-buy__row .btn { max-width: none; }
  .product { gap: 28px; }
}

/* ---------------------------------------------------------------------
   ≤ 760px: телефоны
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
  body { font-size: 15px; line-height: 21px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* шапка */
  .header__top-in { height: 56px; padding-top: 8px; padding-bottom: 8px; }
  .logo img { height: 36px; }
  .header__nav { border-top: 0; }
  .header__nav-in { height: 56px; padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .header__nav-left { flex: 1; min-width: 0; gap: 0; }
  .btn--catalog, .header__actions .hico { display: none; }
  .header__actions { gap: 0; }

  /* поиск всегда виден как поле */
  .search { flex: 1; min-width: 0; width: auto; height: 40px; margin: 0; padding: 0; border: 0; }
  .search__btn { position: absolute; left: 12px; top: 10px; z-index: 1; width: 20px; height: 20px; pointer-events: none; }
  .search__input, .search.is-open .search__input {
    width: 100%; opacity: 1; height: 40px; margin: 0; padding: 0 12px 0 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 16px;
  }
  .search__input:focus { background: #fff; border-color: var(--green); }
  .search__drop { position: fixed; left: 8px; right: 8px; top: 108px; width: auto; max-width: none; max-height: 60vh; overflow-y: auto; }
  .sd { padding: 12px 14px; }

  /* нижняя навигация */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(26, 26, 37, .06); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .tb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 58px; color: var(--gray); font-size: 10px; line-height: 12px; font-weight: 500; }
  .tb__ico { position: relative; display: block; width: 24px; height: 24px; }
  .tb .count { top: -5px; right: -9px; left: auto; width: auto; min-width: 12px; height: 12px; padding: 0 2px; font-size: 9px; line-height: 12px; border-width: 1.5px; }
  .page-home .tb--home, .page-catalog .tb--catalog, .page-product .tb--catalog, .page-favorites .tb--favorites, .page-cart .tb--cart, .page-checkout .tb--cart { color: var(--green); }
  .page-home .tb--home span, .page-catalog .tb--catalog span, .page-product .tb--catalog span, .page-favorites .tb--favorites span, .page-cart .tb--cart span, .page-checkout .tb--cart span { font-weight: 700; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); width: max-content; text-align: center; }

  /* липкая панель покупки на странице товара */
  .buybar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; position: fixed; left: 0; right: 0; z-index: 110;
    bottom: calc(58px + env(safe-area-inset-bottom)); padding: 10px 16px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(26, 26, 37, .08);
  }
  .buybar b { font-size: 20px; line-height: 24px; white-space: nowrap; }
  .buybar .btn { flex: 1; max-width: 220px; height: 46px; }

  /* ---------- главная ---------- */
  .home { gap: 36px; padding-top: 12px; padding-bottom: 24px; }
  .hero { gap: 12px; }
  .hero__main { min-height: 370px; padding: 22px 18px 20px; border-radius: 14px; }
  .hero__body h1 { font-size: 28px; line-height: 32px; margin-bottom: 14px; }
  .hero__body p { font-size: 15px; line-height: 22px; }
  .hero__btns { width: 100%; }
  .hero__btns .btn { width: 100%; height: 50px; }
  .hero__promo { min-height: 0; height: 0; padding-bottom: 82%; background-position: left center; border-radius: 14px; }
  .section { gap: 20px; }
  .section__head { min-height: 0; }
  .section__head h2 { font-size: 22px; line-height: 26px; }
  .tabs { margin-right: calc(var(--gut) * -1); padding-right: var(--gut); gap: 18px; align-items: baseline; }
  .tabs .tab { font-size: 16px; line-height: 22px; padding: 6px 0; }
  .tabs .tabs__title { font-size: 22px; line-height: 26px; }
  .cat-grid { gap: 10px; }
  .cat { border-radius: 12px; }
  .cat__img { flex-basis: 0; aspect-ratio: 4 / 3; }
  .cat__name { padding: 10px 12px; font-size: 13px; line-height: 17px; }
  .cat-cta { height: 76px; border-radius: 12px; }

  /* карусель хитов: одна лента, лёгкий «подглядывающий» край */
  .hits { grid-template-rows: auto; grid-auto-columns: 64%; gap: 12px; margin-right: calc(var(--gut) * -1); padding-right: var(--gut); scroll-padding-left: 0; -webkit-overflow-scrolling: touch; }

  .about { padding: 0; gap: 24px; }
  .about h2 { font-size: 24px; line-height: 30px; }
  .about__text { gap: 22px; }
  .about p { font-size: 15px; line-height: 22px; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
  .stats > div, .stats > div:first-child { padding: 0 0 0 12px; border: 0; border-left: 1px solid var(--line-soft); }
  .stats > div:first-child { padding-left: 0; border-left: 0; }
  .stats b { font-size: 26px; line-height: 30px; }
  .stats span { white-space: normal; font-size: 12px; line-height: 15px; }
  .about__text .btn { width: 100%; }
  /* карта целиком по ширине экрана, подписи уменьшаются вместе с ней */
  .about__map { display: block; overflow: visible; margin: 0; padding: 0; }
  .map { width: 100%; max-width: none; }
  .map__lbl { font-size: max(7px, 2.1cqw); letter-spacing: -.03em; }
  .map__dot { min-width: 7px; min-height: 7px; }

  .features { gap: 10px; }
  .feat, .feat:first-child, .feat:last-child, .feat--active { flex: none; width: 100%; border-radius: 14px; gap: 14px; padding: 22px 18px; align-items: flex-start; text-align: left; }
  .feat > img { width: 36px; height: 36px; }
  .feat--active .btn { width: 100%; }
  .cta { min-height: 0; padding: 26px 18px; gap: 24px; border-radius: 14px; }
  .cta__body { gap: 14px; }
  .cta__body h2 { font-size: 26px; line-height: 30px; }
  .cta__body p { font-size: 15px; line-height: 22px; }
  .cta .btn { width: 100%; align-self: stretch; height: 50px; }

  /* ---------- карточка товара в списках ---------- */
  .grid--3, .grid--4 { gap: 10px; }
  .card { border-radius: 12px; }
  .card__media { padding: 10px; }
  .badge { width: 26px; height: 26px; font-size: 8px; line-height: 10px; margin-left: -5px; }
  .badge svg { width: 12px; height: 12px; }
  .card__tools { top: 8px; right: 8px; gap: 6px; }
  .icon-btn { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(26, 26, 37, .15); opacity: 1; }
  .icon-btn img { width: 16px; height: 16px; }
  .card__body { padding: 12px 12px 14px; }
  .card__info { gap: 8px; padding-bottom: 10px; }
  .card__info > .card__stock + .card__title, .card__title { margin-top: 0; }
  .card__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; line-height: 18px; min-height: 36px; }
  .card__props { display: none; }
  .card__stock { font-size: 11px; line-height: 13px; }
  .rating span { font-size: 11px; }
  .price b { font-size: 16px; line-height: 20px; }
  .price s { font-size: 12px; line-height: 16px; }
  .price__ph { height: 16px; }
  .card__buy { gap: 8px; }
  .card__buy .btn { height: 42px; font-size: 14px; }
  .card__buy .btn img { width: 20px; height: 20px; }

  /* ---------- шапка страниц ---------- */
  .crumbs { padding-top: 14px; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 8px; font-size: 13px; scrollbar-width: none; margin-right: calc(var(--gut) * -1); padding-right: var(--gut); }
  .crumbs::-webkit-scrollbar { display: none; }
  .crumbs > * { flex: none; }
  .page-head--simple .crumbs { padding-top: 14px; }
  .page-head h1, .page-head--product h1, .page-head--simple h1 { font-size: 24px; line-height: 29px; padding: 12px 0 14px; }
  .page-head__row { padding: 0 0 12px; gap: 0; }
  .page-head__row h1 { padding-bottom: 10px; }
  .sort { width: calc(100% + var(--gut) * 2); margin: 0 calc(var(--gut) * -1); padding: 0 var(--gut) 2px; flex-wrap: nowrap; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .sort::-webkit-scrollbar { display: none; }
  .sort__item { flex: none; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; font-size: 13px; white-space: nowrap; }
  .sort__item svg { display: none; }
  .sort__item.is-active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }

  /* каталог, избранное */
  .catalog, .listpage { padding-top: 16px; padding-bottom: 28px; }
  .catalog { gap: 12px; }
  .catalog__main { width: 100%; }
  .more { margin-top: 20px; }
  .more__btn { padding: 12px 24px; border: 1px solid var(--green); border-radius: 10px; }
  .pager a, .pager span { min-width: 36px; height: 36px; }
  .empty { padding: 36px 16px; border-radius: 14px; }

  /* ---------- страница товара ---------- */
  .product { padding-top: 12px; padding-bottom: 24px; gap: 20px; }
  .p-top { gap: 20px; }
  .p-gallery { gap: 10px; margin: 0 calc(var(--gut) * -1); }
  .p-gallery__main { border-left: 0; border-right: 0; }
  .p-gallery__thumbs { height: 60px; justify-content: flex-start; gap: 8px; overflow-x: auto; padding: 0 var(--gut); scrollbar-width: none; }
  .p-gallery__thumbs::-webkit-scrollbar { display: none; }
  .p-arrow { display: none; }
  .thumb { flex: none; width: 60px; height: 60px; border-radius: 6px; }
  .p-info { gap: 18px; }
  .p-info__head { gap: 12px; }
  .p-brand { width: 120px; height: 44px; }
  .p-brand--text { font-size: 24px; line-height: 44px; }
  .p-flags { gap: 8px; }
  .p-cols { gap: 18px; }
  .p-meta { gap: 16px; }
  .p-meta__acts { gap: 8px; flex-wrap: wrap; font-size: 14px; }
  .link-ico { gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
  .p-props { font-size: 15px; line-height: 22px; }
  .p-buy__box { padding: 20px 16px 16px; border-radius: 12px; }
  .p-price b { font-size: 28px; line-height: 32px; }
  .p-price s { font-size: 18px; line-height: 22px; }
  .p-buy__row { gap: 12px; }
  .qty { gap: 6px; }
  .qty button { width: 36px; height: 36px; font-size: 18px; }
  .qty span { width: 26px; }
  .p-buy__row .btn { height: 50px; font-size: 15px; }
  .p-install { display: block; padding: 6px 0; text-align: left; }
  .p-soc { justify-content: flex-start; }
  .p-ship { grid-template-columns: 1fr; gap: 20px; padding: 18px 16px; border-radius: 12px; }
  .p-ship__col { padding-right: 0; }
  .help { display: none; }

  .acc { padding: 4px 16px; border-radius: 12px; }
  .acc__head { min-height: 56px; cursor: pointer; }
  .acc__head h2 { font-size: 18px; line-height: 22px; }
  .acc__toggle { width: 36px; height: 36px; }
  .acc__toggle::before { left: 13px; top: 13px; }
  .acc__body { margin: 4px 0 16px; }
  .text p { font-size: 15px; line-height: 23px; margin-bottom: 14px; }
  .slider { height: 220px; }
  .slider__btn { width: 40px; height: 40px; margin-top: -20px; }
  .specs { font-size: 13px; line-height: 18px; border-radius: 10px; }
  .specs td { padding: 11px 12px; width: auto; }
  .specs td:first-child { width: 45%; color: var(--gray); }
  .review__rates { gap: 6px 16px; }
  .review__reply { padding-left: 0; }
  .reviews__list { gap: 32px; }
  .rform { margin-top: 28px; gap: 16px; }
  .rform h3 { font-size: 20px; line-height: 24px; }
  .rform__rates { flex-wrap: wrap; gap: 10px 20px; }
  .rform input[type=text], .rform input[type=tel], .rform input[type=email], .rform textarea { padding: 12px; font-size: 16px; border-radius: 8px; }
  .captcha { width: 100%; }
  .stars--input img { width: 20px; height: 20px; }

  /* ---------- корзина ---------- */
  .cart { padding-top: 16px; padding-bottom: 28px; gap: 16px; }
  .cart__list { width: 100%; gap: 10px; }
  .crow { padding: 12px; gap: 10px 12px; border-radius: 14px; align-items: start; }
  .crow__title { font-size: 15px; line-height: 19px; }
  .crow__del { width: 36px; height: 36px; margin: -6px -6px 0 0; }
  .crow .qty { align-self: center; }
  .crow__price { align-self: center; }
  .crow__price b { font-size: 17px; }
  .cart__box { padding: 18px 16px; border-radius: 14px; }
  .cart__box h3 { font-size: 20px; }
  .cart__total b { font-size: 22px; }
  .radio { min-height: 40px; }
  .radio i { width: 20px; height: 20px; }
  .radio input:checked + i::after { inset: 4px; }
  .form .btn[type=submit], #orderBtn { height: 52px; font-size: 16px; }
  .done { padding: 40px 16px; border-radius: 14px; }

  /* поля форм ≥16px, чтобы iOS не приближал страницу при фокусе */
  .form input[type=text], .form input[type=tel], .form input[type=email], .form textarea { padding: 13px 12px; font-size: 16px; border-radius: 8px; }

  /* ---------- инфо-страницы, 404 ---------- */
  .info { padding-top: 16px; padding-bottom: 28px; }
  .info__body { padding: 18px 16px; border-radius: 14px; }
  .info__body h2 { font-size: 20px; line-height: 26px; margin-top: 22px; }
  .info__body p, .info__body li { font-size: 15px; line-height: 24px; }
  .info__body .lead { font-size: 16px; line-height: 25px; }
  .info-stats { gap: 20px; flex-wrap: wrap; }
  .info-stats b { font-size: 26px; line-height: 30px; }
  .info__body .btn { width: 100%; }
  .notfound { padding: 56px 16px; }
  .notfound b { font-size: 88px; }
  .notfound h1 { font-size: 24px; }
  .notfound__btns { flex-direction: column; width: 100%; }
  .notfound__btns .btn { width: 100%; }

  /* ---------- модальные окна → нижняя шторка ---------- */
  .modal { align-items: end; padding: 0; }
  .modal__box { max-width: none; padding: 24px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; max-height: 92vh; overflow-y: auto; animation: sheet-up .25s ease-out; }
  .modal__box h3 { font-size: 22px; }
  .modal__box--auth { padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); }
  .modal__box--auth::before { height: 4px; }
  .auth__brand { margin: 2px 0 16px; }
  .modal__box--auth .field__in input { height: 50px; font-size: 16px; padding: 0 14px 0 44px; }
  .modal__box--auth .field__in input[type=password], .modal__box--auth .field__in input[data-pw] { padding-right: 46px; }
  .modal__close { right: 8px; top: 8px; width: 40px; height: 40px; }
  .form__row { flex-direction: column; }
  .form .btn { height: 50px; }
  .subcat__box { grid-template-columns: 1fr 1fr; padding: 16px; gap: 10px; max-height: 90vh; overflow-y: auto; }

  /* ---------- футер ---------- */
  .footer { margin-top: 24px; padding: 36px 0 24px; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 28px 16px; padding-top: 0; }
  .footer__col { gap: 4px; }
  .footer__col h4 { margin-bottom: 8px; }
  .footer__col a { font-size: 14px; line-height: 20px; padding: 6px 0; }
  .footer__contacts { grid-column: 1 / -1; }
  .footer__contacts > a { margin-bottom: 4px; }
  .footer .footer__small { margin: 4px 0 18px; padding: 8px 0; }
  .footer__line { margin: 24px 0; }
  .footer__bottom { gap: 22px; }
  .footer__brand p { margin-top: 14px; font-size: 13px; }
  .footer__soc { margin-right: 0; gap: 12px; }
  .footer__soc a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; }
  .footer__pay { gap: 14px 18px; }
  .footer__pay img { height: 28px; width: auto; }
}

/* ---------------------------------------------------------------------
   ≤ 380px: узкие телефоны
   --------------------------------------------------------------------- */
@media (max-width: 380px) {
  html { --gut: 12px; }
  .container { padding-left: 12px; padding-right: 12px; }
  .hero__body h1 { font-size: 25px; line-height: 29px; }
  .hits { grid-auto-columns: 72%; }
  .card__body { padding: 10px 10px 12px; }
  .card__buy .btn { font-size: 13px; padding: 0 8px; }
  .cat__name { font-size: 12px; }
  .tb { font-size: 9px; }
  .stats b { font-size: 22px; }
  .footer__cols { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   планшет 761–1100: чуть плотнее сетки
   --------------------------------------------------------------------- */
@media (max-width: 1100px) {
  /* вкладки «Хит товары…» не растягивают страницу */
  .section__head { gap: 16px; min-width: 0; }
  .section__head .tabs { flex: 1; min-width: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .section__head .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab, .tabs__title { flex: none; white-space: nowrap; }
  /* футер: нижняя строка переносится */
  .footer__bottom { flex-wrap: wrap; gap: 24px 32px; }
  .footer__brand { width: auto; flex: 1 1 280px; }
  .footer__pay { flex-wrap: wrap; gap: 14px 24px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .cat-cta { grid-column: span 1; }
  .card__props { display: none; }
  /* планшет: герой и акционный баннер рядом, как на десктопе */
  .hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; height: 440px; }
  .hero__main { min-height: 0; padding: 36px; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero__promo { min-height: 0; height: auto; background-position: 18% center; }
  .p-gallery { max-width: 560px; margin: 0 auto; }
  .catalog { gap: 16px; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------
   исправления телефона: футер и фото категорий
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
  /* фото категорий на главной (раньше высота схлопывалась до 1px) */
  .cat__img { flex: none; width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .cat { height: auto; }
  /* нижняя часть футера: по центру, без пустого поля */
  .footer__bottom { align-items: center; text-align: center; gap: 20px; }
  .footer__brand { flex: none; width: 100%; display: flex; flex-direction: column; align-items: center; }
  .footer__brand p { margin-top: 12px; }
  .footer__soc { justify-content: center; width: 100%; }
  .footer__pay { justify-content: center; align-items: center; width: 100%; gap: 14px 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .footer__pay img { height: 26px; width: auto; max-width: 30%; object-fit: contain; }
  .footer__pay img[alt="Kaspi"] { height: 24px; }
  .footer__pay img[alt="PayPal"] { height: 18px; }
}

/* ---------------------------------------------------------------------
   ноутбуки 1101–1439: страница товара подстраивается под ширину
   --------------------------------------------------------------------- */
@media (min-width: 1101px) and (max-width: 1439px) {
  .p-top { gap: 40px; }
  .p-gallery { flex: 0 0 min(577px, 44%); min-width: 0; }
  .p-gallery__main { width: 100%; height: auto; aspect-ratio: 1; }
  .p-buy { min-width: 0; }
}
@media (min-width: 1101px) and (max-width: 1279px) {
  .p-cols { flex-direction: column; }
  .p-meta { flex: none; }
}
