/* Общие стили */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap'); /* Добавляем Roboto */

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

body {
    font-family: 'Roboto', 'Inter', sans-serif; /* Обновляем семейство шрифтов */
    line-height: 1.6;
    color: #333; /* Основной цвет текста */
    background-color: #ffffff; /* Белый фон для страницы */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px; /* Немного уменьшим для соответствия макету */
    margin: 0 auto;
    padding: 0 15px; /* Уменьшим паддинги контейнера */
}

a {
    text-decoration: none;
    color: #2e75d3; /* Основной цвет ссылок из макета */
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: none;
    color: #005cb9; /* Более темный оттенок при наведении */
}

button, .btn {
    cursor: pointer;
    font-family: 'Roboto', 'Inter', sans-serif;
    border-radius: 4px; /* Слегка скругленные углы для кнопок */
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex; /* Для выравнивания иконок в кнопках */
    align-items: center;
    justify-content: center;
}

/* Основной стиль кнопки */
.btn-primary {
    background-color: #007bff; /* Синий цвет - унифицированный */
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

/* Второстепенный стиль кнопки */
.btn-secondary {
    background-color: transparent; /* Прозрачный фон */
    color: #007bff; /* Синий текст - унифицированный */
    border: 1px solid #007bff; /* Синяя рамка */
}

.btn-secondary:hover {
    background-color: rgba(0, 123, 255, 0.1); /* Легкий синий фон при наведении */
    color: #0056b3;
    border-color: #0056b3;
}

/* Универсальные стили для всех кнопок "В корзину" */
.add-to-cart, 
button.add-to-cart,
.btn.add-to-cart {
    background-color: #007bff !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 15px !important;
    font-size: 0.85em !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    transition: background-color 0.2s ease, transform 0.15s ease !important;
    cursor: pointer !important;
    text-align: center !important;
}

.add-to-cart:hover,
button.add-to-cart:hover,
.btn.add-to-cart:hover {
    background-color: #0056b3 !important;
    transform: translateY(-1px) !important;
}

.add-to-cart:active,
button.add-to-cart:active,
.btn.add-to-cart:active {
    background-color: #004085 !important;
}

/* Стили для новой шапки */
.site-header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(33, 150, 243, 0.10);
    border-bottom: none;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    height: 64px;
    border-bottom: 1px solid #eaf6ff;
}

.logo-container .logo {
    font-family: 'Roboto', sans-serif;
    font-size: 30px;
    font-weight: 900;
    color: #1976d2;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s;
}

.logo-container .logo:hover {
    color: #1a73e8;
}

.header-contacts {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #1976d2;
    gap: 24px;
}

.header-contacts span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.header-contacts i {
    color: #1976d2;
    font-size: 17px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px; /* Немного увеличим отступ, т.к. кругов не будет */
}

.header-icon {
    color: #444; /* Более темный цвет для иконок */
    background: none;
    font-size: 24px; /* Немного увеличим размер самих иконок */
    /* Убираем width, height, border-radius, чтобы не было кругов */
    display: flex; /* Оставляем для выравнивания, если внутри текст или еще что-то */
    align-items: center;
    justify-content: center;
    transition: color 0.18s;
    box-shadow: none;
    position: relative; /* Для корректного позиционирования .cart-badge */
    padding: 5px; /* Небольшой отступ для удобства клика */
}

.header-icon:hover {
    color: #007bff; /* Цвет при наведении, можно выбрать другой */
    background: none;
}

.cart-badge {
    position: absolute;
    top: -2px;      /* Скорректированная позиция */
    right: -4px;     /* Скорректированная позиция */
    background: #ff5252;
    color: #fff;
    border-radius: 50%; /* Оставляем круглым сам бейдж */
    padding: 2px 5px; /* Немного изменим паддинг для компактности */
    font-size: 10px;   /* Уменьшим шрифт для компактности */
    font-weight: bold;
    line-height: 1;
    pointer-events: none; /* Чтобы не мешал клику по иконке */
}

.main-navigation {
    background: #1976d2;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.08), 0 4px 5px 0 rgba(0, 0, 0, 0.14);
}

.main-navigation .container {
    padding: 0;
    max-width: 100vw;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 36px;
    height: 54px;
}

.main-navigation ul li {
    margin: 0;
}

.main-navigation ul li a {
    color: #fff;
    font-weight: 600;
    font-size: 17px;
    padding: 8px 0;
    display: block;
    position: relative;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 3px;
    background: #ffd600;
    border-radius: 2px;
    transition: width 0.3s;
}

.main-navigation ul li a:hover::after,
.main-navigation ul li a.active::after {
    width: 100%;
}

.main-navigation ul li a:hover {
    color: #ffd600;
}

/* Hero Section */
.hero-section {
    position: relative;
    color: #fff;
    text-align: left;
    padding: 48px 0 36px 0;
    min-height: 220px; /* Можно будет настроить высоту */
    display: flex;
    align-items: center;
    /* Обновленный фон: глубокий синий цвет и градиент поверх него */
    background-color: #1e88e5; /* Базовый синий */
    background-image: linear-gradient(to bottom right, rgba(41, 128, 185, 0.8), rgba(44, 62, 80, 0.9)); /* Градиент */
    box-shadow: 0 8px 32px rgba(33,150,243,0.10), 0 12px 32px -8px rgba(33, 150, 243, 0.18);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    overflow: hidden; /* Обязательно, чтобы кляксы не вылезали */
}

.hero-background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы не мешали кликам по контенту */
    z-index: 0; /* Под контентом, но над основным фоном */
}

.blob {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; /* Пример органической формы */
    opacity: 0;
    animation: chaotic-blob-move 20s infinite ease-in-out;
    will-change: transform, opacity;
}

