/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #fffdf7;
  color: #333;
  line-height: 1.6;
}

/* HEADER */
header {
  background-color: #f9d24d;
  text-align: center;
  padding: 10px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.logo {
  height: 70px;
}

/* TOP NAVIGATION */
.top-nav {
  display: flex;
  justify-content: center;
  background-color: #f1c40f;
  padding: 12px 0;
  gap: 25px;
  flex-wrap: wrap;
  box-shadow: 0 3px 7px rgba(0,0,0,0.1);
}

.top-nav a {
  color: #333;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.3s ease, border-bottom 0.3s ease;
  padding-bottom: 4px;
  border-bottom: 3px solid transparent;
}

.top-nav a:hover,
.top-nav a.active {
  color: #2d6a4f;
  border-bottom-color: #2d6a4f;
}

/* LAYOUT */
.container {
  display: flex;
  max-width: 1200px;
  margin: 40px auto;
  gap: 30px;
  padding: 0 20px;
}

/* MAIN AREA */
main {
  flex: 1;
}

main h2 {
  color: #2d6a4f;
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
}

/* MENU ITEMS GRID */
#menu-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

/* MENU CARD */
.menu-card {
  background-color: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.menu-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.menu-card-content {
  padding: 15px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-card-content h3 {
  color: #2d6a4f;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.menu-card-content p {
  color: #555;
  font-size: 0.95rem;
  flex-grow: 1;
}

.menu-price {
  font-weight: bold;
  color: #f39c12;
  font-size: 1.1rem;
  margin-top: 12px;
}

/* STOCK BADGE */
.stock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.in-stock {
  background-color: #2d6a4f;
}

.out-stock {
  background-color: #bd2d21;
}

/* CATEGORY MENU (aside) */
aside#category-menu {
  width: 220px;
  background-color: #f9f871;
  border-radius: 12px;
  padding: 20px 15px;
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
  font-weight: 600;
}

aside#category-menu h3 {
  color: #2d6a4f;
  margin-bottom: 15px;
  font-size: 1.5rem;
  text-align: center;
}

#category-list {
  list-style: none;
}

#category-list li {
  margin-bottom: 12px;
}

#category-list li button {
  padding: 8px 12px;
  width: 100%;
  background-color: transparent;
  border: 2px solid #2d6a4f;
  color: #2d6a4f;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#category-list li button:hover,
#category-list li button.active {
  background-color: #2d6a4f;
  color: #f9f871;
}

/* FOOTER */
footer {
  background-color: #f1c40f;
  color: white;
  text-align: center;
  padding: 15px 0;
  margin-top: 40px;
  font-weight: bold;
  letter-spacing: 1px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    padding: 0 15px;
  }

  aside#category-menu {
    width: 100%;
    position: relative;
    top: auto;
    margin-bottom: 30px;
  }

  #menu-items {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  #menu-items {
    grid-template-columns: 1fr;
  }
}
