body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #808080;

}

html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

main {
    padding: 2em;
}

@media (max-width: 600px) {
  main {
    padding: 1em; /* Уменьшаем отступы, чтобы оставить больше пространства для контента */
  }
}


footer {
    border-radius: 15px;
    color: #fff;
    text-align: center;
    padding: 1em;
    position: relative;
    bottom: 0;
    width: 100%;
}


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

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

.product-detail img {
    max-width: 100;
    height: auto;
    border-radius: 15px;
    display: block;
    margin-bottom: 10px;
}

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

.product-detail .description {
    font-size: 14px;
    color: #555;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 14px;
}

.product-detail button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border-radius: 10px;
}
.product-detail button:hover {
    background-color: #45a049;
}




        .header {
            display: flex;
            justify-content: space-between;
            border-radius: 20px;
            align-items: baseline;
            background-color: black; /* Цвет #78373C фона */
            color: white; /* Цвет текста */
            height: 100px;
            padding: 60px; /* Отступы */
            position: relative;
            background-size: cover;



        }
        .header div {
            flex: 10; /* Равномерное распределение ширины */
            text-align: center; /* Выравнивание текста по центру */
        }
        .header img {
            height: 40%;
            border-radius: 12px;
            width: 80%;           /* Растягивает по ширине родителя */
            object-fit: cover;     /* Обрезает, если нужно заполнить */
            display: block;        /* Убирает лишние отступы от inline-элемента */
            border-radius: 12px;
        }

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

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

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



        @media (max-width: 600px) {
            header {
                flex-direction: column;          /* Располагаем содержимое вертикально */
                align-items: center;             /* Центрируем по горизонтали */
                justify-content: center;         /* Центрируем по вертикали */
                padding: 24px 16px;              /* Уменьшаем паддинги */
                border-radius: 8px;
                text-align: center;              /* Центруем текст */
                gap: 16px;
            }

        }


        /* Контейнер продуктов */
        .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: 600px) {  /* ✅ Срабатывает на мобильных */
            .product-list {
                display: grid;
                grid-template-columns: repeat(3, 1fr); /* ✅ 2 карточки в ряд */
                gap: 6px;
                grid-auto-rows: 260px; /* фиксируем высоту строк сетки */
             }
            .product-item {
                font-size: 14px; /* ✅ Чуть меньше текст для компактности */
                width: 90%;              /* можно задать конкретную ширину, если нужно */
                max-width: 160px;         /* ограничить максимальную ширину */
                min-height: 247px;        /* задать минимальную высоту, если не хватает воздуха */
                padding: 6px;             /* отступы внутри карточки */
                font-size: 10px;          /* масштабируем текст */
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                border-radius: 6px;
             }

        }


        /* Элемент продукта */
        .product-item {
            background-color: white; /* Светлый фон */
            border-radius: 10px; /* Закругленные углы */
            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; /* Закругленные углы изображения */
        }

        /* Ссылки */
        .product-item a {

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

        @media (max-width: 600px) {
            .product-item {
                padding: 4px;
                font-size: 8px;
                max-height: 240px; /* Ограничим высоту */
                overflow: hidden;
                border-radius: 4px;
                box-shadow: 0 4px 6px rgba(0,0,0,0.08);
            }

            .product-item img {
                max-height: 140px;
                object-fit: cover;
                border-radius: 4px;
                margin-top: 4px;
                margin-bottom: 4px;
            }

            .product-item a {
                font-size: 8px;
                margin-top: 1px;
                display: block;
                text-overflow: ellipsis;
                white-space: nowrap;
                overflow: hidden;
            }

        }

        .product-link {
            padding: 6px 12px;
            background-color: black;   /* Зелёный фон */
            color: #fff;                 /* Белый текст */
            text-decoration: none;       /* Без подчеркивания */
            border-radius: 6px;
            font-weight: bold;
            font-size: 13px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            transition: background-color 0.3s ease, transform 0.2s ease;
        }

            .product-link:hover {
                background-color: #388E3C;
                transform: translateY(-2px); /* Эффект "подъёма" при наведении */
        }

        @media (max-width: 600px) {
            .product-link {
                display: block;                /* Каждая ссылка на своей строке */
                font-size: 4px;               /* Чуть меньше шрифт */
                padding: 4px 6px;             /* Больше воздуха для пальцев */
                border-radius: 6px;
                text-align: center;
                background-color: black !important;     /* Контрастный фон */
                color: black;
                margin-bottom: 6px;            /* Отступ снизу между ссылками */
            }

            .product-link:hover {
                background-color: #388E3C;     /* Плавное затемнение при наведении */
            }
        }


        .product-price {
            background-color: #f9f2f4;
            border: 1px solid green;
            padding: 2px 2px;
            border-radius: 6px;
            display: inline-block;
            color: green;
            font-weight: 600;
        }

#order-form {
    background-color: #f9f9f9; /* Светлый фон */
    padding: 30px; /* Пространство внутри формы */
    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;
}