/* Индивидуальные стили для клякс для хаотичности */
.blob:nth-child(1) { width: 180px; height: 180px; top: 5%; left: 10%; animation-duration: 22s; animation-delay: -2s; background-color: rgba(173, 216, 230, 0.15); border-radius: 30% 70% 50% 50% / 50% 40% 60% 50%; }
.blob:nth-child(2) { width: 220px; height: 220px; top: 50%; left: 75%; animation-duration: 25s; animation-delay: -5s; background-color: rgba(255, 255, 255, 0.08); border-radius: 60% 40% 30% 70% / 40% 60% 70% 30%; }
.blob:nth-child(3) { width: 120px; height: 120px; top: 25%; left: 35%; animation-duration: 18s; animation-delay: -8s; background-color: rgba(200, 230, 255, 0.12); border-radius: 50% 50% 60% 40% / 70% 30% 50% 50%; }
.blob:nth-child(4) { width: 150px; height: 150px; top: 70%; left: 5%; animation-duration: 28s; animation-delay: -12s; background-color: rgba(173, 216, 230, 0.1); border-radius: 40% 60% 40% 60% / 60% 40% 60% 40%; }
.blob:nth-child(5) { width: 200px; height: 200px; top: 10%; left: 80%; animation-duration: 20s; animation-delay: -15s; background-color: rgba(224, 255, 255, 0.1); border-radius: 70% 30% 50% 50% / 30% 70% 50% 50%; }
.blob:nth-child(6) { width: 100px; height: 100px; top: 60%; left: 45%; animation-duration: 23s; animation-delay: -3s; background-color: rgba(255, 255, 255, 0.12); }
.blob:nth-child(7) { width: 170px; height: 170px; top: 30%; left: 15%; animation-duration: 26s; animation-delay: -7s; background-color: rgba(173, 216, 230, 0.18); border-radius: 30% 70% 70% 30% / 60% 40% 40% 60%; }
.blob:nth-child(8) { width: 140px; height: 140px; top: 75%; left: 65%; animation-duration: 19s; animation-delay: -10s; background-color: rgba(200, 230, 255, 0.09); }
.blob:nth-child(9) { width: 190px; height: 190px; top: 15%; left: 55%; animation-duration: 21s; animation-delay: -13s; background-color: rgba(255, 255, 255, 0.11); border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%; }
.blob:nth-child(10) { width: 160px; height: 160px; top: 40%; left: 90%; animation-duration: 27s; animation-delay: -1s; background-color: rgba(173, 216, 230, 0.13); }

@keyframes chaotic-blob-move {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.2;
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
    15% {
        transform: translate(15px, -25px) scale(1.05) rotate(30deg);
        opacity: 0.5;
        border-radius: 30% 70% 50% 50% / 50% 40% 60% 50%;
    }
    30% {
        transform: translate(-20px, 30px) scale(0.95) rotate(-20deg);
        opacity: 0.3;
        border-radius: 70% 30% 40% 60% / 60% 50% 40% 50%;
    }
    45% {
        transform: translate(25px, 15px) scale(1.1) rotate(50deg);
        opacity: 0.6;
        border-radius: 50% 50% 60% 40% / 70% 30% 50% 50%;
    }
    60% {
        transform: translate(-10px, -20px) scale(0.9) rotate(-40deg);
        opacity: 0.4;
        border-radius: 40% 60% 30% 70% / 50% 50% 70% 30%;
    }
    75% {
        transform: translate(20px, 20px) scale(1.15) rotate(70deg);
        opacity: 0.55;
        border-radius: 60% 40% 50% 50% / 40% 60% 50% 50%;
    }
    90% {
        transform: translate(-25px, -10px) scale(0.85) rotate(-60deg);
        opacity: 0.25;
        border-radius: 30% 70% 60% 40% / 70% 40% 50% 50%;
    }
}

/* Был .hero-photo, теперь .hero-photo-carousel */
.hero-photo-carousel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 44vw; 
    min-width: 340px;
    max-width: 600px;
    z-index: 2;
    filter: brightness(0.7) saturate(0.85) contrast(1.05);
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%); 
    overflow: hidden; /* Важно для правильной работы смены изображений */
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    transition: opacity 0.7s ease-in-out; /* Плавная смена прозрачности */
    will-change: opacity;
}

.carousel-image.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 44vw; /* Должно совпадать с .hero-photo */
    min-width: 340px;
    max-width: 600px;
    /* Градиент для затемнения у среза - теперь темный, а не голубой */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 25%, rgba(0, 0, 0, 0) 50%);
    z-index: 3;
    /* Тот же срез, что и у изображения */
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
    pointer-events: none; /* Чтобы оверлей не мешал взаимодействию с фото, если потребуется */
}

.hero-content {
    position: relative;
    z-index: 4;
    max-width: 600px;
    margin-left: 120px;
}

.hero-section h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 22px;
    line-height: 1.13;
    color: #fff;
    letter-spacing: 0.5px;
}

.hero-section p {
    font-size: 19px;
    font-weight: 400;
    color: #f0f0f0;
    margin-bottom: 32px;
    line-height: 1.6;
    letter-spacing: 0.2px;
}

.hero-buttons {
    margin-bottom: 28px;
}

.hero-buttons .btn {
    margin-right: 16px;
    padding: 13px 32px;
    font-size: 17px;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(33,150,243,0.08);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.hero-buttons .btn-primary {
    background: #fff;
    color: #1976d2;
    border: 2px solid #fff;
}

.hero-buttons .btn-primary:hover {
    background: #e3f0fa;
    color: #1976d2;
    border-color: #e3f0fa;
}

.hero-buttons .btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.hero-buttons .btn-secondary:hover {
    background: rgba(255,255,255,0.10);
    color: #fff;
    border-color: #fff;
}

.hero-features {
    margin-top: 18px;
    display: flex;
    gap: 28px;
}

.feature-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #fff;
    opacity: 0.92;
    font-weight: 500;
}

.feature-item i {
    font-size: 18px;
    margin-right: 8px;
    color: #ffe066;
}

