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

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background-color: #d4c153;
  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: center;
  gap: 0.75rem;
  height: 100vh;
  height: 100dvh;
  padding: 0.75rem;
  overflow: hidden;
}

.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 {
  display: none;
}

@media (orientation: landscape) {
  main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
  }

  #portada {
    align-self: center;
  }

  #fruteria {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgb(255 249 230 / 70%) transparent;
  }

  .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: 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%);
  }
} */

/* Reseteo básico para evitar márgenes externos que provoquen scroll */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  width: 100%;
  background-color: #d4c153;
  background-image: radial-gradient(circle at center, #dfd075 0%, #d4c153 100%);
}

main {
  --margen-exterior: min(1.5em, 3vw);

  display: grid;
  place-items: safe center;
  min-height: 100dvh;
  width: 100%;
  grid-template-columns: 1fr;
  padding: var(--margen-exterior);
  gap: var(--margen-exterior);
}

/* --- ESTILO VISUAL COMPARTIDO DE VIDRIO --- */
#contenedor,
#fruteria {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: min(1.5em, 2.5dvh);
  padding: min(1.5em, 2.5dvh);
  width: fit-content;
  max-width: 100%;
  text-align: center;

  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: min(1.5em, 3dvh);
  box-shadow: 0 8px 32px rgba(45, 58, 18, 0.15);
}

/* --- MÓVIL VERTICAL: SOLO PORTADA AL 100% (PETICIÓN DEL JEFE) --- */
/* @media (orientation: portrait) {
  #fruteria {
    display: none;
  }
} */

/* --- PANTALLA APAISADA (PC Y MÓVIL GIRADO): PORTADA FIJA + OFERTA CON SCROLL --- */
@media (orientation: landscape) {
  main {
    --margen-exterior: min(2em, 2.5dvh);

    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 100dvh;
    overflow: hidden;
  }

  #fruteria {
    max-height: calc(100dvh - (var(--margen-exterior) * 2));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 51, 17, 0.35) transparent;
  }
}

/* --- SECCIÓN 1: PORTADA --- */
#contenedor {
  grid-template-rows: auto auto 1fr auto;
  height: auto;
  max-height: 96dvh;
  overflow: hidden;
}

#texto1 {
  font-size: clamp(1.8rem, 3vw + 0.8dvh, 4.5rem);
  line-height: 1.05;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  max-width: 100%;
  overflow-wrap: break-word;
  color: #1f3311;
}

#texto2 {
  font-size: clamp(1.15rem, 1.8vw + 0.5dvh, 2.75rem);
  line-height: 1.15;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  max-width: 100%;
  overflow-wrap: break-word;
  color: #2f4a1c;
}

#imagen-foto {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  max-height: 22em;
  min-height: 0;
  overflow: hidden;
}

#foto-logotipo {
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.75em;
}

#texto3 {
  font-size: clamp(0.95rem, 1.3vw + 0.4dvh, 1.85rem);
  line-height: 1.25;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  max-width: 100%;
  overflow-wrap: break-word;
  color: #1f3311;
}

/* --- SECCIÓN 2: FRUTERÍA Y REDES --- */
#fruteria {
  grid-template-rows: auto auto auto;
  height: auto;
}

#fruteria nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 4vw, 3.5rem);
  width: 100%;
  padding-block: 0.25em;
}

.rrss-enlace {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: clamp(0.85rem, 3.2vw + 0.8dvh, 4rem);
  height: clamp(0.85rem, 3.2vw + 0.8dvh, 4rem);
  aspect-ratio: 1 / 1;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 3px 6px rgba(31, 51, 17, 0.2));
}

.rrss-enlace:hover,
.rrss-enlace:focus-visible {
  transform: scale(1.15);
  filter: drop-shadow(0 5px 10px rgba(31, 51, 17, 0.3));
}

.rrss-icono {
  width: 100%;
  height: 100%;
  display: block;
}

#fruteria-foto {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#foto-oferta {
  width: 100%;
  max-width: min(100%, 45rem);
  height: auto;
  display: block;
  border-radius: 0.75em;
}

#texto4 {
  font-size: clamp(0.95rem, 1.3vw + 0.4dvh, 1.85rem);
  line-height: 1.25;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
  max-width: 100%;
  overflow-wrap: break-word;
  color: #1f3311;
}