/* ==========================================================================
   #ROOT VARIABLES & GLOBAL RESET
   ========================================================================== */

:root {
    /* Цветовая палитра */
    --background: #FFFFFF;
    --main-color: #3A3A3A;
    --accent: #B52040;
    --sec-accent: #D9D9D9;
    --add-color: #ff6b6b;
    
    /* Шрифты */
    --main-fonts: 'Inter', sans-serif;
    --second-fonts: 'Inter', sans-serif;
    --second-fonts-weight: 600;

    /* Размеры и адаптивность */
    --nav-height: 4rem;
    --mobile-nav-height: 3.5rem;
    --transition-speed: 0.3s;
    --transition-ease: ease-in-out;
}

/* Глобальный сброс и настойки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: auto;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--background);
    font-family: var(--main-fonts)
}

/* ==========================================================================
   #HEADER — Верхняя панель навигации сайта
   ========================================================================== */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: clamp(1rem, 5vw, 3rem);
  padding-block: clamp(0.8rem, 2vh, 1.5rem);
  background-color: var(--background);
  color: var(--accent);
  position: relative;
  z-index: 100;
}

/* ———————————————————————————————————————————————
   ЛОГОТИП
   ——————————————————————————————————————————————— */

/* Обёртка логотипа: выравнивание и базовые стили */
.logotip {
  display: flex;
  align-items: center;
  margin: 0;
  line-height: 0; /* Убирает лишний интерлиньяж под SVG */
}

/* Ссылка-логотип: сброс стилей и фокус для доступности */
.logotip a {
  text-decoration: none;
  display: block;
  outline-offset: 4px;
}

/* SVG-логотип: адаптивный размер и цвет через переменную */
.logo {
  width: 150px;
  height: auto;
  max-width: 100%;
  display: block;
  fill: var(--main-color); /* Единообразие с основной цветовой схемой */
}

/* ———————————————————————————————————————————————
   НАВИГАЦИЯ
   ——————————————————————————————————————————————— */

/* Контейнер основной навигации */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: var(--nav-height);
  margin-left: clamp(1rem, 3vw, 2rem);
}

/* Список пунктов меню */
.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.nav-list li {
  margin: 0;
  position: relative;
}

/* Стили ссылок меню */
.nav-list li a {
  color: var(--accent);
  font-family: var(--main-fonts);
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  font-weight: 500;
  text-decoration: none;
  padding: 0.3rem 0;
  display: inline-block;
  transition: color var(--transition-speed) var(--transition-ease);
  white-space: nowrap;
  line-height: 1.2;
  position: relative;
}

/* Анимированный нижний индикатор при наведении */
.nav-list li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  border-radius: 1px;
  transition: width var(--transition-speed) var(--transition-ease);
}

.nav-list li a:hover,
.nav-list li a:focus {
  color: var(--main-color);
}

.nav-list li a:hover::after,
.nav-list li a:focus::after {
  width: 100%;
}

/* Фокус для доступности (WCAG) */
.nav-list li a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Активная страница — текущий пункт меню */
.nav-list li a[aria-current="page"],
.nav-list li a.active {
  color: var(--main-color);
  font-weight: 600;
}

.nav-list li a[aria-current="page"]::after,
.nav-list li a.active::after {
  width: 100%;
  background-color: var(--main-color);
}

/* ———————————————————————————————————————————————
   ГАМБУРГЕР (МОБИЛЬНОЕ МЕНЮ)
   ——————————————————————————————————————————————— */

/* Кнопка переключения мобильного меню */
.mobile-menu-toggle {
  display: none; /* Скрыта на десктопе */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  transition: transform var(--transition-speed) var(--transition-ease);
}

.mobile-menu-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Линии гамбургера */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 24px;
  height: 18px;
  justify-content: center;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--main-color);
  border-radius: 1px;
  transition:
    transform var(--transition-speed) var(--transition-ease),
    opacity var(--transition-speed) var(--transition-ease);
}

/* Анимация при открытии меню */
.mobile-menu-toggle--active .hamburger-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.mobile-menu-toggle--active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle--active .hamburger-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ———————————————————————————————————————————————
   АДАПТИВНЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ——————————————————————————————————————————————— */

