/* ============================================================
   custom.css — правки по SEO-аудиту artstyle-expo.ru
   Подключается автоматически из tpls/blocks/head.php,
   грузится последним → перебивает template.css без !important.
   ============================================================ */

/* ------------------------------------------------------------
   1. Off-canvas: заголовок «Меню» был <h2>, стал <div>.
      Возвращаем ему прежний вид (правила скопированы
      из css/off-canvas.css, где селектор был ... .t3-off-canvas-header h2)
   ------------------------------------------------------------ */
.t3-off-canvas .t3-off-canvas-header .t3-off-canvas-header-title {
  color: #667780;
  margin: 0;
  line-height: 35px;
  font-size: 15px;
  font-weight: bold;
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   2. H1 главной страницы (tpls/blocks/page-heading.php)
      Скромный, не ломающий сетку заголовок над каталогом.
   ------------------------------------------------------------ */
.t3-frontpage-heading {
  padding: 24px 0 0;
}

.custom h1 {
  margin: 0 0 20px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
  color: #424147;
}

@media (max-width: 767px) {
  .t3-frontpage-heading {
    padding: 16px 0 0;
  }
  .custom h1 {
    font-size: 20px;
  }
}

/* ------------------------------------------------------------
   3. (Контакты в шапке переехали в иконки — см. секцию 11)
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   4. Шрифт FontAwesome: font-display: swap —
      иконки не блокируют отрисовку текста (устраняет FOIT).
      Переопределяет @font-face из font-awesome.min.css.
   ------------------------------------------------------------ */
@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/font-awesome/fonts/fontawesome-webfont.eot?v=4.1.0');
  src: url('../fonts/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),
       url('../fonts/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),
       url('../fonts/font-awesome/fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),
       url('../fonts/font-awesome/fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------
   5. Мелкое: снимаем «прыжки» вёрстки от картинок без
      явных размеров (CLS) и разрешаем зум на мобильных.
   ------------------------------------------------------------ */
img {
  height: auto;
}

/* ============================================================
   6. ПОДВАЛ САЙТА (tpls/blocks/footer.php)
   ============================================================ */

.t3-footer-main {
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 14px;
  line-height: 1.6;
}

.t3-footer-main a {
  color: #9aa8b2;
  text-decoration: none;
  transition: color 0.2s ease;
}

.t3-footer-main a:hover,
.t3-footer-main a:focus {
  color: #ffffff;
  text-decoration: none;
}

.t3-footer-main .footer-col {
  margin-bottom: 28px;
}

.t3-footer-main .footer-col-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ffffff;
}

/* --- колонка «О компании» --- */
.footer-about .footer-logo {
  display: inline-block;
  margin-bottom: 18px;
}

.footer-about .footer-logo img {
  max-width: 200px;
  width: auto;
  height: auto;
}

.footer-about-text {
  margin: 0 0 18px;
  max-width: 340px;
  color: #6b7c88;
}

.footer-social {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  font-size: 13px;
}

.footer-social:hover,
.footer-social:focus {
  border-color: #e74c3c;
  background: #e74c3c;
  color: #ffffff;
}

.footer-social .fa {
  margin-right: 6px;
}

/* --- списки ссылок --- */
.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 9px;
}

/* --- контакты --- */
.footer-contacts-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-contacts-list li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 26px;
  color: #6b7c88;
}

.footer-contacts-list .fa {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  text-align: center;
  color: #e74c3c;
}

.footer-contacts-list a {
  color: #c3ced6;
}

/* --- нижняя строка копирайта --- */
.t3-footer .t3-copyright {
  padding: 20px 0;
}

/* --- мобильные --- */
@media (max-width: 991px) {
  .t3-footer-main {
    padding: 32px 0 8px;
  }
}

@media (max-width: 480px) {
  .t3-footer-main .footer-col {
    margin-bottom: 24px;
  }
  .footer-about-text {
    max-width: none;
  }
}

/* ============================================================
   7. СЕТКА ТОВАРОВ В КАТЕГОРИИ (JoomShopping)
   Разметка компонента: .row-fluid > .sblock3 > .block_product >
   .product > .name / .image / .oiproduct (.jshop_price, .buttons)
   Переводим ряды на flex → карточки равной высоты,
   картинку поднимаем над названием, кнопку прижимаем к низу.
   ============================================================ */

/* --- ряд --- */
#comjshop .jshop_list_product .row-fluid {
  display: flex;
  flex-wrap: wrap;
  border: 0;              /* убираем серую линию-разделитель между рядами */
  margin: 0 -12px;
}

#comjshop .sblock3 {
  float: none;
  width: 33.3333%;
  padding: 0 12px;
  display: flex;
}

#comjshop .block_product {
  width: 100%;
  display: flex;
  margin: 0 0 24px;
}

/* --- карточка --- */
#comjshop .product {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 16px 16px 20px;
  background: #fff;
  border: 1px solid #e6e8ea;
  border-radius: 6px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#comjshop .product:hover {
  border-color: #d9dcdf;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

/* --- картинка: поднимаем наверх --- */
#comjshop .product .image {
  order: 1;
  margin: 0 0 14px;
}

#comjshop .product .image_block {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  overflow: hidden;
}

#comjshop .product .image_block > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

#comjshop .product img.jshop_img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

#comjshop .product:hover img.jshop_img {
  transform: scale(1.04);
}

/* метки SALE / NEW */
#comjshop .product .image_block img[src*="img_labels"] {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  max-height: 44px;
  width: auto;
}

/* --- название --- */
#comjshop .product .name {
  order: 2;
  margin: 0 0 12px;
  min-height: 2.6em;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  text-align: left;
}

#comjshop .product .name a {
  color: #2f3438;
  text-decoration: none;
}

