/**
 * Wiki-Specs.ru — Премиальный дизайн и UI система
 * Modern Glassmorphism & High-Converting Typography (Outfit + Inter)
 */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-glow: rgba(37, 99, 235, 0.15);
    
    --accent-obd: #dc2626;
    --accent-obd-light: #fef2f2;
    --accent-obd-border: #fecaca;
    
    --dark: #0f172a;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    
    --border: #e2e8f0;
    --border-light: rgba(226, 232, 240, 0.8);
    
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
    --card-shadow-hover: 0 20px 32px -8px rgba(37, 99, 235, 0.12);
    --floating-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(226, 232, 240, 0.8);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f8faff;
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(37, 99, 235, 0.03) 0px, transparent 50%);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   HEADER & NAVIGATION (MATTE GLASS)
   ========================================================================== */
header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: var(--transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: var(--slate-900);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo-badge {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    font-size: 18px;
}

.logo span {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-links a {
    color: var(--slate-700);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
}

.nav-links a svg {
    width: 18px;
    height: 18px;
    color: var(--slate-500);
    flex-shrink: 0;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-links a:hover svg {
    color: var(--primary);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--slate-400);
    pointer-events: none;
}

.search-box input {
    padding: 10px 52px 10px 42px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: #ffffff;
    font-size: 14px;
    width: 260px;
    transition: var(--transition);
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.search-box input:focus {
    width: 320px;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.search-hotkey-badge {
    position: absolute;
    right: 12px;
    background: var(--slate-100);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-500);
    pointer-events: none;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs-wrap {
    padding: 14px 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.breadcrumbs li+li:before {
    content: "›";
    color: var(--slate-400);
    margin-right: 8px;
    font-size: 14px;
    font-weight: 600;
}

.breadcrumbs a {
    color: var(--slate-500);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs span {
    color: var(--slate-800);
    font-weight: 600;
}

/* ==========================================================================
   HERO SECTION & MESH BACKGROUND
   ========================================================================== */
.hero {
    text-align: center;
    padding: 24px 0 36px 0;
    position: relative;
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 18px;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -1px;
    color: var(--slate-900);
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 60%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.subtitle {
    color: var(--slate-600);
    font-size: 17px;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   CAR SELECTOR WIDGET (FLOATING CARD)
   ========================================================================== */
.floating-card {
    background: #ffffff;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-light);
    padding: 28px 32px;
    box-shadow: var(--floating-shadow);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.floating-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 50%, #6366f1 100%);
}

.floating-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--slate-900);
}

.car-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.car-select {
    width: 100%;
    height: 52px;
    padding: 0 42px 0 18px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--slate-50);
    font-size: 15px;
    font-weight: 500;
    color: var(--slate-800);
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.car-select:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.car-select:disabled {
    background: #f1f5f9;
    color: var(--slate-400);
    cursor: not-allowed;
    border-color: var(--border);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    height: 52px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ==========================================================================
   CATEGORY CARDS (PREMIUM 3D BADGES & HOVER)
   ========================================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.category-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 24px;
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: var(--card-shadow-hover);
}

.cat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.cat-icon-container {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    flex-shrink: 0;
    overflow: hidden;
}

.cat-icon-container img.cat-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.cat-icon-container svg {
    width: 32px;
    height: 32px;
}

.cat-count-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid rgba(37, 99, 235, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
}

.category-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 8px;
    line-height: 1.3;
}

.category-card p {
    font-size: 13px;
    color: var(--slate-500);
    line-height: 1.55;
    margin-bottom: 18px;
}

.cat-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.cat-card-footer svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.category-card:hover .cat-card-footer svg {
    transform: translateX(4px);
}

/* Accent Cards: OBD-2, Fuses, Guides */
.card-accent-obd {
    background: linear-gradient(180deg, #ffffff 0%, #fffbfb 100%);
    border: 1.5px solid #fecaca;
}
.card-accent-obd:hover {
    border-color: #ef4444;
    box-shadow: 0 20px 32px -8px rgba(239, 68, 68, 0.18);
}
.card-accent-obd .cat-icon-container {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}
.card-accent-obd .cat-count-badge {
    color: #dc2626;
    background: #fee2e2;
    border-color: #fca5a5;
}
.card-accent-obd .cat-card-footer {
    color: #dc2626;
}

.card-accent-fuses {
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    border: 1.5px solid #bfdbfe;
}
.card-accent-fuses:hover {
    border-color: #2563eb;
    box-shadow: 0 20px 32px -8px rgba(37, 99, 235, 0.18);
}

.card-accent-guides {
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
    border: 1.5px solid #e9d5ff;
}
.card-accent-guides:hover {
    border-color: #9333ea;
    box-shadow: 0 20px 32px -8px rgba(147, 51, 234, 0.18);
}
.card-accent-guides .cat-icon-container {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #9333ea;
}
.card-accent-guides .cat-count-badge {
    color: #9333ea;
    background: #f3e8ff;
    border-color: #d8b4fe;
}
.card-accent-guides .cat-card-footer {
    color: #9333ea;
}

/* ==========================================================================
   TABLES & PARAMETERS
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px 0;
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

th {
    background: #f8fafc;
    padding: 14px 18px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-700);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 14px 18px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--slate-800);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: #f8faff;
}

/* Copy Button */
.copy-btn {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-600);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.copy-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Fuses Badges */
.fuse-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    color: #ffffff;
    text-align: center;
    min-width: 48px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.fuse-num-badge {
    font-family: monospace;
    font-weight: 700;
    background: #f1f5f9;
    color: #1e293b;
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
}

.fuse-search-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    border: 2px solid #cbd5e1;
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
    margin-bottom: 24px;
    background: #ffffff;
}

.fuse-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ==========================================================================
   MARKETPLACE WIDGET (OZON, WB, YANDEX MARKET)
   ========================================================================== */
.marketplace-widget {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 26px 28px;
    margin: 28px 0;
    box-shadow: var(--card-shadow);
}

.marketplace-header {
    margin-bottom: 18px;
}

.marketplace-header h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 4px;
}

.marketplace-header p {
    font-size: 14px;
    color: var(--slate-500);
}

.marketplace-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.market-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.market-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.market-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.market-text {
    display: flex;
    flex-direction: column;
}

.market-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.market-action {
    font-size: 12px;
    opacity: 0.85;
}

/* Ozon */
.ozon-btn {
    background: #005bff;
    color: #ffffff;
}
.ozon-btn:hover {
    background: #004edc;
}

/* Wildberries */
.wb-btn {
    background: #cb11ab;
    color: #ffffff;
}
.wb-btn:hover {
    background: #b00f94;
}

/* Yandex Market */
.ym-btn {
    background: #fc3f1d;
    color: #ffffff;
}
.ym-btn:hover {
    background: #e03415;
}

.marketplace-disclaimer {
    font-size: 11px;
    color: var(--slate-400);
    text-align: center;
    margin-top: 8px;
}

/* Tire Pressure Banner */
.tire-pressure-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin: 22px 0;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 2px 10px rgba(34, 197, 94, 0.05);
}

.tire-pressure-icon {
    font-size: 32px;
    background: #dcfce7;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* HowTo Steps */
.howto-step {
    display: flex;
    gap: 18px;
    margin-bottom: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.howto-num {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.howto-text {
    font-size: 15px;
    color: var(--slate-800);
    line-height: 1.65;
}

/* OBD2 Cards */
.obd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.obd-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.obd-card:hover {
    border-color: #ef4444;
    transform: translateY(-4px);
    box-shadow: 0 16px 28px -6px rgba(239, 68, 68, 0.14);
}

.obd-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.obd-code-badge {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: #dc2626;
}

.obd-cat-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    background: #fee2e2;
    color: #b91c1c;
}

.obd-card h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--slate-800);
}

.obd-filter-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.obd-filter-btn {
    padding: 9px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--slate-700);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.obd-filter-btn:hover, .obd-filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* FAQ Block */
.faq-block {
    margin-top: 40px;
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 32px;
    box-shadow: var(--card-shadow);
}

.faq-block h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--slate-900);
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 6px;
}

.faq-item p {
    font-size: 14px;
    color: var(--slate-600);
    line-height: 1.6;
}

/* FOOTER */
footer {
    background: #ffffff;
    border-top: 1px solid var(--border-light);
    padding: 45px 0 35px 0;
    color: var(--slate-500);
    font-size: 13px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--slate-500);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

/* TOAST NOTIFICATION */
#toast-msg {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    pointer-events: none;
}
#toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   PRODUCT CARDS GRID & BRAND FILTERS (CATALOG)
   ========================================================================== */
