/* ==========================
   🛠 Общие стили
   ========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #121212; /* Темный фон */
    color: #E0E0E0; /* Светлый текст */
    line-height: 1.6;
}

/* ==========================
   🔹 Шапка
   ========================== */
.header {
    background: linear-gradient(135deg, #1F1F1F, #292929);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header h1 {
    font-size: 24px;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
}

/* ==========================
   🔹 Авторизация
   ========================== */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-section p {
    color: #E0E0E0;
    margin: 0;
    font-size: 16px;
}

/* ==========================
   🔹 Кнопки
   ========================== */
.btn {
    padding: 10px 20px;
    background-color: #292929;
    color: #E0E0E0;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(255, 255, 255, 0.1);
}

.btn:hover {
    background-color: #383838;
    transform: translateY(-2px);
}

/* ==========================
   🔹 Меню категорий
   ========================== */
.category-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
}

.category-card {
    width: 250px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #333, #444);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

/* Фоновое изображение категории */
.category-card {
    background-size: cover;
    background-position: center;
}

/* Затемнение фонового изображения */
.category-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Текст на карточке */
.category-card a {
    text-decoration: none;
    color: #E0E0E0;
    font-size: 18px;
    font-weight: bold;
    z-index: 2;
    position: relative;
}

/* ==========================
   🔹 Контейнер главного содержимого
   ========================== */
.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

/* ==========================
   🔹 Описание возможностей
   ========================== */
.features-section {
    background: linear-gradient(135deg, #1F1F1F, #292929);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    width: 100%;
    max-width: 800px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    font-size: 16px;
    margin-bottom: 8px;
    padding-left: 30px;
    position: relative;
    color: #B0B0B0;
}

.feature-list li strong {
    color: #E0E0E0;
}

.feature-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #888;
    font-weight: bold;
}

/* ==========================
   🔹 Карточки товаров
   ========================== */
.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.product-buttons {
    display: flex;
    gap: 20px; /* Устанавливает расстояние между кнопками */
}


/* Карточка товара */
.product-card {
    background: linear-gradient(135deg, #2A2A2A, #333);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    width: 280px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
}

.product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.2);
}

/* Изображение товара */
.product-image img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 10px;
    object-fit: contain;
}

/* Информация о товаре */
.product-info {
    margin-top: 10px;
}

.product-type {
    font-size: 14px;
    color: #B0B0B0;
}


/* ДЕТАЛИ ТОВАРА */
.product-detail {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #1F1F1F, #292929);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

/* ==========================
   🔹 Галерея изображений (горизонтальная)
   ========================== */

/* Главное изображение товара */
.main-image {
    width: 180px;
    height: 180px;
    border: 3px solid #fff;
}


/* ГАЛЕРЕЯ ИЗОБРАЖЕНИЙ ДЕТАЛИ ТОВАРА */
.product-images {
    text-align: center;
    margin-top: 20px;
}

.gallery {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px;
    gap: 10px;
    justify-content: center;
    scroll-behavior: smooth;
}

.gallery::-webkit-scrollbar {
    height: 8px;
}

.gallery::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 5px;
}

.thumbnail {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #333;
    transition: transform 0.3s ease-in-out;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    transform: scale(1.05);
    border-color: #999;
}

.product-gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.product-gallery img {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    object-fit: cover;
}

/* ==========================
   🔹 Навигационные кнопки
   ========================== */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* ==========================
   🔹 Модальные окна
   ========================== */
.modal {
    display: none; /* Скрываем по умолчанию */
    position: fixed;
   /* z-index: 2000; */
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Затемнение */
   /* display: flex; */
    align-items: center;
    justify-content: center;
}

.modal-inner {
    position: relative; /* Относительное позиционирование для крестика */
    display: inline-block; /* Позволяет контейнеру адаптироваться под размер изображения */
}


/* 🔍 Специальный стиль для изображений */
.modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain; /* Сохраняет пропорции изображения */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.modal-content {
    position: relative; /* Это важно! Ограничивает позицию .close-btn */
    background: #1F1F1F;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 90%;
    animation: fadeIn 0.3s ease-in-out;
}


/* Кнопка закрытия */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ccc;
}


/* Заголовок окна */
.modal-content h2 {
    font-size: 22px;
    color: #E0E0E0;
    margin-bottom: 20px;
}