#comjshop .product:hover .name a,
#comjshop .product .name a:hover {
  color: #e30613;
}

/* --- цена + кнопка, прижаты к низу --- */
#comjshop .product .oiproduct {
  order: 3;
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

#comjshop .product .jshop_price {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  color: #2f3438;
  text-align: left;
}

#comjshop .product .jshop_price span {
  color: inherit;
}

#comjshop .product .description:empty,
#comjshop .product .extra_fields:empty,
#comjshop .product .price_extra_info:empty {
  display: none;
}

#comjshop .product .buttons {
  margin: 0;
  text-align: left;
}

#comjshop .product .btn.button_detail {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border: 0;
  border-radius: 4px;
  background: #e30613;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: none;
  transition: background 0.2s ease;
}

#comjshop .product .btn.button_detail:hover,
#comjshop .product .btn.button_detail:focus {
  background: #b8050f;
  color: #fff;
}

/* --- панель сортировки --- */
#comjshop .form_sort_count {
  margin: 0 0 24px;
  padding: 12px 16px;
  background: #f6f7f8;
  border-radius: 6px;
}

#comjshop .box_products_sorting {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

#comjshop .box_products_sorting .control-label {
  width: auto;
  float: none;
  padding: 0;
  font-size: 13px;
  color: #6b7278;
  white-space: nowrap;
}

#comjshop .box_products_sorting .controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

#comjshop .box_products_sorting select {
  margin: 0;
  height: 34px;
}

/* --- адаптив --- */
@media (max-width: 991px) {
  #comjshop .sblock3 {
    width: 50%;
  }
}

@media (max-width: 600px) {
  #comjshop .sblock3 {
    width: 100%;
  }
  #comjshop .product .image_block {
    height: 170px;
  }
  #comjshop .product img.jshop_img {
    max-height: 170px;
  }
  #comjshop .product .name {
    min-height: 0;
  }
}

/* ============================================================
   8. КАРТОЧКА ТОВАРА (JoomShopping, view=product)
   Компонент верстает колонки флоатом: .row-fluid.jshop float:left,
   остальные блоки — обычным потоком, обтекая его. Из-за этого
   «Количество / Быстрый заказ» уезжали под картинку.
   Переводим форму на CSS Grid: слева галерея, справа описание,
   характеристики, цена и кнопка заказа.
   ============================================================ */

#comjshop > form {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  column-gap: 40px;
  align-items: start;
}

#comjshop > form > h1 {
  grid-column: 1 / -1;
  margin: 0 0 24px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  color: #2f3438;
}

/* галерея — левая колонка на всю высоту */
#comjshop > form > .row-fluid.jshop {
  grid-column: 1;
  grid-row: 2 / span 30;
  float: none;
  width: auto;
  margin: 0;
}

#comjshop > form > .jshop_prod_description,
#comjshop > form > .jshop_prod_attributes,
#comjshop > form > .prod_price,
#comjshop > form > .extra_fields,
#comjshop > form > .prod_buttons {
  grid-column: 2;
  width: auto;
}

/* --- главное изображение --- */
#comjshop .row-fluid.jshop .span4.image_middle {
  float: none;
  width: auto;
  margin: 0 0 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e6e8ea;
  border-radius: 6px;
  text-align: center;
}

#comjshop .row-fluid.jshop .span8.jshop_img_description {
  float: none;
  width: auto;
  margin: 0;
}

#comjshop #list_product_image_middle img {
  max-width: 100%;
  height: auto;
}

#comjshop .product_label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
}

#comjshop .text_zoom {
  width: auto;
  margin-top: 12px;
  font-size: 13px;
  color: #6b7278;
  text-align: center;
}

/* --- миниатюры --- */
#comjshop #list_product_image_thumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

#comjshop img.jshop_img_thumb {
  display: block;
  width: 84px;
  height: 84px;
  padding: 5px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e6e8ea;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

#comjshop img.jshop_img_thumb:hover {
  border-color: #e30613;
}

/* --- кнопка «Смотреть примеры работ» --- */
#comjshop .portfolio_button {
  width: auto;
  margin: 0 0 8px;
}

#comjshop .portfolio_button a.btn {
  display: inline-block;
  width: 100%;
  padding: 11px 18px;
  background: #fff;
  border: 1px solid #e30613;
  border-radius: 4px;
  color: #e30613;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

#comjshop .portfolio_button a.btn:hover,
#comjshop .portfolio_button a.btn:focus {
  background: #e30613;
  color: #fff;
}

/* --- описание --- */
#comjshop .jshop_prod_description {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.65;
  color: #4a5157;
}

#comjshop .jshop_prod_description p {
  margin: 0 0 14px;
}

/* --- опции (секции, печать) --- */
#comjshop .jshop_prod_attributes {
  margin: 0 0 20px;
  padding: 20px;
  background: #f6f7f8;
  border-radius: 6px;
}

#comjshop .jshop_prod_attributes .row-fluid {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: none;      /* компонент ставит max-width:300px — из-за него блок не растягивался */
  margin: 0 0 14px;
}

/* clearfix-псевдоэлементы .row-fluid становятся flex-элементами
   и съедают лишний gap справа — гасим их */
#comjshop .jshop_prod_attributes .row-fluid:before,
#comjshop .jshop_prod_attributes .row-fluid:after {
  display: none;
}

#comjshop .jshop_prod_attributes .row-fluid:last-child {
  margin-bottom: 0;
}

#comjshop .jshop_prod_attributes .span2.attributes_title {
  flex: 0 0 auto;
  float: none;
  width: auto;
  margin: 0;
  padding: 0;             /* было padding: 5px 50px */
  font-size: 14px;
  color: #6b7278;
  text-align: left;
  white-space: nowrap;
}