/* Categories Section */
.categories-section {
    padding: 60px 0;
    background-color: #f9f9f9; /* Слегка серый фон для секции */
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #202124; /* Темный цвет для заголовков секций */
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 16px;
    color: #5f6368; /* Серый цвет для подзаголовков */
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Обновленные стили для сетки категорий - 3 колонки как на макете */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Уменьшил ширину */
    gap: 20px; /* Уменьшил отступ */
    perspective: 1000px; /* Уменьшил перспективу */
}

.category-card {
    background-color: #fff;
    border-radius: 10px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07); 
    overflow: hidden;
    text-align: center;
    transform-style: preserve-3d; 
    will-change: transform, box-shadow, border-color; /* Добавил border-color */
    border: 2px solid transparent; /* Добавил прозрачный бордер */

    /* Инициализируем CSS переменные */
    --rotateX: 0deg;
    --rotateY: 0deg;
    --scale: 1;

    /* Плавный переход для возврата в исходное состояние И ПРИ НАВЕДЕНИI */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.3s ease-out; /* Добавил переход для бордера */

    transform: perspective(1000px) rotateX(var(--rotateX)) rotateY(var(--rotateY)) scale(var(--scale));
}

.category-card.is-hovering {
    /* Плавный переход при активном наведении для следования за курсором */
    transition: transform 0.08s linear, /* Ускорил немного реакцию */
                box-shadow 0.2s ease-out, 
                border-color 0.15s ease-in; /* Ускорил появление бордера */
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.11); /* Немного изменил тень */
    border-color: #80bdff; /* Голубой контур при наведении */
}

.category-card:hover .category-img img {
    /* transform: scale(1.05); Этот скейл теперь управляется JS через --scale на всей карточке */
}

.category-img {
    width: 100%;
    height: 160px; /* Уменьшил высоту изображения */
    overflow: hidden;
    background-color: #e0e0e0; /* Фон для случая, если изображение не загрузится */
}

.category-img img,
.category-img .category-icon-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Изображение будет покрывать область, может обрезаться */
    /* transition: transform 0.3s ease; /* Убираем transition */
}

.category-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px; /* Еще немного уменьшил иконку-заглушку */
    color: rgba(0,0,0,0.3);
}

.category-info {
    padding: 10px 12px; /* Уменьшил паддинги */
}

.category-info h3 {
    font-size: 1.05em; /* Уменьшил шрифт заголовка */
    margin-top: 0;
    margin-bottom: 4px; /* Уменьшил отступ */
    color: #333;
    line-height: 1.3; /* Для лучшего вида, если название в 2 строки */
    margin-left: 8px; /* Добавляем левый отступ */
}

.category-info p {
    font-size: 0.85em; /* Уменьшил шрифт описания */
    color: #777; /* Чуть светлее */
    min-height: 0; /* Убрал минимальную высоту, пусть будет по контенту */
    /* Если нужен небольшой отступ снизу, если нет описания, можно padding-bottom для .category-info увеличить */
}

/* Удаляем старые стили категорий, если они конфликтуют */
.categories h2 { display: none; }
/* .category-img { display: none; } */ /* <--- Закомментировано */

/* Стили для поисковой секции, если она будет использоваться */
.search-section input[type="text"] {
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    width: 300px; /* или другая ширина */
    margin-right: 10px;
}

.search-section button {
    padding: 12px 20px;
}


/* Совместимость со старыми классами, если они используются в JS для модалок и т.д. */
/* Можно оставить или адаптировать старые стили модальных окон, если они не конфликтуют */

/* Модальное окно корзины - пример сохранения */
.modal {
    display: none;
    position: fixed;
    z-index: 10001; /* Выше всех элементов, включая уведомления */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    border-radius: 8px;
    max-width: 600px; /* Увеличим немного */
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
    z-index: 10002; /* Еще выше для содержимого */
}

/* ... остальные стили модальных окон и других элементов, которые не менялись ... */

/* Страница категории */
.category-header {
    background-color: #f8f9fa; /* Более светлый фон, почти белый */
    padding: 30px 0 20px 0; /* Немного изменены отступы */
    margin-bottom: 25px;
    text-align: center; /* Центрируем все содержимое */
}

/* Убираем border-radius если шторка теперь всегда сверху */
/* .category-header {
    border-radius: 8px;
} */

#categoryTitle {
    font-size: 2.5em; /* Увеличиваем шрифт заголовка */
    font-weight: 700;
    color: #202124;
    margin-bottom: 8px;
}

.breadcrumbs {
    font-size: 0.95em; /* Немного увеличим шрифт */
    color: #5f6368;
    /* text-align: center; уже задано для .category-header */
}

.breadcrumbs a {
    color: #1a73e8; /* Используем основной синий для ссылок */
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Фильтры */
.filters {
    background-color: #ffffff;
    padding: 20px 25px; /* Немного увеличим паддинги */
    border-radius: 12px; /* Более скругленные углы */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); /* Мягкая тень */
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Увеличим промежутки */
    align-items: center;
    border: 1px solid #e0e0e0; /* Тонкая рамка */
}

.filter-group {
    display: flex;
    align-items: center;
    /* gap: 8px; /* Убрал, чтобы label и input/select были ближе */
}

/* Стили для поиска по артикулу */
.search-article-group {
    margin-left: 20px; /* Добавим отступ слева, если фильтры не прижаты */
    /* margin-left: auto; /* Если хотим оставить его справа */
}

#articleSearchInput {
    width: 180px; /* Ширина поля ввода */
    transition: width 0.3s ease, opacity 0.3s ease;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px 0 0 6px; /* Скругляем только левые углы */
    font-size: 14px;
    margin-right: -1px; /* Чтобы кнопка прилегала плотно */
}

#articleSearchInput:focus {
     outline: none;
     border-color: #80bdff;
     box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
     z-index: 2; /* Поверх кнопки */
}

#toggleSearchBtn {
    padding: 8px 12px;
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 0 6px 6px 0; /* Скругляем правые углы */
    font-size: 14px;
}

#toggleSearchBtn:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(108, 117, 125, 0.2);
}