.brand-filter-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.brand-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: #ffffff;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.brand-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.brand-filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 22px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: var(--card-shadow-hover);
}

.product-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.product-brand-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 9px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-cat-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-500);
    background: var(--slate-100);
    padding: 3px 8px;
    border-radius: 12px;
}

.product-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 8px;
    line-height: 1.35;
}

.product-card p {
    font-size: 13px;
    color: var(--slate-500);
    line-height: 1.55;
    margin-bottom: 16px;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--slate-100);
    padding-top: 12px;
    margin-top: auto;
}

.product-link-btn {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease;
}

.product-card:hover .product-link-btn {
    transform: translateX(4px);
}

/* ==========================================================================
   CAR HUB CATEGORY CARDS (AUTO-HUB)
   ========================================================================== */
.car-hub-card {
    background: #ffffff;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.car-hub-card:hover {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--card-shadow-hover);
}

.car-hub-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--slate-100);
    flex-wrap: wrap;
}

.car-hub-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.car-hub-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.car-hub-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.car-hub-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.car-hub-card-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--slate-900);
}

.car-hub-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.car-hub-item-pill {
    background: var(--slate-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.car-hub-item-pill:hover {
    background: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.pill-brand {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 7px;
    border-radius: 6px;
    flex-shrink: 0;
}

.pill-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-800);
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pill-arrow {
    color: var(--slate-400);
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.2s;
}

.car-hub-item-pill:hover .pill-arrow {
    color: var(--primary);
    transform: translateX(3px);
}

@media(max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 14px;
    }
    .hero h1 {
        font-size: 28px;
    }
    .car-form-row {
        grid-template-columns: 1fr;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .search-box input {
        width: 100%;
    }
    .search-box input:focus {
        width: 100%;
    }
    .marketplace-buttons {
        grid-template-columns: 1fr;
    }
}

/* HowTo Steps for Key Battery and Maintenance */
.howto-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.howto-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.howto-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
}

.howto-text {
    font-size: 15px;
    color: var(--slate-800);
    line-height: 1.65;
    padding-top: 4px;
}

/* ==========================================================================
   Generation Switcher (Переключатель поколений и кузовов)
   ========================================================================== */
.generation-switcher-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: var(--radius-xl) !important;
    padding: 20px 24px !important;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 25px !important;
}