#comjshop .jshop_prod_attributes .span10 {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  float: none;
  width: auto;
  margin: 0;
  padding: 0;             /* было padding: 0 50px — селект вылезал за плашку */
}

#comjshop .jshop_prod_attributes span[id^="block_attr_sel"] {
  display: block;
  width: 100%;
  max-width: 260px;
}

#comjshop .jshop_prod_attributes select.inputbox {
  width: 100%;
  min-width: 0;
  height: 38px;
  margin: 0;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #d5d9dc;
  border-radius: 4px;
  box-shadow: none;
  color: #2f3438;
}

#comjshop .jshop_prod_attributes select.inputbox:focus {
  border-color: #e30613;
  outline: none;
}

#comjshop .jshop_prod_attributes .prod_attr_img:empty,
#comjshop .jshop_prod_attributes .attributes_description:empty {
  display: none;
}

/* --- цена --- */
#comjshop .prod_price {
  margin: 0 0 18px;
  padding-top: 18px;
  border-top: 1px solid #eceef0;
  font-size: 15px;
  color: #6b7278;
  text-align: left;
}

#comjshop .prod_price #block_price {
  display: inline-block;
  margin-left: 6px;
  font-size: 28px;
  font-weight: 700;
  color: #2f3438;
  vertical-align: middle;
}

/* --- характеристики --- */
#comjshop .extra_fields {
  margin: 0 0 24px;
}

/* font-size:0 гасит текстовое двоеточие из разметки компонента,
   двоеточие возвращаем псевдоэлементом — иначе оно висит по центру */
#comjshop .extra_fields .extra_fields_el {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: auto;
  height: auto;
  padding: 9px 0;
  border-bottom: 1px dashed #e6e8ea;
  font-size: 0;
}

#comjshop .extra_fields .extra_fields_name {
  font-size: 14px;
  color: #6b7278;
}

#comjshop .extra_fields .extra_fields_name:after {
  content: ':';
  font-size: 14px;
}

#comjshop .extra_fields .extra_fields_value {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: #2f3438;
  text-align: right;
}

/* --- количество + кнопка заказа --- */
#comjshop .prod_buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

#comjshop .prod_buttons .prod_qty {
  width: auto;
  font-size: 14px;
  color: #6b7278;
}

#comjshop .prod_buttons .prod_qty_input {
  width: auto;
}

#comjshop .prod_buttons .prod_qty_input input {
  width: 64px;
  height: 44px;
  margin: 0;
  text-align: center;
}

#comjshop .prod_buttons .buttons {
  width: auto;
}

#comjshop .prod_buttons .addtocart-button {
  height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 4px;
  background: #e30613;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: none;
}

#comjshop .prod_buttons .addtocart-button:hover,
#comjshop .prod_buttons .addtocart-button:focus {
  background: #b8050f;
}

/* --- кнопка «Назад» --- */
#comjshop .button_back {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #eceef0;
}

#comjshop .button_back input {
  height: 38px;
  padding: 0 20px;
  background: #fff;
  border: 1px solid #d5d9dc;
  border-radius: 4px;
  color: #6b7278;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: none;
}

#comjshop .button_back input:hover,
#comjshop .button_back input:focus {
  background: #fff;
  border-color: #b7bdc2;
  color: #2f3438;
}

/* --- адаптив карточки --- */
@media (max-width: 767px) {
  #comjshop > form {
    display: block;
  }
  #comjshop > form > .row-fluid.jshop {
    margin-bottom: 24px;
  }
  #comjshop > form > h1 {
    font-size: 22px;
  }
  #comjshop img.jshop_img_thumb {
    width: 70px;
    height: 70px;
  }
  #comjshop .prod_buttons {
    gap: 8px;
  }
}

/* ============================================================
   9. МОДАЛЬНОЕ ОКНО «БЫСТРЫЙ ЗАКАЗ» (One Click Checkout)
   Размеры и позицию окна выставляет JS инлайновым style,
   поэтому позиционирование перебиваем !important и центрируем
   через transform — окно перестаёт зависеть от расчётов скрипта.
   ============================================================ */

/* затемнение фона */
#window {
  background: #0f1417 !important;
}

/* само окно */
#contactForm_Oneclickcheckout {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 420px !important;
  max-width: calc(100vw - 32px) !important;
  height: auto !important;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

/* ВАЖНО: oneclickcheckout.css подключается ПОСЛЕ custom.css,
   селекторы там такие же по специфичности (по id), поэтому
   ключевые свойства ниже приходится помечать !important. */

/* заголовок */
#contactForm_Oneclickcheckout .form_callMe {
  margin: 0 !important;
  padding: 20px 24px !important;
  border-bottom: 1px solid #eceef0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  color: #2f3438;
  text-align: left !important;
}

/* крестик: у ссылки внутри свой текст «x» — гасим его font-size:0
   и рисуем × псевдоэлементом */
#ContactClose_OneClick {
  top: 16px !important;
  right: 18px !important;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  font-size: 0 !important;
  color: transparent !important;
  text-decoration: none;
  transition: background 0.2s ease;
}

#ContactClose_OneClick:before {
  content: '\00d7';
  font-size: 24px;
  line-height: 30px;
  color: #9aa2a8;
}

#ContactClose_OneClick:hover {
  background: #f2f4f5;
}

#ContactClose_OneClick:hover:before {
  color: #2f3438;
}

/* поля */
#contactForm_Oneclickcheckout ul {
  margin: 0 !important;
  padding: 22px 24px 6px !important;
  list-style: none !important;
}

#contactForm_Oneclickcheckout ul li {
  margin: 0 0 16px !important;
  padding: 0 !important;
  list-style: none !important;
  text-align: left !important;
}