/* Анимация подсветки найденного товара */
.product-card.highlighted {
    animation: highlight-product 2s ease-in-out;
    border-color: #80bdff; /* Начальный цвет рамки */
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.4); /* Тень подсветки */
}

@keyframes highlight-product {
    0% { border-color: #80bdff; box-shadow: 0 0 10px rgba(0, 123, 255, 0.4); }
    25% { border-color: #addcff; box-shadow: 0 0 15px rgba(0, 123, 255, 0.6); }
    50% { border-color: #80bdff; box-shadow: 0 0 10px rgba(0, 123, 255, 0.4); }
    75% { border-color: #addcff; box-shadow: 0 0 15px rgba(0, 123, 255, 0.6); }
    100% { border-color: #e9ecef; box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08); } /* Возвращаем к hover-состоянию или обычному */
}

/* Конец стилей для поиска */

/* Стили для сетки товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    padding-top: 10px;
}

.filter-group label {
    margin-right: 10px; /* Увеличим отступ */
    font-size: 14.5px; /* Немного увеличим */
    font-weight: 500;
    color: #343a40; /* Темнее */
}

.filter-group select,
.filter-group input[type="number"] /* Уточняем для инпутов цены */
{
    padding: 9px 14px; /* Увеличим паддинги */
    border: 1px solid #ced4da;
    border-radius: 6px;
    width: 160px; /* Немного шире */
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus,
.filter-group input[type="number"]:focus
{
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.2);
}

#applyFilters,
#resetFilters {
    padding: 9px 18px; /* Общий паддинг для кнопок */
    font-size: 14.5px;
    font-weight: 500;
    border-radius: 6px;
}

#applyFilters {
    background-color: #20c997; /* Бирюзовый */
    border-color: #20c997;
    color: white;
}
#applyFilters:hover {
    background-color: #1baa80;
    border-color: #179b72;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(32, 201, 151, 0.25);
}

#resetFilters {
     background-color: #6c757d; /* Серый */
     border-color: #6c757d;
     color: white;
     margin-left: auto; /* Остается справа */
}

#resetFilters:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(108, 117, 125, 0.2);
}

/* Индикаторы */
.loading,
.no-products {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 16px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для карточки товара - СОВРЕМЕННАЯ МИНИМАЛИСТИЧНАЯ ВЕРСИЯ */
.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    min-width: 0;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #d1d9e0;
}

.product-img {
    width: 100%;
    aspect-ratio: 1/1;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
    background-color: #fff;
}

.product-info h3 {
    font-size: 0.9em;  
    font-weight: 600; 
    color: #212529;   
    margin-bottom: 4px; 
    line-height: 1.4;
    min-height: auto; 
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em; 
    letter-spacing: 0.01em; 
    margin-left: 8px;
}

.product-brand {
    font-size: 0.75em;
    color: #495057; 
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    font-weight: 500; 
    margin-left: 8px;
}

.product-availability {
    font-size: 0.7em; 
    font-weight: 500;
    margin-top: 2px; 
    margin-bottom: 6px; 
    padding: 2px 5px; 
    border-radius: 4px;
    display: inline-block;
    max-width: max-content;
    margin-left: 8px;
}

.product-availability.in-stock {
    color: #1e8e3e; 
    background-color: #e6f4ea; 
}

.product-availability.out-of-stock {
    color: #a50e0e; 
    background-color: #fce8e6; 
}

.product-availability.unknown-status {
    color: #5f6368; 
    background-color: #f1f3f4; 
}

.product-article { 
    font-size: 0.75em;
    color: #6c757d; 
    margin-bottom: 4px;
    margin-left: 8px;
}

.product-price {
    font-size: 1.1em; 
    font-weight: 700;
    color: #007bff; 
    margin-bottom: 8px; 
    margin-top: auto; 
    margin-left: 8px;
}

.product-card .add-to-cart {
    margin: 0px 20px 15px 20px;
    padding: 10px 15px;
    font-size: 0.85em;
    font-weight: 600;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: background-color 0.2s ease, transform 0.15s ease;
    width: calc(100% - 40px);
    box-sizing: border-box;
    cursor: pointer;
    text-align: center;
}

.product-card .add-to-cart:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.product-card .add-to-cart:active {
    background-color: #004085;
}

.product-card.highlighted {
    animation: highlight-product-card-new 2s ease-in-out;
}

@keyframes highlight-product-card-new {
    0%, 100% {
        border-color: #80bdff;
        box-shadow: 0 5px 15px rgba(0,0,0,0.07), 0 0 0 3px rgba(128, 189, 255, 0.5);
    }
    50% {
        border-color: #007bff;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1), 0 0 0 4px rgba(0, 123, 255, 0.7);
    }
}

/* Стили для значков на карточках товаров */
.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.product-badge.new-badge {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: 1px solid #ff6b35;
}

.product-badge.sale-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: 1px solid #e74c3c;
}

.product-badge i {
    margin-right: 3px;
    font-size: 0.9em;
}

/* Стили для цен в акциях */
.product-price-old {
    text-decoration: line-through !important;
    color: #999 !important;
    font-size: 0.9em !important;
    margin-bottom: 4px !important;
    margin-left: 8px !important;
}

.savings-amount {
    color: #27ae60 !important;
    font-size: 0.8em !important;
    font-weight: 600 !important;
    margin-left: 8px !important;
    margin-top: 4px !important;
}

/* Модальные окна */
/* ИСПРАВЛЕНО: убрано дублирующее определение .modal с конфликтующим z-index 1000 */
/*
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(33, 37, 41, 0.6);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
}
*/

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ИСПРАВЛЕНО: убрано дублирующее определение .modal-content */
/*
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 650px;
    position: relative;
    animation: slideIn 0.3s ease;
}
*/

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.product-modal-content {
    max-width: 850px;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    color: #adb5bd;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.close:hover {
    color: #495057;
}

