/* =====================================================================
   Футер по макету дизайнера (владелец, 12.11.2026) — footer.php (.qp-ftq). Подключается на всех страницах (functions.php).
   Макет 1920: «Консультация» и соцсети; контакты слева и 4 колонки по 240 px (Магазин / Услуги / Информация / Бренд);
   линия, реквизиты ИП и «Правовая информация»; надпись QUANTUM PC во всю ширину (Bahnschrift узкий, серый и красный
   градиенты). Телефон и планшет — адаптация агента. Старые правила .qp-site-footer__* в main.css к новой разметке не относятся.
   Здесь же @font-face Roboto (normal, 4 сабсета, тот же самохостинг, что catalog-test-4.css) — шрифт футера и
   нового конфигуратора (configurator-q.css); браузер не скачивает файл дважды, даже если тест-страница объявит его снова.
   ===================================================================== */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/roboto/roboto-normal-cyrillic-ext.woff2") format("woff2"); /* cyrillic-ext */
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/roboto/roboto-normal-cyrillic.woff2") format("woff2"); /* cyrillic */
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/roboto/roboto-normal-latin-ext.woff2") format("woff2"); /* latin-ext */
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/roboto/roboto-normal-latin.woff2") format("woff2"); /* latin */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.qp-site-footer.qp-ftq {
  position: relative;
  padding: 32px 0 0;
  overflow: hidden;
  background: linear-gradient(180deg, #2a2a2a 0%, #232323 100%);
  color: #ffffff;
  font-family: "Roboto", Arial, sans-serif;
}
.qp-ftq__shell { position: relative; z-index: 1; }