/* скрытые поля (город, комментарий) оставляли пустые отступы */
#contactForm_Oneclickcheckout ul li:has(> input[style*="display: none"]),
#contactForm_Oneclickcheckout ul li:has(> input[style*="display:none"]),
#contactForm_Oneclickcheckout ul li:has(> textarea[style*="display: none"]),
#contactForm_Oneclickcheckout ul li:has(> textarea[style*="display:none"]) {
  display: none !important;
}

#contactForm_Oneclickcheckout label {
  display: block !important;
  width: auto !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 500;
  color: #6b7278 !important;
  text-align: left !important;
}

#contactForm_Oneclickcheckout label:empty {
  display: none !important;
}

/* display НЕ трогаем: скрытые поля прячутся инлайновым display:none */
#contactForm_Oneclickcheckout input[type="text"],
#contactForm_Oneclickcheckout textarea {
  width: 100% !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  background: #fff !important;
  border: 1px solid #d5d9dc !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  font-size: 14px !important;
  color: #2f3438 !important;
}

#contactForm_Oneclickcheckout textarea {
  height: auto !important;
  min-height: 90px;
  padding: 10px 12px !important;
}

#contactForm_Oneclickcheckout input[type="text"]:focus,
#contactForm_Oneclickcheckout textarea:focus {
  border-color: #e30613;
  outline: none;
}

#contactForm_Oneclickcheckout input::placeholder,
#contactForm_Oneclickcheckout textarea::placeholder {
  color: #a8b0b5;
}

/* кнопки */
#contactForm_Oneclickcheckout #formButtons {
  display: flex !important;
  gap: 12px;
  height: auto !important;
  padding: 6px 24px 24px !important;
  text-align: left !important;
}

#contactForm_Oneclickcheckout #sendmessage_OneClick {
  flex: 1 1 auto;
  width: auto !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #e30613 !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: none !important;
}

#contactForm_Oneclickcheckout #sendmessage_OneClick:hover,
#contactForm_Oneclickcheckout #sendmessage_OneClick:focus {
  background: #b8050f !important;
}

#contactForm_Oneclickcheckout #cancel_OneClick {
  flex: 0 0 auto;
  width: auto !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 22px !important;
  background: #fff !important;
  border: 1px solid #d5d9dc !important;
  border-radius: 4px !important;
  color: #6b7278 !important;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: none !important;
}

#contactForm_Oneclickcheckout #cancel_OneClick:hover,
#contactForm_Oneclickcheckout #cancel_OneClick:focus {
  border-color: #b7bdc2;
  color: #2f3438;
}

/* служебные сообщения (отправка / успех / ошибка) */
.statusMessage {
  padding: 22px 26px !important;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  font-size: 15px;
  color: #2f3438;
}

@media (max-width: 480px) {
  #contactForm_Oneclickcheckout .form_callMe {
    padding: 16px 18px !important;
    font-size: 18px;
  }
  #contactForm_Oneclickcheckout ul {
    padding: 18px 18px 4px !important;
  }
  #contactForm_Oneclickcheckout #formButtons {
    flex-direction: column-reverse;
    padding: 4px 18px 20px !important;
  }
  #contactForm_Oneclickcheckout #sendmessage_OneClick,
  #contactForm_Oneclickcheckout #cancel_OneClick {
    width: 100% !important;
    padding: 0 !important;
  }
}

/* ============================================================
   10. САЙДБАР С КАТЕГОРИЯМИ + КОНТЕЙНЕР КОНТЕНТА
   ============================================================ */

.t3-mainbody {
  padding-top: 28px;
  padding-bottom: 40px;
}

/* карточки-контейнеры: у шаблона тут жёсткая тень
   rgba(0,0,0,.5) 0 0 10px — заменяем на мягкую */
.t3-sidebar,
#t3-content {
  background: #fff;
  border: 1px solid #ebedef;
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(20, 27, 31, 0.05);
}

.t3-sidebar {
  padding: 24px 20px !important;
}

#t3-content {
  padding: 28px 32px !important;
}

@media (min-width: 992px) {
  .t3-sidebar {
    position: sticky;
    top: 20px;
  }
}

/* --- модуль в сайдбаре --- */
.t3-sidebar .t3-module {
  margin-bottom: 0;
}

.t3-sidebar .module-title {
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid #eceef0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #2f3438;
}

.t3-sidebar .module-title span {
  color: inherit;
  font-size: inherit;
}

/* --- список категорий --- */
.t3-sidebar ul.menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.t3-sidebar ul.menu li {
  margin: 0;
  border: 0 !important;   /* убираем серые линии-разделители */
  list-style: none;
}

.t3-sidebar ul.menu li a {
  position: relative;
  display: block;
  padding: 10px 12px 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.35;
  color: #4a5157;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.t3-sidebar ul.menu li a:hover,
.t3-sidebar ul.menu li a:focus {
  background: #f5f6f7;
  color: #e30613;
}

/* активный пункт */
.t3-sidebar ul.menu li.active > a,
.t3-sidebar ul.menu li.current > a {
  background: #fdf0f1;
  color: #e30613;
  font-weight: 600;
}

.t3-sidebar ul.menu li.active > a:before,
.t3-sidebar ul.menu li.current > a:before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: #e30613;
}

/* пункт с подпунктами — шеврон */
.t3-sidebar ul.menu li.parent > a:after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -4px;
  border-right: 1.5px solid #b7bdc2;
  border-bottom: 1.5px solid #b7bdc2;
  transform: rotate(-45deg);
}

/* вложенный уровень */
.t3-sidebar ul.menu ul {
  margin: 2px 0 6px;
  padding: 0 0 0 14px;
  border-left: 1px solid #eceef0;
  list-style: none;
}

