/* Общие стили */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    text-align: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000; /* Чтобы header был поверх других элементов */
    height: 60px; /* Фиксированная высота */
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header nav ul li {
    display: inline;
    margin: 0 15px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
}

.container {
    display: flex;
    padding: 20px;
    margin-top: 80px;
	position: relative;
}

.content {
    flex: 2;
}

.sidebar {
    flex: 1;
    padding-left: 20px;
}

#tiles {
    display: flex;
    flex-wrap: wrap;
}

.tile {
    width: 300px; /* Фиксированная ширина */

    margin: 1.5%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden; /* Обрезаем изображение, если оно выходит за пределы блока */
    position: relative; /* Для позиционирования внутренних элементов */
}

.tile img {
    width: 100%; /* Ширина изображения равна ширине блока */
    height: 100%; /* Высота изображения равна высоте блока */
    object-fit: cover; /* Масштабируем изображение, чтобы оно заполнило блок */
}

#cart {
    list-style: none;
    padding: 0;
}

#cart li {
    padding: 10px;
    border-bottom: 1px solid #ccc;
}

#orderForm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Мобильное меню */
.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-icon .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px; /* Отступ сверху, чтобы не наезжало на header */
    left: 0;
    width: 100%;
    height: calc(100% - 60px); /* Высота минус высота header */
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-menu ul li {
    margin: 20px 0;
}

.mobile-menu ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5em;
}

/* Адаптивность */
@media (max-width: 768px) {
    .menu-icon {
        display: flex;
    }

    .desktop-menu {
        display: none;
    }

    .sidebar {
        display: none;
    }

    .container {
        flex-direction: column;
        margin-top: 60px; /* Меньший отступ для мобильной версии */
    }

    .tile {
        width: 100%; /* На всю ширину экрана */
        height: auto; /* Автоматическая высота */
        margin: 10px 0; /* Отступы между блоками */
    }

    .tile img {
        height: auto; /* Автоматическая высота для мобильной версии */
    }

    .mobile-menu.active {
        display: flex;
    }
}

@media (max-width: 480px) {
    .tile {
        width: 100%;
        margin: 10px 0;
    }
}