/*
Theme Name: Россавтохим Pro
Theme URI: https://www.rossavtohim.ru
Author: Rossavtohim Development Team
Author URI: https://www.rossavtohim.ru
Description: Высокоскоростная современная тема для сайта оптовых и розничных поставок автомасел, смазок и автохимии «Россавтохим» с интеграцией WooCommerce и B2B-заявок. Создана на базе модульной архитектуры LeonPro.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
Text Domain: rossavtohim
Tags: e-commerce, woocommerce, b2b, auto-parts, grid-layout, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   1. ДИЗАЙН-ТОКЕНЫ И ПЕРЕМЕННЫЕ
   ========================================================================== */
:root {
  /* Фирменные цвета Россавтохим */
  --primary:        #fbd80a; /* Фирменный желтый */
  --primary-hover:  #e6c400;
  --primary-light:  #fffbe6;
  --accent:         #dd3333; /* Фирменный красный */
  --accent-hover:   #bf2323;
  --accent-light:   #fdeded;
  
  /* Контрастная индустриальная темная палитра */
  --dark-bg:        #111216;
  --dark-surface:   #181920;
  --dark-card:      #21232d;
  --dark-border:    rgba(255, 255, 255, 0.1);
  --dark-text:      #ffffff;
  --dark-muted:     #94a3b8;
  
  /* Светлая рабочая зона каталога */
  --bg-body:        #f5f7fa;
  --bg-card:        #ffffff;
  --border-color:   #e2e8f0;
  --border-light:   #edf2f7;
  
  /* Типографика */
  --text-main:      #1e293b;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  
  /* Шрифты */
  --font-sans:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading:   'Montserrat', var(--font-sans);
  --font-mono:      'JetBrains Mono', monospace;
  
  /* Размеры и скругления */
  --radius-xs:      4px;
  --radius-sm:      6px;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      18px;
  --radius-pill:    9999px;
  
  /* Тени */
  --shadow-xs:      0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm:      0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow:         0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg:      0 12px 36px rgba(0, 0, 0, 0.12);
  --shadow-accent:  0 4px 18px rgba(221, 51, 51, 0.3);
  --shadow-primary: 0 4px 18px rgba(251, 216, 10, 0.35);
  
  /* Анимации */
  --transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Сетка */
  --container-max:  1260px;
}

/* ==========================================================================
   2. СБРОС СТИЛЕЙ И БАЗОВАЯ РАЗМЕТКА
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--text-main);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  background: none;
}

/* Скроллбар */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #ebeef5;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Доступность */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* ==========================================================================
   3. СЕТКА И УТИЛИТЫ
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.site-main {
  flex: 1 0 auto;
}

.section-padding {
  padding: 60px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 40px 0;
  }
}

.section-header {
  margin-bottom: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 28px;
  background: var(--primary);
  border-radius: var(--radius-xs);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

.section-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.section-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ==========================================================================
   4. КНОПКИ И БЕЙДЖИ
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.94rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  border: 1.5px solid transparent;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #111216;
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(251, 216, 10, 0.45);
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(221, 51, 51, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-outline:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: #111216;
  box-shadow: var(--shadow-sm);
}

.btn-outline-white {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
}

/* Бейджи */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-hit {
  background: #fee2e2;
  color: #dc2626;
}

.badge-sale {
  background: var(--accent);
  color: #ffffff;
}

.badge-new {
  background: #fef08a;
  color: #854d0e;
}

.badge-stock {
  background: #dcfce7;
  color: #15803d;
}

.badge-brand {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ==========================================================================
   5. ЛОГОТИП С ВРАЩАЮЩЕЙСЯ ШЕСТЕРНЕЙ РОССАВТОХИМ
   ========================================================================== */
.rossavtohim-logo {
  position: relative;
  width: 104px;
  height: 72px;
  flex: 0 0 104px;
  display: block;
  overflow: hidden;
  cursor: pointer;
  margin: 0;
  padding: 0;
  isolation: isolate;
}

.rossavtohim-logo img {
  position: absolute;
  left: 50%;
  top: 70.8%;
  height: 145.5%;
  width: auto;
  aspect-ratio: 1 / 1;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.rossavtohim-logo__main {
  z-index: 2;
  transform: translate(-50%, -50%);
}

.rossavtohim-logo__gear {
  z-index: 1;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50%;
  transition: none;
  will-change: transform;
}

@media (max-width: 991px) {
  .rossavtohim-logo {
    width: 96px;
    height: 66px;
    flex: 0 0 96px;
  }
}

@media (max-width: 576px) {
  .rossavtohim-logo {
    width: 86px;
    height: 60px;
    flex: 0 0 86px;
  }
}