.t3-sidebar ul.menu ul li a {
  padding: 7px 10px;
  font-size: 13px;
  color: #6b7278;
}

/* --- заголовок и описание категории в контенте --- */
#comjshop > h1 {
  margin: 0 0 22px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  color: #2f3438;
}

#comjshop .jshop_list_category {
  margin: 0 0 24px;
}

#comjshop .category_description {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid #eceef0;
  font-size: 15px;
  line-height: 1.7;
  color: #4a5157;
}

@media (max-width: 767px) {
  #t3-content {
    padding: 20px 18px !important;
  }
  #comjshop > h1 {
    font-size: 22px;
  }
}

/* ============================================================
   11. ШАПКА САЙТА
   ============================================================ */

#t3-header {
  background: #fff;
  border-bottom: 1px solid #ebedef;
}

/* липкая шапка на десктопе */
@media (min-width: 992px) {
  #t3-header {
    position: sticky;
    top: 0;
    z-index: 1010;
    box-shadow: 0 1px 10px rgba(20, 27, 31, 0.05);
  }
  /* сайдбар не должен подлезать под шапку */
  .t3-sidebar {
    top: 80px;
  }
}

/* Все дети #t3-mainnav — floats, поэтому у <nav> схлопывалась высота
   и меню прилипало к верхнему краю шапки. Переводим ряд и сам nav
   на flex и центрируем по вертикали относительно логотипа. */
#t3-header > .container > .row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

#t3-header > .container > .row:before,
#t3-header > .container > .row:after {
  display: none;   /* clearfix-псевдоэлементы мешают flex */
}

#t3-header #t3-mainnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  float: none;
  /* .row гасит паддинг контейнера отрицательным margin, а тема задаёт
     #t3-mainnav{padding:0 0 0 50px} — поэтому !important */
  padding-right: 20px !important;
}

/* порядок: меню → иконки → бургер */
#t3-header #t3-mainnav > .navbar.t3-mainnav {
  order: 1;
  float: none;
  margin: 0;
}

#t3-header #t3-mainnav > .head-contacts {
  order: 2;
  float: none;
}

#t3-header #t3-mainnav > .t3-nav-btn {
  order: 3;
  float: none;
  margin-left: 14px;
}

#t3-header .t3-navbar {
  padding-left: 0;
  padding-right: 0;
}

/* --- логотип --- */
#t3-header .logo {
  display: flex;
  align-items: center;
  /* левый паддинг возвращает отступ контейнера: .row съедает его
     отрицательным margin, из-за чего логотип прилипал к краю экрана */
  padding: 14px 40px 14px 20px !important;
}

#t3-header .logo-image img {
  max-width: 100%;
  height: auto;
}

#t3-header .site-slogan {
  display: none;   /* пустой элемент, занимал место */
}

/* --- контакты-иконки (справа от меню) --- */
#t3-header .head-contacts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 18px;
  padding-left: 18px;
  border-left: 1px solid #ebedef;
}

#t3-header .head-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e6e8ea;
  border-radius: 50%;
  color: #4a5157;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#t3-header .head-contact:hover,
#t3-header .head-contact:focus {
  background: #e30613;
  border-color: #e30613;
  color: #fff;
}

/* --- главное меню --- */
#t3-header .t3-mainnav {
  margin: 0;
  min-height: 0;
  background: transparent;
  border: 0;
}

#t3-header .navbar-nav > li {
  margin: 0 2px !important;
}

#t3-header .navbar-nav > li > a {
  padding: 10px 14px !important;
  border-radius: 4px;
  background: transparent !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #2f3438 !important;
  transition: background 0.15s ease, color 0.15s ease;
}

#t3-header .navbar-nav > li > a:hover,
#t3-header .navbar-nav > li > a:focus {
  background: #f5f6f7 !important;
  color: #e30613 !important;
}

#t3-header .navbar-nav > li.active > a,
#t3-header .navbar-nav > li.current > a,
#t3-header .navbar-nav > li.open > a {
  background: #fdf0f1 !important;
  color: #e30613 !important;
}

#t3-header .navbar-nav > li.dropdown > a .caret {
  margin-left: 6px;
  border-top-color: #b7bdc2;
}

#t3-header .navbar-nav > li.dropdown > a:hover .caret {
  border-top-color: #e30613;
}

/* --- выпадающее меню (megamenu) ---
   Пункты лежат в .mega-dropdown-inner > .row > .mega-col-nav > .mega-inner > ul.mega-nav,
   у .mega-inner был padding 0 50px — из-за него текст переносился и строки были в 2 раза выше. */
#t3-header .mega-dropdown-menu {
  min-width: 220px;
  padding: 6px;
  background: #fff;              /* было #2c3236 */
  border: 1px solid #ebedef;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(20, 27, 31, 0.1);
}

#t3-header .mega-dropdown-menu .mega-dropdown-inner,
#t3-header .mega-dropdown-menu .mega-inner,
#t3-header .mega-dropdown-menu .mega-col-nav {
  padding: 0;
}

#t3-header .mega-dropdown-menu .row {
  margin: 0;
}

#t3-header .mega-dropdown-menu .mega-nav {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

#t3-header .mega-dropdown-menu .mega-nav > li {
  margin: 0;
  border: 0;
}

#t3-header .mega-dropdown-menu .mega-nav > li > a {
  display: block;
  margin: 0;
  padding: 6px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #4a5157;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.3px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

#t3-header .mega-dropdown-menu .mega-nav > li > a:hover,
#t3-header .mega-dropdown-menu .mega-nav > li > a:focus {
  background: #f5f6f7;
  color: #e30613;
}

#t3-header .mega-dropdown-menu .mega-nav > li.active > a,
#t3-header .mega-dropdown-menu .mega-nav > li.current > a {
  background: #fdf0f1;
  color: #e30613;
  font-weight: 600;
}

