/* Основные стили для каталога */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Общие стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    padding-top: 0;
    overflow-x: hidden;
}

/* Навигация */
.navbar {
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.auth-buttons .btn {
    white-space: nowrap;
}

/* Адаптивные кнопки для мобильных */
@media (max-width: 991.98px) {
    .btn-block-mobile {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .auth-buttons {
        width: 100%;
    }

    .auth-buttons .btn {
        width: 100%;
        margin-left: 0 !important;
    }
}

/* Герой секция */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 2rem 0;
    }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
    opacity: 0.9;
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

.search-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-box {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 0.75rem 1rem;
}

.search-box button {
    border: none;
    padding: 0.75rem 1.5rem;
}

/* Основной контейнер */
.main-container {
    padding: 0 1rem;
}

@media (max-width: 767.98px) {
    .main-container {
        padding: 0 0.5rem;
    }
}

/* Сайдбар фильтров */
.filter-sidebar-wrapper {
    position: sticky;
    top: 1rem;
}

.filter-sidebar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 991.98px) {
    .filter-sidebar {
        position: static;
        margin-top: 1rem;
    }

    .filter-sidebar.collapse:not(.show) {
        display: none;
    }
}

.filter-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.filter-header h5 {
    margin: 0;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.filter-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.filter-list::-webkit-scrollbar {
    width: 4px;
}

.filter-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.filter-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.filter-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.price-filter input {
    font-size: 0.875rem;
}

.filter-actions {
    margin-top: 2rem;
}

.company-info .card {
    border: none;
    box-shadow: var(--box-shadow);
}

.company-info .card-body {
    padding: 1rem;
}

/* Заголовок товаров */
.products-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.products-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.sort-container {
    flex-shrink: 0;
}

.sort-label {
    font-size: 0.875rem;
    color: #6c757d;
}

.sort-select {
    min-width: 180px;
}

@media (max-width: 767.98px) {
    .products-header {
        padding: 1rem;
    }

    .products-title {
        font-size: 1.25rem;
    }

    .sort-select {
        min-width: 140px;
    }
}

/* Активные фильтры */
.active-filters {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--box-shadow);
    font-size: 0.875rem;
}

.active-filters .alert {
    margin: 0;
    padding: 0.75rem 1rem;
}

/* Карточки товаров */
.product-card {
    transition: var(--transition);
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-img {
    height: 180px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@media (max-width: 767.98px) {
    .product-img {
        height: 150px;
    }
}

.product-img i {
    color: #adb5bd;
}

.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

.card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .card-title {
        font-size: 1rem;
    }
}

.card-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.5;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .product-price {
        font-size: 1.1rem;
    }
}

/* Загрузка и ошибки */
.loading-container {
    text-align: center;
    padding: 4rem 1rem;
}