.modal h2, .modal h3 {
    color: #343a40;
    margin-bottom: 15px;
    font-weight: 700;
}

.modal h3 {
     font-size: 18px;
}

/* Модалка корзины */
#cartItems {
    overflow-y: auto; /* Включаем скролл */
    /* flex-grow: 1; */ /* Убираем flex-grow */
    max-height: 50vh; /* Задаем явную максимальную высоту для списка товаров */
    margin-bottom: 15px; /* Небольшой отступ снизу */
    padding-right: 5px; /* Место для скроллбара */
    /* Добавим немного отступа сверху/снизу внутри скролл-области */
}

.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-info {
    padding: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #343a40;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 12px;
    color: #6c757d;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background-color: #f1f3f5;
    color: #495057;
    border: 1px solid #dee2e6;
}
.quantity-btn:hover {
    background-color: #e9ecef;
}

.quantity-input {
    width: 40px;
    height: 28px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.cart-item-total {
    font-weight: 500;
    min-width: 80px;
    text-align: right;
    font-size: 14px;
    color: #343a40;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #adb5bd;
    font-size: 20px;
    padding: 0 5px;
    margin-left: 10px;
    transition: color 0.2s ease;
}
.cart-item-remove:hover {
     color: #dc3545;
}

.promo-code-section,
.cart-summary,
#checkoutBtn,
#orderMethodsContainer {
    flex-shrink: 0;
}

.promo-code-section {
    display: flex;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.promo-code-section input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    margin-right: -1px;
}
.promo-code-section input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.promo-code-section button {
    padding: 9px 15px;
    background-color: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.promo-code-section button:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.promo-message {
    margin-top: 8px;
    font-size: 13px;
    height: 16px;
}

.promo-message.success {
    color: #28a745;
}

.promo-message.error {
    color: #dc3545;
}

.cart-summary {
    margin-top: 15px;
    text-align: right;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.cart-summary p {
    font-size: 16px;
    margin-bottom: 8px;
    color: #495057;
}

#discountRow {
    color: #28a745;
}

.cart-total-final {
    font-size: 18px !important;
    font-weight: 700;
    color: #343a40;
}

#checkoutBtn {
    margin-top: 15px;
    float: right;
    padding: 10px 20px;
    font-size: 15px;
    background-color: #28a745;
    border-color: #28a745;
}
#checkoutBtn:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
}

#checkoutBtn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.empty-cart {
    padding: 30px 0;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 16px;
}

/* Модалка деталей товара */
.product-details {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.product-image {
    flex: none;
    width: 300px;
    height: 300px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* transition: transform 0.3s ease; /* Убираем transition */
}

/* Добавляем новое правило для увеличения при наведении */
/* .product-image:hover img {
    transform: scale(1.15);
} */

.product-info {
    flex: none;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#modalProductTitle {
    font-size: 24px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 10px;
}

#modalProductArticle {
     font-size: 14px;
     color: #6c757d;
     margin-bottom: 15px;
}

#modalProductPrice {
     font-size: 22px;
     font-weight: 700;
     color: #007bff;
     margin-bottom: 20px;
}

#modalAddToCart {
    width: auto;
    align-self: flex-start;
    margin-top: auto;
    padding: 10px 25px;
    font-size: 15px;
}

.product-description {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.product-description h3 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #343a40;
}
.product-description p {
    font-size: 14px;
    color: #495057;
    line-height: 1.7;
}

/* Подвал */
footer {
    background-color: #343a40;
    color: #adb5bd;
    padding: 25px 0;
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
}

/* Секция методов отправки */
#orderMethodsContainer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    clear: both;
}

#orderMethodsContainer h3 {
    margin-bottom: 10px;
    font-size: 18px;
    text-align: center;
    font-weight: 500;
    color: #343a40;
}

#orderMethodsContainer p {
    margin-bottom: 20px;
    color: #6c757d;
    text-align: center;
    font-size: 14px;
}

.order-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.order-method-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 12px 15px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    font-size: 14px;
}

.order-method-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.order-method-btn i {
    font-size: 18px;
    margin: 0 8px 0 0;
}

.whatsapp-btn { background-color: #25D366; }
.telegram-btn { background-color: #0088cc; }
.email-btn { background-color: #dd4b39; }
.sms-btn { background-color: #6c757d; }

.order-methods-note {
    font-size: 13px;
    color: #6c757d;
    margin-top: 15px;
    text-align: center;
    font-style: italic;
}

/* Уведомления */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ffffff;
    color: #2c3e50;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    font-size: 13px;
    font-weight: 500;
    max-width: 280px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid #007bff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Иконки для уведомлений */
.notification::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    flex-shrink: 0;
    font-size: 14px;
}

/* Типы уведомлений */
.notification-success {
    border-left-color: #28a745;
    background-color: #d4edda;
    color: #155724;
}

.notification-success::before {
    content: "\f00c"; /* Галочка */
    color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
    background-color: #f8d7da;
    color: #721c24;
}

.notification-error::before {
    content: "\f00d"; /* Крестик */
    color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
    background-color: #fff3cd;
    color: #856404;
}

.notification-warning::before {
    content: "\f071"; /* Предупреждение */
    color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
    background-color: #d1ecf1;
    color: #0c5460;
}

.notification-info::before {
    content: "\f05a"; /* Информация */
    color: #17a2b8;
}

/* Мобильная адаптация уведомлений */
@media (max-width: 480px) {
    .notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(100%);
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 1200px) {
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .product-details {
        grid-template-columns: 250px 1fr;
        gap: 20px;
    }
    .product-image {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        width: 100%;
        max-width: 300px;
        height: 300px;
        margin: 0 auto 20px auto;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
        margin-right: 0;
    }
    .filter-group input, .filter-group select {
         width: 100%;
    }
    #resetFilters {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
    nav ul li {
        margin-left: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-content {
        margin: 20px;
        width: auto;
        padding: 15px;
    }
    
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    nav {
         width: 100%;
    }
    nav ul {
         align-items: stretch;
    }
    nav ul li {
        margin-bottom: 5px;
    }
    .hero h1 {
        font-size: 32px;
    }
    .hero p {
        font-size: 16px;
    }
    .cart-item {
        grid-template-columns: 50px 1fr auto;
        grid-template-rows: auto auto;
        gap: 5px 10px;
    }
    .cart-item-img { grid-row: 1 / 3; }
    .cart-item-info { grid-column: 2 / 3; grid-row: 1 / 2; }
    .cart-item-quantity { grid-column: 2 / 3; grid-row: 2 / 3; justify-self: start; }
    .cart-item-total { display: none; }
    .cart-item-remove { grid-column: 3 / 4; grid-row: 1 / 3; align-self: center; }
    .promo-code-section {
        flex-direction: column;
    }
    .promo-code-section input,
    .promo-code-section button {
        border-radius: 6px;
        width: 100%;
    }
    .promo-code-section input {
        margin-bottom: 5px;
    }
    .order-methods {
         grid-template-columns: 1fr;
    }
}

/* Стили для модального окна ввода контактной информации */
#orderInfoModal .modal-content {
    max-width: 450px;
    z-index: 10003; /* Максимальный приоритет для модального окна заказа */
}

#orderInfoModal input[type="text"],
#orderInfoModal input[type="tel"] {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 10px 0 15px 0;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    position: relative;
    z-index: 10004; /* Поля ввода поверх всего */
}

#orderInfoModal input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    z-index: 10005; /* Фокус поверх всего */
}

#orderInfoModal button {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    font-size: 16px;
    position: relative;
    z-index: 10004; /* Кнопка поверх всего */
}

