/*
Theme Name: Blocksy Child - МСК-ЕВРОСТРОЙ
Template: blocksy
Version: 1.1.4
*/

/* ------------------------------------------------------------------
   Задача 3.1 (docs/PLAN.md) - дизайн-система по docs/TZ.md §1.
   Палитра, шрифт, контейнер и колонки заданы theme_mod'ами
   (inc/setup/customizer.php). Здесь - то, для чего у Blocksy Free
   нет своей настройки: скругления, вес цен, цвет «В наличии»,
   верхняя строка шапки и мобильная sticky-панель.
   ------------------------------------------------------------------ */

:root {
  --msk-primary: #E65100;
  --msk-primary-hover: #BF360C;
  --msk-accent: #1565C0;
  --msk-bg: #FAFAFA;
  --msk-text: #1F1F1F;
  --msk-gray: #6B6B6B;
  --msk-success: #2E7D32;
  --msk-radius: 8px;
}

/* Скругления 8 px, тени минимальные (TZ §1) */
.ct-media-container,
.entry-card,
.ct-image-container img,
.woocommerce-product-gallery__image img,
.ct-button,
.ct-button-ghost,
.button,
.wp-block-button__link,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  border-radius: var(--msk-radius);
}

.entry-card {
  box-shadow: none;
}

/* Цены - 700 и акцентный цвет (TZ §1) */
.price,
.woocommerce-Price-amount,
.ct-price,
.summary .price .amount {
  font-weight: 700;
}

.entry-summary .price,
.entry-summary .price .amount,
.entry-card .price,
[data-products] .price {
  color: var(--msk-primary);
}

/* Зачёркнутая старая цена - серым, она не акцент */
.price del,
.price del .amount {
  color: var(--msk-gray);
  font-weight: 400;
}

/* Наличие */
.stock.in-stock,
.ct-stock-status[data-status="in-stock"] {
  color: var(--msk-success);
}

.stock.out-of-stock {
  color: var(--msk-gray);
}

/* ---------------- Шапка (TZ §2) ---------------- */

/* Верхняя строка: адрес и почта - мелко и серым */
header [data-row="top"] {
  font-size: 13px;
}

header [data-row="top"] .msk-header-info {
  color: var(--msk-gray);
}

header [data-row="top"] a {
  color: inherit;
  text-decoration: none;
}

header [data-row="top"] a:hover {
  color: var(--msk-primary);
}

/* Строка поиска по каталогу (шорткод [msk_search], inc/search.php) */
.msk-search {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 320px;
  max-width: 460px;
}

@media (min-width: 1400px) {
  .msk-search {
    min-width: 420px;
  }
}

.msk-search__field {
  width: 100%;
  height: 42px;
  padding: 0 46px 0 14px;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  background: #fff;
  font-size: 14px;
}

.msk-search__field:focus {
  border-color: var(--msk-primary);
  outline: none;
}

.msk-search__submit {
  position: absolute;
  inset: 0 0 0 auto;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0 var(--msk-radius) var(--msk-radius) 0;
  background: transparent;
  color: var(--msk-gray);
  cursor: pointer;
}

.msk-search__submit:hover {
  color: var(--msk-primary);
}

.msk-search__submit svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Средние экраны (до 1500): ужимаем меню, поиск и адрес, чтобы
   десять веток каталога и сервисные пункты не схлопывались в пункт «Больше».
   Селекторы начинаются с body[data-header] - атрибут data-header тема ставит
   на сам <body>, а лишний уровень специфичности нужен потому, что
   динамический CSS Blocksy подключается ПОСЛЕ стилей child theme. */
.msk-addr-short {
  display: none;
}

@media (max-width: 1499.98px) {
  body[data-header*="type-1"] .ct-header [data-id="menu"] {
    --menu-items-spacing: 8px;
  }

  body[data-header*="type-1"] .ct-header [data-id="menu"] > ul > li > a {
    --theme-font-size: 12.5px;
  }

  body[data-header*="type-1"] .ct-header [data-id="menu-secondary"] {
    --menu-items-spacing: 14px;
  }
}