@media (max-width: 768px) {
  /* Показываем гамбургер */
  .mobile-menu-toggle {
    display: block;
    margin-right: 1rem;
  }

  /* Скрываем обычную навигацию */
  .header-nav {
    margin-left: 0;
    height: var(--mobile-nav-height);
  }

  .nav-list {
    position: fixed;
    top: var(--mobile-nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s ease,
      visibility 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  .nav-list--active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list li {
    width: 100%;
    text-align: center;
  }

  .nav-list li a {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    padding: 0.75rem 0;
    font-weight: 600;
    display: block;
  }

  .nav-list li a::after {
    height: 3px;
  }
}

/* Мелкие корректировки на очень узких экранах */
@media (max-width: 480px) {
  .header-nav {
    height: 3.25rem;
  }

  .nav-list--active {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .nav-list li a {
    font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  }

  .mobile-menu-toggle {
    margin-right: 0.75rem;
  }
}

/* ———————————————————————————————————————————————
   ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ
   ——————————————————————————————————————————————— */

/* Поддержка prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .nav-list li a,
  .mobile-menu-toggle,
  .hamburger-line {
    transition: none !important;
  }
}

/* Увеличенные touch targets для мобильных */
@media (hover: none) {
  .nav-list li a,
  .mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Поддержка RTL (арабский, иврит и др.) */
html[dir="rtl"] .header-nav {
  margin-left: 0;
  margin-right: clamp(1rem, 3vw, 2rem);
}
html[dir="rtl"] .nav-list {
  flex-direction: row-reverse;
  justify-content: flex-start;
}
html[dir="rtl"] .nav-list li a::after {
  left: auto;
  right: 0;
}
html[dir="rtl"] .mobile-menu-toggle {
  margin-right: 0;
  margin-left: 1rem;
}
html[dir="rtl"] .nav-list--active {
  left: auto;
  right: 0;
}

/* Hover-эффекты только для устройств с мышью */
@media (hover: hover) {
  .nav-list li a:hover {
    color: var(--main-color);
  }
  .nav-list li a:hover::after {
    width: 100%;
  }
}


/* ==========================================================================
   #SITE INFO BAR — Информационная панель под хедером
   ========================================================================== */

.bottom_header {
  background-color: var(--main-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  color: var(--accent);
  padding-inline: clamp(1rem, 5vw, 3rem);
  padding-block: clamp(0.8rem, 1.5vh, 1.2rem);
  gap: clamp(0.5rem, 1.5vh, 1rem);
  border-bottom: solid clamp(3px, 0.5vh, 5px) var(--accent);
}

/* ———————————————————————————————————————————————
   ОСНОВНОЙ ЗАГОЛОВОК САЙТА
   ——————————————————————————————————————————————— */

/* Главный заголовок (обычно название компании/бренда) */
.bottom_header h1 {
  font-family: var(--second-fonts);
  font-weight: 300; /* light — для визуального контраста */
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 1.4;
  margin: 0;
  flex: 1 0 100%; /* занимает всю строку на мобильных */
}

/* На планшетах и выше — выравнивание влево, занимает только нужное пространство */
@media (min-width: 768px) {
  .bottom_header h1 {
    text-align: left;
    flex: 0 0 auto;
  }
}

/* ———————————————————————————————————————————————
   КОНТАКТНАЯ ИНФОРМАЦИЯ
   ——————————————————————————————————————————————— */

/* Контейнер контактов: телефон, email и пр. */
.contacts {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  font-size: clamp(0.8rem, 2.5vw, 1.5rem);
  line-height: 1.4;
  margin: 0;
  padding: 0;
  list-style: none; /* если это <ul> — явно сбрасываем стиль */
}

@media (min-width: 768px) {
  .contacts {
    justify-content: flex-end;
  }
}

/* Стили ссылок контактов */
.contacts a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.5em; /* улучшает touch target */
}

.contacts a:hover,
.contacts a:focus {
  color: var(--background);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  outline: none;
}

.contacts a:focus {
  text-shadow: none;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Иконка + текст в контакте */
.contact-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-item-header svg {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
}

/* ———————————————————————————————————————————————
   УЛУЧШЕНИЯ ДЛЯ ДОСТУПНОСТИ И АДАПТИВНОСТИ
   ——————————————————————————————————————————————— */

/* Поддержка высокой контрастности */
@media (forced-colors: active) {
  .contacts a {
    color: LinkText;
    text-shadow: none !important;
  }
  .contact-item-header svg {
    fill: LinkText !important;
  }
}

/* Отключение анимаций при prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .contacts a {
    transition: none;
    text-shadow: none !important;
  }
}

/* RTL-поддержка */
html[dir="rtl"] .contacts {
  flex-direction: row-reverse;
}
html[dir="rtl"] .contact-item-header {
  flex-direction: row-reverse;
  margin-right: 0;
  margin-left: 0.5rem;
}


/* ==========================================================================
   #HERO — Герой-секция: основной заголовок и призыв к действию
   ========================================================================== */

.hero {
  background-color: var(--main-color);
  min-height: 35vh;
  color: var(--background);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(2rem, 8vh, 4rem) clamp(1rem, 5vw, 3rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ———————————————————————————————————————————————
   ЗАГОЛОВОК САЙТА
   ——————————————————————————————————————————————— */

/* Контейнер для основного заголовка */
.accent-text {
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

/* Главный заголовок героя */
.accent-text h1 {
  font-family: var(--second-fonts);
  font-weight: var(--second-fonts-weight);
  font-size: clamp(1.8rem, 8vw, 4rem);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}

/* ———————————————————————————————————————————————
   ОПИСАНИЕ
   ——————————————————————————————————————————————— */

/* Контейнер с описательным текстом */
.text {
  max-width: 70ch; /* Оптимальная длина строки для удобочитаемости */
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

.text p {
  font-weight: 300; /* light — для контраста с заголовком */
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  line-height: 1.6;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* ———————————————————————————————————————————————
   КНОПКА "ОСТАВИТЬ ЗАЯВКУ" — ОСТАВЛЕНА БЕЗ ИЗМЕНЕНИЙ
   ——————————————————————————————————————————————— */

/* Стили кнопки намеренно не объединяются с другими CTA — сохранена как есть */
.submit-btn {
  border: none;
  border-radius: clamp(25px, 2vw, 150px);
  text-align: center;
  justify-content: center;
  padding: clamp(0.7rem, 2vw, 1rem) clamp(1.5rem, 5vw, 2rem);
  background: linear-gradient(135deg, var(--accent), var(--add-color));
  color: var(--background);
  font-family: var(--main-fonts);
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  font-weight: lighter;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  animation: pulse 2s infinite;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
  background: linear-gradient(135deg, var(--add-color), var(--accent));
}

.submit-btn:active {
  transform: translateY(1px);
}

.submit-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(30deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.submit-btn:hover::after {
  opacity: 1;
  transform: rotate(30deg) translate(50%, 50%);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(255, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

/* ———————————————————————————————————————————————
   АДАПТИВНЫЕ УТОЧНЕНИЯ
   ——————————————————————————————————————————————— */

@media (max-width: 768px) {
  .accent-text h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  .text {
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .text p {
    font-size: clamp(0.8rem, 2vw, 1rem);
    line-height: 1.5;
  }

  .submit-btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    font-size: clamp(1rem, 3vw, 1.1rem);
    border-radius: 50px;
    animation: none; /* пульсация отключена на мобильных */
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
  }
}

@media (max-width: 480px) {
  .accent-text {
    margin-bottom: 1.5rem;
  }

  .accent-text h1 {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .text p {
    font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  }

  .submit-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* ———————————————————————————————————————————————
   ДОСТУПНОСТЬ
   ——————————————————————————————————————————————— */

/* Отключаем анимации, если пользователь предпочитает без них */
@media (prefers-reduced-motion: reduce) {
  .submit-btn {
    animation: none !important;
    transition: none !important;
  }

  .submit-btn:hover,
  .submit-btn:active {
    transform: none !important;
  }
}

/* Focus-состояние для доступности (WCAG) */
.submit-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: clamp(25px, 2vw, 150px);
}

/* Поддержка режима высокой контрастности */
@media (forced-colors: active) {
  .submit-btn {
    background: ButtonFace !important;
    color: ButtonText !important;
    border: 2px solid CanvasText;
    box-shadow: none !important;
  }
  .submit-btn::after {
    display: none;
  }
}


/* ==========================================================================
   #PRODUCTS HEADER — Заголовок раздела каталога продукции
   ========================================================================== */

/* Основной контейнер для центрирования и ограничения ширины */
.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

/* Контейнер заголовка каталога */
.name-products {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: clamp(1rem, 3vh, 2rem);
  margin-bottom: clamp(0.8rem, 2vh, 1rem);
  width: 100%;
}

/* Заголовок "Каталог продукции" */
.name-products h1 {
    font-family: var(--second-fonts);
    font-weight: var(--second-fonts-weight);
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    color: var(--main-color);
    text-align: center;
    line-height: 1.3;
    margin: 0;
    /* Обеспечивает корректный перенос длинных слов (например, "вкладыши") */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ==========================================================================
   #MAIN CONTENT — Основной контент страницы (между хедером и футером)
   ========================================================================== */

main {
  flex: 1; /* Занимает всё доступное пространство в flex-контейнере body */
  background-color: var(--background);
  padding-inline: clamp(1rem, 10vw, 10rem); /* Адаптивные отступы: от 1rem до 10rem */
  padding-block: clamp(1.5rem, 3vh, 2.5rem); /* Вертикальный отступ для дыхания */
  width: 100%;
  min-height: 0; /* Обход "flex minimum size" в Firefox/Safari */
}

/* Убираем большие отступы на мобильных — иначе контент "утопает" */
@media (max-width: 768px) {
  main {
    padding-inline: clamp(0.8rem, 5vw, 1.5rem);
    padding-block: clamp(1rem, 2vh, 1.5rem);
  }
}

@media (max-width: 480px) {
  main {
    padding-inline: clamp(0.5rem, 4vw, 1rem);
    padding-block: clamp(0.8rem, 1.5vh, 1.2rem);
  }
}

/* ==========================================================================
   #SEARCH — Строка поиска по каталогу продукции
   ========================================================================== */

/* Центрированный контейнер поиска */
.standalone-search {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

.standalone-search form {
  width: 100%;
}

/* Обёртка для инпута с абсолютным позиционированием иконок */
.standalone-search .search-wrapper {
  position: relative;
  width: 100%;
}

/* Поле ввода поиска */
.standalone-search .search-input {
  width: 100%;
  min-height: clamp(45px, 7vh, 55px);
  padding: 0 clamp(45px, 8vw, 3rem) 0 clamp(1.2rem, 3vw, 1.5rem);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  background-color: var(--sec-accent);
  border: none;
  border-radius: 150px;
  box-sizing: border-box;
  outline: none;
  appearance: none;
  text-align: center;
  font-family: var(--main-fonts);
  color: var(--main-color);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Фокус: улучшенный визуальный фидбек */
.standalone-search .search-input:focus {
  box-shadow: 0 0 0 3px rgba(181, 32, 64, 0.3);
  background-color: var(--background);
  color: var(--main-color);
}

/* Placeholder: стиль подсказки */
.standalone-search .search-input::placeholder {
  color: var(--accent);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  opacity: 0.8;
  text-align: center;
  transition: opacity 0.2s ease;
}

.standalone-search .search-input:focus::placeholder {
  opacity: 0.2;
}

/* Иконка лупы (поиска) */
.standalone-search .search-icon,
/* Кнопка очистки */
.standalone-search .clear-icon {
  position: absolute;
  right: clamp(12px, 2.5vw, 16px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(16px, 3vw, 20px);
  height: clamp(16px, 3vw, 20px);
  transition: all 0.3s ease;
  pointer-events: none; /* только лупа не кликабельна */
  color: var(--accent);
}

/* Кнопка очистки — активна для клика */
.standalone-search .clear-icon {
  pointer-events: auto;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* Показ/скрытие иконок при наличии текста */
.standalone-search .search-wrapper.has-text .search-icon {
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
}

.standalone-search .search-wrapper.has-text .clear-icon {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

/* Скрытие нативных элементов поиска в WebKit */
.standalone-search .search-input[type="search"]::-webkit-search-cancel-button,
.standalone-search .search-input[type="search"]::-webkit-search-decoration,
.standalone-search .search-input[type="search"]::-webkit-search-results-button,
.standalone-search .search-input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

/* Скрытое, но доступное для скринридеров описание поля */
.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ———————————————————————————————————————————————
   АДАПТИВНЫЕ УТОЧНЕНИЯ
   ——————————————————————————————————————————————— */

@media (max-width: 1024px) {
  .standalone-search .search-input {
    min-height: clamp(42px, 6.5vh, 50px);
    padding: 0 clamp(40px, 7vw, 2.5rem) 0 clamp(1rem, 2.5vw, 1.2rem);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
  }
}

@media (max-width: 768px) {
  .standalone-search {
    margin-bottom: clamp(1rem, 3vh, 2rem);
  }

  .standalone-search .search-input {
    min-height: clamp(40px, 8vh, 48px);
    padding: 0 clamp(35px, 8vw, 2rem) 0 clamp(0.8rem, 2.5vw, 1rem);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    border-radius: 100px;
    text-align: left;
  }

  .standalone-search .search-input::placeholder {
    text-align: left;
  }

  .standalone-search .search-icon,
  .standalone-search .clear-icon {
    right: clamp(10px, 2vw, 14px);
    width: clamp(14px, 2.8vw, 18px);
    height: clamp(14px, 2.8vw, 18px);
  }
}

@media (max-width: 480px) {
  .standalone-search {
    margin-bottom: clamp(0.8rem, 2.5vh, 1.5rem);
  }

  .standalone-search .search-input {
    min-height: clamp(38px, 9vh, 45px);
    padding: 0 clamp(30px, 9vw, 1.8rem) 0 clamp(0.6rem, 2vw, 0.8rem);
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
  }

  .standalone-search .search-input::placeholder {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
  }

  .standalone-search .search-icon,
  .standalone-search .clear-icon {
    right: clamp(8px, 1.8vw, 12px);
    width: clamp(12px, 2.5vw, 16px);
    height: clamp(12px, 2.5vw, 16px);
  }
}

/* ———————————————————————————————————————————————
   УЛУЧШЕНИЯ ДОСТУПНОСТИ
   ——————————————————————————————————————————————— */

/* Поддержка клавиатуры: фокус на кнопке очистки */
.standalone-search .clear-icon:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 50%;
}

/* Отключение анимаций при prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .standalone-search .search-wrapper.has-text .search-icon,
  .standalone-search .search-wrapper.has-text .clear-icon {
    transition: none !important;
  }
}

/* ==========================================================================
   #PRODUCT GRID — Сетка карточек продукции
   ========================================================================== */

/* Контейнер сетки карточек */
.product_cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(300px, 35vw, 400px), 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ———————————————————————————————————————————————
   КАРТОЧКА ТОВАРА
   ——————————————————————————————————————————————— */

/* Основной стиль карточки */
.product-card {
  background: linear-gradient(145deg, #1a1a1a, #252525);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

/* Hover-эффект: подъём + акцентная рамка */
@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(181, 32, 64, 0.3);
    border-color: rgba(181, 32, 64, 0.4);
  }
}

/* ———————————————————————————————————————————————
   ИЗОБРАЖЕНИЕ ТОВАРА (с аспектом 1:1)
   ——————————————————————————————————————————————— */

/* Контейнер с фиксированным соотношением сторон */
.card-image-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%; /* 1:1 — квадрат */
  overflow: hidden;
  background: linear-gradient(135deg, #2a2a2a, #333);
}

/* Декоративный градиент поверх фона */
.card-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  z-index: 1;
}

/* Само изображение товара */
.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px 16px 0 0;
  transition: transform 0.5s ease;
}

@media (hover: hover) {
  .product-card:hover .card-image {
    transform: scale(1.05);
  }
}

/* ———————————————————————————————————————————————
   ЗАГОЛУШКА ДЛЯ ОТСУТСТВУЮЩЕГО ИЗОБРАЖЕНИЯ
   ——————————————————————————————————————————————— */

.placeholder-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  z-index: 2;
  padding: 1.5rem;
}

.placeholder-icon {
  width: 60px;
  height: 60px;
  background: rgba(181, 32, 64, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 2px solid rgba(181, 32, 64, 0.3);
}

.placeholder-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.placeholder-text {
  font-family: var(--second-fonts);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-weight: var(--second-fonts-weight);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.placeholder-article {
  font-family: var(--main-fonts);
  font-size: 0.9rem;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

/* ———————————————————————————————————————————————
   КОНТЕНТ КАРТОЧКИ: заголовок, артикул, цена
   ——————————————————————————————————————————————— */

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Заголовок товара (название) */
.card-title {
  font-family: var(--second-fonts);
  font-size: 2rem;
  color: var(--accent);
  margin: 0;
  line-height: 1.4;
  font-weight: 500;
  text-align: center;
  /* Ограничение до 2 строк */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.title-link {
  color: var(--accent);
  text-decoration: none;
  display: block;
}

.title-link:hover {
  color: var(--add-color);
}

/* Фокус для доступности */
.title-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ———————————————————————————————————————————————
   МЕТА-ИНФОРМАЦИЯ: артикулы
   ——————————————————————————————————————————————— */

.card-meta {
  text-align: center;
  font-family: var(--main-fonts);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.article-meta,
.additional-article-meta {
  display: block;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 0.95rem;
  backdrop-filter: blur(2px);
}

/* ———————————————————————————————————————————————
   ЦЕНОВОЙ БЛОК
   ——————————————————————————————————————————————— */

.card-price-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.8rem 0;
  flex-grow: 1;
}

.price-discount-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.old-price {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--main-fonts);
  font-size: 1rem;
  font-weight: 500;
}

.discount-badge {
  background: linear-gradient(135deg, var(--accent), var(--add-color));
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-family: var(--main-fonts);
  font-weight: bold;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.current-price-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.price-amount {
  font-family: var(--main-fonts);
  color: var(--accent);
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.price-unit {
  font-family: var(--main-fonts);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 400;
}

/* ==========================================================================
   #ORDER BUTTON — Кнопка "Сделать заказ" внутри карточки товара
   Примечание: Используется только в контексте .product-card, не объединяется
   с другими CTA-кнопками для сохранения специфики дизайна.
   ========================================================================== */

.card-order-btn {
  /* Визуальный стиль кнопки */
  background: linear-gradient(135deg, var(--accent), var(--add-color));
  color: var(--background);
  border: none;
  border-radius: 50px;
  font-family: var(--main-fonts);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;

  /* Размеры и позиционирование */
  display: block;
  width: calc(100% - 2rem); /* отступы по краям карточки */
  height: 48px;
  padding: 0.9rem 1.5rem;
  margin: 1rem auto 1rem auto;
  margin-top: auto; /* прижимает кнопку к низу карточки */

  /* Поведение */
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(255, 107, 107, 0.4);
}

/* Hover-эффект: подъём + смена градиента */
@media (hover: hover) {
  .card-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, var(--add-color), var(--accent));
  }

  .card-order-btn:hover::after {
    opacity: 1;
    transform: rotate(30deg) translate(70%, 70%);
  }
}

/* Активное состояние (при нажатии) */
.card-order-btn:active {
  transform: translateY(0);
}

/* Декоративный световой блик (анимированный градиент) */
.card-order-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(30deg);
  transition: all 0.6s ease;
  opacity: 0;
  z-index: -1;
}

/* Focus-состояние для клавиатурной навигации (WCAG) */
.card-order-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 50px; /* дублируется для корректного отображения */
}

/* Отключение анимаций при системной настройке */
@media (prefers-reduced-motion: reduce) {
  .card-order-btn,
  .card-order-btn::after {
    transition: none !important;
    transform: none !important;
  }
}

/* Улучшение тач-таргетов на мобильных */
@media (hover: none) {
  .card-order-btn {
    min-height: 44px;
  }
}

/* ==========================================================================
   #NO PRODUCTS MESSAGE — Блок, отображаемый при отсутствии товаров
   Используется в каталоге или при пустом результате поиска.
   ========================================================================== */

.no-products {
  /* Расширяет элемент на всю ширину родительской сетки */
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(38, 38, 38, 0.9));
  border-radius: 16px;
  margin: 0 auto;
  max-width: 800px;
  border: 1px solid rgba(181, 32, 64, 0.3);
  backdrop-filter: blur(4px);
  /* Анимация появления (если включена в JS) */
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

/* Внутренний контейнер для центрирования содержимого */
.no-products-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* Иконка-заглушка (например, корзина с крестом или лупа) */
.no-products-icon {
  width: 80px;
  height: 80px;
  background: rgba(181, 32, 64, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(181, 32, 64, 0.3);
}

.no-products-icon svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
  stroke: currentColor; /* обеспечивает наследование цвета */
  fill: none;
}

/* Заголовок сообщения */
.no-products h3 {
  margin: 0;
  font-family: var(--second-fonts);
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: var(--second-fonts-weight);
  line-height: 1.3;
}

/* Описательный текст */
.no-products p {
  margin: 0;
  font-family: var(--main-fonts);
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  max-width: 600px;
}

/* ———————————————————————————————————————————————
   КНОПКА "В КАТАЛОГ"
   ——————————————————————————————————————————————— */

/* Контейнер для центрирования кнопки */
.btn-container-products {
  display: flex;
  justify-content: center;
  margin: 2.5rem 0;
  width: 100%;
}

/* Стиль кнопки — оставлен без объединения с другими CTA */
.catalog-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--add-color));
  color: var(--background);
  border: none;
  border-radius: 50px;
  padding: 0.9rem 2rem;
  font-family: var(--main-fonts);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 1.2rem;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 200px;
  /* Улучшение для доступности */
  outline-offset: 4px;
}

@media (hover: hover) {
  .catalog-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.7);
    background: linear-gradient(135deg, var(--add-color), var(--accent));
  }
}

.catalog-btn:active {
  transform: translateY(0);
}

/* Focus-состояние для клавиатурной навигации */
.catalog-btn:focus {
  outline: 2px solid var(--accent);
  border-radius: 50px;
}

/* ———————————————————————————————————————————————
   КОПИЯ КНОПКИ (products-btn) — возможно, дубликат
   Примечание: если .products-btn используется где-то ещё,
   рекомендуется унифицировать классы. Пока оставлено как есть.
   ——————————————————————————————————————————————— */

.products-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--add-color));
  color: var(--background);
  border: none;
  border-radius: 50px;
  padding: 0.9rem 2rem;
  font-family: var(--main-fonts);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 240px;
  text-align: center;
}

@media (hover: hover) {
  .products-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.7);
    background: linear-gradient(135deg, var(--add-color), var(--accent));
  }
}

.products-btn:active {
  transform: translateY(0);
}

.products-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 50px;
}

/* ———————————————————————————————————————————————
   АДАПТИВНЫЕ СТИЛИ
   ——————————————————————————————————————————————— */

@media (max-width: 768px) {
  .no-products {
    padding: 2.5rem 1.5rem;
  }

  .catalog-btn,
  .products-btn {
    width: 100%;
    max-width: 320px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .no-products {
    padding: 2rem 1rem;
  }

  .no-products h3 {
    font-size: 1.6rem;
  }

  .no-products p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .catalog-btn,
  .products-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    letter-spacing: 0.8px;
  }
}

/* Отключение анимаций при системной настройке */
@media (prefers-reduced-motion: reduce) {
  .catalog-btn,
  .products-btn {
    transition: none !important;
    transform: none !important;
  }
}

/* Поддержка высокой контрастности */
@media (forced-colors: active) {
  .catalog-btn,
  .products-btn {
    background: ButtonFace !important;
    color: ButtonText !important;
    border: 2px solid CanvasText;
    box-shadow: none !important;
  }
}


/* ———————————————————————————————————————————————
   ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ
   ——————————————————————————————————————————————— */

   /* Hover эффекты для мобильных */
@media (hover: none) {
    .product-card:hover {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    
    .card-order-btn:hover {
        box-shadow: 0 3px 10px rgba(255, 107, 107, 0.4);
    }
}

/* Focus состояния для доступности */
.card-order-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.title-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}


/* ==========================================================================
   #MODAL — Модальное окно формы заявки
   Используется для сбора контактных данных при клике на "Оставить заявку".
   Анимация появления управляется через класс .active.
   ========================================================================== */

/* Оверлей: затемнение фона */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Контент модального окна */
.modal-content {
  background-color: var(--background);
  border-radius: clamp(20px, 4vw, 40px);
  padding: clamp(2rem, 5vw, 3rem);
  max-width: 90%;
  width: 600px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* ———————————————————————————————————————————————
   КНОПКА ЗАКРЫТИЯ
   ——————————————————————————————————————————————— */

.modal-close {
  position: absolute;
  top: clamp(1rem, 2vw, 1.5rem);
  right: clamp(1rem, 2vw, 1.5rem);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  width: clamp(30px, 5vw, 40px);
  height: clamp(30px, 5vw, 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
  background-color: rgba(181, 32, 64, 0.1);
  transform: rotate(90deg);
  outline: none; /* фокус обрабатывается через background */
}

/* Focus-состояние для клавиатурной навигации */
.modal-close:focus {
  box-shadow: 0 0 0 3px rgba(181, 32, 64, 0.4);
}

.modal-close svg {
  width: clamp(20px, 3vw, 24px);
  height: clamp(20px, 3vw, 24px);
  stroke: currentColor;
  fill: none;
}

/* ———————————————————————————————————————————————
   ЗАГОЛОВОК И ТЕЛЕФОН
   ——————————————————————————————————————————————— */

.modal-content h2 {
  color: var(--main-color);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: clamp(1.5rem, 3vh, 2rem);
  text-align: center;
  font-weight: 500;
}

/* Блок с телефоном для быстрого контакта */
.phone-display {
  text-align: center;
  margin-bottom: clamp(1.5rem, 3vh, 2rem);
  padding: clamp(1rem, 2vw, 1.5rem);
  background-color: rgba(181, 32, 64, 0.05);
  border-radius: clamp(15px, 3vw, 25px);
}

.phone-display p {
  color: var(--main-color);
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin-bottom: clamp(0.5rem, 1vh, 0.8rem);
}

.phone-number {
  display: block;
  color: var(--accent);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .phone-number:hover {
    color: var(--add-color);
  }
}

.phone-number:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ———————————————————————————————————————————————
   ФОРМА ЗАЯВКИ
   ——————————————————————————————————————————————— */

.application-form {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vh, 1.5rem);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1vh, 0.8rem);
}

.form-group label {
  color: var(--main-color);
  font-size: clamp(0.9rem, 2vw, 1rem);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: clamp(0.8rem, 2vw, 1rem);
  border: 2px solid var(--sec-accent);
  border-radius: clamp(10px, 2vw, 15px);
  font-size: clamp(0.95rem, 2vw, 1rem);
  transition: all 0.3s ease;
  background-color: var(--background);
  color: var(--main-color);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(181, 32, 64, 0.2);
}

#message {
  resize: vertical;
  min-height: 100px;
}

/* ———————————————————————————————————————————————
   ЧЕКБОКС СОГЛАСИЯ
   ——————————————————————————————————————————————— */

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.5rem, 1vw, 0.8rem);
  margin-top: clamp(0.5rem, 1vh, 1rem);
}

.checkbox-group input {
  width: clamp(18px, 3vw, 22px);
  height: clamp(18px, 3vw, 22px);
  margin-top: clamp(0.3rem, 0.5vh, 0.5rem);
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  line-height: 1.5;
  color: var(--main-color);
}

.privacy-link {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .privacy-link:hover {
    color: var(--add-color);
  }
}

.privacy-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ———————————————————————————————————————————————
   КНОПКА ОТПРАВКИ ФОРМЫ
   ——————————————————————————————————————————————— */

.submit-form-btn {
  border: none;
  border-radius: clamp(25px, 2vw, 50px);
  padding: clamp(0.8rem, 2vw, 1.2rem);
  background: linear-gradient(135deg, var(--accent), var(--add-color));
  color: var(--background);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  margin-top: clamp(0.5rem, 1vh, 1rem);
  width: 100%;
}

@media (hover: hover) {
  .submit-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, var(--add-color), var(--accent));
  }

  .submit-form-btn:hover::after {
    opacity: 1;
    transform: rotate(30deg) translate(50%, 50%);
  }
}

.submit-form-btn:active {
  transform: translateY(1px);
}

.submit-form-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(30deg);
  transition: all 0.6s ease;
  opacity: 0;
  z-index: -1;
}