.qp-ftq__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.qp-ftq__consult {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 216px;
  min-height: 40px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--qp-accent, #d51c32);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.qp-ftq__consult:hover { background: var(--qp-accent-strong, rgba(213, 28, 50, 0.7)); color: #ffffff; }
.qp-ftq__socials { display: flex; align-items: center; gap: 14px; }
.qp-ftq__social {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffffff;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.qp-ftq__social svg { width: 30px; height: 30px; }
.qp-ftq__social--telegram svg, .qp-ftq__social--vk svg { width: 34px; height: 34px; }
.qp-ftq__social--avito svg { width: 26px; height: 26px; }
.qp-ftq__social:hover { color: var(--qp-accent, #d51c32); }

.qp-ftq__grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px 0;
  margin-top: 36px;
}
.qp-ftq__contacts { display: flex; flex-direction: column; align-items: flex-start; font-style: normal; }
.qp-ftq__phone { font-size: 20px; font-weight: 700; line-height: 1.3; color: #ffffff; text-decoration: none; }
.qp-ftq__h { margin-top: 18px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.qp-ftq__text { margin-top: 6px; font-size: 16px; line-height: 1.4; color: #ffffff; text-decoration: none; }
a.qp-ftq__text:hover, .qp-ftq__phone:hover { color: var(--qp-accent, #d51c32); }

.qp-ftq__nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.qp-ftq__title { margin: 0 0 14px; font-size: 16px; font-weight: 700; line-height: 1.3; color: #ffffff; }
.qp-ftq__col ul { margin: 0; padding: 0; list-style: none; }
.qp-ftq__col li + li { margin-top: 10px; }
.qp-ftq__col a { font-size: 16px; line-height: 1.4; color: #a1a1a1; text-decoration: none; transition: color 0.15s ease; }
.qp-ftq__col a:hover { color: #ffffff; }

.qp-ftq__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid #5a5a5a;
}
.qp-ftq__req { margin: 0; font-size: 13px; line-height: 1.5; color: #8a8a8a; }
.qp-ftq__legal { text-align: right; }
.qp-ftq__legal summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  color: #a1a1a1;
  list-style: none;
  cursor: pointer;
}
.qp-ftq__legal summary::-webkit-details-marker { display: none; }
.qp-ftq__legal summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.qp-ftq__legal[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.qp-ftq__legal summary:hover { color: #ffffff; }
.qp-ftq__legal-list { margin: 12px 0 0; padding: 0; list-style: none; }
.qp-ftq__legal-list li + li { margin-top: 8px; }
.qp-ftq__legal-list a { font-size: 14px; color: #a1a1a1; text-decoration: none; }
.qp-ftq__legal-list a:hover { color: #ffffff; }
.qp-ftq a:focus-visible, .qp-ftq summary:focus-visible { outline: 2px solid rgba(213, 28, 50, 0.7); outline-offset: 3px; border-radius: 4px; }

/* SEO-ссылки «Подборок» (template-parts/footer-links.php, оригинал 26.10) — решение владельца 12.11: в стиле нового футера,
   отдельным рядом под основными колонками. Сетка совпадает с основной: первая колонка под контактами (336 + зазор 24 = 360),
   остальные четыре — под «Магазин / Услуги / Информация / Бренд». Старые правила nav-q.css перекрыты в рамках .qp-ftq. */
.qp-ftq .qp-footer-links { margin: 40px 0 0; padding: 32px 0 0; border-top: 1px solid #3a3a3a; border-bottom: 0; }
.qp-ftq .qp-footer-links .qp-shell { width: auto; margin: 0; }
.qp-ftq .qp-footer-links__grid { grid-template-columns: 336px repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.qp-ftq .qp-footer-links__title { margin: 0 0 14px; color: #ffffff; font-size: 16px; font-weight: 700; line-height: 1.3; }
.qp-ftq .qp-footer-links__title a:hover { color: var(--qp-accent, #d51c32); text-decoration: none; }
.qp-ftq .qp-footer-links ul { gap: 8px; }
.qp-ftq .qp-footer-links li a { color: #a1a1a1; font-size: 15px; line-height: 1.4; transition: color 0.15s ease; }
.qp-ftq .qp-footer-links li a:hover { color: #ffffff; }

/* Надпись QUANTUM PC: SVG на всю ширину окна (поля 40 px при 1920, как в макете), низ букв у нижней кромки */
.qp-ftq__brand { position: relative; margin-top: 28px; padding: 0 clamp(12px, 2.1vw, 40px); line-height: 0; pointer-events: none; user-select: none; }
.qp-ftq__brand svg { display: block; width: 100%; height: auto; }
.qp-ftq__brand-text {
  font-family: "quantum", "Roboto Condensed", "Arial Narrow", sans-serif; /* Bahnschrift — шрифт логотипа, только здесь (владелец 14.11) */
  font-size: 700px;
  font-weight: 700;
  font-variation-settings: "wght" 700, "wdth" 75;
  font-stretch: 75%;
}

/* Якоря ссылок футера (блоки доставки, контактов, отзывов, команды) — не прятать заголовок под закреплённой шапкой */
#delivery, #contacts, #reviews, #team { scroll-margin-top: calc(var(--qp-hdr-main-h, 72px) + 24px); }

@media (max-width: 1279px) {
  .qp-ftq__grid { grid-template-columns: 300px minmax(0, 1fr); }
  .qp-ftq .qp-footer-links__grid { grid-template-columns: 276px repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .qp-ftq__grid { grid-template-columns: minmax(0, 1fr); }
  .qp-ftq__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .qp-ftq .qp-footer-links__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
}
@media (max-width: 767px) {
  .qp-site-footer.qp-ftq { padding-top: 28px; }
  .qp-ftq__top { flex-direction: column; align-items: stretch; gap: 20px; }
  .qp-ftq__consult { width: 100%; }
  .qp-ftq__socials { justify-content: space-between; gap: 8px; }
  .qp-ftq__social { width: 44px; height: 44px; }
  .qp-ftq__grid { margin-top: 28px; }
  .qp-ftq__phone, .qp-ftq__h { font-size: 18px; }
  .qp-ftq__col a { display: inline-block; padding: 3px 0; font-size: 15px; }
  .qp-ftq__bottom { flex-direction: column; margin-top: 32px; }
  .qp-ftq__legal { text-align: left; }
  .qp-ftq__brand { margin-top: 20px; }
}
@media (max-width: 767px) {
  .qp-ftq .qp-footer-links { margin-top: 32px; padding-top: 28px; }
  .qp-ftq .qp-footer-links li a { display: inline-block; padding: 3px 0; }
}
@media (max-width: 380px) {
  .qp-ftq__nav, .qp-ftq .qp-footer-links__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 18.11.2026 (владелец): телефон — надпись QUANTUM PC внизу видна целиком ----------
   Её закрывали кнопка «наверх» (44 px + 16) и нижние полосы «Заказать» (карточка товара, конфигуратор D4), а хвост «Q»
   обрезался рамкой SVG. Под надписью — место под эти элементы и безопасную зону iPhone. */
.qp-ftq__brand svg { overflow: visible; }
@media (max-width: 767px) {
  .qp-ftq__brand { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  body.single-product .qp-ftq__brand,
  body:has(.qp-cfgq-bar) .qp-ftq__brand { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
}
