body {
    font-family: Arial, sans-serif;
    margin: 0;
    /* padding-top: 70px; */
    background: #f5f5f5;
    color: #333;
}

.site-header {
    background: #222;
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    z-index: 999;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}

.main-nav a:hover {
    text-decoration: underline;
}

section {
    padding: 40px 20px;
    background: white;
    margin: 20px auto;
    max-width: 1400px;
    width: 100%;
    border-radius: 8px;
    box-sizing: border-box;
}

header.bg-light {
    background-color: #373737 !important;
    color: white !important;
}

/* Футер */
.footer {
    background-color: #373737;
    color: white;
    padding: 20px;
    text-align: center;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 510px;
    border-radius: 8px;
    position: relative;
}

.modal-form-container {
    max-width: 480px;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    font-size: 16px;
}

.modal-content button {
    background: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}


html, body {
    height: 100%;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding-top: 90px; 
}

/** Для корзины */
._counter_1sk63_7 {
    display: flex;
    align-items: center;
    gap: 10px;
}

._-x-large_1sk63_58 {
    font-size: 20px;
    font-weight: bold;
}

.search-dropdown {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1050;
  }
.search-dropdown .dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
}
.search-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Кнопка "КОРЗИНА" */
.cart-link {
    background-color: white !important;
    color: black !important;
    border: 1px solid #0d6efd;
    transition: all 0.2s ease-in-out;
}
  
.cart-link:hover {
    background-color: #0d6efd !important;
    color: white !important;
}

.btn-success {
    margin-left: 24px;
}
.btn-success, .btn-sm {
    background-color: #ffffff;
    color: #ff4f12;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-success:hover, .btn-sm:hover {
    background-color: #ff4f12;
    color: #ffffff;
    transition: 0.3s;
}

/* Хлебные крошки */
.breadcrumbs {
    font-size: 14px;
    padding-top: 15px;
    padding-bottom: 15px;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0;
    color: #666;
    background: white;
    /* box-shadow: 0 1px 3px rgba(0,0,0,0.1); */
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #ff4f12;
}

.breadcrumbs span {
    color: #999;
}

.add-to-cart, .return-to-start{
    background-color: white;
    color: #ff4f12;
    border: none;
    padding: 8px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid;
}

.orange-button {
    background-color: white;
    color: #ff4f12;
    border: 1px solid;
}
.add-to-cart:hover, .orange-button:hover {
    background-color: #ff4f12;
    color: white;
}


.form-control-custom {
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    padding: 10px 5px;
    box-shadow: none;
    width: 100%;
}

.form-control-custom:focus {
    border-bottom-color: #000;
    outline: none;
    box-shadow: none;
}


 /* Плавное обновление страницы при нажатии на кнопку "показать еще" */
#catalogue_section .col-md-4 {
    transition: opacity 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-new {
    animation: fadeIn 0.5s ease forwards;
}


@media (min-width: 768px) {
    .b-category__list .container {
        max-width: 750px;
        width: 100%;
    }
}