.gen-switcher-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.gen-switcher-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--slate-900) !important;
}

.gen-switcher-hint {
    font-size: 12px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    background: #ffffff !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
}

.gen-switcher-pills {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
    gap: 12px !important;
}

.gen-pill {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
}

.gen-pill:hover {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15) !important;
    transform: translateY(-2px) !important;
}

.gen-pill.active {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.18) !important;
}

.gen-pill-name {
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--slate-800) !important;
    margin-bottom: 6px !important;
    line-height: 1.35 !important;
}

.gen-pill.active .gen-pill-name {
    color: #1d4ed8 !important;
}

.gen-pill-meta {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.gen-pill-code {
    background: #e2e8f0 !important;
    color: #334155 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
}

.gen-pill.active .gen-pill-code {
    background: #bfdbfe !important;
    color: #1e40af !important;
}

.gen-pill-years {
    font-size: 12px !important;
    color: var(--slate-500) !important;
    font-weight: 600 !important;
}

.gen-pill.active .gen-pill-years {
    color: #2563eb !important;
    font-weight: 600 !important;
}

.gen-active-check {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #15803d !important;
    background: #dcfce7 !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}

/* ==========================================================================
   Crosslink Cards (Карточки перелинковки внизу страниц авто)
   ========================================================================== */
.crosslink-card {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.crosslink-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.08) !important;
    border-color: #3b82f6 !important;
}