/* --- бургер (кнопка off-canvas) --- */

/* обёртки кнопки — floats, из-за них она не центрировалась по вертикали */
#t3-header .t3-nav-btn {
  display: flex;
  align-items: center;
  float: none;
  height: auto;
  margin-left: 8px;
}

#t3-header .t3-nav-btn > .pull-right {
  display: flex;
  align-items: center;
  float: none;
}

#t3-header .navbar-header {
  float: none;
  margin: 0;
}

#t3-header .off-canvas-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0 !important;        /* было margin: 15px 12px 0 — кнопка съезжала вниз */
  background: #fff;
  border: 1px solid #e6e8ea;   /* было 2px solid teal */
  border-radius: 50%;
  color: #4a5157;
  font-size: 16px;
  line-height: 1;
  box-shadow: none;
}

#t3-header .off-canvas-toggle:hover,
#t3-header .off-canvas-toggle:focus,
#t3-header .off-canvas-toggle:active {
  background: #e30613;
  border-color: #e30613;
  color: #fff;
  box-shadow: none;
  outline: none;
}

#t3-header .off-canvas-toggle .top_menu_tytle {
  display: none;
}

@media (max-width: 991px) {
  #t3-header .logo {
    padding: 12px 12px 12px 20px !important;
  }
  #t3-header .logo-image img {
    max-height: 44px;
    width: auto;
  }
  #t3-header .head-contacts {
    margin: 0 0 0 10px;
    padding-left: 0;
    border-left: 0;
  }
  #t3-header .head-contact,
  #t3-header .off-canvas-toggle {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
}

/* ============================================================
   12. OFF-CANVAS МЕНЮ (мобильное)
   Тема шаблона тут тёмная (#2c3236) — переводим в светлую,
   в тон остальному сайту.
   ============================================================ */

/* ВАЖНО: ширину панели менять нельзя — скрипт сдвигает .t3-wrapper
   ровно на 250px, и при другой ширине левый край панели уезжает за экран. */
#t3-off-canvas {
  width: 250px;
  background: #fff;
  box-shadow: -8px 0 30px rgba(20, 27, 31, 0.12);
  overflow-x: hidden;
  overflow-y: auto;               /* в теме было overflow:hidden — длинное меню обрезалось */
  -webkit-overflow-scrolling: touch;
}

#t3-off-canvas .t3-off-canvas-header {
  height: auto;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #ebedef;
}

#t3-off-canvas .t3-off-canvas-header .t3-off-canvas-header-title {
  color: #2f3438;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 36px;
}

#t3-off-canvas .close {
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  background: transparent;
  border-radius: 50%;
  color: #9aa2a8;
  opacity: 1;
  font-size: 24px;
  font-weight: 400;
  text-shadow: none;
}

#t3-off-canvas .close:hover,
#t3-off-canvas .close:focus {
  background: #f2f4f5;
  color: #2f3438;
  opacity: 1;
}

#t3-off-canvas .t3-off-canvas-body {
  padding: 12px 12px 24px;
}

#t3-off-canvas .module-title {
  margin: 8px 8px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #8a9198;
}

#t3-off-canvas .t3-off-canvas-body ul {
  margin: 0;
  padding: 0;
  border: 0;            /* тёмные разделители тёмной темы */
  list-style: none;
}

#t3-off-canvas .t3-off-canvas-body li {
  border: 0 !important;
  list-style: none;
}

#t3-off-canvas .t3-off-canvas-body a {
  display: block;
  padding: 11px 12px;
  border: 0;
  border-radius: 4px;
  color: #4a5157;
  font-size: 14px;
  line-height: 1.35;
  text-transform: none;
  text-decoration: none;
}

#t3-off-canvas .t3-off-canvas-body a:hover,
#t3-off-canvas .t3-off-canvas-body a:focus {
  background: #f5f6f7;
  color: #e30613;
}

#t3-off-canvas ul.menu li.active > a,
#t3-off-canvas ul.menu li.current > a {
  background: #fdf0f1;
  color: #e30613;
  font-weight: 600;
}

/* вложенный уровень */
#t3-off-canvas ul.menu ul {
  margin: 2px 0 6px;
  padding: 0 0 0 12px;
  border-left: 1px solid #eceef0;
}

#t3-off-canvas ul.menu ul li a {
  padding: 8px 10px;
  font-size: 13px;
  color: #6b7278;
}

#t3-off-canvas .caret {
  border-top-color: #b7bdc2;
}

/* ============================================================
   13. ФОКУС НА ССЫЛКАХ И КНОПКАХ
   Bootstrap 3 вешает outline на :focus, а не на :focus-visible —
   поэтому чёрная обводка появлялась при обычном клике мышью.
   Убираем её для мыши, но оставляем для клавиатуры (Tab).
   ============================================================ */

a:focus,
button:focus,
.btn:focus,
.btn:active:focus,
.btn.active:focus,
input[type="submit"]:focus,
input[type="button"]:focus {
  outline: none;
  outline-offset: 0;
}

/* навигация с клавиатуры — фокус остаётся видимым */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
select:focus-visible,
textarea:focus-visible,
input[type="text"]:focus-visible {
  outline: 2px solid #e30613;
  outline-offset: 2px;
}

/* ============================================================
   14. ГЛАВНАЯ: HTML-модуль (.custom)
   Разметка сетки категорий — в _seo/home-grid.html,
   её нужно вставить в модуль вместо старой таблицы.
   ============================================================ */

/* контейнер модуля — та же карточка, что #t3-content на внутренних:
   в теме тут radius:10px и тень rgba(0,0,0,.5) 0 0 10px */
