body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: grey;

}

}
nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 1em;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

main {
    padding: 1em;
}


/* Контейнер для продукта */
.product-detail {
    max-width: 300px;
    margin: 0 auto;
    background-color: #f9f9f9;
    padding: 20px;/* Более компактный отступ */
    border-radius: 25px; /* Слегка закругленные углы */
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.product-detail h1 {
    color: #333;
    font-size: 24px;
    text-align: center;
    margin-bottom: 15px;
}

.product-detail img {
    max-width: 80;
    height: auto;
    border-radius: 15px;
    margin-bottom: 0px;
}

.product-detail .price {
    font-size: 20px;
    color: #4CAF50;
    margin-bottom: 10px;
    text-align: center;
}

.product-detail .description {
    font-size: 18px;
    color: #555;
    text-align: center;
    margin-bottom: 20px;
}

.product-detail .buttons {
    display: flex;
    justify-content: center;
    gap: 0px;
}

.product-detail button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.product-detail button:hover {
    background-color: #45a049;
}

@media (max-width: 768px) {
    header {
        height: 40px; !important;
        font-size: 14px;
        min-height: 50px;
        padding: 10px 20px;
        front-size: 14px;

    }
}

    .header-buttons {
        flex-wrap: wrap; /* Позволяем кнопкам переноситься */
    }

    .cart-section {
        text-align: center; /* Центрируем корзину */
    }

        .header {
            display: flex;
            justify-content: space-between;
            border-radius: 15px;
            align-items: center;
            background-color: black; /* Цвет фона */
            color: gold; /* Цвет текста */
            padding: 4px; /* Отступы */
        }
        .header div {
            flex: 4; /* Равномерное распределение ширины */
            text-align: center; /* Выравнивание текста по центру */
        }

        a {
            color: #DEB887; /* Зеленый */
            text-decoration: none; /* Убираем подчеркивание */
        }

        /* Цвет при наведении на ссылку */
        a:hover {
            color: gold; /* zalaniy при наведении */
        }

        /* Изменение цвета фона списка */
        ul {
            background-color: silver; /* Светло-серый фон kategory*/
            padding: 10px;
            border-radius: 5px;
        }

        .header-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
        }

        .header-buttons a {
            display: inline-block;
            background-color: gold; /* shrift hedar */
            color: black; /* shrift hedat */
            font-size: 14px;
            padding: 8px 12px;
            border-radius: 6px;
            text-decoration: none;
            text-align: center;
            transition: background-color 0.3s ease-in-out;
        }

        .header-buttons a:hover {
            background-color: #45a049;
        }


        /* Контейнер продуктов */
        .product-list {
            display: grid; /* Используем CSS Grid */
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Автоматическая подгонка */
            gap: 15px; /* Расстояние между продуктами */
            padding: 10px;
            justify-content: center;
        }
        @media (max-width: 768px) {  /* ✅ Срабатывает на мобильных */
            .product-list {
                grid-template-columns: repeat(2, 1fr); /* ✅ 2 карточки в ряд */
                gap: 10px;
             }

            .product-item {
                padding: 8px; /* ✅ Уменьшаем отступ, чтобы карточки не были громоздкими */
                font-size: 14px; /* ✅ Чуть меньше текст для компактности */
            }
        }


        /* Элемент продукта */
        .product-item {
            background-color: silver; /* Светлый фон kartochki tovara*/
            border: 1px solid #ddd; /* Легкая рамка */
            border-radius: 8px; /* Закругленные углы */
            box-shadow: 0 9px 9px rgba(0, 0, 0, 0.1); /* Тень */
            cursor: pointer; /* Добавляем указатель мыши при наведении */

            overflow: hidden;
            padding: 10px;
            text-align: center;
            transition: transform 0.3s, box-shadow 0.3s; /* Добавляем анимацию */
        }

        /* Эффект при наведении */
        .product-item:hover {
            transform: scale(1.1); /* Лёгкое увеличение */
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Более выразительная тень */
        }

        /* Изображение */
        .product-item img {
            margin-top: 10px; /* Добавляет пространство между названием и изображением */
            max-width: 100%; /* Адаптивное изображение */
            height: auto;
            border-radius: 8px; /* Закругленные углы изображения */
            object-fit: cover;
            display: block;
            box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
            margin: 0 auto;
            /*aspect-ratio: 6 / 5;*/
        }

        /* Ссылки */
        .product-item a {
            margin-top: 10px; /* Добавляет пространство между названием и изображением */

            color: black; /* Зеленый текст shrift kartochki tovara */
            text-decoration: none; /* Убираем подчеркивание */
            font-weight: bold;
        }

