main > .container {
    padding: 70px 15px 20px;
}


.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th,
.grid-view td:last-child {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 50px;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(128, 128, 128, 1);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

@media (min-width: 1024.1px) {
  [data-layout="horizontal"] .page-content {
    margin-top: 20px;
  }
}

.bg-orange {
    background-color: #f81;
}

.navbar-brandbox {
  padding: 0 1.3rem;
  text-align: center;
}

.product-view .product-img-slider .mdi::before {
  font-size: 15em;
}
.product-view .button-tocart {
    margin-left: 1rem;
}

.cart-index .avatar-lg .mdi::before {
  font-size: 6.8em;
  line-height: 1em;
}

/* ============================================================
   Мобильная эргономика витрины
   ------------------------------------------------------------
   Тема Velzon рассчитана на десктопную панель управления: цели
   нажатия 28-30px, подписи 11-13px. На телефоне это мимо пальца
   (рекомендованный минимум — 44px) и мимо глаза.
   Здесь надстройка над темой, а не замена: цвета, шрифт и
   компоненты остаются темины, меняются только размеры,
   плотность и порядок содержимого на узком экране.
   ============================================================ */

:root {
  --ss-touch: 44px;           /* минимальная цель нажатия */
  --ss-thumb: 76px;           /* превью товара в списке */
  --ss-radius: 8px;
}

/* ---------- позиция каталога ---------- */

.catalog-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--vz-border-color, #e9ebec);
}
.catalog-item:last-child { border-bottom: 0; }

