* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --red-accent: #e63946;
  --red-accent-hover: #c11a2a;
  --card-bg: #1e1e1e;
  --border-color: #333;
  --light-text: #aaa;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  padding: 10px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 2px solid var(--red-accent);
  margin-bottom: 20px;
}

.logo {
  font-size: 1.8rem;
  color: var(--red-accent);
  font-weight: bold;
}

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

.btn {
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: background-color 0.2s, opacity 0.2s;
}

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

.btn-primary:hover {
  background-color: var(--red-accent-hover);
}

.btn-secondary {
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

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

.btn-qty {
  width: 32px;
  height: 32px;
  background-color: var(--red-accent);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-qty:hover {
  background-color: var(--red-accent-hover);
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--red-accent);
}

.category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.category-tab {
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.category-tab.active,
.category-tab:hover {
  background-color: var(--red-accent);
  color: white;
}

.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-item {
  display: flex;
  gap: 15px;
  background-color: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  padding: 15px;
}

.item-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  flex-shrink: 0;
}

.item-info {
  flex: 1;
}

.item-info h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.item-ingredients {
  font-size: 0.8rem;
  color: var(--light-text);
  margin-bottom: 8px;
}

.item-price {
  font-weight: bold;
  color: var(--red-accent);
  margin-bottom: 10px;
}

.cart-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid var(--red-accent);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: var(--card-bg);
  border-radius: 5px;
  gap: 10px;
}

.cart-item-name {
  flex: 1;
  font-size: 0.95rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-qty {
  min-width: 20px;
  text-align: center;
}

.cart-item-price {
  font-weight: bold;
  min-width: 80px;
  text-align: right;
}

.cart-total {
  font-size: 1.3rem;
  font-weight: bold;
  text-align: right;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.empty-cart {
  text-align: center;
  color: var(--light-text);
  padding: 20px;
}

.order-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid var(--red-accent);
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-form input,
.order-form textarea {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 1rem;
  width: 100%;
}

.order-form textarea {
  resize: vertical;
  min-height: 80px;
}

#order-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  min-height: 24px;
}

#order-message.success {
  background-color: rgba(42, 157, 143, 0.2);
  color: #2a9d8f;
  border: 1px solid #2a9d8f;
}

#order-message.error {
  background-color: rgba(230, 57, 70, 0.2);
  color: var(--red-accent);
  border: 1px solid var(--red-accent);
}

.contacts-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid var(--red-accent);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--card-bg);
  padding: 15px;
  border-radius: 10px;
}

.contact-info p {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-info a {
  color: var(--red-accent);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
  }

  .header {
    padding: 20px 0;
    margin-bottom: 30px;
  }

  .logo {
    font-size: 2.2rem;
  }

  .menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .menu-item {
    flex-direction: row;
    align-items: center;
  }

  .category-tabs {
    justify-content: center;
  }

  .main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
  }

  .cart-section {
    margin-top: 0;
    padding-top: 0;
    border: none;
  }

  .order-section,
  .contacts-section {
    margin-top: 0;
    padding-top: 0;
    border: none;
  }

  .form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}
