/* Основные стили */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    font-weight: 400;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

h1 {
    font-weight: 700;
}

/* Навигация */
.navbar {
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.1);
    font-weight: 500;
}

.nav-link {
    color: #1a237e;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: #1a237e !important;
    transform: translateY(-1px);
}

.nav-link:focus {
    outline: none;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Карточки */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.1) !important;
}

.card-header {
    font-weight: 600;
}

/* Таблица */
.table {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0;
}

.table-header {
    padding: 15px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.sort-link {
    color: #212529;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.sort-link:hover {
    color: #0d6efd;
}

.sort-link:focus {
    outline: none;
}

.product-row {
    border-bottom: 2px solid #e3f2fd;
    transition: background-color 0.2s ease;
}

.product-row:hover {
    background-color: #e3f2fd !important;
}

.product-cell {
    padding: 12px 15px !important;
    font-weight: 500;
    vertical-align: middle;
}

.product-link {
    color: #1a237e;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: #1a237e;
    text-decoration: underline;
}


/* Описание товара */
.product-description {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 0.5;
    font-weight: 400;
    text-align: left !important;
    font-size: 1.05rem;
    color: #000;
    margin-bottom: 10px;
}

.product-image:hover {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

.empty-table-message {
    text-align: center;
    color: #6c757d;
    padding: 40px !important;
    font-weight: 500;
}

.empty-icon {
    font-size: 3rem;
    color: #0d6efd;
    opacity: 0.5;
}

/* Кнопки */
.btn {
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 6px 14px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.2);
}

.btn-outline-primary {
    border: 1px solid #1a237e;
    color: #1a237e;
}

.btn-outline-primary:hover {
    background-color: white;
    color: black;
}

/* Формы */
.form-label {
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.form-control, .form-select {
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    font-weight: 400;
}

.form-control:focus, .form-select:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-text {
    font-weight: 400;
}

/* Пагинация */
.pagination {
    font-weight: 500;
}

.pagination .page-link {
    color: #1a237e;
    border: 1px solid #e3f2fd;
    font-weight: 500;
    padding: 8px 16px;
}

.pagination .page-item.active .page-link {
    background-color: #1a237e;
    border-color: #1a237e;
    color: white;
    font-weight: 600;
}

.pagination .page-link:hover {
    background-color: #e3f2fd;
    color: #1a237e;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.5s ease-out;
}

/* Фильтры */
.filter-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 1.5rem;
}

/* Бейджи */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
}


/* Footer */
footer {
    box-shadow: 0 -2px 4px rgba(13, 110, 253, 0.05);
    font-weight: 400;
}

/* Алерты */
.alert {
    font-weight: 500;
    border-radius: 8px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

/* Мелкий текст */
small, .small {
    font-weight: 400;
}

.text-muted {
    font-weight: 400;
}

/* Выделение жирным */
strong, b {
    font-weight: 700;
}

/* Базовые стили для всех устройств */
* {
    box-sizing: border-box;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table-header {
        padding: 10px !important;
        font-size: 0.8rem;
    }
    
    .product-cell {
        padding: 10px !important;
        font-size: 12px !important;
    }

    .btn {
        padding: 5px 5px;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    body {
        font-size: 14px;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .mt-4 {
        margin-top: 1rem !important;
    }

    /* Таблица становится горизонтальной прокруткой (для IOS) */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Карточки на всю ширину */
    .card {
        margin-bottom: 15px;
    }

    /* Формы */
    input, select, textarea {
        font-size: 16px !important; /* Предотвращает зумирование на iOS */
    }

    .hero-section {
        padding: 40px 25px !important;
    }

    .bi-building {
        font-size: 40px !important;
    }

    .col-md-4 {
        margin-bottom: 15px;
    }

    .col-md-5 {
        margin-top: 30px;
    }

    iframe {
        height: 250px !important;
    }
}

/* Для планшетов (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
}

/* Для очень маленьких экранов (до 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    /* Скрываем второстепенные элементы */
    .hide-on-mobile {
        display: none;
    }
}



/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

/* Улучшенная читаемость */
p {
    line-height: 1.6;
    font-weight: 400;
}

.lead {
    font-weight: 400;
    line-height: 1.8;
}

/* Стили для активных фильтров */
.filter-active {
    background-color: #e3f2fd;
    border-left: 4px solid #0d6efd;
    padding-left: 12px;
}

/* Стили для результатов поиска */
.search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* Стили для уведомление */

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
}

.toast {
    min-width: 300px;
    opacity: 0.95;
    backdrop-filter: blur(10px);
}

.toast:hover {
    opacity: 1;
}

.bg-success {
    background-color: #198754 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.bg-primary {
    background-color: #0d6efd !important;
}

.hero-section {
    transition: all 0.3s ease;
}

img {
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15) !important;
}

/* Анимация для модального окна */
.modal.fade .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Добавляем плавность для ссылок или иконок */
.bi-check-circle-fill, .bi-dot {
    transition: transform 0.2s ease;
}

li:hover .bi-check-circle-fill {
    transform: scale(1.05);
}