/* =========================================================
   ТОК-МАРКЕТ — единый рабочий stylesheet
   OpenCart 3.x / default theme
   Шапка сохранена в утверждённом виде.
   Главная, каталог, карточки, бренды и mobile оптимизированы.
   ========================================================= */

:root {
  --tm-red: #8f0508;
  --tm-red2: #b30b0f;
  --tm-red-dark: #650004;
  --tm-gold: #f6b700;
  --tm-gold2: #ffca35;
  --tm-cream: #fbf5ec;
  --tm-paper: #fff;
  --tm-text: #1b1b1b;
  --tm-muted: #666;
  --tm-border: #eadfd2;
  --tm-shadow: 0 5px 18px rgba(82, 22, 8, .10);
}

html { scroll-behavior: smooth; }
body {
  color: var(--tm-text);
  background: #fff;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--tm-red); }
a:hover, a:focus { color: var(--tm-red2); }
.container {
  width: calc(100% - 56px);
  max-width: 1560px;
}

/* =========================================================
   ШАПКА — утверждённая версия
   ========================================================= */

.tm-final-top,
.tm-final-header,
.tm-final-menu-wrap {
  font-family: 'Open Sans', Arial, sans-serif;
}

.tm-final-top {
  min-height: 44px !important;
  margin: 0 !important;
  border: 0 !important;
  background: linear-gradient(90deg, #8f0508 0%, #b30b0f 52%, #760004 100%) !important;
}
.tm-final-top__inner {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.tm-final-top__contacts,
.tm-final-top__social {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
}
.tm-final-top a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: #fff !important;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}
.tm-final-top a:hover { background: rgba(255, 255, 255, .07); }
.tm-final-top .fa {
  color: var(--tm-gold);
  font-size: 16px;
}
.tm-msg--telegram .fa,
.tm-msg--wa .fa {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: #fff !important;
  font-size: 14px;
}
.tm-msg--telegram .fa { background: #229ed9; }
.tm-msg--wa .fa { background: #25d366; }
.tm-msg--max img {
  display: block;
  width: 23px;
  height: 23px;
  border-radius: 6px;
  object-fit: contain;
}

.tm-final-header {
  background: #fff;
  border-bottom: 1px solid #eee7df;
}
.tm-final-header__main {
  display: grid !important;
  grid-template-columns: 360px minmax(320px, 1fr) 205px 205px !important;
  gap: 16px !important;
  align-items: center !important;
  padding: 12px 0 !important;
}
.tm-final-logo {
  display: block;
  width: 360px;
  max-width: 100%;
  height: 92px;
  overflow: hidden;
  border-radius: 2px;
  text-decoration: none !important;
}
.tm-final-logo img {
  display: block !important;
  width: 100% !important;
  height: 92px !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
}
.tm-final-search {
  min-width: 0;
  margin: 0 !important;
}
.tm-final-search #search,
.tm-final-search #search .input-group {
  width: 100%;
  margin: 0;
}
.tm-final-search #search input {
  height: 48px;
  padding: 0 16px;
  border: 1px solid #d8d2cb;
  border-radius: 5px 0 0 5px;
  box-shadow: none;
  font-size: 15px;
}
.tm-final-search #search button {
  height: 48px;
  min-width: 68px;
  padding: 0 20px;
  color: #241400;
  border-color: #e3a000;
  border-radius: 0 5px 5px 0;
  background: linear-gradient(#ffca35, #f3ad00);
  box-shadow: none;
  text-shadow: none;
  font-size: 17px;
}
.tm-final-sales {
  display: flex !important;
  min-height: 64px;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center;
  gap: 2px;
  margin: 0 !important;
  line-height: 1.2;
}
.tm-final-sales span {
  margin-bottom: 1px;
  color: #555;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
}
.tm-final-sales a {
  color: var(--tm-red) !important;
  font-size: 18px !important;
  line-height: 1.18;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
}
.tm-final-request {
  display: inline-flex !important;
  width: 100%;
  min-height: 48px !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 5px;
  color: #fff !important;
  background: linear-gradient(#b30b0f, #8a0004);
  box-shadow: 0 4px 12px rgba(120, 0, 0, .18);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
}
.tm-final-request:hover {
  background: linear-gradient(#c71418, #930004);
  box-shadow: 0 5px 15px rgba(120, 0, 0, .24);
}

.tm-final-benefits {
  display: grid !important;
  grid-template-columns: 1.28fr 1.14fr .96fr 1.08fr 1.12fr !important;
  margin: 0 0 10px !important;
  overflow: hidden;
  border: 1px solid var(--tm-border);
  border-radius: 8px;
  background: linear-gradient(90deg, #fffaf5, #faf1e8);
}
.tm-benefit {
  display: flex;
  min-height: 90px !important;
  align-items: center;
  gap: 13px !important;
  padding: 13px 18px !important;
  border-right: 1px solid #e7dbcd;
}
.tm-benefit:last-child { border-right: 0; }
.tm-benefit > i {
  flex: 0 0 38px;
  width: 38px;
  color: var(--tm-red2);
  font-size: 34px !important;
  text-align: center;
}
.tm-benefit b {
  display: block;
  margin: 0 0 4px;
  color: #171717;
  font-size: 14px !important;
  line-height: 1.28;
  font-weight: 800;
}
.tm-benefit span {
  display: block;
  color: #303030;
  font-size: 12px !important;
  line-height: 1.4;
}
.tm-marketplaces {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}
.tm-market {
  display: inline-flex !important;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 4px 11px !important;
  border-radius: 4px;
  color: #fff !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800;
  text-decoration: none !important;
}
.tm-market--ozon { background: #1769ff; }
.tm-market--wb { background: linear-gradient(90deg, #b312c4, #7f168f); }
.tm-market--avito {
  color: #111 !important;
  border: 1px solid #ddd;
  background: #fff;
}
.tm-market--avito:before {
  content: '●';
  margin-right: 4px;
  color: #20c36b;
  text-shadow: 7px -4px #1d7dff, 7px 4px #ef3b81, -1px 0 #7d42db;
}

/* =========================================================
   ВЕРХНЕЕ МЕНЮ
   ========================================================= */

.tm-final-menu-wrap { margin: 0 0 10px; }
.tm-final-menu {
  min-height: 50px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 5px;
  background: linear-gradient(180deg, #a0080c, #790004) !important;
  box-shadow: 0 3px 10px rgba(100, 0, 0, .18);
}
.tm-final-menu .navbar-collapse { padding: 0 !important; }
.tm-final-menu__items {
  display: flex !important;
  width: 100%;
  float: none !important;
  margin: 0 !important;
}
.tm-final-menu__items > li {
  flex: 1 1 0;
  border-right: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
}
.tm-final-menu__items > li:last-child { border-right: 0; }
.tm-final-menu__items > li > a {
  display: flex !important;
  min-height: 50px !important;
  align-items: center;
  justify-content: center;
  padding: 12px 8px !important;
  color: #fff !important;
  font-family: 'Open Sans', Arial, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.2;
  font-weight: 800 !important;
  letter-spacing: .1px;
  text-shadow: none !important;
  text-transform: uppercase;
}
.tm-final-menu__items > li > a:hover,
.tm-final-menu__items > li.active > a {
  background: linear-gradient(180deg, #c71519, #920306) !important;
}

/* =========================================================
   ГЛАВНАЯ / КАТАЛОГ
   ========================================================= */

.tm-home-final,
.tm-catalog-page {
  margin-top: 0;
  color: #242424;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
.tm-home-final h1,
.tm-home-final h2,
.tm-home-final h3,
.tm-catalog-page h1,
.tm-catalog-page h2,
.tm-catalog-page h3 {
  color: #232323;
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.25;
}
.tm-catalog-page h1,
.tm-catalog-page h2 {
  margin-top: 10px;
  margin-bottom: 18px;
  font-size: 28px;
}
.tm-home-final__row,
.tm-catalog-page > .row {
  display: flex;
  align-items: flex-start;
}
.tm-home-final__sidebar,
.tm-catalog-sidebar {
  position: sticky;
  top: 8px;
}
.tm-home-final__content { padding-left: 10px; }
.tm-catalog-sidebar { padding-right: 10px; }
.tm-catalog-page #content { padding-left: 10px; }

/* Каталог слева */
.tm-category-panel {
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #e6ddd3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(82, 22, 8, .08);
}
.tm-category-panel__title {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #181100;
  background: linear-gradient(90deg, #ffc51b, #f1a900);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .1px;
}
.tm-category-panel__list { background: #fff; }
.tm-category-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 15px;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  color: #222 !important;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none !important;
}
.tm-category-item:hover,
.tm-category-item.active { background: #fff8e5; }
.tm-category-item span { min-width: 0; }
.tm-category-item em {
  padding: 2px 7px;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: #555;
  background: #f8f8f8;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}
.tm-category-item .fa { color: #999; }
.tm-category-panel__all {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  color: #fff !important;
  background: linear-gradient(#a80c10, #810004);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
}

/* Верхний баннер — рассчитан на hero.jpg 1800x400 */
.tm-final-hero {
  display: block;
  width: 100%;
  max-height: 255px;
  aspect-ratio: 9 / 2;
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: 7px;
  background: #2c0506;
  box-shadow: 0 6px 20px rgba(65, 9, 4, .12);
}
.tm-final-hero img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 255px;
  object-fit: contain;
  object-position: center;
}

/* Полосы заголовков: Популярные товары / Бренды */
.tm-section-bar {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 16px;
  color: #191000;
  border-radius: 5px;
  background: linear-gradient(90deg, #f9bd00, #ffc52c);
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .1px;
  text-transform: uppercase;
}
.tm-section-bar span {
  display: flex;
  min-height: 44px;
  align-items: center;
}
.tm-section-bar span:after {
  content: '';
  width: 34px;
  height: 44px;
  margin-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .8);
  transform: skew(-34deg);
}
.tm-home-products { margin-bottom: 16px; }
.tm-featured-final { margin-bottom: 14px; }

/* =========================================================
   КАРТОЧКИ ТОВАРОВ — одинаковая высота
   ========================================================= */

.tm-product-row,
.tm-catalog-products,
.tm-catalog-products > .row {
  display: flex;
  flex-wrap: wrap;
}
.tm-product-row { margin: 0 -5px; }
.tm-product-row .product-layout,
.tm-catalog-products .product-layout {
  display: flex !important;
  margin-bottom: 12px;
}
.tm-product-row .product-layout { padding: 6px 5px; }

.tm-product-card,
.tm-catalog-products .product-thumb {
  display: flex;
  width: 100%;
  min-height: 348px;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e4e1dd;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(35, 24, 15, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tm-product-card:hover,
.tm-catalog-products .product-thumb:hover {
  transform: translateY(-2px);
  border-color: #dccfbe;
  box-shadow: 0 8px 20px rgba(65, 20, 8, .10);
}

.tm-product-card .image,
.tm-catalog-products .product-thumb .image {
  display: flex;
  width: 100%;
  height: 160px;
  flex: 0 0 160px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
  background: #fff;
}
.tm-product-card .image img,
.tm-catalog-products .product-thumb .image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tm-product-card .caption,
.tm-catalog-products .product-thumb .caption {
  display: flex;
  min-height: 112px;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 12px 12px 8px;
}
.tm-product-card h4,
.tm-catalog-products .product-thumb h4,
.tm-product-name {
  display: -webkit-box;
  min-height: 58px;
  margin: 0 0 8px !important;
  overflow: hidden;
  color: #242424;
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.tm-product-card h4 a,
.tm-catalog-products .product-thumb h4 a,
.tm-product-name a {
  color: #242424 !important;
  font-weight: 700 !important;
  text-decoration: none;
}
.product-thumb .caption > p:not(.tm-price-request) { display: none; }
.tm-price-request,
.product-thumb .price {
  margin-top: auto !important;
  margin-bottom: 0 !important;
  color: var(--tm-red) !important;
  font-size: 14px !important;
  line-height: 1.3;
  font-weight: 800 !important;
}

.tm-request-button-group {
  margin-top: auto;
  padding: 0 10px 8px !important;
  border: 0 !important;
  background: #fff !important;
}
.tm-request-card-button {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 4px !important;
  color: #fff !important;
  background: linear-gradient(#af1013, #8a0004);
  font-size: 13px !important;
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
  text-decoration: none !important;
}
.tm-request-card-button:hover { background: linear-gradient(#c51418, #930004); }
.tm-card-tools {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 10px 10px;
}
.tm-card-tools > a,
.tm-card-tools > button {
  display: flex;
  width: 38px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 2px;
  color: #6d0002;
  background: #fff;
}
.tm-card-tools .tm-card-tool--gold {
  color: #fff;
  border-color: #eaaa00;
  background: var(--tm-gold);
}
.tm-catalog-products .product-grid { display: flex !important; }
.tm-catalog-products .product-grid .product-thumb { height: 100%; }
.tm-catalog-products .product-list .tm-product-card,
.tm-catalog-products .product-list .product-thumb {
  min-height: 0;
}
.tm-catalog-page .product-layout .product-thumb .button-group {
  display: flex;
  align-items: stretch;
  margin-top: auto;
  background: #fff;
}
.tm-catalog-page .tm-request-card-button {
  flex: 1;
  border-radius: 0 !important;
}
.tm-catalog-page .button-group button {
  width: 44px;
  background: #fff;
}
.tm-catalog-page .button-group button:hover {
  color: #fff;
  background: var(--tm-red);
}

/* =========================================================
   БРЕНДЫ 
   ========================================================= */

.tm-brands-section {
    display: block !important;
    width: 100%;
    margin: 22px 0 30px;
    overflow: hidden;
    border: 1px solid #ece5dd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(35,24,15,.05);
}

.tm-brands-section > .tm-section-bar {
    display: flex !important;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
}

.tm-brands-banner {
    display: block !important;
    width: 100%;
    padding: 14px 18px;
    box-sizing: border-box;
    background: #fff;
}

.tm-brands-banner img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 320px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
}

@media (max-width: 767px) {
    .tm-brands-section {
        margin: 16px 0 22px;
    }

    .tm-brands-banner {
        padding: 8px 5px;
    }

    .tm-brands-banner img {
        max-height: none !important;
    }
}
/* =========================================================
   ПОИСК / КАТЕГОРИИ / MOBILE-КАТАЛОГ
   ========================================================= */

.tm-mobile-catalog-toggle,
.tm-mobile-catalog-close,
.tm-catalog-overlay {
  display: none;
}
#product-search .form-control,
#product-category .form-control {
  min-height: 40px;
  font-size: 14px;
}
#product-search .control-label,
#product-search .checkbox-inline,
#product-category .control-label,
#product-category .checkbox-inline {
  font-size: 13px;
  line-height: 1.45;
}

/* =========================================================
   КНОПКИ / ФОРМЫ / ЦЕНА ПО ЗАПРОСУ
   ========================================================= */

.btn-primary {
  color: #fff !important;
  border-color: #800004 !important;
  background: linear-gradient(#ae0e12, #870004) !important;
  text-shadow: none !important;
}
.btn-primary:hover,
.btn-primary:focus { background: #700003 !important; }
.form-control:focus {
  border-color: #d59500;
  box-shadow: 0 0 0 2px rgba(246, 183, 0, .15);
}
.tm-product-price-request {
  margin: 18px 0;
  padding: 16px;
  border-left: 5px solid var(--tm-gold);
  background: #fff7dc;
}
.tm-product-price-request strong {
  display: block;
  color: var(--tm-red);
  font-size: 27px;
}
.tm-product-price-request span { color: #555; }
.tm-product-request-action .btn { max-width: 360px; }
.tm-form-page { margin-top: 15px; }
.tm-form-card {
  max-width: 930px;
  margin: 0 auto 30px;
  padding: 28px;
  border: 1px solid #eadfd4;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--tm-shadow);
}
.tm-privacy-check {
  font-weight: 400;
  line-height: 1.5;
}
.tm-privacy-check input { margin-right: 8px; }

/* =========================================================
   ПОДВАЛ / COOKIE / МОДАЛЬНОЕ ОКНО ТОВАРА
   ========================================================= */

.tm-final-footer {
  margin-top: 16px;
  padding: 28px 0 0;
  border-top: 1px solid #eadfce;
  background: linear-gradient(90deg, #fffaf3, #f5ede2);
}
.tm-final-footer h5 {
  color: #222;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
}
.tm-final-footer p,
.tm-final-footer li,
.tm-final-footer a {
  color: #555;
  font-size: 12px;
  line-height: 1.6;
}
.tm-final-footer a:hover { color: var(--tm-red); }
.tm-final-footer__bottom {
  margin-top: 22px;
  padding: 14px 0;
  color: #eee;
  background: #252525;
  font-size: 11px;
}

.tm-cookie {
  position: fixed;
  z-index: 1055;
  left: 28px;
  bottom: 25px;
  width: 300px;
  padding: 16px;
  border: 1px solid #e9dfd4;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .16);
}
.tm-cookie__body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tm-cookie__icon { font-size: 38px; }
.tm-cookie p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
}
.tm-cookie__check {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 400;
}
.tm-cookie__actions {
  display: flex;
  gap: 10px;
}
.tm-cookie__actions .btn { flex: 1; }

.tm-product-modal__dialog {
  width: 92vw;
  max-width: 1380px;
  margin: 4vh auto;
}
.tm-product-modal__dialog .modal-content {
  height: 90vh;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
}
.tm-product-modal__frame {
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
}
.tm-product-modal__close {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 13px;
  font-size: 36px;
}
.tm-product-modal__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1399px) {
  .tm-final-header__main {
    grid-template-columns: 310px minmax(270px, 1fr) 190px 185px !important;
    gap: 14px !important;
  }
  .tm-final-logo { width: 310px; height: 82px; }
  .tm-final-logo img { height: 82px !important; }
  .tm-final-sales a { font-size: 16px !important; }
  .tm-final-request { font-size: 14px; }
  .tm-benefit { padding: 12px 14px !important; }
}

@media (max-width: 1199px) {
  .tm-category-item { font-size: 13.5px; }
  .tm-product-card,
  .tm-catalog-products .product-thumb { min-height: 338px; }
}

@media (max-width: 991px) {
  .container { width: calc(100% - 24px); }

  .tm-final-top__inner {
    flex-direction: column;
    gap: 0;
    padding: 3px 0;
  }
  .tm-final-top__contacts,
  .tm-final-top__social {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .tm-final-top a {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }
  .tm-final-header__main {
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 12px 16px !important;
    padding: 12px 0 !important;
  }
  .tm-final-logo { width: 280px; height: 74px; }
  .tm-final-logo img { height: 74px !important; }
  .tm-final-sales {
    min-height: 48px;
    align-items: flex-start !important;
  }
  .tm-final-request { min-height: 46px !important; }
  .tm-final-benefits { grid-template-columns: repeat(2, 1fr) !important; }
  .tm-benefit {
    min-height: 82px !important;
    border-bottom: 1px solid #e7dbcd;
  }
  .tm-benefit:nth-child(2n) { border-right: 0; }
  .tm-benefit:last-child { grid-column: 1 / -1; }

  /* Меню Bootstrap остаётся мобильным; пункты читаемы */
  .tm-final-menu__items { display: block !important; }
  .tm-final-menu__items > li {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
  }

  /* Главная: каталог перестаёт быть sticky */
  .tm-home-final__row { display: block; }
  .tm-home-final__sidebar { position: static; }
  .tm-home-final__content { padding-left: 15px; }
  .tm-final-hero { margin-top: 4px; }
  .tm-section-bar { font-size: 17px; }

  /* Поиск/категория: каталог уходит в выезжающую панель */
  body.tm-catalog-lock { overflow: hidden; }
  .tm-catalog-page > .row.tm-catalog-layout { display: block !important; }
  .tm-catalog-page #content {
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .tm-mobile-catalog-toggle {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    padding: 9px 14px;
    border: 1px solid #e1a900;
    border-radius: 5px;
    color: #2a1b00;
    background: linear-gradient(#ffca35, #f3ad00);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
  }
  .tm-mobile-catalog-close {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    background: linear-gradient(#b30b0f, #870004);
    font-size: 13px;
    font-weight: 800;
  }
  .tm-catalog-sidebar {
    position: fixed !important;
    z-index: 2100;
    top: 0 !important;
    bottom: 0;
    left: 0;
    width: min(88vw, 360px) !important;
    max-width: 360px;
    height: 100vh;
    padding: 12px !important;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
    background: #fff;
    box-shadow: 8px 0 30px rgba(0, 0, 0, .22);
    transform: translateX(-105%);
    transition: transform .24s ease, visibility .24s ease;
  }
  .tm-catalog-sidebar.tm-mobile-catalog-open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }
  .tm-catalog-overlay {
    position: fixed;
    z-index: 2090;
    inset: 0;
    background: rgba(18, 12, 8, .45);
  }
  .tm-catalog-overlay.is-open { display: block; }
  .tm-category-item {
    min-height: 50px;
    font-size: 14px;
  }
  .tm-product-modal__dialog { width: 96vw; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }
  .container {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .tm-final-top { min-height: auto !important; }
  .tm-final-top__inner { padding: 5px 0; }
  .tm-final-top__contacts,
  .tm-final-top__social { gap: 2px 4px; }
  .tm-final-top a {
    min-height: 30px;
    padding: 0 6px;
    font-size: 11px;
  }
  .tm-final-top__contacts a[href^='mailto:'] {
    width: 100%;
    justify-content: center;
  }
  .tm-final-header__main {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 10px 0 !important;
  }
  .tm-final-logo {
    width: min(100%, 330px);
    height: 86px;
    margin: 0 auto;
  }
  .tm-final-logo img { height: 86px !important; }
  .tm-final-search { margin: 0 !important; }
  .tm-final-search #search input,
  .tm-final-search #search button { height: 46px; }
  .tm-final-sales {
    min-height: auto;
    align-items: center !important;
    gap: 3px;
    text-align: center;
  }
  .tm-final-sales span { font-size: 12px; }
  .tm-final-sales a { font-size: 17px !important; }
  .tm-final-request {
    width: 100%;
    min-height: 46px !important;
    font-size: 14px;
  }
  .tm-final-benefits {
    grid-template-columns: 1fr !important;
    margin-bottom: 8px !important;
  }
  .tm-benefit,
  .tm-benefit:last-child {
    grid-column: auto;
    min-height: 76px !important;
    padding: 12px 14px !important;
    border-right: 0;
    border-bottom: 1px solid #e7dbcd;
  }
  .tm-benefit:last-child { border-bottom: 0; }
  .tm-benefit > i {
    flex-basis: 34px;
    width: 34px;
    font-size: 30px !important;
  }
  .tm-benefit b { font-size: 13px !important; }
  .tm-benefit span { font-size: 12px !important; }
  .tm-final-menu__items > li > a {
    min-height: 44px !important;
    font-size: 13px !important;
  }

  .tm-home-final,
  .tm-catalog-page { font-size: 14px; }
  .tm-catalog-page h1,
  .tm-catalog-page h2 {
    margin-top: 8px;
    margin-bottom: 14px;
    font-size: 24px;
  }
  .tm-category-panel__title {
    min-height: 46px;
    font-size: 17px;
  }
  .tm-category-item {
    min-height: 50px;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: 600;
  }

  /* 1800x400 сохраняет пропорции и на телефоне */
  .tm-final-hero {
    max-height: none;
    margin-bottom: 12px;
    border-radius: 5px;
  }
  .tm-final-hero img { max-height: none; }

  .tm-section-bar {
    min-height: 42px;
    padding: 0 12px;
    font-size: 15px;
  }
  .tm-section-bar span { min-height: 42px; }
  .tm-section-bar span:after { display: none; }

  .tm-product-row .product-layout,
  .tm-catalog-products .product-layout { margin-bottom: 10px; }
  .tm-product-card,
  .tm-catalog-products .product-thumb { min-height: 330px; }
  .tm-product-card .image,
  .tm-catalog-products .product-thumb .image {
    height: 150px;
    flex-basis: 150px;
  }
  .tm-product-card h4,
  .tm-catalog-products .product-thumb h4,
  .tm-product-name {
    min-height: 57px;
    font-size: 14px !important;
  }
  .tm-request-card-button {
    min-height: 42px;
    font-size: 13px !important;
  }

  .tm-brands-section { margin: 16px 0 22px; }
  .tm-brands-banner { padding: 10px 6px; }
  .tm-brands-banner img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }

  #product-search .row > .col-sm-4,
  #product-search .row > .col-sm-3 { margin-bottom: 8px; }

  .tm-cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
  .tm-product-modal__dialog {
    width: 100vw;
    height: 100vh;
    margin: 0;
  }
  .tm-product-modal__dialog .modal-content {
    height: 100vh;
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .tm-final-top__social span,
  .tm-final-top__contacts a[href^='tel:'] span {
    font-size: 11px;
  }
  .tm-section-bar {
    font-size: 14px;
    line-height: 1.25;
  }
  .tm-category-item { font-size: 14px; }
  .tm-brands-banner { padding: 8px 4px; }
}