/* Поиск и адрес ужимаются позже меню: на 1440 места им ещё хватает */
@media (max-width: 1399.98px) {
  .msk-search {
    min-width: 230px;
    max-width: 340px;
  }

  .msk-search__field {
    font-size: 13px;
  }

  .msk-addr-full {
    display: none;
  }

  .msk-addr-short {
    display: inline;
  }
}

/* Ниже 1300 кнопка калькулятора в шапке уступает место категориям -
   пункт «Калькулятор» остаётся в верхней строке (задачи 4.2 и 3.1).
   Селектор по ссылке, а не по data-id: клон элемента билдера («button~2»)
   рендерится с произвольным data-id вида "2". */
@media (max-width: 1299.98px) {
  body[data-header*="type-1"] .ct-header .ct-header-cta:has(a[href="/calculator/"]) {
    display: none;
  }
}

/* Совсем узкий десктоп (1000–1280): последний пункт иначе уезжает в «Больше» */
@media (max-width: 1279.98px) {
  body[data-header*="type-1"] .ct-header [data-id="menu"] {
    --menu-items-spacing: 7px;
  }

  body[data-header*="type-1"] .ct-header [data-id="menu"] > ul > li > a {
    --theme-font-size: 12px;
  }
}

/* 1000–1100: места в основной строке не хватает. Прячем кнопку «Заказать
   звонок» (телефон рядом и так кликабельный) и ужимаем поиск. */
@media (max-width: 1100px) {
  body[data-header*="type-1"] .ct-header [data-id="button"] {
    display: none;
  }

  .msk-search {
    min-width: 200px;
    max-width: 260px;
  }

  .msk-header-phone a {
    font-size: 16px;
  }

  .msk-header-phone small {
    display: none;
  }
}

/* Телефон в основной строке */
.msk-header-phone {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  white-space: nowrap;
}

.msk-header-phone a {
  font-size: 18px;
  font-weight: 700;
  color: var(--msk-text);
  text-decoration: none;
}

.msk-header-phone a:hover {
  color: var(--msk-primary);
}

.msk-header-phone small {
  font-size: 12px;
  color: var(--msk-gray);
}

/* ---------------- Мобильная sticky-панель (TZ §2) ----------------
   Blocksy Free своей нижней панели не имеет - разметка в inc/mobile-bar.php */

.msk-mobile-bar {
  display: none;
}

@media (max-width: 999.98px) {
  .msk-mobile-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #fff;
    border-top: 1px solid #E3E3E3;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .msk-mobile-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 4px 8px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--msk-text);
    text-decoration: none;
  }

  .msk-mobile-bar a + a {
    border-left: 1px solid #EFEFEF;
  }

  .msk-mobile-bar svg {
    width: 21px;
    height: 21px;
    stroke: var(--msk-primary);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .msk-mobile-bar .msk-mobile-bar__wa svg {
    stroke: #25D366;
  }

  .msk-mobile-bar__count.is-empty {
    display: none;
  }

  .msk-mobile-bar__count {
    position: absolute;
    transform: translate(14px, -10px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--msk-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
  }

  /* чтобы панель не перекрывала футер и кнопку «В корзину» */
  body.msk-has-mobile-bar {
    padding-bottom: 62px;
  }
}

/* ---------------- Свотчи вариаций (задача 3.2, TZ §5) ---------------- */

.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item {
  min-width: 54px;
  border-radius: var(--msk-radius);
  padding: 0 10px;
}

.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item .variable-item-span {
  border-radius: var(--msk-radius);
}

.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item.selected {
  border-color: var(--msk-primary);
  box-shadow: 0 0 0 1px var(--msk-primary) inset;
}

/* Подсветка блока выбора, когда с липкой панели ведём к свотчам */
.variations.msk-highlight {
  animation: msk-pulse 1.2s ease;
}

@keyframes msk-pulse {
  0%, 100% { box-shadow: none; }
  30%, 70% { box-shadow: 0 0 0 3px rgba(230, 81, 0, .25); }
}

/* ================ Главная страница (задача 3.4, TZ §4) ================ */

.msk-section-title {
  margin: 48px 0 20px;
  font-size: 28px;
}

/* --- Hero-слайдер (inc/hero.php) --- */

.msk-hero {
  position: relative;
  margin-bottom: 8px;
}

.msk-hero__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.msk-hero__track::-webkit-scrollbar {
  display: none;
}

.msk-hero__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 340px;
  padding: 32px 40px;
  border-radius: var(--msk-radius);
  background: linear-gradient(120deg, #FFF3E9 0%, #FFE6D3 100%);
}

.msk-hero__content {
  flex: 1 1 55%;
}

.msk-hero__title {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.2;
}

.msk-hero__text {
  margin: 0 0 22px;
  max-width: 44ch;
  color: #4A4A4A;
}

.msk-hero__button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--msk-radius);
  background: var(--msk-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.msk-hero__button:hover {
  background: var(--msk-primary-hover);
  color: #fff;
}

.msk-hero__media {
  flex: 0 0 38%;
  text-align: center;
}

.msk-hero__media img {
  max-height: 280px;
  width: auto;
  mix-blend-mode: multiply;
}

.msk-hero__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.msk-hero__dot {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: #E0E0E0;
}

.msk-hero__dot.is-active {
  background: var(--msk-primary);
}

/* --- Карточки категорий и преимуществ --- */

.msk-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 22px;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease;
}