/* Дополнительная защита для всех модальных окон */
#orderInfoModal {
    z-index: 10001 !important; /* Принудительный высокий z-index */
}

/* Стили для поисковой строки на главной */
.search-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0 10px 0;
    gap: 10px;
}
#mainSearchInput {
    width: 350px;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}
#mainSearchInput:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
}
#mainSearchBtn {
    padding: 10px 18px;
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    border-radius: 0 6px 6px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
#mainSearchBtn:hover {
    background-color: #0056b3;
}
/* Конец стилей для поиска */

/* Стили для модального окна чата */
.chat-modal .modal-content {
    max-width: 480px;
    width: 95%;
    height: 80vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.08);
    border: 1px solid rgba(0, 123, 255, 0.1);
    margin: 2vh auto;
}

.chat-modal-content h3 {
    text-align: center;
    margin: 0;
    padding: 20px 24px;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafbfc;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 123, 255, 0.2) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.2);
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 123, 255, 0.3);
}

.chat-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 75%;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-message.user {
    background-color: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-message.admin {
    background-color: #ffffff;
    color: #495057;
    border: 1px solid #e9ecef;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.chat-message.system {
    background-color: #f8f9fa;
    color: #6c757d;
    font-style: italic;
    text-align: center;
    max-width: 100%;
    font-size: 0.9em;
    border-radius: 12px;
}

.chat-message .sender {
    font-weight: 600;
    display: block;
    font-size: 0.7rem;
    margin-bottom: 4px;
    opacity: 0.8;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
}

.chat-input-area textarea {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    resize: none;
    min-height: 40px;
    max-height: 100px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.3;
    background: #ffffff;
    transition: all 0.2s ease;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.chat-input-area textarea::placeholder {
    color: #adb5bd;
}

.chat-input-area button {
    width: 40px;
    height: 40px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.chat-input-area button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.chat-input-area button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chat-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Мобильная адаптация чата */
@media (max-width: 768px) {
    .chat-modal .modal-content {
        margin: 1vh auto;
        border-radius: 12px;
        max-width: 96%;
        width: 96%;
        height: 85vh;
    }
    
    .chat-modal-content h3 {
        padding: 16px 18px;
        font-size: 1.1rem;
        border-radius: 12px 12px 0 0;
    }
    
    .chat-messages {
        padding: 16px;
        height: calc(85vh - 140px);
    }
    
    .chat-message {
        max-width: 80%;
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .chat-input-area {
        padding: 12px 16px;
        gap: 8px;
    }
    
    .chat-input-area textarea {
        font-size: 16px; /* Предотвращает зум на iOS */
        padding: 10px 14px;
        min-height: 36px;
        max-height: 80px;
    }
    
    .chat-input-area button {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .chat-close-btn {
        top: 12px;
        right: 16px;
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .chat-modal .modal-content {
        margin: 0.5vh auto;
        width: 98%;
        height: 90vh;
        border-radius: 8px;
    }
    
    .chat-modal-content h3 {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 8px 8px 0 0;
    }
    
    .chat-messages {
        padding: 12px;
        height: calc(90vh - 130px);
    }
    
    .chat-message {
        max-width: 85%;
        margin-bottom: 12px;
    }
    
    .chat-input-area {
        padding: 10px 12px;
    }
    
    .chat-input-area textarea {
        padding: 8px 12px;
        border-radius: 18px;
    }
    
    .chat-input-area button {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Иконка пользователя (предполагаем, что есть #userIcon или .user-icon) */
/* Пример стилей, если иконка не из FontAwesome */
#userIcon, .user-icon { 
    /*
    display: inline-block;
    width: 30px;
    height: 30px;
    background-color: #ddd;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
    */
} 

/* Product availability styles */
.product-availability {
    font-size: 0.9em;
    color: #6c757d; /* Bootstrap secondary color for unknown/default */
    margin-top: 5px;
}

.product-availability.in-stock {
    color: #28a745; /* Bootstrap success color for in stock */
    font-weight: bold;
}

.product-availability.out-of-stock {
    color: #dc3545; /* Bootstrap danger color for out of stock */
}

.product-availability.unknown-status {
    color: #6c757d; /* Bootstrap secondary color for unknown status */
}

/* --- Современный стиль корзины --- */
.modern-cart-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(26, 115, 232, 0.07), 0 1.5px 6px rgba(33, 37, 41, 0.06);
    margin-bottom: 28px;
    padding: 24px 28px;
    gap: 32px;
    transition: box-shadow 0.2s;
    border: 1.5px solid #eaf1fb;
}
.modern-cart-item:hover {
    box-shadow: 0 8px 32px rgba(26, 115, 232, 0.13), 0 2px 8px rgba(33, 37, 41, 0.09);
    border-color: #b3d1f7;
}
.modern-cart-item-img {
    min-width: 140px !important;
    min-height: 140px !important;
    max-width: 140px !important;
    max-height: 140px !important;
    border-radius: 12px;
    background: #f4f8fd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(26, 115, 232, 0.04);
}
.modern-cart-item-img img {
    width: 128px !important;
    height: 128px !important;
}
.modern-cart-item-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px !important;
}
.modern-cart-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 2px;
    line-height: 1.2;
}
.modern-cart-item-article {
    font-size: 1rem;
    color: #5c6bc0;
    margin-bottom: 2px;
}
.modern-cart-item-price {
    font-size: 1.1rem;
    color: #1976d2;
    font-weight: 500;
    margin-bottom: 8px;
}
.modern-cart-item-qtyblock {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 54px !important;
    gap: 12px !important;
    margin-top: 8px !important;
}
.modern-qty-btn {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #e3f0fd !important;
    color: #1976d2 !important;
    border: none !important;
    box-shadow: 0 1px 4px rgba(26, 115, 232, 0.08) !important;
    transition: background 0.18s, color 0.18s !important;
    margin: 0 !important;
}
.modern-qty-btn:hover {
    background: #1976d2 !important;
    color: #fff !important;
}
.modern-qty-input {
    height: 48px !important;
    line-height: 48px !important;
    min-width: 54px !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f4f8fd !important;
    border-radius: 8px !important;
    border: 1px solid #eaf1fb !important;
    margin: 0 6px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}
@media (max-width: 700px) {
    .modern-cart-item-img {
        min-width: 90px !important;
        min-height: 90px !important;
        max-width: 90px !important;
        max-height: 90px !important;
    }
    .modern-cart-item-img img {
        width: 70px !important;
        height: 70px !important;
    }
    .modern-qty-btn, .modern-qty-input {
        height: 36px !important;
        min-width: 32px !important;
        font-size: 1.1rem !important;
        line-height: 36px !important;
    }
}
.modern-cart-item-totalblock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 18px;
    min-width: 120px;
}
.modern-cart-item-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 2px;
}
.modern-cart-remove {
    background: #f4f8fd;
    color: #b71c1c;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, color 0.18s;
    box-shadow: 0 1px 4px rgba(26, 115, 232, 0.08);
}
.modern-cart-remove:hover {
    background: #ffebee;
    color: #d32f2f;
}

/* --- Мобильная адаптация --- */
@media (max-width: 700px) {
    .modern-cart-item {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 18px 10px;
    }
    .modern-cart-item-img {
        margin: 0 auto 10px auto;
    }
    .modern-cart-item-totalblock {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        gap: 10px;
    }
}

/* --- Компактная современная корзина --- */
.modal-content {
    max-width: 500px !important;
    max-height: 80vh !important;
    padding: 18px 18px 0 18px !important;
    overflow: visible !important;
}
#cartItems {
    max-height: 38vh !important;
    padding-right: 0 !important;
    margin-bottom: 10px !important;
}
.modern-cart-item {
    gap: 18px !important;
    padding: 14px 12px !important;
    margin-bottom: 16px !important;
}
.modern-cart-item-img {
    min-width: 96px !important;
    min-height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
}
.modern-cart-item-img img {
    width: 88px !important;
    height: 88px !important;
}
.modern-qty-input {
    min-width: 44px !important;
    text-align: center !important;
    line-height: 40px !important;
    font-size: 1.15rem !important;
    background: #f4f8fd !important;
    border-radius: 8px !important;
    border: 1px solid #eaf1fb !important;
    padding: 0 !important;
}
/* --- Промокод --- */
.promo-code-section {
    display: flex;
    align-items: center;
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid #eaf1fb !important;
    gap: 0 !important;
}
.promo-code-section input {
    flex: 1;
    height: 44px !important;
    border-radius: 8px 0 0 8px !important;
    border: 1.5px solid #eaf1fb !important;
    font-size: 15px !important;
    padding-left: 38px !important;
    background: #f4f8fd url('data:image/svg+xml;utf8,<svg fill="%2397b3e6" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M17.65 6.35a7.95 7.95 0 0 0-11.3 0a7.95 7.95 0 0 0 0 11.3a7.95 7.95 0 0 0 11.3 0a7.95 7.95 0 0 0 0-11.3zm-1.41 9.89a5.98 5.98 0 0 1-8.48 0a5.98 5.98 0 0 1 0-8.48a5.98 5.98 0 0 1 8.48 0a5.98 5.98 0 0 1 0 8.48z"/><circle cx="12" cy="12" r="2.5"/></svg>') no-repeat 12px center !important;
}
.promo-code-section input:focus {
    border-color: #1976d2 !important;
    background-color: #fff !important;
}
.promo-code-section button {
    height: 44px !important;
    border-radius: 0 8px 8px 0 !important;
    background: #1976d2 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border: none !important;
    padding: 0 24px !important;
    margin-left: -1px !important;
    transition: background 0.18s;
}
.promo-code-section button:hover {
    background: #1251a3 !important;
}
/* --- Кнопка оформления заказа --- */
#checkoutBtn {
    position: sticky !important;
    bottom: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 15px 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    border-radius: 0 0 8px 8px !important;
    background: #28a745 !important;
    color: #fff !important;
    box-shadow: 0 -2px 8px rgba(33,150,243,0.04);
    z-index: 2;
    left: 0;
    right: 0;
    border: none !important;
    transition: background 0.18s;
}
#checkoutBtn:hover {
    background: #218838 !important;
}
#checkoutBtn:disabled {
    background: #bfc5c9 !important;
    color: #fff !important;
    opacity: 0.7 !important;
}
.cart-summary {
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid #eaf1fb !important;
    text-align: right !important;
    background: inherit !important;
}
.cart-summary p {
    font-size: 15px !important;
    margin-bottom: 6px !important;
    color: #495057 !important;
}
.cart-total-final {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1976d2 !important;
}
@media (max-width: 700px) {
    .modal-content {
        max-width: 98vw !important;
        padding: 6px 2vw 0 2vw !important;
    }
    .modern-cart-item-img {
        min-width: 72px !important;
        min-height: 72px !important;
        max-width: 72px !important;
        max-height: 72px !important;
    }
    .modern-cart-item-img img {
        width: 64px !important;
        height: 64px !important;
    }
    #checkoutBtn {
        font-size: 15px !important;
        padding: 12px 0 !important;
    }
}

