/* Блок с блюдами (section>div) - Grid сетка */
.dishes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки */
    gap: 10px; /* Отступ между элементами */
}

/* Блок каждого блюда (section>div>div) - Flex контейнер */
.dish-item {
    display: flex;
    flex-direction: column; /* Вертикальное направление */
    padding: 30px 40px; /* 30px сверху и снизу, 40px справа и слева */
    border-radius: 35px; /* Радиус закругления */
    background-color: white; /* Цвет фона */
    cursor: pointer; /* Вид курсора */
    transition: all 0.3s;
    border: 2px solid transparent;
    height: 100%;
    filter: drop-shadow(17px 19px 24px rgba(0, 0, 0, 0.13));
    min-height: 500px; /* Увеличена минимальная высота */
}

/* Для выравнивания кнопок используем margin-top: auto */
.dish-item .add-button {
    margin-top: auto; /* Кнопка всегда внизу */
}

.dish-item:hover {
    border: 2px solid tomato;
    transform: translateY(-5px);
}

.dish-item:hover .add-button {
    background-color: #ff6b00;
    color: white;
}

.dish-image {
    width: 100%;
    height: 250px; /* Увеличена высота для лучшего заполнения */
    object-fit: cover; /* Изображение заполняет весь контейнер */
    border-radius: 25px; /* Слегка уменьшен радиус для соответствия макету */
    margin-bottom: 20px;
}

/* Для случаев, когда нужно показать всё изображение без обрезки */
.dish-image.full-image {
    object-fit: contain;
    background-color: #f8f8f8; /* Светлый фон для изображений с прозрачностью */
}

.dish-name {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
    min-height: 60px; /* Увеличена минимальная высота для двух строк */
    line-height: 1.3;
    flex-grow: 0;
}

.dish-weight {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 0;
}

.dish-price {
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333;
    flex-grow: 0;
}

.add-button {
    background-color: #f1eee9; 
    border: none;
    padding: 12px 30px; 
    border-radius: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    margin-top: auto; /* Обеспечивает выравнивание кнопок */
    width: 100%;
}

.add-button:hover {
    background-color: #ff6b00;
    color: white;
}

/* Стили для выбранного блюда */
.dish-item.selected {
    border: 3px solid #ff6b00;
    position: relative;
    transform: translateY(-5px);
    z-index: 1;
}

/* Улучшаем тень при наведении на обычные карточки */
.dish-item:hover {
    border: 2px solid tomato;
    transform: translateY(-5px);
}

.dish-item.selected:hover {
    transform: translateY(-7px);
    border: 3px solid #ff8c42;
}

.dish-item.selected .dish-name {
    color: #ff6b00;
}

.dish-item.selected .add-button {
    background-color: #ff6b00;
    color: white;
    font-weight: 600;
}

/* ≤800px */
@media (max-width: 800px) {
    .dishes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dish-item {
        min-height: 480px;
    }
    
    .dish-image {
        height: 220px;
    }
    
    nav {
        justify-content: space-between;
    }
    
    h1 {
        text-align: center;
    }
    
    h2 {
        text-align: center;
    }
}

/* ≤600px */
@media (max-width: 600px) {
    .dishes-grid {
        grid-template-columns: 1fr; /* 1 колонка */
    }
    
    .dish-item {
        min-height: 450px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .dish-image {
        height: 200px;
    }
    
    nav {
        flex-direction: column;
        align-items: center;
    }
    
    nav a {
        font-size: 22px;
    }
    
    h1 {
        text-align: center;
    }
    
    h2 {
        text-align: center;
    }
}

/* Стили для блока заказа */
.order-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #ff6b00;
}

.order-section h2 {
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

.order-form {
    max-width: 1200px; /* Увеличена максимальная ширина */
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    filter: drop-shadow(0px 4px 20px rgba(0, 0, 0, 0.1));
}

.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Две равные колонки */
    gap: 40px;
}

/* Одинаковые стили для обоих блоков */
.order-block, .client-block {
    background: white;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #eee;
    filter: drop-shadow(0px 2px 10px rgba(0, 0, 0, 0.05));
    height: 100%;
    display: flex;
    flex-direction: column;
}

.order-block h3, .client-block h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #ff6b00;
    padding-bottom: 10px;
}