.row-feature > .container {
  padding: 28px 32px;
  background: #fff;
  border: 1px solid #ebedef;
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(20, 27, 31, 0.05);
}

.custom {
  font-size: 15px;
  line-height: 1.7;
  color: #4a5157;
}

.custom p {
  margin: 0 0 16px;
}

.custom a {
  color: #e30613;
}

.custom h2 {
  margin: 36px 0 16px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
  color: #2f3438;
}

/* --- сетка категорий --- */
.custom .cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
}

.custom .cat-grid__item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.custom .cat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  background: #fff;
  border: 1px solid #e6e8ea;
  border-radius: 6px;
  text-decoration: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.custom .cat-card:hover,
.custom .cat-card:focus {
  border-color: #d9dcdf;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
  text-decoration: none;
}

.custom .cat-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  margin-bottom: 14px;
  overflow: hidden;
}

.custom .cat-card__media img {
  max-width: 100%;
  max-height: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.custom .cat-card:hover .cat-card__media img {
  transform: scale(1.04);
}

.custom .cat-card__title {
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid #e30613;
  border-radius: 4px;
  color: #e30613;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.custom .cat-card:hover .cat-card__title {
  background: #e30613;
  color: #fff;
}

/* --- текстовая часть --- */
.custom ul.list-ul {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.custom ul.list-ul li {
  position: relative;
  margin: 0 0 9px;
  padding-left: 22px;
  list-style: none;
}

.custom ul.list-ul li:before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e30613;
}

.custom .right {
  float: right;
  max-width: 40%;
  margin: 4px 0 20px 28px;
}

.custom .right img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.custom p.center {
  text-align: center;
}

.custom p.bold {
  font-weight: 600;
  color: #2f3438;
}

@media (max-width: 991px) {
  .custom .cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .custom .cat-card__media {
    height: 150px;
  }
  .custom .cat-card__media img {
    max-height: 150px;
  }
}

@media (max-width: 600px) {
  .custom .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .custom .cat-card {
    padding: 12px;
  }
  .custom .cat-card__media {
    height: 120px;
  }
  .custom .cat-card__media img {
    max-height: 120px;
  }
  .custom .cat-card__title {
    padding: 8px;
    font-size: 11px;
  }
  .custom .right {
    float: none;
    max-width: 100%;
    margin: 0 0 20px;
  }
}

@media (max-width: 767px) {
  .row-feature > .container {
    padding: 20px 18px;
  }
}

/* ============================================================
   15. СТРАНИЦА «УСЛУГИ» (список категории com_content)
   Joomla выводит список таблицей .table-striped.table-bordered —
   разбираем её через display:contents в сетку карточек-ссылок.
   ============================================================ */

#t3-content .content-category > h1 {
  margin: 0 0 22px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  color: #2f3438;
}

#t3-content .category-list table.category {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  margin: 0;
  border: 0;
  background: none;
}

#t3-content .category-list table.category caption,
#t3-content .category-list table.category thead {
  display: none;
}

#t3-content .category-list table.category tbody {
  display: contents;
}

#t3-content .category-list table.category tr {
  display: block;
  border: 0;
  background: none !important;   /* гасим .table-striped */
}

#t3-content .category-list table.category td {
  display: block;
  padding: 0;
  border: 0;
  background: none;
}

#t3-content .category-list td.list-title a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 16px 46px 16px 20px;
  background: #fff;
  border: 1px solid #e6e8ea;
  border-radius: 6px;
  color: #2f3438;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
              transform 0.2s ease, color 0.2s ease;
}

/* шеврон справа */
#t3-content .category-list td.list-title a:after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  border-right: 2px solid #c3ced6;
  border-bottom: 2px solid #c3ced6;
  transform: rotate(-45deg);
  transition: border-color 0.2s ease, right 0.2s ease;
}

#t3-content .category-list td.list-title a:hover,
#t3-content .category-list td.list-title a:focus {
  border-color: #e30613;
  box-shadow: 0 6px 20px rgba(227, 6, 19, 0.1);
  transform: translateY(-2px);
  color: #e30613;
  text-decoration: none;
}

#t3-content .category-list td.list-title a:hover:after {
  border-color: #e30613;
  right: 16px;
}

@media (max-width: 600px) {
  #t3-content .category-list table.category {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ============================================================
   16. ПОРТФОЛИО (Phoca Gallery, список категорий)
   Плитки — float:left с фиксированной шириной 270px и таблицами
   внутри. Переводим на grid, картинки — на object-fit.
   ============================================================ */

#phocagallery .page-header {
  margin: 0 0 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid #eceef0;
}

#phocagallery .page-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  color: #2f3438;
}

#phocagallery .ph-cb {
  display: none;   /* clearfix под флоаты, больше не нужен */
}

#pg-msnr-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

#phocagallery .pg-csv-box {
  float: none;
  width: auto !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6e8ea;
  border-radius: 6px;
  box-shadow: none;   /* было rgba(120,120,120,.5) 1px 1px */
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#phocagallery .pg-csv-box:hover {
  border-color: #d9dcdf;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

/* внутренние обёртки были display:table / table-cell */
#phocagallery .pg-csv-box-img,
#phocagallery .pg-box2,
#phocagallery .pg-box3 {
  display: block;
  width: auto !important;
  height: auto !important;
}

#phocagallery .pg-box3 {
  position: relative;
  overflow: hidden;
}

#phocagallery .pg-box3 a {
  display: block;
  line-height: 0;
}

#phocagallery .pg-box3 img {
  display: block;
  width: 100%;
  max-width: none;
  height: 230px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

#phocagallery .pg-csv-box:hover .pg-box3 img {
  transform: scale(1.05);
}

#phocagallery .pg-box-img-bottom {
  width: auto !important;
  height: auto !important;
  padding: 14px 16px;
}