.no-products-container {
    text-align: center;
    padding: 4rem 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Пагинация */
.pagination-container {
    margin-top: 2rem;
}

.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

@media (max-width: 767.98px) {
    .page-link {
        padding: 0.375rem 0.5rem;
        min-width: 36px;
        font-size: 0.85rem;
    }
}

/* Футер */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 0;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list-item {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
    opacity: 0.9;
}

.footer-list-item i {
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-bottom {
    padding-top: 1.5rem;
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

@media (max-width: 767.98px) {
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .footer-list-item {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
    }
}

/* Адаптивная сетка товаров */
@media (max-width: 575.98px) {
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .col-6 {
        padding-left: calc(var(--bs-gutter-x) * .5);
        padding-right: calc(var(--bs-gutter-x) * .5);
    }
}

/* Мобильные улучшения */
@media (max-width: 767.98px) {
    /* Улучшаем доступность тач-элементов */
    .btn,
    .form-control,
    .form-select,
    .page-link,
    .product-card {
        min-height: 44px; /* Минимальный размер для удобного тапа */
    }

    /* Увеличиваем отступы для мобильных */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Улучшаем читаемость текста */
    body {
        font-size: 0.95rem;
    }

    /* Оптимизируем карточки товаров */
    .col-sm-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (max-width: 575.98px) {
    .col-sm-6 {
        width: 100%;
    }

    .product-card {
        margin-bottom: 1rem;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#productsContainer {
    animation: fadeIn 0.5s ease-out;
}

/* Кастомные чекбоксы для фильтров */
.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Улучшения для iOS */
input, select, textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: var(--border-radius);
}

/* Предотвращаем масштабирование при фокусе на iOS */
input[type="text"],
input[type="number"],
textarea {
    font-size: 16px; /* Предотвращает зумирование на iOS */
}

/* Оптимизация для планшетов */
@media (min-width: 768px) and (max-width: 991.98px) {
    .col-md-4 {
        flex: 0 0 auto;
        width: 50%;
    }
}
/* Стили для модального окна с деталями товара */
.product-details-img {
    height: 250px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.product-details-img i {
    color: #adb5bd;
    font-size: 4rem;
}

.similar-product-card {
    transition: var(--transition);
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
}

.similar-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--secondary-color);
}

/* Стили для алертов в модальных окнах */
.modal .alert {
    margin-bottom: 1rem;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .product-details-img {
        height: 200px;
    }

    .product-details-img i {
        font-size: 3rem;
    }
}
/* Фикс для modal backdrop */
.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1050;
}

/* Анимация для похожих товаров */
.similar-product-card {
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
}

.similar-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--secondary-color);
    background-color: #f8f9fa;
}

/* Стили для product-details-img */
.product-details-img {
    height: 250px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.product-details-img i {
    color: #adb5bd;
    font-size: 4rem;
}

/* Исправление для модальных окон Bootstrap */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: none;
}