/* Стили для левого блока (Ваш заказ) */
.current-order {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.empty-message {
    text-align: center;
    color: #666;
    font-size: 18px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 2px dashed #ddd;
    margin-bottom: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-category {
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.order-category h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

.selected-dishes {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.selected-dish {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.selected-dish .dish-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.selected-dish .dish-price {
    font-size: 16px;
    color: #ff6b00;
    font-weight: 600;
}

.not-selected {
    color: #999;
    font-style: italic;
    text-align: center;
    width: 100%;
    font-size: 14px;
}

.order-total {
    border-top: 2px solid #ff6b00;
    padding-top: 20px;
    margin-top: auto; /* Чтобы итог всегда был внизу */
    background: #fff8f5;
    border-radius: 10px;
    padding: 20px;
}

.order-total h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.total-price {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #ff6b00;
}

/* Стили для правого блока (Ваши данные) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 14px 16px; /* Увеличены отступы */
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Oswald', sans-serif;
    transition: border-color 0.3s;
    background-color: #f9f9f9;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6b00;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.form-buttons {
    margin-top: auto; /* Чтобы кнопка была внизу */
    padding-top: 20px;
}

.submit-btn {
    width: 100%;
    padding: 16px 30px;
    background-color: #ff6b00;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #e55a00;
}

/* Стили для фильтров */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #ff6b00;
    background: white;
    color: #ff6b00;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: #fff0e6;
}

.filter-btn.active {
    background: #ff6b00;
    color: white;
}

/* Стили для комбо-ланчей (компактный вариант) */
.combo-section {
    margin-bottom: 40px;
}

.combo-section h2 {
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
}

.combo-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.combo-item {
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: white;
    border-radius: 12px;
    filter: drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.1));
    transition: all 0.3s;
}

.combo-item:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0px 6px 15px rgba(0, 0, 0, 0.15));
}

.combo-header {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
}

.combo-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.combo-price {
    font-size: 16px;
    color: #ff6b00;
    font-weight: 500;
    margin: 0;
}

.combo-dishes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
}

.combo-dish {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.combo-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: contain; /* Используем contain чтобы изображения не обрезались */
    transition: transform 0.3s ease;
    cursor: pointer;
    /* Убираем ВСЕ границы и фоны */
    border: none;
    padding: 0;
    background-color: transparent; /* Прозрачный фон */
    box-shadow: none; /* Убираем серую рамку */
    /* Уменьшаем размеры чтобы изображения полностью влезали */
    width: 50px;
    height: 50px;
}

.combo-image:hover {
    transform: translateY(-5px) scale(1.1);
}

