/* ============================================
   ПОЛНЫЙ АУДИТ - ТЁМНАЯ ТЕМА ДЛЯ ВСЕХ ЭЛЕМЕНТОВ
   ============================================ */

/* ===== ОСНОВНОЙ ФОН ===== */
body {
    background-color: #1a1a1a !important;
    color: #e8e8e8 !important;
}

main {
    background-color: #1a1a1a !important;
}

/* ===== БЕЛЫЕ И СВЕТЛЫЕ ФОНЫ ===== */
.bg-white {
    background-color: #2d2d2d !important;
}

.bg-slate-50 {
    background-color: #2d2d2d !important;
}

/* КРИТИЧЕСКОЕ ИСКЛЮЧЕНИЕ: блок "О партнерстве" НЕ должен использовать bg-slate-50 */
.bg-gradient-to-br.from-primary-50.to-slate-50,
div.bg-gradient-to-br.from-primary-50.to-slate-50,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 {
    background-color: #252525 !important;
}

/* Исключение для градиентов - не переопределять фон градиента */
.bg-gradient-to-br.from-primary-50.to-slate-50.bg-slate-50,
div.bg-gradient-to-br.from-primary-50.to-slate-50.bg-slate-50 {
    background: linear-gradient(135deg, #1f1f1f 0%, #252525 50%, #2a2a2a 100%) !important;
    background-color: transparent !important;
}

.bg-slate-100 {
    background-color: #2d2d2d !important;
}

.bg-gray-50 {
    background-color: #2d2d2d !important;
}

.bg-gray-100 {
    background-color: #2d2d2d !important;
}

.bg-red-50 {
    background-color: #3a1a1a !important;
}

.min-h-screen.bg-white {
    background-color: #1a1a1a !important;
}

.bg-gradient-to-b.from-slate-50.to-white {
    background: linear-gradient(to bottom, #2d2d2d, #1a1a1a) !important;
}

.bg-gradient-to-br.from-slate-50.to-white {
    background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

.bg-gradient-to-br.from-primary-50.to-white {
    background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    border-color: #404040 !important;
}

/* Блок "О партнерстве" на странице поставщиков - такой же стиль как from-primary-50 to-white на главной */
.bg-gradient-to-br.from-primary-50.to-slate-50,
div.bg-gradient-to-br.from-primary-50.to-slate-50,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl,
.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl.p-8,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl.border {
    background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    background-color: #2d2d2d !important;
    background-image: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

/* Переопределение для всех возможных комбинаций классов блока "О партнерстве" */
[class*="from-primary-50"][class*="to-slate-50"][class*="rounded-xl"] {
    background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    background-color: #2d2d2d !important;
    background-image: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

div.bg-gradient-to-br.from-primary-50.to-slate-50 *,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 *,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl *,
.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl *,
[class*="from-primary-50"][class*="to-slate-50"][class*="rounded-xl"] * {
    color: inherit !important;
}

/* Текст в блоке "О партнерстве" использует стандартные цвета как на главной странице */
div.bg-gradient-to-br.from-primary-50.to-slate-50 h2,
div.bg-gradient-to-br.from-primary-50.to-slate-50 h3,
div.bg-gradient-to-br.from-primary-50.to-slate-50 p,
div.bg-gradient-to-br.from-primary-50.to-slate-50 strong,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 h2,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 h3,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 p,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 strong,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl h2,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl h3,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl p,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl strong {
    color: inherit !important;
}

div.bg-gradient-to-br.from-primary-50.to-slate-50 svg,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 svg,
div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl svg {
    color: #808080 !important;
}

.bg-gradient-to-br.from-gray-50.to-gray-100 {
    background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    border-color: #404040 !important;
}

/* ===== ТЁМНЫЙ ТЕКСТ НА ТЁМНОМ ФОНЕ → СВЕТЛЫЙ ===== */
.text-slate-900 {
    color: #e8e8e8 !important;
}

.text-slate-800 {
    color: #d3d3d3 !important;
}

.text-slate-700 {
    color: #d3d3d3 !important;
}

.text-slate-600 {
    color: #c0c0c0 !important;
}

.text-slate-500 {
    color: #a9a9a9 !important;
}

.text-gray-900 {
    color: #e8e8e8 !important;
}

.text-gray-800 {
    color: #d3d3d3 !important;
}

.text-gray-700 {
    color: #d3d3d3 !important;
}

.text-gray-600 {
    color: #c0c0c0 !important;
}

.text-gray-500 {
    color: #a9a9a9 !important;
}

.text-gray-400 {
    color: #808080 !important;
}

.text-red-900 {
    color: #ffcccc !important;
}

.text-red-800 {
    color: #ffaaaa !important;
}

.text-red-700 {
    color: #ff8888 !important;
}

.text-blue-700 {
    color: #a0c4ff !important;
}

.text-blue-600 {
    color: #a0c4ff !important;
}

/* ===== КАРТОЧКИ И ПАНЕЛИ ===== */
.card {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2),
                0 0 1px rgba(192, 192, 192, 0.2) !important;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.2),
                0 0 20px rgba(192, 192, 192, 0.3) !important;
}

.card-panel {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

.product-card {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

.product-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3),
                0 0 30px rgba(192, 192, 192, 0.2) !important;
    border-color: #808080 !important;
}

/* ===== ГРАНИЦЫ ===== */
.border-slate-200 {
    border-color: #404040 !important;
}

.border-slate-300 {
    border-color: #505050 !important;
}

.border-gray-200 {
    border-color: #404040 !important;
}

.border-gray-300 {
    border-color: #505050 !important;
}

.border-red-200 {
    border-color: #5a3a3a !important;
}

.border-red-500 {
    border-color: #cc6666 !important;
}

.border-blue-200 {
    border-color: #505080 !important;
}

.border-b-2.border-gray-200 {
    border-color: #404040 !important;
}

.border-t.border-slate-200 {
    border-color: #404040 !important;
}

.border-t.border-gray-300 {
    border-color: #505050 !important;
}

/* ===== ВХОДНЫЕ ПОЛЯ И ФОРМЫ ===== */
input[type="text"],
input[type="tel"],
input[type="email"],
textarea,
select,
.control-input {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder,
.control-input::placeholder {
    color: #808080 !important;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus,
.control-input:focus {
    background-color: #2d2d2d !important;
    border-color: #808080 !important;
    color: #e8e8e8 !important;
    outline: none !important;
}

.input {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

.input::placeholder {
    color: #808080 !important;
}

.input:focus {
    border-color: #808080 !important;
    box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.3) !important;
}

/* ===== КНОПКИ ===== */
.btn-primary {
    background-image: linear-gradient(to right, #a9a9a9, #808080) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.1),
                0 0 20px rgba(192, 192, 192, 0.3) !important;
}

.btn-primary:hover {
    background-image: linear-gradient(to right, #808080, #696969) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.1),
                0 0 30px rgba(192, 192, 192, 0.5) !important;
}

/* Синие кнопки → металлические */
.bg-blue-600 {
    background-color: #808080 !important;
    background-image: linear-gradient(to right, #a9a9a9, #808080) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.1),
                0 0 20px rgba(192, 192, 192, 0.3) !important;
}

.bg-blue-600:hover,
.hover\:bg-blue-700:hover {
    background-color: #696969 !important;
    background-image: linear-gradient(to right, #808080, #696969) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.1),
                0 0 30px rgba(192, 192, 192, 0.5) !important;
}

/* Кнопка формы с синим фоном → металлический */
.form-submit {
    background: linear-gradient(to right, #a9a9a9, #808080) !important;
    background-color: #808080 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.1),
                0 0 20px rgba(192, 192, 192, 0.3) !important;
}

.form-submit:hover {
    background: linear-gradient(to right, #808080, #696969) !important;
    background-color: #696969 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.1),
                0 0 30px rgba(192, 192, 192, 0.5) !important;
}

.btn-secondary {
    background-color: transparent !important;
    border-color: #808080 !important;
    color: #d3d3d3 !important;
}

.btn-secondary:hover {
    background-color: #2d2d2d !important;
    border-color: #a9a9a9 !important;
    color: #e8e8e8 !important;
}

button.bg-white {
    background-color: #2d2d2d !important;
    color: #e8e8e8 !important;
}

button.bg-white:hover {
    background-color: #404040 !important;
}

.hover\:bg-slate-50:hover {
    background-color: #404040 !important;
}

/* ===== БЕДЖИ И ТЕГИ ===== */
.bg-blue-50 {
    background-color: #2d2d3a !important;
}

.bg-primary-100 {
    background-color: #2d2d2d !important;
}

.bg-slate-100 {
    background-color: #2d2d2d !important;
}

/* ===== PRIMARY COLORS - МЕТАЛЛИЧЕСКИЙ ХРОМ ===== */
.text-primary-50 { color: #f8f8f8 !important; }
.text-primary-100 { color: #e8e8e8 !important; }
.text-primary-300 { color: #d3d3d3 !important; }
.text-primary-400 { color: #c0c0c0 !important; }
.text-primary-500 { color: #a9a9a9 !important; }
.text-primary-600 { color: #808080 !important; }
.text-primary-700 { color: #696969 !important; }

.bg-primary-50 { background-color: #2d2d2d !important; }
.bg-primary-100 { background-color: #2d2d2d !important; }
.bg-primary-300 { background-color: #404040 !important; }
.bg-primary-400 { background-color: #505050 !important; }
.bg-primary-500 { background-color: #606060 !important; }
.bg-primary-600 { background-color: #808080 !important; }
.bg-primary-600\/20 { background-color: rgba(128, 128, 128, 0.2) !important; }
.bg-primary-700 { background-color: #696969 !important; }

.border-primary-100 { border-color: #404040 !important; }
.border-primary-300 { border-color: #505050 !important; }
.border-primary-500\/30 { border-color: rgba(128, 128, 128, 0.3) !important; }
.border-primary-600 { border-color: #808080 !important; }
.border-primary-700 { border-color: #696969 !important; }

.from-primary-50 { --tw-gradient-from: #2d2d2d var(--tw-gradient-from-position); }

/* ПЕРЕОПРЕДЕЛЕНИЕ для блока "О партнерстве" - темный градиент */
.bg-gradient-to-br.from-primary-50.to-slate-50 .from-primary-50,
div.bg-gradient-to-br.from-primary-50.to-slate-50 .from-primary-50,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 .from-primary-50 {
    --tw-gradient-from: #1f1f1f var(--tw-gradient-from-position) !important;
}

.bg-gradient-to-br.from-primary-50.to-slate-50 .to-slate-50,
div.bg-gradient-to-br.from-primary-50.to-slate-50 .to-slate-50,
.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50 .to-slate-50 {
    --tw-gradient-to: #2a2a2a var(--tw-gradient-to-position) !important;
}
.from-primary-600 { --tw-gradient-from: #808080 var(--tw-gradient-from-position); }
.to-primary-700 { --tw-gradient-to: #696969 var(--tw-gradient-to-position); }

/* ===== НАВИГАЦИЯ И ФУТЕР ===== */
.bg-slate-900 {
    background-color: #1a1a1a !important;
}

.bg-slate-800 {
    background-color: #2d2d2d !important;
}

.bg-slate-700 {
    background-color: #404040 !important;
}

/* Градиенты с slate-900 и slate-800 → единый тёмный */
.bg-gradient-to-br.from-slate-900.via-slate-800.to-slate-900 {
    background: linear-gradient(to bottom right, #1a1a1a, #1a1a1a, #1a1a1a) !important;
    background-color: #1a1a1a !important;
}

.bg-gradient-to-br.from-slate-900.to-slate-800 {
    background: linear-gradient(to bottom right, #1a1a1a, #1a1a1a) !important;
    background-color: #1a1a1a !important;
}

.text-slate-300 {
    color: #d3d3d3 !important;
}

.text-slate-400 {
    color: #c0c0c0 !important;
}

footer.bg-slate-900 {
    background-color: #1a1a1a !important;
}

footer .text-slate-400 {
    color: #a9a9a9 !important;
}

footer .text-slate-300 {
    color: #c0c0c0 !important;
}

footer .text-slate-500 {
    color: #808080 !important;
}

/* ===== HOVER СОСТОЯНИЯ ===== */
.hover\:text-primary-300:hover {
    color: #d3d3d3 !important;
}

.hover\:text-white:hover {
    color: #ffffff !important;
}

.hover\:bg-slate-800:hover {
    background-color: #2d2d2d !important;
}

.hover\:bg-slate-700:hover {
    background-color: #404040 !important;
}

.hover\:border-primary-300:hover {
    border-color: #808080 !important;
}

.hover\:text-gray-900:hover {
    color: #e8e8e8 !important;
}

.hover\:text-slate-900:hover {
    color: #e8e8e8 !important;
}

/* ===== CSS ПЕРЕМЕННЫЕ ДЛЯ catalog.html ===== */
:root {
    --bg-main: #1a1a1a !important;
    --panel: #2d2d2d !important;
    --stroke: #404040 !important;
    --ink: #e8e8e8 !important;
    --muted: #c0c0c0 !important;
    --accent: #808080 !important;
    --accent-2: #696969 !important;
}

/* ===== СПЕЦИАЛЬНЫЕ ЭЛЕМЕНТЫ ===== */
.prose {
    color: #e8e8e8 !important;
}

.prose strong {
    color: #e8e8e8 !important;
}

.prose p {
    color: #d3d3d3 !important;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
    color: #e8e8e8 !important;
}

.prose ul, .prose ol {
    color: #d3d3d3 !important;
}

.prose li {
    color: #d3d3d3 !important;
}

/* ===== СПИННЕР И ЛОАДЕР ===== */
.spinner {
    border-color: #404040 !important;
    border-top-color: #808080 !important;
}

/* ===== ПРОДУКТ ИЗОБРАЖЕНИЯ ===== */
.product-image-wrapper {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%) !important;
    border-color: #404040 !important;
}

/* ===== ПРОЧИЕ ЭЛЕМЕНТЫ ===== */
.control-label {
    color: #c0c0c0 !important;
}

#error-message {
    background-color: #3a1a1a !important;
    border-color: #5a3a3a !important;
    color: #ff8888 !important;
}

#loading p {
    color: #c0c0c0 !important;
}

/* ===== SVG И ИКОНКИ ===== */
svg.text-gray-300 {
    color: #808080 !important;
}

svg.text-slate-400 {
    color: #808080 !important;
}

svg.text-slate-600 {
    color: #808080 !important;
}

/* ===== ВСЕ СТРАНИЦЫ ===== */
article.bg-white {
    background-color: #2d2d2d !important;
}

div.bg-white.rounded-xl,
div.bg-white.rounded-lg {
    background-color: #2d2d2d !important;
}

div.bg-white.border {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ ПЕРЕОПРЕДЕЛЕНИЯ ===== */
* {
    scrollbar-color: #404040 #1a1a1a;
}

*::-webkit-scrollbar {
    background-color: #1a1a1a;
}

*::-webkit-scrollbar-thumb {
    background-color: #404040;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #505050;
}

/* ===== КРИТИЧЕСКОЕ ПЕРЕОПРЕДЕЛЕНИЕ БЛОКА "О ПАРТНЕРСТВЕ" ===== */
/* Применяем тот же стиль, что и from-primary-50 to-white на главной странице */
main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl,
body main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50,
html body main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl.p-8,
html body main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl.border,
html body main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl.shadow-sm {
    background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    background-color: #2d2d2d !important;
    background-image: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

/* АБСОЛЮТНОЕ ПЕРЕОПРЕДЕЛЕНИЕ - применяется ко ВСЕМ элементам с этими классами */
[class*="mb-12"][class*="bg-gradient-to-br"][class*="from-primary-50"][class*="to-slate-50"][class*="rounded-xl"] {
    background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    background-color: #2d2d2d !important;
    background-image: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

/* ФИНАЛЬНОЕ ПЕРЕОПРЕДЕЛЕНИЕ - применяется в самом конце для гарантии */
div[class*="from-primary-50"][class*="to-slate-50"]:has(h2:contains("О партнерстве")),
div[class*="from-primary-50"][class*="to-slate-50"]:has(h2),
div.mb-12[class*="from-primary-50"][class*="to-slate-50"] {
    background: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    background-color: #2d2d2d !important;
    background-image: linear-gradient(to bottom right, #2d2d2d, #1a1a1a) !important;
    border-color: #404040 !important;
    color: #e8e8e8 !important;
}

div[class*="from-primary-50"][class*="to-slate-50"]:has(h2) *,
div.mb-12[class*="from-primary-50"][class*="to-slate-50"] * {
    color: inherit !important;
}

/* Текст наследует цвет от родителя, стандартные цвета применяются автоматически */
main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl h2,
main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl p,
main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl strong,
main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl .text-slate-900,
main div div div.mb-12.bg-gradient-to-br.from-primary-50.to-slate-50.rounded-xl .text-slate-700 {
    color: inherit !important;
}
