*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background-color: #d4c153;
  /* background-color: #165126; /* Borde del logo */
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #d4c153;
  background-image: url("img/fondo-movil.jpg");
  background-image: image-set(url("img/fondo-movil.avif") type("image/avif"),
      url("img/fondo-movil.jpg") type("image/jpeg"));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (orientation: landscape) {
  body::before {
    background-image: url("img/fondo-pc.jpg");
    background-image: image-set(url("img/fondo-pc.avif") type("image/avif"),
        url("img/fondo-pc.jpg") type("image/jpeg"));
  }
}

@media (orientation: landscape) and (min-width: 160rem),
(orientation: landscape) and (min-width: 120rem) and (min-resolution: 1.5dppx) {
  body::before {
    background-image: url("img/fondo-4k.jpg");
    background-image: image-set(url("img/fondo-4k.avif") type("image/avif"),
        url("img/fondo-4k.jpg") type("image/jpeg"));
  }
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: max-content;
  align-content: safe center;
  gap: 0.75rem;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0.75rem;
}

.panel {
  min-width: 0;
  min-height: 0;
  padding: 0.75rem;
  padding: clamp(0.75rem, 2vh, 1.25rem);
  padding: clamp(0.75rem, 2dvh, 1.25rem);
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 1rem;
  background-color: rgb(75 75 75 / 30%);
  backdrop-filter: blur(0.25rem);
}

#portada {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 0.5rem;
  height: fit-content;
  max-height: 100%;
  overflow-y: auto;
}

.texto {
  margin: 0;
  max-width: 100%;
  text-align: center;
  text-shadow: 0 2px 4px rgb(0 0 0 / 85%);
  overflow-wrap: anywhere;
  -webkit-user-select: none;
  user-select: none;
}

#titulo {
  font-size: clamp(2rem, 12cqi, 3rem);
  line-height: 1.05;
  color: #6eff2c;
}

#subtitulo {
  font-size: clamp(1.4rem, 8cqi, 1.75rem);
  line-height: 1.1;
  color: #e5ff82;
}

.descripcion {
  font-size: clamp(1.1rem, 6cqi, 1.50rem);
  line-height: 1.2;
  color: #fff9e6;
}

.figura {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  margin: 0;
}

#portada-figura {
  flex: 0 1 auto;
  gap: 0.5rem;
  width: min(100%, 36rem);
}

#whatsapp-pedido {
  display: grid;
  width: 100%;
  min-height: 0;
  place-items: center;
}

.pedido-texto {
  display: none;
}

.imagen {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
}

#logotipo {
  display: block;
  width: min(100%, 55dvh);
  height: auto;
  max-width: 100%;
  margin-inline: auto;
}

#fruteria {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.rrss {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

.rrss-enlace {
  display: grid;
  min-width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  border-radius: 50%;
}

.rrss-enlace:focus-visible {
  outline: 3px solid #fff9e6;
  outline-offset: 3px;
}

.rrss-icono {
  display: block;
  width: 3rem;
  width: clamp(3rem, 7cqi, 4rem);
  height: auto;
}

#fruteria-figura {
  flex: 0 0 auto;
  gap: 1rem;
  width: 100%;
}

#fruteria-foto {
  display: block;
  width: 100%;
}

.foto {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  color: #fff9e6;
}

#fruteria .descripcion {
  width: 100%;
  font-size: 1.1rem;
  font-size: clamp(1.1rem, 4cqi, 1.5rem);
  text-align: center;
  overflow-wrap: anywhere;
}

@media (orientation: landscape) {
  main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  #portada {
    align-self: center;
  }

  #fruteria {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgb(255 249 230 / 70%) transparent;
  }

}

@media (orientation: portrait) and (max-height: 34rem),
(orientation: landscape) and (max-width: 64rem) and (max-height: 34rem) {
  #whatsapp-pedido {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
  }

#whatsapp-pedido.enlace:visited,
#whatsapp-pedido.enlace:hover,
#whatsapp-pedido.enlace:active {
  text-decoration: none;
}

  .imagen {
    width: clamp(3rem, 12vmin, 5rem);
  }

  #whatsapp-pedido .imagen {
    flex: 0 0 auto;
    width: clamp(3rem, 12vmin, 5rem);
  }

  #whatsapp-pedido .imagen > img {
    width: 100%;
    height: auto;
  }

  .pedido-texto {
    display: block;
    flex: 0 0 auto;
    color: #ffffff;
    font-size: clamp(0.875rem, 3vmin, 1.125rem);
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 4px rgb(0 0 0 / 85%);
  }
}