/* Улучшение для мобильных модальных окон */
@media (max-width: 768px) {
    .product-details-img {
        height: 200px;
    }

    .product-details-img i {
        font-size: 3rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Мобильная версия модального окна */
@media (max-width: 767.98px) {
    /* Мобильное модальное окно */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    .modal-content {
        border-radius: 0;
        border: none;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        border-bottom: 1px solid #e9ecef;
        padding: 1rem;
        background: white;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        padding-bottom: 80px; /* Для кнопок в футере */
    }

    .modal-footer {
        background: white;
        border-top: 1px solid #e9ecef;
        padding: 1rem;
        position: sticky;
        bottom: 0;
        z-index: 10;
        display: flex;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1;
        padding: 0.75rem;
    }

    /* Контейнер для мобильной версии */
    .mobile-product-details {
        padding-bottom: 1rem;
    }

    /* Изображение товара на мобильных */
    .mobile-product-image-container {
        border-radius: 10px;
        overflow: hidden;
        background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
    }

    .mobile-product-image {
        width: 100%;
        height: 200px;
        object-fit: contain;
        display: block;
    }

    .no-image-placeholder {
        background: linear-gradient(135deg, #f5f5f5 0%, #e9ecef 100%);
        border-radius: 10px;
        color: #adb5bd;
    }

    /* Название товара */
    .mobile-product-name {
        font-size: 1.25rem;
        font-weight: 600;
        line-height: 1.3;
    }

    /* Мета-информация */
    .mobile-product-meta .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        margin-right: 0.5rem;
        border: 1px solid #dee2e6;
    }

    /* Описание */
    .mobile-product-description {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 1rem;
    }

    .mobile-product-description h6 {
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-product-description p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 0;
    }

    /* Цена на мобильных */
    .mobile-product-price .card {
        border-radius: 10px;
    }

    .mobile-product-price .h4 {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .mobile-product-price .alert {
        border-radius: 10px;
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* Похожие товары на мобильных */
    .similar-product-card-mobile {
        background: white;
        border-radius: 10px;
        border: 1px solid #e9ecef;
        transition: all 0.2s ease;
    }

    .similar-product-card-mobile:hover {
        background: #f8f9fa;
        border-color: var(--secondary-color);
        transform: translateY(-2px);
    }

    .similar-product-card-mobile:active {
        transform: translateY(0);
    }

    .similar-product-card-mobile .smaller {
        font-size: 0.8rem;
    }

    /* Кнопка закрытия */
    .modal-header .btn-close {
        padding: 0.5rem;
        margin: 0;
        background-size: 1rem;
    }

    /* Заголовок модального окна */
    .modal-title {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.3;
        max-width: calc(100% - 40px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Адаптивные улучшения для модального окна */
@media (max-width: 575.98px) {
    .mobile-product-image {
        height: 180px;
    }

    .mobile-product-name {
        font-size: 1.1rem;
    }

    .modal-footer {
        padding: 0.75rem;
    }

    .modal-footer .btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
}

/* Планшетная версия */
@media (min-width: 768px) and (max-width: 991.98px) {
    .modal-dialog {
        max-width: 90%;
        margin: 1.75rem auto;
    }

    .product-details-img {
        height: 250px !important;
    }

    .mobile-product-image {
        height: 220px;
    }
}

/* Анимация открытия модального окна на мобильных */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .modal.fade .modal-dialog {
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }

    .modal.show .modal-dialog {
        transform: translateY(0);
        animation: slideInUp 0.3s ease-out;
    }
}

/* Улучшения для доступности на мобильных */
@media (max-width: 767.98px) {
    /* Увеличиваем область клика для похожих товаров */
    .similar-product-card-mobile {
        min-height: 60px;
    }

    /* Улучшаем читаемость текста */
    .modal-body {
        font-size: 0.95rem;
    }

    /* Убираем горизонтальный скролл */
    .modal-content {
        overflow-x: hidden;
    }

    /* Улучшаем контрастность */
    .mobile-product-meta .badge {
        background-color: #f8f9fa;
    }
}
/* Стили для кнопок в модальном окне */
.modal-footer .btn-primary {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    font-weight: 600;
}

.modal-footer .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.modal-footer .btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

.modal-footer .btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

/* Иконки в кнопках */
.modal-footer .btn i {
    font-size: 0.9em;
}

/* Адаптивные кнопки */
@media (max-width: 767.98px) {
    .modal-footer {
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }

    .modal-footer .btn {
        font-size: 0.9rem;
        height: 48px; /* Минимальная высота для удобного тапа */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-footer .btn i {
        margin-right: 8px;
    }
}

/* Логотип компании */
.company-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.company-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 3px solid white;
    background: white;
    padding: 10px;
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    color: white;
}

.company-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Контактная информация */
.contact-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark-color);
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.contact-value {
    font-size: 1rem;
    line-height: 1.4;
}

.contact-value a {
    color: var(--primary-color);
    transition: color 0.2s;
}

.contact-value a:hover {
    color: var(--secondary-color);
}

/* Кнопки копирования */
.btn-outline-primary.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Социальные сети */
.social-links {
    padding-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: white;
}

/* Адаптивность для мобильных */
@media (max-width: 767.98px) {
    .company-logo {
        width: 100px;
        height: 100px;
    }

    .company-name {
        font-size: 1.1rem;
    }

    .contact-value {
        font-size: 0.95rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    .social-link i {
        font-size: 1.5rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .contact-item .row.g-2 {
        margin-bottom: 0.5rem;
    }
}

/* Планшетная версия */
@media (min-width: 768px) and (max-width: 991.98px) {
    .company-logo {
        width: 110px;
        height: 110px;
    }

    .modal-dialog {
        max-width: 600px;
    }
}

/* Анимация для копирования */
@keyframes copyAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.btn-outline-primary:active {
    animation: copyAnimation 0.2s ease;
}

/* Улучшения для кнопок в модальном окне контактов */
.modal-footer .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили для формы обратной связи */
#contactModalForm .modal-dialog {
    max-width: 500px;
}

#contactModalForm .form-label {
    font-weight: 500;
    color: var(--dark-color);
}

#contactModalForm .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    font-size: 0.95rem;
}

#contactModalForm .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Кнопка "Назад к контактам" */
.btn-secondary i {
    margin-right: 5px;
}
/* Адаптивные кнопки копирования для мобильных */
@media (max-width: 991.98px) {
    .modal-footer .btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .contact-item .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Кнопки копирования в ряд */
    .d-block.d-lg-none .btn {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Улучшение для иконок в контактах */
.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(52, 152, 219, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
/* Улучшение для модального окна на мобильных */
@media (max-width: 767.98px) {
    .contact-section-title {
        font-size: 0.9rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .company-name {
        font-size: 1.1rem;
    }

    .contact-value a {
        font-size: 0.95rem;
        word-break: break-all;
    }

    .modal-footer .btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Логотип компании */
.company-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.company-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid #dee2e6;
    padding: 5px;
    background: white;
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

/* Улучшение для мобильных кнопок копирования */
@media (max-width: 991.98px) {
    .d-block.d-lg-none .btn {
        height: 70px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .d-block.d-lg-none .btn i {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .d-block.d-lg-none .btn .small {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}
/* ========== МОБИЛЬНАЯ ВЕРСИЯ КОНТАКТОВ ========== */
@media (max-width: 991.98px) {
    #contactModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    #contactModal .modal-content {
        border-radius: 12px;
        overflow: hidden;
    }

    #contactModal .modal-header {
        background: var(--primary-color);
        color: white;
        border-bottom: none;
        padding: 1rem;
    }

    #contactModal .modal-header .btn-close {
        filter: invert(1);
        opacity: 0.8;
        background-size: 0.8rem;
    }

    #contactModal .modal-body {
        padding: 0;
    }

    /* Мобильный контент контактов */
    .mobile-contacts-container {
        padding: 0;
    }

    .mobile-contact-header {
        text-align: center;
        padding: 1.5rem 1rem 1rem;
        background: linear-gradient(135deg, var(--primary-color) 0%, #1a5276 100%);
        color: white;
        margin-bottom: 0;
    }

    .mobile-logo-placeholder {
        width: 70px;
        height: 70px;
        margin: 0 auto 1rem;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        font-size: 1.3rem;
        border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .mobile-company-name {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
        color: white;
    }

    .mobile-company-desc {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.9);
        opacity: 0.9;
    }

    /* Основные действия */
    .mobile-primary-actions {
        padding: 1rem;
        background: white;
    }

    .mobile-action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.875rem;
        border: none;
        border-radius: 10px;
        font-weight: 600;
        font-size: 1rem;
        text-decoration: none;
        transition: all 0.2s ease;
        margin-bottom: 0.75rem;
        width: 100%;
        text-align: center;
    }

    .mobile-action-btn i {
        margin-right: 10px;
        font-size: 1.1rem;
    }

    .mobile-action-btn.call {
        background: #28a745;
        color: white;
    }

    .mobile-action-btn.call:hover {
        background: #218838;
        color: white;
    }

    .mobile-action-btn.message {
        background: var(--secondary-color);
        color: white;
    }

    .mobile-action-btn.message:hover {
        background: #2980b9;
        color: white;
    }

    /* Контактные карточки */
    .mobile-contact-card {
        background: white;
        padding: 1rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #e9ecef;
    }

    .mobile-contact-card:last-child {
        margin-bottom: 0;
    }

    .mobile-contact-card-header {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
    }

    .mobile-contact-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        background: rgba(52, 152, 219, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 0.75rem;
        flex-shrink: 0;
    }

    .mobile-contact-title {
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--dark-color);
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-contact-content {
        margin-bottom: 1rem;
    }

    .mobile-contact-value {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f8f9fa;
    }

    .mobile-contact-value:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    /* Кнопки действий внутри карточек */
    .mobile-contact-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .mobile-contact-btn {
        padding: 0.5rem;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        border-radius: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-contact-btn i {
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    /* Дополнительная информация */
    .mobile-details-section {
        background: #f8f9fa;
        padding: 1rem;
        margin-top: 0;
        border-top: 1px solid #e9ecef;
    }

    .mobile-details-toggle {
        background: none;
        border: none;
        color: var(--secondary-color);
        font-size: 0.9rem;
        padding: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-weight: 500;
    }

    .mobile-details-toggle i {
        margin-right: 0.5rem;
        transition: transform 0.3s ease;
    }

    .mobile-details-toggle.collapsed i {
        transform: rotate(-90deg);
    }

    .mobile-details-content {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #dee2e6;
        display: none;
    }

    .mobile-details-content.show {
        display: block;
    }

    .mobile-details-item {
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }

    .mobile-details-item:last-child {
        margin-bottom: 0;
    }

    /* Кнопки в футере */
    #contactModal .modal-footer {
        background: white;
        border-top: 1px solid #e9ecef;
        padding: 0.75rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    #contactModal .modal-footer .btn {
        padding: 0.75rem;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    #contactModal .modal-footer .btn i {
        margin-right: 5px;
    }
}

/* Логотип компании для десктопной версии */
.company-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.company-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #dee2e6;
    background: white;
    padding: 5px;
}

/* Логотип для мобильной версии */
.mobile-company-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: white;
    padding: 3px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Десктопная версия контактов */
@media (min-width: 992px) {
    #contactModal .modal-dialog {
        max-width: 850px;
    }

    #contactModal .modal-body {
        padding: 1.5rem;
    }

    .company-name {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--primary-color);
        line-height: 1.3;
        margin-top: 1rem;
    }

    /* Контактная информация */
    .contact-section-title {
        font-size: 0.9rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--dark-color);
        border-bottom: 2px solid var(--primary-color);
        padding-bottom: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .contact-label {
        font-size: 0.75rem;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
    }

    .contact-value {
        color: var(--dark-color);
    }

    .contact-value.h5 {
        font-size: 1.1rem;
    }

    /* Карточки контактов */
    .contact-item .card {
        border-radius: 10px;
        border: 1px solid #dee2e6;
        transition: all 0.2s ease;
        background: white;
    }

    .contact-item .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0,0,0,0.1);
        border-color: var(--secondary-color);
    }

    .contact-item .card-body {
        padding: 1.25rem;
    }

    /* Кнопки */
    #contactModal .btn {
        font-size: 0.85rem;
        font-weight: 500;
    }

    #contactModal .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Разделитель */
    #contactModal .border-end {
        border-right: 1px solid #e9ecef !important;
    }
}

/* Мобильная версия контактов */
@media (max-width: 991.98px) {
    #contactModal .modal-footer {
        display: none !important;
    }

    /* Улучшенные стили для мобильной версии */
    .mobile-contact-header {
        text-align: center;
        padding: 1.5rem 1rem 1rem;
        background: linear-gradient(135deg, var(--primary-color) 0%, #1a5276 100%);
        color: white;
    }

    .mobile-company-name {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0.5rem 0 0.25rem;
        color: white;
    }

    .mobile-company-desc {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.9);
        opacity: 0.9;
    }
}
.company-logo-placeholder {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dee2e6;
}
/* Улучшения для мобильных фильтров */
@media (max-width: 991.98px) {
    .filter-sidebar-wrapper {
        position: static;
        width: 100%;
    }

    .filter-sidebar {
        margin-top: 0.5rem;
        padding: 1rem;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .filter-sidebar.collapse:not(.show) {
        display: none;
    }

    .filter-sidebar.collapse.show {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Улучшаем кнопку фильтров */
    .filter-sidebar-wrapper > .btn-primary {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
        font-size: 1rem;
        border-radius: 10px;
        background: var(--secondary-color);
        border: none;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .filter-sidebar-wrapper > .btn-primary i {
        font-size: 1.1rem;
    }

    .filter-sidebar-wrapper > .btn-primary[aria-expanded="true"] i.fa-chevron-down {
        transform: rotate(180deg);
        transition: transform 0.3s ease;
    }

    .filter-sidebar-wrapper > .btn-primary i.fa-chevron-down {
        transition: transform 0.3s ease;
    }
}
/* Мобильные фильтры - упрощенная версия */
@media (max-width: 991.98px) {
    /* Убираем блок "Все товары" */
    .products-header {
        display: none !important;
    }

    /* Скрываем фильтр по ценам */
    .filter-group:has(.price-filter) {
        display: none !important;
    }

    /* Скрываем блок "О компании" в сайдбаре */
    .company-info {
        display: none !important;
    }

    /* Добавляем правило для скрытия дублирующейся сортировки */
    .sort-container .sort-label {
        display: inline-block !important;
    }

    /* Убеждаемся, что активные фильтры отображаются */
    .active-filters {
        display: block !important;
        margin-bottom: 1rem !important;
    }

    /* Улучшаем отображение основного контента */
    .col-lg-9 {
        padding: 0;
    }

    /* Убираем лишние отступы */
    .products-header + * {
        margin-top: 0;
    }

    /* Опционально: уменьшаем отступы для оставшихся элементов */
    .filter-group {
        margin-bottom: 1rem !important;
    }

    .filter-group:last-child {
        margin-bottom: 0 !important;
    }

    .filter-actions {
        margin-top: 1rem !important;
    }
}

/* Дополнительные исправления для мобильной версии */
@media (max-width: 767.98px) {
    /* Скрываем лишние элементы */
    .products-header {
        display: none !important;
    }

    /* Показываем только нужные элементы */
    #productsContainer {
        margin-top: 0;
    }

    /* Убираем дублирование заголовка */
    .hero-title {
        font-size: 1.5rem;
    }

    /* Улучшаем отображение активных фильтров */
    .active-filters .alert {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .active-filters .alert .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}















/* Добавьте эти стили в конец файла catalog.css */

/* Стили для группировки товаров на главной */
.category-group-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.category-group-section:last-child {
    border-bottom: none;
}

.category-group-header {
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.category-group-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
}

.category-group-header .btn-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
}

.category-group-header .btn-link:hover {
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
    border-radius: 20px;
}

/* Адаптация для мобильных */
@media (max-width: 767.98px) {
    .category-group-title {
        font-size: 1.1rem;
    }

    .category-group-header {
        flex-wrap: wrap;
    }

    .category-group-header .btn-link {
        font-size: 0.8rem;
    }

    .category-group-section {
        margin-bottom: 1.5rem;
    }
}

/* Улучшаем отображение карточек на главной */
.product-card .card-body.p-2 {
    padding: 0.5rem !important;
}

.product-card .card-title {
    font-size: 0.95rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .card-text.small {
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .product-price.small {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Анимация при наведении */
.category-group-section {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.category-group-section:nth-child(1) { animation-delay: 0.1s; }
.category-group-section:nth-child(2) { animation-delay: 0.2s; }
.category-group-section:nth-child(3) { animation-delay: 0.3s; }
.category-group-section:nth-child(4) { animation-delay: 0.4s; }
.category-group-section:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Стили для бейджа фото */
.photo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary-color);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.photo-badge i {
    font-size: 0.65rem;
}

/* Стили для сообщения о товарах с фото */
.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.2);
    color: var(--primary-color);
    font-size: 0.9rem;
    border-radius: 8px;
}

.alert-info i {
    color: var(--secondary-color);
}

/* Улучшаем отображение карточек с фото */
.product-card .product-img img {
    transition: transform 0.3s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

/* Стили для заглушки когда нет фото */
.product-img i.fa-box {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-img i.fa-box {
    opacity: 0.8;
}

/* Адаптация для мобильных */
@media (max-width: 767.98px) {
    .photo-badge {
        top: 5px;
        left: 5px;
        padding: 2px 6px;
        font-size: 0.6rem;
    }

    .alert-info {
        font-size: 0.8rem;
        padding: 0.5rem;
        margin-top: 0.5rem !important;
    }
}