.msk-card:hover {
  border-color: var(--msk-primary);
}

.msk-card__icon svg,
.msk-feature__icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--msk-accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msk-card__title {
  font-size: 17px;
  font-weight: 600;
}

.msk-card__meta {
  font-size: 13px;
  color: var(--msk-gray);
}

.msk-card__meta .amount {
  color: var(--msk-primary);
  font-weight: 600;
}

.msk-feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 20px;
  border-radius: var(--msk-radius);
  background: #fff;
  border: 1px solid #EFEFEF;
}

.msk-feature__title {
  font-size: 16px;
}

.msk-feature__text {
  font-size: 14px;
  color: var(--msk-gray);
  line-height: 1.55;
}

/* --- Шаги подбора --- */

.msk-step {
  height: 100%;
  padding-left: 52px;
  position: relative;
}

.msk-step__number {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--msk-primary);
  color: #fff;
  font-weight: 700;
}

.msk-step__title {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.msk-step__text {
  font-size: 14px;
  color: var(--msk-gray);
  line-height: 1.55;
}

.msk-center-button {
  justify-content: center;
  margin-top: 26px;
}

/* --- Блок магазина --- */

.msk-shop-block {
  margin: 56px 0 8px;
  padding: 32px 36px;
  border-radius: var(--msk-radius);
  background: #F2F2F2;
}

.msk-shop-block h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.msk-shop-block p {
  margin: 0 0 14px;
  line-height: 1.6;
}

.msk-shop-block__link,
.msk-shop-block__phone {
  display: inline-block;
  margin-right: 14px;
  padding: 11px 22px;
  border-radius: var(--msk-radius);
  font-weight: 600;
  text-decoration: none;
}

.msk-shop-block__link {
  background: var(--msk-primary);
  color: #fff;
}

.msk-shop-block__link:hover {
  background: var(--msk-primary-hover);
  color: #fff;
}

.msk-shop-block__phone {
  border: 1px solid var(--msk-primary);
  color: var(--msk-primary);
}

@media (max-width: 767.98px) {
  .msk-hero__slide {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 24px 20px;
  }

  .msk-hero__title {
    font-size: 26px;
  }

  .msk-hero__media {
    display: none;
  }

  .msk-section-title {
    margin: 36px 0 16px;
    font-size: 23px;
  }

  .msk-shop-block {
    padding: 24px 20px;
  }
}

/* ---------------- Таблица вариаций серии (задача 3.3, TZ §5) ---------------- */

.msk-variations {
  /* Хук после summary выводится вне контейнера (article у товара «wide»),
     поэтому ширину контейнера Blocksy задаём сами. */
  width: var(--theme-container-width);
  max-width: var(--theme-normal-container-max-width, 1290px);
  margin: 40px auto;
}

.msk-variations__title {
  margin-bottom: 16px;
  font-size: 22px;
}

.msk-variations__scroll {
  overflow: auto;
  /* длинные серии (до 30 размеров) не должны выдавливать вкладки вниз */
  max-height: 560px;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  background: #fff;
}

.msk-variations__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.msk-variations__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.msk-variations__table th,
.msk-variations__table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid #EFEFEF;
  white-space: nowrap;
}