/* --- Корзина чуть больше, фото крупнее, кнопка встроена --- */
.modal-content {
    max-width: 600px !important;
    max-height: 88vh !important;
}
.modern-cart-item-img {
    min-width: 120px !important;
    min-height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
}
.modern-cart-item-img img {
    width: 110px !important;
    height: 110px !important;
}
.modern-qty-input {
    font-size: 1.4rem !important;
    min-width: 54px !important;
    line-height: 48px !important;
    font-weight: 700 !important;
}
#checkoutBtn {
    position: static !important;
    width: 100% !important;
    margin: 18px 0 0 0 !important;
    padding: 0 !important;
    height: 48px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: #28a745 !important;
    color: #fff !important;
    box-shadow: none !important;
    left: unset;
    right: unset;
    border: none !important;
    transition: background 0.18s;
    display: block;
}
#checkoutBtn:hover {
    background: #218838 !important;
}
#checkoutBtn:disabled {
    background: #bfc5c9 !important;
    color: #fff !important;
    opacity: 0.7 !important;
}
@media (max-width: 700px) {
    .modal-content {
        max-width: 99vw !important;
        padding: 6px 2vw 0 2vw !important;
    }
    .modern-cart-item-img {
        min-width: 80px !important;
        min-height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
    }
    .modern-cart-item-img img {
        width: 70px !important;
        height: 70px !important;
    }
    #checkoutBtn {
        font-size: 15px !important;
        height: 42px !important;
        margin-top: 12px !important;
    }
    .modern-qty-input {
        font-size: 1.1rem !important;
        min-width: 38px !important;
        line-height: 36px !important;
    }
}

