/* Общие стили */
:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #457b9d;
  --light: #f1faee;
  --dark: #1d3557;
  --gray: #495057;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  color: var(--dark);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Заголовки */
h1, h2, h3 {
  font-weight: 700;
  margin: 0 0 1rem 0;
}

h1 {
  font-size: 2.5rem;
  color: var(--primary);
  text-align: center;
  margin: 2rem 0;
  position: relative;
  padding-bottom: 15px;
}

h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

h2 {
  font-size: 1.8rem;
  color: var(--dark);
  margin: 3rem 0 1.5rem 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-gray);
}

/* Кнопки и ссылки */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #3a6a8a;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
}

/* Карточки блюд */
.dishes-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin: 2rem 0;
}

.dish-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.dish-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.dish-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.dish-content {
  padding: 20px;
}

.dish-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--dark);
}

.dish-description {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.dish-actions {
  display: flex;
  justify-content: space-between;
  padding: 15px 20px;
  background-color: var(--light-gray);
  border-top: 1px solid #dee2e6;
}

.dish-actions a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}

.dish-actions a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Формы */
.form-container {
  max-width: 800px;
  margin: 2rem auto;
  background: white;
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Чекбокс для заказа */
.order-checkbox {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 10;
}

.order-checkbox:checked + label::before {
  content: '✓';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(230, 57, 70, 0.8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: 4px;
}

/* Сообщения */
.alert {
  padding: 15px;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Навигация */
.navbar {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

/* Футер */
.footer {
  background-color: var(--dark);
  color: white;
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
  .dishes-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .form-container {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .dishes-list {
    grid-template-columns: 1fr;
  }
  
  .dish-actions {
    flex-direction: column;
    gap: 10px;
  }
}