.msk-variations__table th {
  font-size: 13px;
  font-weight: 600;
  color: var(--msk-gray);
  background: #FAFAFA;
}

.msk-variations__table tbody tr:last-child td {
  border-bottom: 0;
}

.msk-variations__table tbody tr:hover {
  background: #FFF8F3;
}

.msk-variations__value {
  font-weight: 600;
}

.msk-variations__sku {
  color: var(--msk-gray);
  font-size: 13px;
}

.msk-variations__price {
  font-weight: 700;
  color: var(--msk-primary);
}

.msk-variations__price del {
  font-weight: 400;
  font-size: 13px;
  color: var(--msk-gray);
}

.msk-in-stock {
  color: var(--msk-success);
}

.msk-out-of-stock {
  color: var(--msk-gray);
}

.msk-variations__buy form {
  margin: 0;
}

.msk-variations__button {
  padding: 7px 16px;
  border: 1px solid var(--msk-primary);
  border-radius: var(--msk-radius);
  background: #fff;
  color: var(--msk-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.msk-variations__button:hover {
  background: var(--msk-primary);
  color: #fff;
}

.msk-variations__table tr.is-out-of-stock .msk-variations__value,
.msk-variations__table tr.is-out-of-stock .msk-variations__price {
  opacity: .65;
}

/* Документы во вкладке */
.msk-documents {
  list-style: none;
  margin: 0;
  padding: 0;
}

.msk-documents li + li {
  margin-top: 8px;
}

.msk-documents a::before {
  content: "PDF";
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--msk-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ---------------- Липкая кнопка «В корзину» (задача 3.2) ----------------
   Только мобильные: на время показа прячет общую нижнюю панель (TZ §2). */

.msk-sticky-atc {
  display: none;
}

@media (max-width: 999.98px) {
  .msk-sticky-atc:not([hidden]) {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 101;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #E3E3E3;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .08);
  }

  .msk-sticky-atc__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }

  .msk-sticky-atc__title {
    font-size: 12px;
    color: var(--msk-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .msk-sticky-atc__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--msk-primary);
  }

  .msk-sticky-atc__price del {
    font-size: 12px;
  }

  .msk-sticky-atc__button {
    flex: 0 0 auto;
    padding: 11px 20px;
    border: 0;
    border-radius: var(--msk-radius);
    background: var(--msk-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }

  body.msk-atc-visible .msk-mobile-bar {
    display: none;
  }
}

/* Кнопка счёта на странице «Заказ принят» (задача 5.2) */
.msk-invoice-button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--msk-radius);
  background: var(--msk-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.msk-invoice-button:hover {
  background: var(--msk-primary-hover);
  color: #fff;
}

/* Подсказка про бесплатную доставку (задача 5.1) */
.msk-free-shipping-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--msk-radius);
  background: #FFF6F0;
  font-size: 14px;
}

/* SEO-текст под каталогом категории (задача 6.3) */
.msk-category-text {
  margin: 44px 0 8px;
  padding-top: 28px;
  border-top: 1px solid #E3E3E3;
  font-size: 15px;
  line-height: 1.7;
  color: #3D3D3D;
}

.msk-category-text h2,
.msk-category-text h3 {
  margin: 22px 0 10px;
  font-size: 19px;
}

.msk-category-text ul {
  padding-left: 20px;
}

/* Блок «Статьи и советы» на главной (задача 6.2) */
.msk-latest-posts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.msk-latest-post {
  display: flex;
  flex-direction: column;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  overflow: hidden;
  background: #fff;
}

.msk-latest-post__image img {
  width: 100%;
  height: auto;
  display: block;
}

.msk-latest-post__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}