/* Стили для отображения информации о наличии в модальном окне */
.product-availability-modal {
    font-size: 0.9em;
    margin-bottom: 8px;
    font-weight: 500;
}

.stock-info.in-stock {
    color: #28a745;
    font-weight: 600;
}

.stock-info.out-of-stock {
    color: #dc3545;
    font-weight: 600;
}

.product-brand-modal {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-brand-modal {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

/* Стили для модального окна поиска */
.search-modal-content {
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-modal-content h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input-container input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.search-input-container button {
    padding: 12px 20px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    min-width: 60px;
}

.search-input-container button:hover {
    background-color: #1565c0;
}

.search-modal-results {
    flex: 1;
    overflow-y: auto;
    min-height: 300px;
}

.search-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.search-placeholder i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.search-placeholder p {
    font-size: 16px;
    color: #999;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.search-result-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.search-result-item:hover {
    border-color: #1976d2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.search-result-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}

.search-result-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
}

.search-result-article {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.search-result-price {
    font-size: 18px;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 12px;
}

.search-result-btn {
    width: 100%;
    padding: 8px 16px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.search-result-btn:hover {
    background-color: #1565c0;
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.search-no-results i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

/* Адаптивные стили для поискового модального окна */
@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px auto;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-input-container {
        flex-direction: column;
    }
    
    .search-input-container button {
        width: 100%;
    }
}

/* Стили для выпадающего меню каталога */
.catalog-dropdown {
    position: relative;
}

.catalog-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-dropdown a i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.catalog-dropdown.active a i {
    transform: rotate(180deg);
}

.catalog-dropdown-menu {
    position: fixed;
    left: -400px;
    top: 0;
    width: 350px;
    height: 100vh;
    background-color: white;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.catalog-dropdown-menu.active {
    left: 0;
}

.catalog-menu-content {
    padding: 30px 25px;
}

.catalog-menu-content h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    text-align: center;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
    border: 1px solid transparent;
}

.category-link:hover {
    background-color: #f8f9fa;
    color: #1976d2;
    border-color: #e3f2fd;
    transform: translateX(5px);
}

.catalog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.catalog-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
    .catalog-dropdown-menu {
        width: 85%;
        max-width: 300px;
    }
    
    .catalog-menu-content {
        padding: 20px 15px;
    }
    
    .catalog-menu-content h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .category-link {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Значки на карточках товаров */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-badge.new-badge {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.product-badge.sale-badge {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

/* Цены со скидками */
.product-price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-right: 8px;
}

.product-price.sale-price {
    color: #f44336;
    font-weight: 700;
}

.savings-amount {
    display: block;
    color: #4CAF50;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

/* Кнопки для акций */
.add-to-cart-btn.sale-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: none;
}

.add-to-cart-btn.sale-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
}

.add-to-cart-btn.sale-btn:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Кнопка "Наверх" */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(25, 118, 210, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(25, 118, 210, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* НОВОЕ: Стили для отображения количества упаковок и штук */
.modern-cart-item-quantity-info {
    margin: 8px 0;
    padding: 8px 0;
    border-top: 1px solid #f0f4f8;
}

.quantity-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 4px;
}

.package-info {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.quantity-unit {
    font-size: 0.85rem;
    color: #999;
    margin-left: 4px;
    font-weight: 500;
}

.modern-cart-item-qtyblock {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 54px !important;
    gap: 12px !important;
    margin-top: 8px !important;
}