/* Focus для доступности */
.submit-form-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: clamp(25px, 2vw, 50px);
}

/* ———————————————————————————————————————————————
   АДАПТИВНОСТЬ
   ——————————————————————————————————————————————— */

@media (max-width: 768px) {
  .modal-content {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    width: 90%;
  }

  .phone-number {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
  }
}

@media (max-width: 480px) {
  .modal-content {
    padding: clamp(1rem, 3vw, 2rem);
    margin: clamp(1rem, 2vw, 2rem);
  }

  .modal-close {
    top: clamp(0.8rem, 1.5vw, 1rem);
    right: clamp(0.8rem, 1.5vw, 1rem);
  }

  .phone-display {
    padding: clamp(0.8rem, 1.5vw, 1.2rem);
  }

  .phone-number {
    font-size: clamp(1rem, 3.5vw, 1.5rem);
  }
}

/* Отключение анимаций при системной настройке */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-content,
  .modal-close,
  .submit-form-btn {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   #FOOTER — Нижний блок сайта: логотип, навигация, контакты, карта, соцсети
   ========================================================================== */

.site-footer {
  background: var(--main-color);
  color: var(--background);
  padding: 60px 0 15px;
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ———————————————————————————————————————————————
   СЕТКА СЕКЦИЙ
   ——————————————————————————————————————————————— */

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section {
  margin-bottom: 30px;
}

/* ———————————————————————————————————————————————
   ЗАГОЛОВКИ СЕКЦИЙ
   ——————————————————————————————————————————————— */

.footer-section h3 {
  font-family: var(--second-fonts);
  font-weight: var(--second-fonts-weight);
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

/* Декоративная акцентная линия под заголовком */
.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

/* ———————————————————————————————————————————————
   ЛОГОТИП И ОПИСАНИЕ КОМПАНИИ
   ——————————————————————————————————————————————— */

.footer-logo {
  display: block;
  margin-bottom: 20px;
  max-width: 200px;
}

.footer-logo svg {
  width: 100%;
  height: auto;
  fill: var(--background); /* согласован с цветовой схемой */
}

.footer-description {
  font-family: var(--main-fonts);
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 25px;
}

/* ———————————————————————————————————————————————
   ССЫЛКИ НАВИГАЦИИ
   ——————————————————————————————————————————————— */

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-family: var(--main-fonts);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
  display: block;
  padding: 5px 0;
}

/* Hover: плавное смещение вправо */
@media (hover: hover) {
  .footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
  }
}

/* Focus для клавиатурной навигации (WCAG) */
.footer-links a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
  transform: translateX(5px);
}

