/**
 * Theme Name: Demo Restaurante
 * Description: Tema para restaurante con carta menu
 * Author: jmfm
 * Template: blocksy
 * Text Domain: blocksy
 */

 /* Generales */

 html {
  scroll-behavior: smooth;
  scroll-padding-top: 0 !important;
}
.ocultar-escritorio {
  display: none;
}

.elemento-muy-centrado {
    max-width: 40%;
    margin: 0 auto;
}

/* Animaciones */

.fade-in {
	-webkit-animation: fade-in 1.3s ease-in-out 0.3s both;
	        animation: fade-in 1.3s ease-in-out 0.3s both;
}

/**
 * ----------------------------------------
 * animation fade-in
 * ----------------------------------------
 */
@-webkit-keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}


/* Estilizado menu digital */

/* body.page-template-template-menu summary[id],
body.page-template-template-menu .titulo-seccion,
body.page-template-template-menu h2[id] {
  scroll-margin-top: 287px !important; ajusta según la altura de tu menú fijo 
} */

.anchor-ajuste {
  display: block;
  position: relative;
  top: -40px;   /* altura header + info-menu-fixed */
  height: 0;
  visibility: hidden;
  pointer-events: none;
}

.menu-iconos {
  display: flex;
  justify-content: center;
  gap: 10em;
  margin-bottom: 2em;
}

.icono-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.icono-menu svg {
  width: 48px;
  height: 48px;
  fill: var(--wp--preset--color--palette-color-1);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.8;
}

.icono-menu:hover svg {
  transform: scale(1.1);
  opacity: 1;
}

.icono-menu span {
  margin-top: 0.5em;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--wp--preset--color--palette-color-4);
}

.menu-categorias-scroll {
  position: static;
  top: 0;
  z-index: 100;
  background-color: #fff;
  padding: 0.5em 1em;
  box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.05);
}

.carrusel-categorias {
  display: flex;
  overflow-x: auto;
  gap: 1em;
  scrollbar-width: thin;
  scrollbar-color: var(--wp--preset--color--palette-color-1) transparent;
}

.categoria-link {
  flex: 0 0 auto;
  padding: 0.4em 0.8em;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--wp--preset--color--palette-color-1);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
  white-space: nowrap;
}

.categoria-link:hover {
  border-bottom: 2px solid var(--wp--preset--color--palette-color-2);
}

.scroll-indicador {
  position: absolute;
  right: 1em;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  animation: parpadeo 1.5s infinite;
  display: none;
}

.flecha-scroll {
  font-size: 1.5rem;
  color: var(--wp--preset--color--palette-color-1);
  opacity: 0.6;
}

@keyframes parpadeo {
  0%, 100% { opacity: 0.6; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(5px); }
}

.info-menu-fixed {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #fff;
  padding: 1em 0;
  box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.05);
}


.menu-digital {
  max-width: 82em;
  width: 100%;
  margin: 0.5em auto;
  padding: 2em;
  box-sizing: border-box;
  background-color: #fff;
  border-radius: 0.5em;
  box-shadow: 0 0.5em 1em rgba(0, 0, 0, 0.05);
}

.titulo-seccion {
  font-size: 2rem;
  font-weight: 600;
  margin: 2em 0 1em;
  text-align: center;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

summary {
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--wp--preset--color--palette-color-1); /* color primario */
  padding: 0.8em 0;
  border-bottom: 2px solid var(--wp--preset--color--palette-color-5); /* separador sutil */
  cursor: pointer;
  transition: border-color 0.3s ease;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary:hover {
  border-bottom-color: var(--wp--preset--color--palette-color-2); /* color secundario al pasar el ratón */
}

summary::after {
  content: "➤";
  font-size: 1rem;
  color: var(--wp--preset--color--palette-color-1);
  transition: transform 0.3s ease;
  margin-left: 0.5em;
}

details[open] summary::after {
  transform: rotate(90deg);
}

details.categoria {
  margin-bottom: 1.5em;
  background-color: #fff;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

details.categoria[open] {
  box-shadow: 0 0.3em 0.8em rgba(0, 0, 0, 0.05);
}

details .lista-platos,
details .lista-bebidas {
  padding: 1em 1.5em;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Eliminar estilos predeterminados de listas */

.lista-platos,
.lista-bebidas {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5em;
}

/* Contenedor general del plato/bebida */
.plato,
.bebida {
  display: flex;
  align-items: flex-start;
  gap: 1.5em;
  background-color: #fff;
  border: 1px solid var(--wp--preset--color--palette-color-5);
  border-radius: 0.5em;
  padding: 1.5em;
  box-shadow: 0 0.3em 0.6em rgba(0, 0, 0, 0.03);
}

/* Imagen a la izquierda */
.plato img,
.bebida img {
  width: 120px;
  height: auto;
  border-radius: 0.4em;
  object-fit: cover;
}
.imagen-plato,
.imagen-bebida {
  padding-right: 1em;
  border-right: 4px solid var(--wp--preset--color--palette-color-1);
  display: flex;
  align-items: center;
}

/* Contenido textual dividido en dos columnas */

.contenido-plato,
.contenido-bebida {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1em;
}

/* Título y descripción a la izquierda */
.info-plato,
.info-bebida {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.info-plato h3,
.info-bebida h3 {
  margin: 0;
  font-size: 1.2rem;
  /* font-weight: 600; */
  color: var(--wp--preset--color--palette-color-4);
}

.info-plato p,
.info-bebida p {
  margin: 0;
  color: var(--wp--preset--color--palette-color-3);
  font-size: 1rem;
  line-height: 1.5;
}

/* Precio alineado a la derecha */
.precio {
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--wp--preset--color--palette-color-2);
  white-space: nowrap;
  margin-top: 0.2em;
}



/* Responsive */

@media (max-width: 768px) {
  .elemento-muy-centrado {
       max-width: 95%;
       margin: 0 auto;
}

  .ocultar-movil {
    display: none;
  }
  .ocultar-escritorio {
    display: block;
  }

  div#portada-menu {
    min-height: initial;
    height: 20vh;
  }
  .menu-digital {
    padding: 1.5em;
    margin: 0.5em auto;
    border-radius: 0.4em;
  }
  .plato,
  .bebida {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .contenido-plato,
  .contenido-bebida {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1em;
    /* margin-top: 1em; */
  }

  .info-plato,
  .info-bebida {
    flex: 1;
  }

  .precio {
    align-self: flex-start;
    white-space: nowrap;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--wp--preset--color--palette-color-2);
  }

  .plato img,
  .bebida img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 0.5em;
    object-fit: cover;
    margin: 0; /* ← esto alinea la imagen a la izquierda */
  }

  .imagen-plato,
  .imagen-bebida {
    justify-content: flex-start; /* ← asegura que el contenedor también alinee a la izquierda */
    border-right: none;
    border-bottom: 4px solid var(--wp--preset--color--palette-color-1);
    padding-bottom: 1em;
  }
  .scroll-indicador {
    display: block;
  }
  .anchor-ajuste {
    top: -140px !important;
  }
}