/* 
   DEALPARTNER EMERGENCY FIX - V9 ULTIMATE STABILITY
   Strict, Professional, Unbreakable Layout
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
    --primary: #1e40af;
    --dark: #0f172a;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
}

/* 1. Бронированный сброс */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. ШАПКА - СТАБИЛЬНОСТЬ */
header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-wrap {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-wrap>li {
    position: relative;
}

.nav-wrap>li>a {
    font-weight: 700;
    font-size: 14px;
    color: var(--dark);
    text-transform: uppercase;
}

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

/* Выпадающее меню без наложений */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 250px;
    border: 1px solid var(--border);
    padding: 15px 0;
    display: none;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.nav-wrap li:hover .sub-menu {
    display: block;
}

.sub-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
}

.sub-menu a:hover {
    background: var(--light);
    color: var(--primary);
}

/* 3. ГЛАВНЫЙ ЭКРАН (HERO) */
.hero {
    padding: 100px 0;
    background: var(--light);
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* 4. СЕТКА ТОВАРОВ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    transition: 0.3s;
    background: #fff;
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.card .img-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 20px;
}

.card .img-container img {
    max-height: 160px;
    width: auto;
}

.card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark);
}

.card .price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin: 15px 0;
}

.card .btn {
    display: block;
    text-align: center;
    background: var(--dark);
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
}

/* 5. САЙДБАР И КОНТЕНТ */
.page-layout {
    display: flex;
    gap: 50px;
    padding: 60px 0;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-box {
    background: var(--light);
    padding: 25px;
    border-radius: 12px;
    position: sticky;
    top: 120px;
}

.sidebar-box h4 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    font-size: 14px;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--primary);
}

.main-content {
    flex-grow: 1;
}

.main-content h2 {
    margin: 40px 0 20px;
}

/* 6. ПОДВАЛ (FOOTER) - ЧИСТЫЙ И ТЕМНЫЙ */
footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
}

.footer-logo {
    height: 35px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-title {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.footer-list li {
    margin-bottom: 12px;
}

.footer-list a:hover {
    color: #fff;
}

@media (max-width: 900px) {
    .header-flex {
        flex-direction: column;
        text-align: center;
    }

    .nav-wrap {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-layout {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}