.greeting{
    text-align: center;
    font-size: 15px;
    padding: 15px;
    color: red; /* Зеленый цвет */

h2 {

    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    text-shadow: -1px 0 1px white;
}


h5 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: white;
}

}
@media (max-width: 600px) {
    .greeting {
        font-size: 10px; !important
    }
}
/*tut*/
/* Заголовок корзины */
h3 {
    text-align: center;
    font-size: 24px;
    color: black; /* Зеленый цвет */
    padding: 10px;
    background-color: #f0f0f0; /* Легкий фон */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Тень */
}
@media (max-width: 600px) {
    h3 {
        font-size: 12px !important;           /* Меньший размер шрифта */
        padding: 2px !important;            /* Меньше отступ */
        border-radius: 6px !important;        /* Чуть менее округлённые края */
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;/* Более лёгкая тень */
    }
}

/* new cart*/
.cart-title {
    text-align: center;
    margin-bottom: 20px;
}

.cart-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cart-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-center {
    flex: 1;
}

.cart-center h3 {
    margin: 0;
    font-size: 18px;
}

.cart-center .price {
    font-size: 16px;
    font-weight: bold;
    margin: 5px 0;
}

.qty-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.qty-form input {
    width: 60px;
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.qty-form button {
    padding: 6px 12px;
    background: #0088cc;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.qty-form button:hover {
    background: #0077b3;
}

.delete-btn {
    font-size: 20px;
    color: #ff4d4d;
    text-decoration: none;
    font-weight: bold;
}

.delete-btn:hover {
    color: #cc0000;
}

.total-price {
    font-size: 20px;
    text-align: right;
    margin-top: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 15px;
}

.checkout-btn:hover {
    background: #218838;
}



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

@media (max-width: 400px) {
    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        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: 100%;
    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;
}


/* Кнопка "Оформить заказ" */
.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: unset;
    padding-bottom: 30px;

}


@media (max-width: 600px) {
    .container {
        padding-bottom: 30px;  /* Можно уменьшить отступ снизу */
        padding-left: 2px;    /* Ужимаем боковые отступы */
        padding-right: 2px;
        min-height: auto;      /* Убираем ограничение по высоте, если мешает прокрутке */
    }
}






.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 */


/* Стили заголовка */
h3 {
    text-align: center;
    font-size: 24px;
    color: black; /* Зеленый */
    padding: 10px;
    background-color: #f0f0f0; /* Светлый фон */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/*need to html*/
.auth-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
    width: 250px;
    text-align: center;
    margin: auto;
}

.auth-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: border 0.3s;
}
.auth-container input:focus {
    border-color: #007bff;
    outline: none;
}
/* HEADER NEW */


.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* FOR CART NEW */

.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 22px 28px;
    border-radius: 60px;
    text-decoration: none;
    font-size: 22px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.floating-cart:hover {
    transform: scale(1.05);
}

.hidden {
    display: none;
}

/* 📱 Телефоны */
@media (max-width: 768px) {
    .floating-cart {
        padding: 26px 32px;
        font-size: 26px;
        bottom: 25px;
        right: 20px;
    }
}

/* 💻 Большие экраны */
@media (min-width: 1200px) {
    .floating-cart {
        padding: 26px 34px;
        font-size: 26px;
    }
}


.category-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    .category-scroll {
        justify-content: center;   /* центрируем */
        overflow-x: visible;       /* убираем скролл */
    }
}

/* Убираем полосу прокрутки */
.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-scroll {
    border-bottom: 4px solid black;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
}


.category-pill {
    flex: 0 0 auto;
    padding: 6px 10px;
    background: black;
    border-radius: 50px;
    text-decoration: none;
    color: white;
    font-size: 10px;
    white-space: nowrap;
    transition: 0.3s;
    border: 1px solid transparent;
}

.category-pill:hover {
    background: #ff5722;
    color: white;
    transform: scale(1.05);
}

/* Активная категория */
.category-pill.active {
    background: #ff5722;
    color: white;
}

/* for add souce and addes  */

/* Тёмный фон */
.extras-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    padding-top: 80px;
}

/* Кнопка "Додати" */
#confirm-add {
    width: 100%;
    background: green;
    color: white;
    padding: 12px 0;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 14px;
    cursor: pointer;
    transition: 0.2s;
}

#confirm-add:hover {
    background: #005fcc;
}

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


.price-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.price-status .price {
    font-size: 18px;
    color: #2e7d32;
    font-weight: 600;
    margin: 0;
}

.status {
    font-size: 16px;
    margin: 0;
}

.status.available {
    color: green;
}

.desc-title{
    font-size: 20px;
    margin: 8px 0 4px;
    color: green;
}

/* for home page and menu in header   */

.home-hero{
    background-image: url("/static/image/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align:center;
    padding:60px 20px;
    font-size: 15px;

h2 {

    font-family: 'Poppins', sans-serif;
    font-weight: 1200;
    color: red;

}


h4 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: white;
}

h6 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: white;
}
}

.hero-button{
    display:inline-block;
    margin-top:20px;
    padding:12px 25px;
    background:black;
    color: white;
    border-radius:8px;
    text-decoration:none;
    font-weight:bold;

}

.home-popular{
    margin-top:20px;
    background-image: url("/static/image/popular-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;


}

.home-popular h2{
    text-align:center;
    margin-bottom:30px;


    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    color: white;

}