.combo-dish p {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

.combo-info {
    font-size: 11px;
    color: #666;
    margin-top: 10px;
    font-style: italic;
    text-align: center;
}

/* Адаптивность для комбо-блока */
@media (max-width: 1100px) {
    .combo-item {
        min-width: 160px;
        max-width: 180px;
    }
    
    .combo-image {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 900px) {
    .combo-container {
        gap: 15px;
    }
    
    .combo-item {
        min-width: 140px;
        max-width: 160px;
        padding: 15px 10px;
    }
    
    .combo-header h3 {
        font-size: 16px;
    }
    
    .combo-price {
        font-size: 14px;
    }
    
    .combo-image {
        width: 50px;
        height: 50px;
    }
    
    .combo-dish p {
        font-size: 11px;
    }
}

@media (max-width: 700px) {
    .combo-container {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .combo-item {
        min-width: 45%;
        max-width: 48%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .combo-item {
        min-width: 100%;
        max-width: 100%;
    }
    
    .combo-container {
        gap: 15px;
    }
}

/* Медиа-запросы для формы заказа */
@media (max-width: 900px) {
    .form-columns {
        grid-template-columns: 1fr; /* Одна колонка на мобильных */
        gap: 30px;
    }
    
    .order-form {
        padding: 20px;
    }
    
    .order-block, .client-block {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .order-section {
        padding-top: 30px;
    }
    
    .order-section h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .order-form {
        padding: 15px;
    }
    
    .order-block, .client-block {
        padding: 15px;
    }
    
    .order-block h3, .client-block h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"] {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .submit-btn {
        padding: 14px 25px;
        font-size: 16px;
    }
}

/* Стили для уведомлений */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.notification {
    background: white;
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    text-align: center;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-content h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff6b00;
    padding-bottom: 10px;
    display: inline-block;
}

.notification-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.notification-btn {
    background-color: #ff6b00;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.notification-btn:hover {
    background-color: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

.notification-btn:active {
    transform: translateY(0);
}

/* Медиа-запросы для уведомлений */
@media (max-width: 600px) {
    .notification {
        padding: 25px;
        width: 85%;
    }
    
    .notification-content h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .notification-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .notification-btn {
        padding: 10px 30px;
        font-size: 15px;
    }
}

/* Стили для выбора времени доставки */
.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color 0.3s;
    cursor: pointer;
    margin-bottom: 8px;
}

.radio-option:hover {
    background-color: #f5f5f5;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ff6b00;
}

.radio-option label {
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    flex: 1;
}

/* Панель выбора времени - ВИДИМА ВСЕГДА */
.time-selection-panel {
    display: block;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

.time-panel-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.time-panel-header span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.time-hint {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.time-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Oswald', sans-serif;
    background-color: white;
    margin-top: 10px;
}

.time-input:focus {
    outline: none;
    border-color: #ff6b00;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

/* Убираем красную подсветку невалидных полей */
input:invalid {
    border-color: #ddd !important; /* Серая рамка вместо красной */
}

input:invalid:focus {
    border-color: #ff6b00 !important; /* Оранжевая при фокусе */
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1) !important;
}

/* Для полей с ошибками оставляем только подсказку браузера */
input:invalid {
    background-color: white;
}

/* Кнопки формы - УБИРАЕМ СЕРУЮ ПЛАШКУ */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f1eee9; /* Более светлая граница */
    padding: 20px 0 0 0; /* Убираем лишние отступы */
    border-radius: 0; /* Убираем скругления */
    border: none; /* Убираем рамку */
    background-color: transparent; /* Убираем фон */
}

.reset-btn {
    flex: 1;
    padding: 16px 30px;
    background-color: white; /* Белый фон вместо серого */
    color: #333; /* Темно-серый текст */
    border: 2px solid #ff6b00; /* Оранжевая рамка */
    border-radius: 10px;
    font-size: 18px;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

.reset-btn:hover {
    background-color: #ff6b00; /* Оранжевый фон при наведении */
    color: white; /* Белый текст при наведении */
    border-color: #ff6b00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

.reset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.2);
}

.submit-btn {
    flex: 2;
    padding: 16px 30px;
    background-color: #ff6b00;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background-color: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.2);
}

/* Эффект при нажатии для обеих кнопок */
.reset-btn:focus,
.submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.3);
}

/* Улучшаем стиль для уведомлений */
.notification-btn {
    background-color: #ff6b00;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
    border: 2px solid #ff6b00;
}

.notification-btn:hover {
    background-color: white;
    color: #ff6b00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
}

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

/* Адаптивность */
@media (max-width: 600px) {
    .form-buttons {
        flex-direction: column;
    }
    
    .reset-btn,
    .submit-btn {
        width: 100%;
        flex: none;
    }
    
    .time-selection-panel {
        padding: 12px;
    }
    
    .time-panel-header span {
        font-size: 15px;
    }
    
    .time-hint {
        font-size: 13px;
    }
}

/* Стили для панели заказа */
.order-panel {
    position: sticky;
    bottom: 20px;
    left: 0;
    right: 0;
    background-color: white;
    padding: 20px 40px;
    border-radius: 15px;
    filter: drop-shadow(0px 4px 20px rgba(0, 0, 0, 0.15));
    border: 2px solid #ff6b00;
    z-index: 100;
    margin-top: 30px;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.order-panel-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.order-panel-total {
    font-size: 22px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-total-price {
    font-size: 26px;
    font-weight: 600;
    color: #ff6b00;
}

.go-to-order-btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: #ff6b00;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    text-align: center;
    min-width: 200px;
}

.go-to-order-btn:hover:not(:disabled) {
    background-color: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.go-to-order-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Адаптивность для панели заказа */
@media (max-width: 768px) {
    .order-panel {
        padding: 15px 20px;
        bottom: 10px;
    }
    
    .order-panel-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .order-panel-total {
        font-size: 20px;
    }
    
    .order-total-price {
        font-size: 24px;
    }
    
    .go-to-order-btn {
        width: 100%;
        padding: 12px 20px;
        min-width: auto;
    }
}

/* Стили для поля комментария */
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Oswald', sans-serif;
    transition: border-color 0.3s;
    background-color: #f9f9f9;
    resize: vertical;
    min-height: 120px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #ff6b00;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.form-group textarea::placeholder {
    color: #999;
    font-style: italic;
}