/* у подписи была иконка папки фоном и padding-left:20px */
#phocagallery .pg-csv-name {
  width: auto !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  background: none !important;
  font-size: 15px;
  line-height: 1.35;
}

#phocagallery .pg-csv-name a {
  color: #2f3438;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

#phocagallery .pg-csv-box:hover .pg-csv-name a,
#phocagallery .pg-csv-name a:hover {
  color: #e30613;
}

#phocagallery .pg-csv-count {
  margin-left: 6px;
  color: #8a9198;
  font-size: 13px;
  font-weight: 400;
  vertical-align: baseline;
}

@media (max-width: 991px) {
  #pg-msnr-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  #phocagallery .pg-box3 img {
    height: 200px;
  }
}

@media (max-width: 600px) {
  #pg-msnr-container {
    grid-template-columns: 1fr;
  }
  #phocagallery .pg-box3 img {
    height: 220px;
  }
}

/* ============================================================
   17. ПОРТФОЛИО: страница категории (Phoca Gallery, .pg-cv)
   ============================================================ */

#phocagallery.pg-cv .page-header {
  margin: 0 0 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid #eceef0;
}

#phocagallery.pg-cv .page-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  color: #2f3438;
}

#pg-msnr-container.pg-msnr-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

#phocagallery .pg-cv-box {
  float: none;
  width: auto !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6e8ea;
  border-radius: 6px;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#phocagallery .pg-cv-box:hover {
  border-color: #d9dcdf;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

#phocagallery .pg-cv-box-img,
#phocagallery .pg-cv-box .pg-box2,
#phocagallery .pg-cv-box .pg-box3 {
  display: block;
  width: auto !important;
  height: auto !important;
}

#phocagallery .pg-cv-box .pg-box3 {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

#phocagallery .pg-cv-box .pg-box3 a {
  display: block;
  line-height: 0;
}

#phocagallery .pg-cv-box .pg-box3 img {
  display: block;
  width: 100%;
  max-width: none;
  height: 210px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

#phocagallery .pg-cv-box:hover .pg-box3 img {
  transform: scale(1.05);
}

/* подпись под фото пустая */
#phocagallery .pg-cv-box .pg-box-img-bottom {
  display: none;
}

/* первая плитка — ссылка «назад» с иконкой-стрелкой */
#phocagallery .pg-cv-box:has(img[src*="icon-up-images"]) .pg-box3 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px !important;
  background: #f5f6f7;
}

#phocagallery .pg-cv-box:has(img[src*="icon-up-images"]) .pg-box3 img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#phocagallery .pg-cv-box:has(img[src*="icon-up-images"]):hover .pg-box3 img {
  opacity: 0.9;
  transform: translateX(-4px);
}

/* панель сортировки под галереей */
#phocagallery .pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 14px 16px;
  background: #f6f7f8;
  border-radius: 6px;
}

#phocagallery .pagination select {
  height: 36px;
  margin: 0;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #d5d9dc;
  border-radius: 4px;
  color: #2f3438;
}

@media (max-width: 991px) {
  #pg-msnr-container.pg-msnr-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  #phocagallery .pg-cv-box .pg-box3 img {
    height: 180px;
  }
}

@media (max-width: 600px) {
  #pg-msnr-container.pg-msnr-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  #phocagallery .pg-cv-box .pg-box3 img {
    height: 150px;
  }
  #phocagallery .pg-cv-box:has(img[src*="icon-up-images"]) .pg-box3 {
    height: 150px !important;
  }
}

/* ============================================================
   18. СТРАНИЦА «КОНТАКТЫ» (com_contact)
   ============================================================ */

.contact > .page-header {
  margin: 0 0 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid #eceef0;
}

.contact .page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 600;
  color: #2f3438;   /* был красный 30px */
}

/* --- карта и схема проезда --- */
.contact .contact-left iframe {
  display: block;
  width: 100% !important;   /* в разметке width="600" */
  height: 400px;
  border: 1px solid #e6e8ea;
  border-radius: 8px;
}

.contact .contact-left p {
  margin: 20px 0 0;
}

.contact .contact-left img {
  max-width: 100%;
  height: auto;
  border: 1px solid #e6e8ea;
  border-radius: 8px;
}

/* --- правая колонка: 33% → 40%, иначе адреса и ссылка переносятся --- */
@media (min-width: 992px) {
  .contact .row .contact-left {
    width: 60%;
  }
  .contact .row .contact-information {
    width: 40%;
  }
}

.contact .contact-information .inner {
  padding: 22px 24px;
  background: #f6f7f8;
  border: 1px solid #ebedef;
  border-radius: 8px;
}

/* «Контакты» дублирует заголовок страницы, «Контакт» — служебный */
.contact .contact-information .page-header,
.contact .contact-information h3 {
  display: none;
}

.contact .contact-miscinfo:empty,
.contact .contact-miscinfo dl:empty {
  display: none;
}

.contact dl.contact-address {
  margin: 0;
}

.contact dl.contact-address dt {
  display: none;
}

.contact dl.contact-address dd {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid #e3e6e8;
}

.contact dl.contact-address dd:first-of-type {
  padding-top: 0;
}

.contact dl.contact-address dd:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact dl.contact-address dd > span {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #2f3438;
}

.contact dl.contact-address dd .fa {
  flex: none;
  width: 16px;
  margin-top: 3px;
  color: #e30613;
  font-size: 14px;
  text-align: center;
}

.contact dl.contact-address dd br {
  display: none;
}

.contact .contact-webpage a {
  color: #e30613;
  word-break: break-all;
}

@media (max-width: 767px) {
  .contact .contact-left iframe {
    height: 320px;
  }
  .contact .contact-information {
    margin-top: 24px;
  }
}