/* Стили для контейнера категорий */
        .categories {
            display: flex;
            gap: 10px;
        }

        .category {
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            border-radius: 5px;
            cursor: pointer;
        }

        .category:hover {
            background-color: #45a049;
        }

.categories-container {
            text-align: center;
            margin-top: 20px;
        }


#order-form {
    background-color: silver; /* Светлый фон */
    padding: 20px; /* Пространство внутри формы */
    border-radius: 10px; /* Закругленные углы */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Тень для эффекта "карточки" */
    max-width: 400px;
    margin: 0 auto;
    display: none; /* Скрыта, пока не нажата кнопка */
}

#order-form label {
    font-weight: bold;
    color: #333; /* Темный цвет текста */
    display: block;
    margin-top: 10px;
}

#order-form input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

#order-form button {
    width: 100%;
    background-color: #4CAF50; /* Зеленый */
    color: white;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

#order-form button:hover {
    background-color: #45a049;
}
/*tut*/
/* Заголовок корзины */
h2 {
    text-align: center;
    font-size: 24px;
    color: gold /* Зеленый цвет */
    padding: 10px;
    background-color: #f0f0f0; /* Легкий фон */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Тень */
}


/* Блок товара в корзине */

@media (max-width: 600px) {
    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 90%;
        margin: auto;
    }
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    margin: auto;
    max-width: 95%;
    overflow: hidden;

}

/* Фото товара */
.cart-item img {
    width: 80px;
    height: auto;
    border-radius: 8px;
}

/* Название и цена */
.cart-item p {
    font-size: 16px;
    font-weight: bold;
}

