@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&family=Lato:wght@400;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(#29251c, #2c2306);
  color: #d9e2f1;
  min-height: 100vh;
}

#main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 10%;
}

#main-header #title {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#main-header #title img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid #ffc404;
}

#main-header button {
  font-size: 1.5rem;
  font-family: 'Lato', sans-serif;
}

h1 {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  margin: 0;
  color: #ffc404;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
}

#meals {
  width: 90%;
  max-width: 70rem;
  list-style: none;
  margin: 2rem auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1rem;
}

.meal-item {
  background-color: #1d1a16;
  border-radius: 1rem;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.meal-item article {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.meal-item img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
}

.meal-item h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0.75rem 0;
}

.meal-item-description {
  margin: 1rem;
}

.meal-item-price {
  display: inline-block;
  background-color: #312c1d;
  color: #ffc404;
  font-size: 0.9rem;
  font-weight: bold;
  padding: 0.5rem 2rem;
  margin: 0;
  border-radius: 4px;
}

.meal-item-actions {
  margin-bottom: 1.5rem;
}

.cart h2 {
  margin: 1rem 0;
}

.cart ul {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.modal-actions .text-button {
  color: #1d1a16;
}

.modal-actions .text-button:hover,
.modal-actions .text-button:active {
  color: #312c1d;
}

.cart-total {
  display: flex;
  justify-content: flex-end;
  margin: 2rem 0;
  font-size: 1.15rem;
  font-weight: bold;
  color: #46443c;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0;
}

.cart-item p {
  margin: 0;
}

.cart-item-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.cart-item-actions button {
  cursor: pointer;
  font-size: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: none;
  background-color: #312c1d;
  color: #ffc404;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cart-item-actions button:hover,
.cart-item-actions button:active {
  background-color: #1d1a16;
  color: #ffab04;
}

.control {
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
}

.control label {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.control input {
  width: 100%;
  max-width: 20rem;
  font: inherit;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.control-row {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
}

.button {
  font: inherit;
  cursor: pointer;
  background-color: #ffc404;
  border: 1px solid #ffc404;
  color: #1f1a09;
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
}

.button:hover,
.button:active {
  background-color: #ffab04;
  border-color: #ffab04;
  color: #1f1a09;
}

.text-button {
  font: inherit;
  cursor: pointer;
  background-color: transparent;
  border: none;
  color: #ffc404;
}

.text-button:hover,
.text-button:active {
  color: #ffab04;
}

.modal {
  background-color: #e4ddd4;
  border-radius: 6px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  padding: 1rem;
  width: 80%;
  max-width: 40rem;
  animation: fade-slide-up 0.3s ease-out forwards;
}

.modal::backdrop {
  background-color: rgba(0, 0, 0, 0.55);
}

.center {
  text-align: center;
}

.error {
  width: 90%;
  max-width: 25rem;
  margin: 2rem auto;
  padding: 1rem;
  background-color: #f9b8b8;
  color: #6d0b0b;
  border-radius: 6px;
}

.error h2 {
  margin: 0;
}

.error p {
  margin: 0;
}

@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(4rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
