.section {
    padding: 36px 0;
}

.section h3 {
    margin: 0 0 18px;
}

/* === Grid de platos === */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.dish {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.dish:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    background: #fffdf6;
}

.dish img {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
}

.dish .meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dish .meta h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c2c2c;
}

.dish .meta p {
    margin: 0;
    font-size: 0.9rem;
    color: #777;
}

.dish .footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.price {
    font-size: 1rem;
    font-weight: 700;
    color: #d4a017;
}

/* === Responsive === */
@media(max-width:1000px){
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:640px){
    .menu-grid {
        grid-template-columns: 1fr;
    }

    .menu-grid .dish img {
        display: block;
        margin: 0 auto;
        width: 400px;
        height: 250px;
        object-fit: cover;
        border-radius: 12px;
    }
}

/* === Mobile menu === */
.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    font-size: 1.25rem;
}

@media(max-width:820px) {
    nav ul {
        display: none;
        position: absolute;
        right: 20px; top: 70px;
        background: var(--card);
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 14px 40px rgba(0,0,0,0.09);
    }

    .menu-toggle {
        display: inline-block;
    }

    nav ul.open {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
}

/* === Modal === */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(145deg, #fff, #f8f6f0);
  padding: 28px;
  border-radius: 16px;
  max-width: 600px;
  width: 95%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s ease;
  position: relative;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.8rem;
  color: #222;
  font-weight: 700;
  border-bottom: 2px solid #f1e3c6;
  padding-bottom: 10px;
}

.modal-content p {
  margin-top: 12px;
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}

/* === Lista de platos dentro del modal === */
#dishDetails ul {
  text-align: left;
  margin: 16px 0;
  padding-left: 20px;
}

#dishDetails li {
  margin: 8px 0;
  font-size: 1rem;
  color: #333;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s;
}

#dishDetails li:nth-child(odd) {
  background: #fdf8ef;
}

#dishDetails li:hover {
  background: #f3e8d0;
}

/* === Botón de cerrar === */
.modal .close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 1.8rem;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
}

.modal .close:hover {
  transform: scale(1.2);
  color: #000;
}

/* Scroll personalizado */
.modal-content::-webkit-scrollbar {
  width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
  background: #c8c8c8;
  border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

/* === Animación === */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@media(max-width: 768px) {
  .comida-grid {
    grid-template-columns: repeat(2,1fr);
  }
}

#dishDetails li {
  margin: 8px 0;
  font-size: 1rem;
  color: #333;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between; 
  align-items: center;
  transition: background 0.2s;
}

#dishDetails li:nth-child(odd) {
  background: #fdf8ef;
}

#dishDetails li:hover {
    background-color: #f0e1c3;
    transform: translateX(4px); 
}

#dishDetails li .price {
  font-weight: 700;
  font-size: 1.05rem;
  color: #cfb572;
  margin-left: 12px;
  white-space: nowrap;
}