/* Поле ввода количества */
.cart-item input[type="number"] {
    width: 50px;
    padding: 5px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Кнопка "Обновить" */
.cart-item button {
    background-color: #3498DB; /* Синий */
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.cart-item button:hover {
    background-color: #2980B9;
}

/* Кнопка "Удалить" */
.delete-btn {
    display: block;
    background-color: #E74C3C; /* Красный */
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.delete-btn:hover {
    background-color: #C0392B;
}

/* Итоговая сумма */
.cart-summary {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
}

/* Кнопка "Оформить заказ" */
.checkout-btn {
    display: block;
    text-align: center;
    background-color: #27AE60; /* Зеленый */
    color: white;
    font-size: 18px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    max-width: 200px;
    margin: 20px auto;
}

.checkout-btn:hover {
    background-color: #219C52;
}

.container {
    height: auto;
    min-height: 100vh;
    padding-bottom: 50px;
}


.product-buttons {
    display: flex; /* Размещает кнопки в одной строке */
    gap: 15px; /* Расстояние между кнопками */
    justify-content: flex-start; /* Разместить кнопки слева */
    align-items: center; /* Выравнивает по вертикали */
    flex-wrap: wrap; /* Если места мало, переносит */
}

.button {
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    width: 100%;
    max-width: 140px; /* Одинаковая ширина */
    text-align: center;
}

#order-button {
    background-color: #B57281; /* Оранжевый цвет */

    font-size: 20px; /* Увеличенный текст */
    padding: 2px 8px; /* Больше пространства */
    border-radius: 20px; /* Скругленные углы */
}


.add-to-cart {
    front-size: 1px;
    color: white;

    padding: 8px 5px;
    border-radius: 22px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.product-list .product-buttons {

    display: flex; /* Разместить кнопки горизонтально */
    gap: 10px; /* Расстояние между кнопками */
    justify-content: center; /* Центрируем кнопки */
    align-items: center; /* Выравниваем */
    flex-wrap: wrap; /* Если места мало, кнопки не уходят вниз */
}

.product-list .button {
    background-color: #34C924; /* Оранжевый цвет */

    width: 20%; /* Убираем разный размер */
    max-width: 100px; /* Ограничиваем ширину кнопок */
    text-align: center;
}

@media (max-width: 600px) {
    .user-section, .cart-section {
        font-size: 14px; /* Уменьшаем текст */
        display: flex;
        flex-wrap: wrap; /* Позволяем перенос строк */
    }
}


.user-section {
    display: flex;
    gap: 10px;

    justify-content: center;
    align-items: center;
    margin-bottom: 10px; /* Отделяем от других секций */
}

.cart-section {
    text-align: center;
    margin-top: 10px;
    font-size: 16px;
    padding: 5px;
}
}


.success-message {
    background: linear-gradient(135deg, #4CAF50, #8BC34A); /* Градиент */
    color: white;
    padding: 20px;
    border-radius: 12px;
    font-size: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Глубокая тень */
    animation: fadeIn 0.8s ease-in-out;
}

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

/* Кнопка продолжить покупки */
.success-message a {
    display: inline-block;
    background-color: #FFC107; /* Желтый */
    color: #333;
    font-size: 18px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease-in-out;
    margin-top: 15px;
}

.success-message a:hover {
    background-color: #FFA000;
}

/* stili kategorii */


/* Стили заголовка */
h2 {
    text-align: center;
    font-size: 24px;
    color: black; /* podskazka na kategory */
    padding: 10px;
    background-color: silver; /* Светлый фон */
    border-radius: 10px;
    box-shadow: 0 15px 15px rgba(0, 0, 0, 0.2);
}

h5 {
    text-align: center;
    font-size: 15px;
    color: gold; /* podskazka na kategory */
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 23px 22px rgba(0, 0, 0, 0.2);
}
/* Контейнер категорий */
.category-list {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #FFFFFF;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    margin: 10px auto;
    max-width: 350px;
    transition: transform 0.3s ease-in-out;
}

/* Эффект при наведении */
.category-list:hover {
    transform: scale(1.05);
}

/* Ссылки категорий */
.category-list a {
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    color: #3498DB;
    transition: color 0.3s ease-in-out;
}

.category-list a:hover {
    color: #2980B9;
}

.product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gallery-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: auto;
    min-height: 300px;
    overflow: hidden;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.gallery-image.visible {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;.
}

.gallery-button {
    background: #ddd;
    border: none;
    padding: 3px 5px; /* ✅ Уменьшаем отступы внутри кнопки */
    cursor: pointer;
    font-size: 10px; /* ✅ Делаем текст поменьше */
    width: 20px; /* ✅ Уменьшаем ширину */
    height: 25px; /* ✅ Уменьшаем высоту */
    border-radius: 5px; /* ✅ Лёгкое скругление углов */
}

footer {
    background-color: black;
    border-radius: 15px;
    color: gold;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* ✅ Контейнер для двух колонок */
.footer-container {
    display: flex;
    flex-wrap: wrap; /* ✅ Теперь блоки перестраиваются на маленьких экранах */
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 10px;
}

/* ✅ Левая часть: контакты и соцсети */
.footer-left {
    width: 1;
    text-align: left;

}

/* ✅ Правая часть: карта Google */
.footer-right {
    width: 1;
    text-align: right;

}

/* ✅ Делаем карту адаптивной */
.footer-right iframe {
    width: 100%;
    max-width: 400px;
    height: 200px;
    border-radius: 10px;
}

/* ✅ Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column; /* ✅ Перестраиваем подвал вертикально */
        align-items: center;
        margin: 0 !important; /* ✅ Убираем лишние отступы */
        padding: 0 !important;
        width: 100% !important;
        overflow: hidden;
    }

    .footer-left, .footer-right {
        width: 100%; /* ✅ Теперь блоки занимают всю ширину */
        text-align: center;
    }

    .footer-right iframe {
        max-width: 100px; /* ✅ Ограничиваем ширину карты на мобильных */
    }
}

}

/* ✅ Правая часть: карта Google */
.footer-right {
    width: 48%;
}

/* ✅ Делаем карту адаптивной */
.footer-right iframe {
    width: 100%;
    max-width: 400px;
    height: 200px;
    border-radius: 10px;
}


.price-text {
    font-size: 9px;
    font-family: 'Verdana', sans-serif;
    font-weight: bold;
    color: gold;
    background-color: gray; /* ✅ Светло-серый фон */
    padding: 5px; /* ✅ Добавляет отступ вокруг текста */
    border-radius: 4px; /* ✅ Скругляет углы */
}