.msk-latest-post__title {
  font-size: 17px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.msk-latest-post__title:hover {
  color: var(--msk-primary);
}

.msk-latest-post__excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--msk-gray);
}

.msk-latest-post__date {
  font-size: 12px;
  color: var(--msk-gray);
}

/* ================ Блок «Товары из статьи» (задача 6.2) ================ */

.msk-article-products {
  margin: 36px 0;
  padding: 22px;
  border-radius: var(--msk-radius);
  background: #FFF6F0;
}

.msk-article-products__title {
  margin: 0 0 16px;
  font-size: 21px;
}

.msk-article-products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.msk-article-product {
  display: flex;
  flex-direction: column;
  border-radius: var(--msk-radius);
  background: #fff;
  overflow: hidden;
}

.msk-article-product__image img {
  width: 100%;
  height: auto;
  display: block;
}

.msk-article-product__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
}

.msk-article-product__title {
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.msk-article-product__title:hover {
  color: var(--msk-primary);
}

.msk-article-product__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--msk-primary);
}

.msk-article-product__button {
  margin-top: 4px;
  display: inline-block;
  padding: 9px 14px;
  border: 0;
  border-radius: var(--msk-radius);
  background: var(--msk-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.msk-article-product__button:hover {
  background: var(--msk-primary-hover);
  color: #fff;
}

/* ================ Калькулятор (задача 4.1, TZ §6) ================ */

.msk-calc__form {
  padding: 24px;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  background: #fff;
}

.msk-calc__group {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.msk-calc__group legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
}

.msk-calc__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.msk-calc__option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  cursor: pointer;
  font-size: 15px;
}

.msk-calc__option:hover {
  border-color: var(--msk-primary);
}

.msk-calc__option input {
  margin-top: 3px;
  accent-color: var(--msk-primary);
}

.msk-calc__option small {
  display: block;
  font-size: 12px;
  color: var(--msk-gray);
}

.msk-calc__option:has(input:checked) {
  border-color: var(--msk-primary);
  background: #FFF6F0;
}

.msk-calc__area {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--msk-gray);
}

.msk-calc__area input {
  width: 120px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  font-size: 17px;
  font-weight: 600;
  color: var(--msk-text);
}

.msk-calc__submit {
  padding: 14px 32px;
  border: 0;
  border-radius: var(--msk-radius);
  background: var(--msk-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.msk-calc__submit:hover {
  background: var(--msk-primary-hover);
}

.msk-calc__result:not(:empty) {
  margin-top: 32px;
}

.msk-calc__summary {
  padding: 24px;
  border-radius: var(--msk-radius);
  background: #FFF6F0;
}

.msk-calc__summary h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.msk-calc__numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.msk-calc__numbers li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msk-calc__numbers span {
  font-size: 13px;
  color: var(--msk-gray);
}

.msk-calc__numbers strong {
  font-size: 19px;
  color: var(--msk-primary);
}

.msk-calc__hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.msk-calc__products-title {
  margin: 28px 0 16px;
  font-size: 22px;
}

.msk-calc__products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.msk-calc__product {
  display: flex;
  flex-direction: column;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  overflow: hidden;
  background: #fff;
}

.msk-calc__product-image img {
  width: 100%;
  height: auto;
  display: block;
}

.msk-calc__product-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

.msk-calc__product-title {
  font-size: 15px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.msk-calc__product-title:hover {
  color: var(--msk-primary);
}

.msk-calc__product-meta {
  font-size: 12px;
  color: var(--msk-gray);
}

.msk-calc__product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--msk-primary);
}

.msk-calc__product-button {
  margin-top: 6px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--msk-radius);
  background: var(--msk-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.msk-calc__product-button:hover {
  background: var(--msk-primary-hover);
}

.msk-calc__more {
  margin-top: 20px;
}

.msk-calc__empty,
.msk-calc__error {
  padding: 16px;
  border-radius: var(--msk-radius);
  background: #FFF3E9;
}

.msk-calc__loading {
  color: var(--msk-gray);
}

/* ================ Заявки и мессенджеры (задача 3.5, TZ §6) ================ */

/* --- Плавающие кнопки (inc/floating.php) --- */

.msk-floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msk-floating__button {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  cursor: pointer;
}

.msk-floating__button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msk-floating__button--wa {
  background: #25D366;
}

.msk-floating__button--tg {
  background: #229ED9;
}

.msk-floating__button--call {
  background: var(--msk-primary);
}

.msk-floating__button:hover {
  filter: brightness(1.06);
}

@media (max-width: 999.98px) {
  /* над нижней панелью из inc/mobile-bar.php */
  .msk-floating {
    right: 12px;
    bottom: 74px;
    gap: 8px;
  }

  .msk-floating__button {
    width: 44px;
    height: 44px;
  }

  /* на мобильных звонок и WhatsApp уже есть в нижней панели */
  .msk-floating__button--call,
  .msk-floating__button--wa {
    display: none;
  }
}

/* --- Модалка (inc/callback.php) --- */

.msk-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.msk-modal[hidden] {
  display: none;
}

.msk-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, .55);
}