.catalog-item__thumb {
  flex: 0 0 var(--ss-thumb);
  width: var(--ss-thumb);
  height: var(--ss-thumb);
  display: grid;
  place-items: center;
  background: var(--vz-light, #f3f6f9);
  border-radius: var(--ss-radius);
  overflow: hidden;
}
.catalog-item__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.catalog-item__thumb .mdi::before { font-size: 2.4rem; line-height: 1; }

/* min-width:0 обязателен: без него флекс-потомок не даёт тексту
   переноситься и длинное название распирает строку */
.catalog-item__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.catalog-item__title {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--vz-body-color, #212529);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-item__title:hover { color: var(--vz-primary, #405189); }

.catalog-item__stock { display: flex; align-items: center; gap: 8px; font-size: 12px; }

.catalog-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.catalog-item__price { font-size: 17px; font-weight: 700; white-space: nowrap; }
.catalog-item__price--none { font-size: 12px; font-weight: 500; color: var(--vz-secondary, #878a99); white-space: normal; }

/* ---------- цели нажатия ---------- */

@media (max-width: 767.98px) {
  /* Кнопки и поля в содержимом страницы дотягиваются до пальца.
     Правило общее, а не по разделам: перечисление быстро отстаёт от
     новых экранов — раздел расчётов уже оказался не покрыт.
     Исключения: .btn-icon (квадратные иконки шапки, уже 42px) и
     .btn-close (крестик модальных окон темы). */
  .page-content .btn:not(.btn-icon):not(.btn-close),
  .page-content .form-select,
  .page-content .form-control {
    min-height: var(--ss-touch);
  }

  .catalog-item .btn { padding-inline: 14px; font-size: 14px; }

  /* пункты выпадающего списка количества — тоже под палец */
  .dropdown-menu .dropdown-item { min-height: var(--ss-touch); display: flex; align-items: center; }

  /* заголовок страницы съедает первый экран: на телефоне он дублирует
     хлебные крошки и название вкладки */
  .page-title-box { padding-bottom: .5rem; }
  .page-content { padding-top: .5rem; }
}

/* ---------- панель фильтров ---------- */

.catalog-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.catalog-toolbar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--vz-primary, #405189);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- липкая панель корзины ---------- */

.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--vz-card-bg, #fff);
  border-top: 1px solid var(--vz-border-color, #e9ebec);
  box-shadow: 0 -2px 12px rgba(30, 32, 37, .08);
}
.cart-bar__sum { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.cart-bar__label { font-size: 11px; color: var(--vz-secondary, #878a99); }
.cart-bar__total { font-size: 16px; font-weight: 700; white-space: nowrap; }
.cart-bar__btn { margin-left: auto; min-height: var(--ss-touch); display: inline-flex; align-items: center; }

/* Панель перекрывает низ страницы. Отступ даём распоркой в потоке, а не
   padding-ом у .main-content: тема управляет его отступами сама, и
   переопределение оказалось ненадёжным. */
.cart-bar-spacer { height: 76px; }

@media (min-width: 768px) {
  /* на десктопе корзина и так в шапке, панель не нужна */
  .cart-bar, .cart-bar-spacer { display: none; }
}

/* На узком экране цена и кнопка в одну строку не помещаются: тело
   карточки ~207px, а цена с кнопкой требуют ~250px. Раскладываем их
   в столбец — заодно кнопка становится во всю ширину, то есть самой
   крупной целью в карточке. */
@media (max-width: 575.98px) {
  .catalog-item__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .catalog-item__foot .button-tocart { width: 100%; }
  .catalog-item__foot .button-tocart > .btn:first-child { flex: 1 1 auto; justify-content: center; }
  .catalog-item__price { font-size: 18px; }
}

/* Название — основная цель для перехода в карточку товара. Визуальный
   размер не трогаем, но расширяем область нажатия вертикальными
   отступами: строка в одну линию давала цель высотой 20px. */
.catalog-item__title { display: block; padding-block: 4px; }
@media (max-width: 767.98px) {
  .catalog-item__title { min-height: 34px; }
}

/* ---------- корзина ---------- */

@media (max-width: 767.98px) {
  /* степпер количества был 25x28 — в него трудно попасть, а промах меняет
     количество товара в заказе, поэтому цели доводим до 44px */
  .cart-index .input-step { height: var(--ss-touch); }
  .cart-index .input-step .qty-btn {
    width: var(--ss-touch);
    height: var(--ss-touch);
    font-size: 18px;
    line-height: 1;
  }
  .cart-index .input-step input.product-quantity {
    height: var(--ss-touch);
    width: 56px;
    font-size: 16px;
  }

  /* удаление позиции — цель того же размера, но подчёркнуто вторичная */
  .cart-index .remove-card-btn {
    min-height: var(--ss-touch);
    display: inline-flex;
    align-items: center;
  }

  /* оформление — главное действие экрана, растягиваем во всю ширину */
  .cart-index form .btn[type="submit"] { width: 100%; }
}

/* ---------- выдвижное меню ---------- */

.site-nav { width: min(86vw, 320px); }

.site-nav__section {
  padding: 14px 16px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--vz-secondary, #878a99);
}

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--ss-touch);
  padding: 10px 16px;
  color: var(--vz-body-color, #212529);
  font-size: 15px;
  text-decoration: none;
}
.site-nav__link:hover,
.site-nav__link:focus-visible { background: var(--vz-light, #f3f6f9); color: var(--vz-primary, #405189); }
.site-nav__link .mdi { font-size: 20px; line-height: 1; color: var(--vz-secondary, #878a99); }

/* выбранная категория: полоса слева заметна и в свёрнутом подразделе */
.site-nav__link.is-current {
  background: var(--vz-primary-bg-subtle, #eef1f7);
  color: var(--vz-primary, #405189);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--vz-primary, #405189);
}
.site-nav__link.is-current .mdi { color: inherit; }

/* строка «категория + раскрытие»: сама категория остаётся ссылкой,
   стрелка — отдельная цель, иначе не открыть родителя без перехода */
.site-nav__group { display: flex; align-items: center; }
.site-nav__toggle {
  flex: 0 0 var(--ss-touch);
  width: var(--ss-touch);
  height: var(--ss-touch);
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--vz-secondary, #878a99);
}
.site-nav__toggle .mdi { transition: transform .15s ease; }
.site-nav__toggle[aria-expanded="true"] .mdi { transform: rotate(180deg); }

.site-nav__link--sub { padding-left: 48px; font-size: 14px; }
.site-nav__sub .site-nav__link--sub.is-current { box-shadow: inset 3px 0 0 var(--vz-primary, #405189); }

.offcanvas-footer { margin-top: auto; }