/* ———————————————————————————————————————————————
   КОНТАКТЫ И АДРЕС
   ——————————————————————————————————————————————— */

.footer-contacts {
  margin-top: 25px;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .contact-item:hover {
    color: var(--accent);
  }

  .contact-item:hover .contact-icon {
    background: var(--accent);
  }
}

.contact-icon {
  width: 30px;
  height: 30px;
  background: rgba(181, 32, 64, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.contact-text {
  font-family: var(--main-fonts);
  font-size: 1rem;
}

.address-text {
  font-family: var(--main-fonts);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 15px;
  padding-left: 42px; /* компенсирует отступ под иконку */
}

/* ———————————————————————————————————————————————
   КАРТА РАСПОЛОЖЕНИЯ
   ——————————————————————————————————————————————— */

.map-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 30px;
  margin: 40px 0;
  text-align: center;
  grid-column: 1 / -1; /* занимает всю ширину сетки */
}

.map-section h3 {
  margin-bottom: 20px;
  text-align: center;
  font-family: var(--second-fonts);
  font-weight: var(--second-fonts-weight);
  font-size: 1.5rem;
  color: var(--accent);
}

.map-container {
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(181, 32, 64, 0.3);
}

.map-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px;
  transition: transform 0.3s ease;
}

@media (hover: hover) {
  .map-container:hover .map-iframe {
    transform: scale(1.02);
  }
}