.msk-modal__box {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.msk-modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--msk-gray);
  cursor: pointer;
}

.msk-modal__title {
  margin: 0 0 8px;
  font-size: 22px;
}

.msk-modal__text {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--msk-gray);
}

body.msk-modal-open {
  overflow: hidden;
}

/* --- Кнопка «Купить в 1 клик» (задача 3.6) --- */

.msk-one-click-button {
  margin-top: 10px;
  width: 100%;
  padding: 13px 20px;
  border: 1px solid var(--msk-primary);
  border-radius: var(--msk-radius);
  background: #fff;
  color: var(--msk-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.msk-one-click-button:hover {
  background: var(--msk-primary);
  color: #fff;
}

.msk-form__product {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--msk-radius);
  background: #F7F7F7;
  font-size: 14px;
  font-weight: 600;
}

/* --- Форма --- */

.msk-form__label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--msk-gray);
}

.msk-form__label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #E3E3E3;
  border-radius: var(--msk-radius);
  font-size: 15px;
  color: var(--msk-text);
}

.msk-form__label input:focus {
  border-color: var(--msk-primary);
  outline: none;
}

.msk-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.msk-form__submit {
  width: 100%;
  padding: 13px 20px;
  border: 0;
  border-radius: var(--msk-radius);
  background: var(--msk-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.msk-form__submit:hover {
  background: var(--msk-primary-hover);
}

.msk-form__submit[disabled] {
  opacity: .6;
  cursor: default;
}

.msk-form__note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--msk-gray);
}

.msk-form__result {
  margin: 12px 0 0;
  font-size: 14px;
}

.msk-form__result.is-success {
  color: var(--msk-success);
}

.msk-form__result.is-error {
  color: #C62828;
}

/* ---------------- Фильтры каталога (задача 2.4) ----------------
   Filter Everything free показывает фильтр даже там, где у товаров нет ни
   одного значения атрибута (например, «Площадь обогрева» в регуляторах), и
   пишет «Фильтр пока не имеет терминов» - опции «скрыть пустой фильтр» в
   бесплатной версии нет. Плагин сам вешает на секцию класс
   wpc-filter-terms-count-0, им и пользуемся. */
.wpc-filter-terms-count-0 {
  display: none;
}

/* ---------------- Футер (TZ §3) ---------------- */

.msk-footer-block {
  font-size: 14px;
  line-height: 1.7;
}

.msk-footer-block strong {
  display: block;
  margin-bottom: 4px;
}

.msk-footer-block a {
  text-decoration: none;
}

.msk-footer-requisites {
  font-size: 13px;
  line-height: 1.65;
  color: var(--msk-gray);
}

/* 5.2 Безналичный расчёт: ИНН и КПП в два столбца внутри блока способа оплаты
   (без плавающих form-row-first/last - они вылезали из рамки). */
.payment_box .msk-invoice-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.payment_box .msk-invoice-fields .form-row {
  float: none;
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 689px) {
  .payment_box .msk-invoice-fields {
    grid-template-columns: 1fr;
  }
}