.modal-content h3 {
    font-size: 22px;
    color: #E0E0E0;
    margin-bottom: 10px;
}


/* Поля формы */
.modal-content label {
    display: block;
    text-align: left;
    font-size: 14px;
    color: #B0B0B0;
    margin-bottom: 5px;
}


/* Поля ввода */
.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: #292929;
    color: #E0E0E0;
}



.modal-content p {
    font-size: 16px;
    color: #B0B0B0;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}


/* Кнопка входа */
.modal-content .btn {
    width: 100%;
    padding: 12px;
    background-color: #444;
    border: none;
    border-radius: 8px;
    color: #E0E0E0;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease-in-out;
}

.modal-content .btn:hover {
    background-color: #555;
}

.modal-buttons .btn {
    background-color: #292929;
    color: #E0E0E0;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.modal-buttons .btn:hover {
    background-color: #383838;
}

/* Анимация появления */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================
   🔹 Цена
   ========================== */
.price {
    font-size: 18px;
    font-weight: bold;
    color: #E0E0E0;
    margin: 10px 0;
}

/* ==========================
   🔹 Сообщение "Нет товаров"
   ========================== */
.no-products {
    text-align: center;
    font-size: 18px;
    color: #B0B0B0;
    margin-top: 20px;
}

.intro-text {
    font-size: 18px;
    color: #B0B0B0;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify; /* Выравнивание по ширине */
    text-justify: inter-word; /* Улучшает распределение пробелов */
    max-width: 100%; /* Убедимся, что текст не ограничивается искусственно */
    word-wrap: break-word; /* Предотвращает выход слов за границы */
}

.intro-title {
    text-align: center;
}

.hidden-price {
    display: none; /* Полностью скрывает текст, но он остаётся в коде */
}

/* Футер */
.site-footer {
    background: linear-gradient(135deg, #1F1F1F, #292929);
    color: #E0E0E0;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 16px;
}

.site-footer .footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.site-footer p {
    margin-bottom: 10px;
    color: #B0B0B0;
}

.site-footer .footer-link {
    display: inline-block;
    color: #E0E0E0;
    background: #333;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease-in-out;
}

.site-footer .footer-link:hover {
    background: #484848;
}

/* ==========================
   🔎 Увеличение изображения (модальное окно)
   ========================== */

.image-modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-in-out; /* Плавный переход для opacity */
    opacity: 0; /* Начальное состояние */
}

.image-modal.active {
    opacity: 1; /* Показанное состояние */
}

.modal-content-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

/* Стили для изображения в галерее */
#modalImg.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

/* Стили для общих модальных окон (если используются где-то еще) */
.modal-content:not(#modalImg) {
    position: relative;
    background: #1F1F1F;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 90%;
    animation: fadeIn 0.3s ease-in-out;
}

/* Кнопка закрытия */
.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10000;
}

.close-modal:hover {
    color: #ccc;
}
/* Анимация появления */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Оформление стилей описания продукта/товара */
/* .html-content { */
/*    padding: 15px; */
/*    background: linear-gradient(to right, #111827, #1F2937, #111827); */
/*    border-radius: 8px; */
/*    border: 1px solid #ddd; */
/*    margin-top: 15px; */
/*    font-size: 16px; */
/*    line-height: 1.6; */
/* } */

.html-content {
 /*   display: inline-block; */
 /*   width: fit-content;  */
    max-width: 100%;           /* На всякий случай, чтобы не вылезало за экран */

    margin: 0 auto;            /* Центрируем блок в родителе, если родитель шире */
    overflow: visible;         /* Чтобы вкладки не обрезались по горизонтали */

    /* Остальные стили, которые нужны для дизайна */
    padding: 15px;
    background: linear-gradient(to right, #111827, #1F2937, #111827);
    font-size: 16px;
    line-height: 1.6;
    /* border-radius: 8px; */
    /* border: none; */
    /* и т.д. */
}


.html-content h3, .html-content h4 {
    color: #333;
    margin-top: 10px;
}
.html-content p {
    margin-bottom: 10px;
}
.html-content a {
    color: #007bff;
    text-decoration: none;
}
.html-content a:hover {
    text-decoration: underline;
}


.separator {
  border: 0;
  height: 2px; /* Толщина линии */
  background-image: linear-gradient(to right, #ccc, #333, #ccc);
  margin: 20px 0; /* Отступы сверху и снизу */
}