/* ———————————————————————————————————————————————
   КНОПКА "ЗАДАТЬ ВОПРОС"
   ——————————————————————————————————————————————— */

.question-btn {
  background: linear-gradient(135deg, var(--accent), var(--add-color));
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-family: var(--main-fonts);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  margin-top: 15px;
  text-decoration: none;
}

.question-btn svg {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (hover: hover) {
  .question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(181, 32, 64, 0.4);
    background: linear-gradient(135deg, var(--add-color), var(--accent));
  }
}

.question-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 30px;
}

/* ———————————————————————————————————————————————
   НИЖНИЙ БЛОК: КОПИРАЙТ + СОЦСЕТИ
   ——————————————————————————————————————————————— */

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
  text-align: center;
}

.copyright {
  font-family: var(--main-fonts);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

@media (hover: hover) {
  .social-link:hover {
    background: var(--accent);
    transform: translateY(-3px);
  }
}

.social-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 50%;
}

/* ———————————————————————————————————————————————
   АДАПТИВНЫЕ СТИЛИ
   ——————————————————————————————————————————————— */

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .map-container {
    height: 250px;
  }

  .map-section {
    padding: 25px 15px;
    margin: 30px 0;
  }

  .footer-logo {
    max-width: 180px;
    margin: 0 auto 20px;
  }

  /* Адаптация отступа для текста адреса */
  .contact-item,
  .address-text {
    padding-left: 0;
    margin-left: 42px;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 40px 0 20px;
  }

  .footer-container {
    padding: 0 15px;
  }

  .footer-section h3 {
    font-size: 1.2rem;
  }

  .map-container {
    height: 200px;
    border-radius: 15px;
  }

  .map-section h3 {
    font-size: 1.3rem;
    padding: 0 10px;
  }

  .map-section {
    padding: 20px 10px;
    margin: 25px 0;
  }

  .question-btn {
    width: 100%;
    justify-content: center;
  }

  .social-links {
    flex-wrap: wrap;
  }
}

/* ———————————————————————————————————————————————
   АНИМАЦИИ ПОЯВЛЕНИЯ (управляются через CSS)
   ——————————————————————————————————————————————— */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Применяется автоматически при загрузке */
.footer-section,
.map-section,
.footer-bottom {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }
.map-section { animation-delay: 0.5s; }
.footer-bottom { animation-delay: 0.6s; }

/* Отключение анимаций при prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .footer-section,
  .map-section,
  .footer-bottom {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}