/* common.css – финальная версия с переливающейся кнопкой чата и правильными отступами */
:root {
    --font-main: 19px;
    --font-large: 29px;
    --font-btn: 13px;
    --dark-blue: #2c3e50;
    --accent-blue: #4682b4;
    --glass-bg: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(255, 255, 255, 0.3);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body { 
    height: 100%; 
    overflow: hidden; 
}
body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    color: #333;
    line-height: 1.4;
    background: linear-gradient(rgba(225, 240, 255, 0.5), rgba(225, 240, 255, 0.5)), 
                url('../images/шайбы.jpg') center/cover fixed no-repeat;
    display: flex;
    flex-direction: column;
    padding: 10px;
}
.top-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1400px;
    top: 15px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    padding: 12px 30px;
    border-radius: 60px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 100;
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
	opacity: 0.90;
}
.nav-btn {
    color: var(--dark-blue);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 24px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    transition: 0.2s;
    white-space: nowrap;
}
.nav-btn:hover { 
    background: var(--dark-blue); 
    color: white; 
    transform: translateY(-2px); 
}
.discount-btn { 
    background: rgba(230, 126, 34, 0.7) !important; 
    color: white !important; 
}
.cart-btn { 
    background: rgba(46, 204, 113, 0.7) !important; 
    color: white !important; 
}
/* Стрелки навигации (общие) */
.back-area, .forward-area {
    position: fixed;
    z-index: 1000;
}
.back-area { left: 25px; }
.forward-area { right: 25px; }
.nav-btn-round {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--dark-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    backdrop-filter: blur(5px);
}
.nav-btn-round:hover { 
    background: var(--dark-blue); 
    color: white; 
    transform: scale(1.05); 
}
.nav-btn-round svg { 
    width: 24px; 
    height: 24px; 
}
/* Контейнер основного содержимого */
.container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1400px;
    height: calc(100vh - 130px);
    background: var(--glass-bg);
    padding: 20px 25px;
    border-radius: 28px;
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 50;
	-webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
	opacity: 0.85;
}
h1 { 
    font-size: 26px; 
    text-align: center; 
    margin-bottom: 15px; 
    color: var(--dark-blue); 
    flex-shrink: 0; 
}
/* Серая маска изображений */
img, .card-img-wrapper img, .product-grid img, .card img {
    filter: brightness(1.02) contrast(1.02) saturate(0.5) sepia(0.05) !important;
    transition: filter 0.2s ease;
}
img:hover, .card-img-wrapper img:hover, .product-grid img:hover, .card img:hover {
    filter: brightness(1) contrast(1) saturate(1) sepia(0) !important;
}
/* Читаемость текста */
body, p, li, div, span, .description, .note, small, .model-item, .engine-models,
td, .vin-note, .tolerance-info, .info-card p, .cart-table td, .summary-block div,
.valve-card label, .shim-suggestion, .modal-content input, .modal-content select {
    color: #1a1a2e !important;
    font-weight: 500 !important;
}
b, strong, h1, h2, h3, h4, th, .buy-btn, .order-btn, .price, .price-total {
    font-weight: 700 !important;
}
/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 450px;
}
.modal-content input, .modal-content select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}
/* ===== КНОПКА ЧАТА – МЕДЛЕННОЕ ПЕРЕЛИВАНИЕ ЦВЕТАМИ, ПОЛУПРОЗРАЧНАЯ ===== */
@keyframes chatRainbow {
     0%   { background-color: #9b59b6; }  /* фиолетовый */
    40%  { background-color: #2980b9; }  /* синий */
    80% { background-color: #2c3e50; }  /* серый-синий (тёмный) */
	100%   { background-color: #9b59b6; }  /* фиолетовый */
}
.chat-btn {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    font-size: 30px;
    text-decoration: none;
    animation: chatRainbow 30s infinite ease-in-out;
    background-color: #0088cc;
    box-shadow: none;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.75;
	
}
.chat-btn:hover {
    animation: none;
    transform: scale(1.1);
    filter: brightness(1.05);
    opacity: 1;
}
/* ========== МОБИЛЬНЫЕ (ширина ≤ 768px) ========== */
@media (max-width: 768px) {
    .top-nav {
        display: block !important;
        background: rgba(255, 255, 255, 0.15) !important;
        backdrop-filter: blur(25px) !important;
        border-radius: 30px !important;
        padding: 0 !important;
        width: 95% !important;
        top: 10px !important;
    }
    .menu-toggle {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
        gap: 8px;
        cursor: pointer;
        padding: 12px 0;
        font-weight: bold;
        font-size: 18px;
        color: var(--dark-blue);
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        border-radius: 30px;
    }
    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(25px);
        border-radius: 30px;
        pointer-events: none;
        margin-top: 0;
        padding: 0 10px;
    }
    .nav-links.open {
        max-height: 500px;
        opacity: 1;
        pointer-events: auto;
        padding: 15px 10px;
        margin-top: 8px;
    }
    .nav-links .nav-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 30px;
        font-size: 16px;
        white-space: normal;
        margin: 0;
    }
    .top-nav > .nav-btn {
        display: none;
    }
    /* Контейнер – отступ снизу, чтобы кнопки не перекрывали содержимое */
    .container {
        position: fixed;
        top: 85px;
        left: 0 !important;
        right: 0;
        bottom: 100px;  /* увеличенный отступ под нижние кнопки */
        width: 100% !important;
        transform: none !important;
        border-radius: 0 !important;
        padding: 15px !important;
        overflow-y: auto;
        height: auto;
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 5%, black 95%, transparent);
        mask-image: linear-gradient(to bottom, transparent, black 5%, black 95%, transparent);
		opacity: 0.85;
    }
    /* Стрелки – по углам внизу */
    .back-area, .forward-area {
        position: fixed !important;
        bottom: 20px !important;
        top: auto !important;
        transform: none !important;
        z-index: 2000 !important;
    }
    .back-area { left: 20px !important; right: auto !important; }
    .forward-area { right: 20px !important; left: auto !important; }
    .nav-btn-round {
        width: 50px !important;
        height: 50px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 2px solid var(--dark-blue) !important;
    }
    .nav-btn-round svg {
        width: 28px !important;
        height: 28px !important;
    }
    /* Кнопка чата – снизу по центру */
    .chat-btn {
        bottom: 20px;
        left: 0;
        right: 0;
        margin: 0 auto;
        top: auto;
        transform: none;
    }
    h1 { font-size: 22px; }
    body, p, div, span, li, .description {
        font-weight: 460 !important;
    }
    body, p, li, div, span, .description, td, .model-item {
        color: #0f0f1a !important;
        font-weight: 500 !important;
    }
}

/* ========== ДЕСКТОП (ширина ≥ 769px) ========== */
@media (min-width: 769px) {
    .menu-toggle { display: none !important; }
    .nav-links {
        display: flex !important;
        flex-direction: row !important;
        max-height: none !important;
        opacity: 1 !important;
        background: none !important;
        backdrop-filter: none !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: auto !important;
    }
    .top-nav {
        display: flex !important;
        justify-content: center;
        flex-wrap: wrap;
    }
    /* Стрелки – по бокам по центру */
    .back-area, .forward-area {
        top: 50% !important;
        transform: translateY(-50%) !important;
        bottom: auto !important;
    }
    .back-area { left: 25px !important; }
    .forward-area { right: 25px !important; }
    /* Кнопка чата – справа вверху */
    .chat-btn {
        top: 20px;
        right: 110px;
        bottom: auto;
        left: auto;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .nav-btn { 
        padding: 3px 6px; 
        font-size: 8px; 
    }
}