@media (min-width: 992px) {
    .b-category__list .container {
        max-width: 970px;
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .b-category__list .container {
        max-width: 1170px;
        width: 100%;
    }
}

@media (max-width: 767.98px) {

    body, html {
        padding: 0;
        margin: 0;
        overflow-x: hidden; /* Защита от горизонтального скролла */
    }
    
    main {
        padding: 0;
        margin: 0;
    }

    header, footer {
        font-size: 12px; /* Уменьшаем шрифт */
        padding: 10px;
    }

    section {
        margin: 0;
        padding: 10px;
    }

    footer .footer-content {
        display: flex;
        flex-direction: column; /* В столбик на мобилке */
        align-items: flex-start;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .footer p {
        display: block;              /* Убедимся, что каждый <p> — блочный */
        width: 100%;                 /* Занимает всю ширину контейнера */
        margin: 5px 0;               /* Немного отступов между строками */
        white-space: normal;         /* Разрешаем перенос строк внутри длинных фраз */
        word-break: break-word;      /* Переносим длинные слова при необходимости */
    }

    .footer .container {
        display: flex;
        flex-direction: column;      /* Строим всё в колонку */
        align-items: flex-start;     /* Выравниваем по левому краю */
    }

    footer a {
        font-size: 12px;
        word-wrap: break-word;
        white-space: normal;
    }

    /* Убрать зазоры по краям у всех основных контейнеров */
    .container, .content-wrapper, .section-inner {
        padding-left: 10px;
        padding-right: 10px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    /* Убедимся, что изображения не вылезают за экран */
    img {
        max-height: 100%;
        max-width: auto;
    }
    /* Уменьшаем текст в заголовках категорий */
    .b-category__title {
      font-size: 12px; /* или другое значение по вкусу */
      white-space: normal; /* чтобы текст переносился */
      
    }
  
    /* Уменьшаем размер текста и элементов в header */
    header {
      font-size: 14px; /* уменьшить шрифты в шапке */
      padding: 10px 15px; /* можно чуть уменьшить отступы */
    }
  
    /* Если есть специфичные элементы в header, например логотип, меню — тоже уменьши */
    header .logo {
      max-height: 30px; /* пример */
    }
  
    header nav a {
      font-size: 14px;
      padding: 5px 8px;
    }

    .content {
        padding-top: 250px; /* Увеличиваем отступ для header */
    }
    
    header.bg-light {
        height: auto;
        min-height: 70px;
        padding: 10px 0;
        overflow: visible !important;;
        z-index: 1000;
    }

    header .container {
        flex-direction: column;
        align-items: stretch;
    }

    /* Стили для кнопок в header */
    .d-flex.align-items-center.gap-3 {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 5px;
    }

    /* Стили для отдельных кнопок в header */
    .btn-outline-light, .cart-link, #openModal {
        white-space: nowrap;
        font-size: 12px;
        padding: 6px 8px;
    }

    /* Позиционирование для контейнера корзины */
    .cart-link {
        position: relative;
        padding-right: 20px; /* Добавляем место для счетчика */
    }

    /* Стили для счетчика в корзине */
    .cart-link .badge {
        position: absolute;
        right: -5px !important;
        font-size: 10px;
        padding: 4px 6px;
        min-width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1100; /* Делаем выше всех элементов */
        border: 2px solid #373737; /* Граница в цвет header */
        box-shadow: 0 0 0 1px white; /* Белая обводка для контраста */
    }

    header.bg-light, 
    header.bg-light .container,
    header.bg-light .d-flex.align-items-center.gap-3 {
        min-height: auto !important;
        height: auto !important;
    }
    
    /* Стили для поиска */
    .position-relative.w-100.mx-md-4 {
        margin: 10px 0 !important;
        max-width: 100% !important;
    }
    
    .dropdown-menu {
        z-index: 1100 !important; /* Делаем выше header */
        position: absolute !important;
        right: 0;
        left: auto !important;
    }

    .dropdown {
        position: static !important; /* Важно для правильного позиционирования меню */
    }
    
    /* Улучшаем видимость меню */
    .dropdown-menu.show {
        transform: none !important;
        margin-top: 5px;
        box-shadow: 0 0 10px rgba(0,0,0,0.2);
    }


    .mobile-dropdown {
        position: relative;
    }
    
    /* Стили для выпадающего меню */
    .dropdown-menu-mobile {
        width: 100vw !important; /* На всю ширину viewport */
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        position: fixed !important; /* Фиксированная позиция */
        top: 70px !important; /* Высота header */
        transform: none !important;
        border-radius: 0;
        margin-top: 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border-top: 1px solid #ddd;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 1050;
    }
    
    /* Стили для пунктов меню */
    .dropdown-menu-mobile .dropdown-item {
        padding: 12px 20px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Убираем стандартные стили Bootstrap */
    .dropdown-menu-mobile.show {
        display: block !important;
        transform: none !important;
        margin-top: 120px !important;
    }
    
    /* Затемнение фона при открытом меню */
    .dropdown-backdrop {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
        display: none;
    }
    
    .dropdown-open .dropdown-backdrop {
        display: block;
    }
  }