/* Baja 1000 — Figma → HTML/CSS */

@font-face {
  font-family: "Clem Tinkel";
  src:
    url("assets/fonts/ClemTinkel.ttf") format("truetype"),
    url("assets/fonts/ClemTinkel.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lexend Deca";
  src: url("assets/fonts/LexendDeca-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #16288c;
  --blue-soft: #253591;
  --yellow: #f2bd1d;
  --cream: #fdf5df;
  --white: #ffffff;
  --text: #16288c;
  --max: 1440px;
  --pad: clamp(1rem, 4vw, 4.8rem);
  --font-display: "Clem Tinkel", system-ui, sans-serif;
  --font-body: "Lexend Deca", system-ui, sans-serif;
  --radius-pill: 34px;
  --radius-card: 30px;
  --shadow: 0 4px 44.8px -20px rgba(0, 0, 0, 0.14);
  --header-h: 5.5rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.45;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
}

.logo img {
  width: min(220px, 42vw);
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
}

.site-nav a {
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 0.75;
}

.nav-find {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.nav-find img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.search-form {
  position: relative;
  width: 220px;
}

.search-form input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--blue);
  border-radius: 15px;
  padding: 0 2.75rem 0 0.9rem;
  color: var(--blue);
  background: transparent;
  outline: none !important;
}

.search-form input::placeholder {
  color: rgba(22, 40, 140, 0.54);
}

.search-form button {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 5px;
  cursor: pointer;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
}

.search-form button svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  margin: 5px 0;
  background: var(--blue);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Hero (Figma Desktop - 1: 1440 × ~1022) ---------- */

.hero {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--white);
}

.hero-stage {
  position: relative;
  width: 100%;
  /* Matches Figma artboard height until "Nuestra Historia" */
  aspect-ratio: 1440 / 1022;
  min-height: 640px;
}

.hero-yellow {
  position: absolute;
  /* Figma Asset 2 1: x=680 y=-193 w=1132.7 h=940 */
  left: calc(100% * 680 / 1440);
  top: calc(100% * -193 / 1022);
  width: calc(100% * 1132.7 / 1440);
  height: calc(100% * 940 / 1022);
  object-fit: fill;
  max-width: none;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.hero-eggs {
  position: absolute;
  /* Figma cover 1: x=553 y=0 w=981 h=981 */
  left: calc(100% * 553 / 1440);
  top: 0;
  width: calc(100% * 981 / 1440);
  height: calc(100% * 981 / 1022);
  object-fit: cover;
  object-position: center center;
  max-width: none;
  pointer-events: none;
  z-index: 2;
  user-select: none;
}

.hero-content {
  position: absolute;
  /* Figma headline at x=77 y=351 */
  left: calc(100% * 77 / 1440);
  top: calc(100% * 340 / 1022);
  z-index: 3;
  width: min(620px, 46%);
  animation: rise-in 0.8s ease both;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 6.5vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.01em;
  color: var(--blue);
  text-transform: uppercase;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.hero-title-tu {
  display: inline-block;
  text-transform: none;
  font-style: normal;
  letter-spacing: 0;
  margin-right: 0.08em;
}

.hero p {
  margin: 0 0 1.65rem;
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  font-weight: 500;
  color: var(--blue);
  max-width: 504px;
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 155px;
  height: 39px;
  padding: 0 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(22, 40, 140, 0.18);
}

.btn-yellow {
  background: var(--yellow);
}

.btn-blue {
  background: var(--blue);
}

/* ---------- Section banners (Figma: 1440×105, title 64px Clem Tinkel) ---------- */

.section-banner {
  background: var(--blue);
  height: 105px;
  display: grid;
  place-items: center;
  padding: 0 var(--pad);
  text-align: center;
  width: 100%;
}

.section-banner h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 100%;
  color: var(--white);
  letter-spacing: 0;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.recetario-hero,
.contacto-hero {
  line-height: 0;
  overflow: hidden;
  width: 100%;
  background: transparent;
  margin-top: -110px;
}
.contacto-hero{
  margin-top: -58px;
}
.historia-photo img {
  width: 100%;
  height: 258px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.recetario-hero img,
.contacto-hero img {
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  height:333px;
}
.contacto-hero img {
  height:227px;
}
/* ---------- Historia ---------- */

.historia .section-banner {
  position: relative;
  z-index: 0;
}

.historia-photo {
  /* Figma: gallinas overlaps blue bar by 45px (y 1082 vs bar end 1127).
     Blue fill hides the PNG’s transparent top so no white seam shows. */
  margin-top: -45px;
  position: relative;
  z-index: 1;
  line-height: 0;
}

.historia-body {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem var(--pad) 3.5rem;
}

.historia-image img {
  width: 100%;
  max-width: 906px;
  margin-left: calc(var(--pad) * -1);
  width: calc(100% + var(--pad));
  object-fit: cover;
}

.historia-text p {
  margin: 0 0 1.25rem;
  font-size: clamp(1rem, 1.6vw, 1.5rem);
  color: var(--blue);
}

.historia-text p:last-child {
  margin-bottom: 0;
}

/* ---------- Productos (Figma cuadro 1244×562) ---------- */

.productos {
  padding: 2rem var(--pad) 4rem;
}

.productos-panel {
  /* Scale from Figma 1244×562 artboard */
  --card-w: 23.473cqw;
  /* 292 */
  --card-h: 26.608cqw;
  /* 331 */
  --card-gap: 2.733cqw;
  /* 34 */
  --side-inset: 12.058cqw;
  /* 150 */
  --title-top: 3.215cqw;
  /* 40 */
  --arrow-top: 19.293cqw;
  /* 240 */
  --arrow-size: 6.511cqw;
  /* 81 */
  --img-size: 26.929cqw;
  /* 335 */
  --img-overhang: 7.154cqw;
  /* 89 */
  --bulk-w: 28.215cqw;
  /* 351 */
  --bulk-h: 16.318cqw;
  /* 203 */
  --bulk-overhang: 2.572cqw;
  /* 32 */
  --body-pad-top: 15.836cqw;
  /* 197 */
  --body-pad-x: 1.447cqw;
  /* 18 */
  --radius-card: 3.296cqw;
  /* 41 */

  max-width: 1244px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  container-type: inline-size;
  container-name: productos;
  aspect-ratio: 1244 / 562;
  height: auto;
  box-sizing: border-box;
  filter: drop-shadow(0 4px 44.8px rgba(0, 0, 0, 0.14));
}

.productos-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/products-bg.png") center / 100% 100% no-repeat;
  z-index: 0;
  pointer-events: none;
}

.productos-panel h2 {
  position: absolute;
  z-index: 1;
  top: var(--title-top);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 5.145cqw, 4rem);
  line-height: 1;
  color: var(--white);
  letter-spacing: 0;
  white-space: nowrap;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.productos-track {
  position: absolute;
  z-index: 1;
  left: var(--side-inset);
  right: var(--side-inset);
  bottom: 4.421cqw;
  /* 55px at 1244 */
  top: auto;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: var(--card-gap);
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--img-overhang) 0 0.25rem;
  margin-top: calc(var(--img-overhang) * -1);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.productos-track::-webkit-scrollbar {
  display: none;
}

.product-card {
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  width: var(--card-w);
  flex: 0 0 var(--card-w);
  position: relative;
  padding-top: var(--img-overhang);
  scroll-snap-align: start;
}

.product-card:has(.product-card-media--bulk) {
  padding-top: var(--bulk-overhang);
}

.product-card-media {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--img-size);
  height: var(--img-size);
  display: grid;
  place-items: center;
  margin: 0;
  z-index: 2;
  pointer-events: none;
}

.product-card-media--bulk {
  width: var(--bulk-w);
  height: var(--bulk-h);
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.16));
  transition: transform 0.35s ease;
}

.product-card:hover .product-card-media img {
  transform: translateY(-6px) scale(1.03);
}

.product-card-body {
  width: 100%;
  height: var(--card-h);
  background: var(--yellow);
  border-radius: var(--radius-card);
  padding: var(--body-pad-top) var(--body-pad-x) 1.25rem;
  box-sizing: border-box;
}

.product-card-body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-body);
  font-size: clamp(14px, 1.608cqw, 20px);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blue);
  line-height: 1.15;
}

.product-card-body p {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(13px, 1.286cqw, 16px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--blue);
  max-width: 20.579cqw;
  /* 256 */
}

.carousel-btn {
  position: absolute;
  top: var(--arrow-top);
  z-index: 5;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: var(--arrow-size);
  height: var(--arrow-size);
  display: grid;
  transition: .3s;
  place-items: center;
}

.carousel-prev {
  left: -3cqw;
}

.carousel-next {
  right: -3cqw;
}

.carousel-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel-prev img {
  transform: scaleX(-1);
}

.carousel-btn:hover {
  transform: scale(1.06);
}

/* ---------- Recetario ---------- */
.recetario-content {
  max-width: 1260px;
  margin: 0 auto;
  padding: 2.5rem var(--pad) 4rem;
}

.recetario-intro {
  max-width: 841px;
  margin: 0 auto 2.25rem;
  text-align: center;
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  font-weight: 500;
  color: var(--blue);
  line-height: 1.35;
}

.recipe-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.25rem;
  margin: 0 auto 2.5rem;
  max-width: 1100px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: var(--white);
}

.filter-btn img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.filter-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 155px;
  height: 39px;
  padding: 0 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--yellow);
  font-weight: 700;
  font-size: 1rem;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, outline-color 0.2s ease;
}

.filter-btn:hover span {
  filter: brightness(0.96);
  box-shadow: 0 6px 16px rgba(242, 189, 29, 0.35);
  transform: translateY(-1px);
}

.filter-btn.is-active span {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 374px));
  justify-content: space-between;
  gap: 2.6rem 1.5rem;
}

.recipe-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--blue);
  font-size: 1.125rem;
  margin: 2rem 0;
}

.recipe-card {
  background: var(--blue);
  border-radius: 30px;
  padding: 1.35rem 1.35rem 1.1rem;
  color: var(--white);
  width: 100%;
  max-width: 374px;
  min-height: 379px;
  box-sizing: border-box;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(22, 40, 140, 0.25);
}

.recipe-card-top {
  position: relative;
}

.recipe-badge {
  position: absolute;
  top: 6px;
    right: 6px;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
  z-index: 3;
  pointer-events: none;
}

.recipe-image {
  position: relative;
  width: 100%;
  aspect-ratio: 322 / 255;
  border-radius: 20px;
  overflow: hidden;
  background: #0f1c66;
}

/* Figma square top-right notch with rounded inner corner */
.recipe-image::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 19.25%;
  /* ~62/322 */
  height: 24.3%;
  /* ~62/255 */
  background: var(--blue);
  border-bottom-left-radius: 14px;
  z-index: 1;
  pointer-events: none;
}

.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
}

.recipe-card h3 {
  margin: 1.05rem 0 0.45rem;
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
}

.recipe-time {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
}

.recipe-time img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.pagination {
  margin-top: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4.5rem);
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
}

.page-num {
  border: 0;
  background: transparent;
  color: rgba(22, 40, 140, 0.55);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.5rem;
  cursor: pointer;
  min-width: 1.25rem;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease, font-weight 0.2s ease, transform 0.2s ease;
}

.page-num:hover {
  color: var(--blue);
}

.page-num.is-active {
  color: var(--blue);
  font-weight: 800;
  transform: scale(1.08);
}

.page-arrow {
  border: 0;
  background: transparent;
  padding: 0;
  width: 49px;
  height: 49px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.page-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.page-prev img {
  transform: scaleX(-1);
}

/* ---------- Recipe modal ---------- */

.recipe-modal {
  border: 0;
  padding: 0;
  max-width: min(992px, calc(100vw - 2rem));
  width: 100%;
  background: transparent;
  margin: auto;
  color: var(--blue);
  background: #fff;
  padding: 46px 46px 46px 37px;
  border-radius: 28px;

}

.recipe-modal::-webkit-scrollbar {
  display: none;
}

.recipe-modal::backdrop {
  background: #0000009E;
  backdrop-filter: blur(6.900000095367432px)
}

.recipe-modal-panel {
  position: relative;
  max-height: 100%;
}

.recipe-modal-close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 6;
  border: 0;
  background: transparent;
  padding: 4px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.recipe-modal-close:hover {
  opacity: 0.75;
}

.recipe-modal-close img {
  width: 22px;
  height: 22px;
  display: block;
}

.recipe-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 388px);
  gap: 0.85rem 1.35rem;
  align-items: stretch;
}

.recipe-modal-section--preparacion {
  grid-column-start: 1;
  grid-column-end: 3;
}

.recipe-modal-content {
  color: var(--blue);
}

.recipe-modal-title-wrap {
  margin: 0 0 0.7rem;
  margin-left: -37px;
}

.recipe-modal-title-wrap h2,
#recipe-modal-title {
  width: 100%;

  display: inline-block;
  margin: 0;
  max-width: calc(100% + 1.75rem);
  padding: 0.62rem 1.5rem 0.62rem 37px;
  background: var(--blue);
  color: #fff;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
  font-family: var(--font-display);
  font-size: clamp(48px, 2.15vw, 1.95rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0%;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

#recipe-modal-title span {
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.recipe-modal-intro {
  margin: 0 0 0.95rem;
  max-width: 32rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: 0%;
  color: var(--blue);
}

.recipe-modal-facts {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
}

.recipe-modal-fact {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.65rem;
  align-items: start;
}

.recipe-modal-fact img,
.recipe-modal-section-head img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin-top: 1px;
}

.recipe-modal-fact h3,
.recipe-modal-section-head h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--blue);
}

.recipe-modal-fact p {
  margin: 0.15rem 0 0;
  font-family: Lexend;
  font-weight: 400;
  font-style: Regular;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: 0%;
  color: var(--blue);
}

.recipe-modal-section {
  margin-bottom: 0.85rem;
}

.recipe-modal-section-preparación {
  grid-column: span 2;
  margin-bottom: 0px;
}

.recipe-modal-section-head {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.recipe-modal-section ul,
.recipe-modal-section ol {
  margin: 0;
  padding: 0 0 0 2.05rem;
  list-style: none;
  display: grid;
  gap: 0.12rem;
}

.recipe-modal-section li {
  font-weight: 400;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: 0%;
  color: var(--blue);
}

.recipe-modal-section ol {
  counter-reset: prep;
  gap: 0.28rem;
}

.recipe-modal-section ol li {
  position: relative;
  padding-left: 0;
}

.recipe-modal-section ol li::before {
  counter-increment: prep;
  content: counter(prep) ". ";
  font-weight: 700;
}

.recipe-modal-section ol li strong {
  font-weight: 700;
}

.recipe-modal-tip {
  margin-top: 20px;
  margin-bottom: 0px;
  font-weight: 400;
  font-style: Regular;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: 0%;
}

.recipe-modal-media {
  position: relative;
  align-self: stretch;
  border-radius: 20px 0px 20px 20px;
  overflow: hidden;
  min-height: auto;
}

.recipe-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-modal-media::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 60px;
  height: 60px;
  background: var(--white);
  border-bottom-left-radius: 14px;
  z-index: 1;
  pointer-events: none;
}

.recipe-card {
  cursor: pointer;
}

.recipe-card:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

body.recipe-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .recipe-modal {
    max-width: calc(100vw - 1rem);
    width: calc(100vw - 1rem);
    max-height: min(94vh, 980px);
    margin: auto;
    padding: 1.15rem 1.1rem 1.35rem;
    border-radius: 22px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .recipe-modal-panel {
    max-height: none;
  }

  .recipe-modal-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 0;
  }

  .recipe-modal-media {
    order: 1;
    min-height: 220px;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    align-self: stretch;
  }

  .recipe-modal-media img {
    min-height: 220px;
  }
  .contacto-hero img, .recetario-hero img{
    height: auto;
  }

  .recipe-modal-content {
    order: 2;
    padding: 0;
  }

  .recipe-modal-section-preparación,
  .recipe-modal-section--preparacion {
    order: 3;
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .recipe-modal-title-wrap {
    margin-left: -1.1rem;
    margin-bottom: 0.65rem;
  }

  .recipe-modal-title-wrap h2,
  #recipe-modal-title {
    max-width: calc(100% + 1.1rem);
    padding: 0.55rem 1.1rem 0.55rem 1.1rem;
    font-size: clamp(1.35rem, 6.5vw, 1.75rem);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
  }


  .recipe-modal-intro {
    font-size: 1rem;
    line-height: 1.35;
    max-width: none;
    margin-bottom: 0.85rem;
  }

  .recipe-modal-fact h3,
  .recipe-modal-section-head h3 {
    font-size: 0.95rem;
  }

  .recipe-modal-fact p,
  .recipe-modal-section li,
  .recipe-modal-tip {
    font-size: 0.95rem;
    line-height: 1.35;
  }

  .recipe-modal-section ul,
  .recipe-modal-section ol {
    padding-left: 1.85rem;
  }
  .recipe-modal-media::after {
    width: 52px;
    height: 52px;
  }

  .recipe-modal-tip {
    padding-left: 0;
    margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  .recipe-modal {
    max-width: calc(100vw - 40px);
    width: calc(100vw - 40px);
    max-height: calc(100dvh - 40px);
    height: calc(100dvh - 40px);
    margin: auto;
    padding: 0.9rem 0.85rem 1.25rem;
  }

  .recipe-modal-title-wrap {
    margin-left: -0.85rem;
  }

  .recipe-modal-title-wrap h2,
  #recipe-modal-title {
    max-width: calc(100% + 0.85rem);
    padding: 0.5rem 0.95rem 0.5rem 0.85rem;
    font-size: clamp(1.2rem, 7vw, 1.5rem);
  }

  .recipe-modal-media {
    min-height: 200px;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
  }

  .recipe-modal-media img {
    min-height: 200px;
  }
}

/* ---------- Contacto ---------- */

.contacto-content {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--pad) 9rem;
}

.contacto-intro {
  max-width: 1193px;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  color: var(--blue);
}

.contacto-intro strong {
  font-weight: 600;
}

.contacto-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: end;
}

.contacto-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: var(--cream);
  border-radius: 33px;
  padding: 1.5rem 1.35rem;
  min-height: 191px;
}

.contact-card-head {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.contact-card-head svg {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

.contact-card h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blue);
}

.contact-sub {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--blue);
}

.contact-card>p {
  margin: 0;
  font-size: 1.25rem;
  color: var(--blue-soft);
}

.contacto-illustration {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.contacto-illustration img {
  width: min(100%, 455px);
  height: auto;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--blue);
  color: var(--white);
}

.footer-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem var(--pad) 2rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.4fr;
  gap: 2rem;
}

.footer-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.footer-subtitle,
.footer-tagline {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.footer-tagline {
  margin-bottom: 1rem;
}

.footer-brand a,
.footer-nav a {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.footer-nav a,
.footer-contact p {
  font-weight: 400;
  font-size: 1.25rem;
}

.footer-contact p {
  margin: 0 0 0.55rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.footer-contact svg {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 0.15rem;
  filter: brightness(0) invert(1);
}

.footer-bar {
  background: var(--yellow);
  min-height: 50px;
  display: grid;
  place-items: center;
  padding: 0.75rem var(--pad);
  text-align: center;
}

.footer-bar p {
  margin: 0;
  color: var(--blue);
  font-size: clamp(0.85rem, 1.4vw, 1.25rem);
}

/* ---------- Motion ---------- */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateX(28px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes gentle-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes soft-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto auto 1fr;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .search-form {
    justify-self: end;
  }

}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo toggle"
      "search search";
  }

  .logo {
    grid-area: logo;
  }

  .nav-toggle {
    display: block;
    grid-area: toggle;
    justify-self: end;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem var(--pad) 1.25rem;
    gap: 0;
    box-shadow: 0 12px 30px rgba(22, 40, 140, 0.12);
  }

  .site-nav.is-open {
    display: flex;
    background: var(--white);
  }

  .site-nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(22, 40, 140, 0.08);
  }

  .search-form {
    grid-area: search;
    width: 100%;
    max-width: none;
  }

  .hero {
    overflow: hidden;
  }

  .hero-stage {
    aspect-ratio: auto;
    min-height: auto;
    padding: 6.5rem 1.25rem 2.5rem;
    display: flex;
    flex-direction: column;
  }

  .hero-yellow {
    left: auto;
    right: -18%;
    top: 3.5rem;
    width: min(92vw, 420px);
    height: auto;
    object-fit: contain;
  }

  .hero-eggs {
    left: auto;
    right: -8%;
    top: 4.5rem;
    width: min(88vw, 390px);
    height: auto;
    object-fit: contain;
  }

  .hero-content {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 34rem;
    margin-top: min(58vw, 280px);
    z-index: 3;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 11vw, 3.6rem);
  }

  .section-banner {
    height: 84px;
  }

  .historia-photo {
    /* Match PNG transparent top (~17.3% of image height) at every tablet width */
    margin-top: calc(clamp(160px, 36vw, 258px) * -0.173);
  }
  .recetario-hero {
    /* Match PNG transparent top (~17.3% of image height) at every tablet width */
    margin-top: calc(clamp(120px, 29vw, 258px) * -0.255);
  }
  .contacto-hero {
    /* Match PNG transparent top (~17.3% of image height) at every tablet width */
    margin-top: calc(clamp(120px, 29vw, 258px) * -0.255);
  }
  .historia-photo img {
    height: clamp(160px, 36vw, 258px);
  }

  .historia-body {
    grid-template-columns: 1fr;
  }

  .historia-image img {
    margin-left: 0;
    width: 100%;
  }

  .productos {
    padding: 1.25rem 1.35rem 2rem;
  }

  .productos-panel {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    /* Side gutters keep arrows/notches clear of the yellow card */
    padding: 1rem 2.75rem 1.15rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    --card-w: 100%;
    --card-h: auto;
    --card-gap: 0.85rem;
    --side-inset: 0;
    --img-size: 168px;
    --img-overhang: 4.5rem;
    --bulk-w: 200px;
    --bulk-h: 100px;
    --bulk-overhang: 3.35rem;
    --body-pad-top: 3.85rem;
    --body-pad-x: 1.1rem;
    --radius-card: 28px;
    --arrow-size: 44px;
    border-radius: 0;
    overflow: visible;
    filter: drop-shadow(0 4px 28px rgba(0, 0, 0, 0.14));
  }

  /* Mobile ticket shape */
  .productos-panel::before {
    background: url("assets/bg-mobile.png") center / 100% 100% no-repeat;
    border-radius: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .productos-panel h2 {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0;
    white-space: normal;
    font-size: clamp(1.35rem, 6.2vw, 1.75rem);
    line-height: 1.05;
  }

  .productos-track {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    gap: 0;
    padding: 0.35rem 0 0.15rem;
    margin-top: 0;
    -webkit-overflow-scrolling: touch;
    /* hide subpixel peeks of neighbor cards */
    clip-path: inset(0 2px 0 2px);
    border-radius: 20px;
  }

  .product-card {
    scroll-snap-align: center;
    scroll-snap-stop: always;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    padding-top: var(--img-overhang);
    box-sizing: border-box;
  }

  .product-card:has(.product-card-media--bulk) {
    padding-top: var(--bulk-overhang);
  }

  .product-card-media {
    width: var(--img-size);
    height: calc(var(--img-size) * 0.78);
  }

  .product-card-media--bulk {
    width: var(--bulk-w);
    height: var(--bulk-h);
  }

  .product-card-body {
    height: auto;
    min-height: 0;
    padding: var(--body-pad-top) var(--body-pad-x) 1.15rem;
    border-radius: var(--radius-card);
  }

  .product-card-body h3 {
    font-size: 1.05rem;
    position: relative;
    z-index: 3;
    margin-bottom: 0.45rem;
    padding-top: 0.15rem;
  }

  .product-card-body p {
    font-size: 0.9rem;
    line-height: 1.4;
    max-width: none;
    width: 100%;
  }

  .carousel-btn {
    top: 50%;
    width: var(--arrow-size);
    height: var(--arrow-size);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .carousel-btn img {
    width: 100%;
    height: 100%;
  }

  /* Sit in the ticket notches like desktop */
  .carousel-prev {
    left: 0;
    transform: translate(-50%, -50%);
  }

  .carousel-next {
    right: 0;
    transform: translate(50%, -50%);
  }

  .carousel-prev:hover {
    transform: translate(-50%, -50%) scale(1.06);
  }

  .carousel-next:hover {
    transform: translate(50%, -50%) scale(1.06);
  }

  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 1.5rem;
  }

  .recipe-card {
    max-width: none;
    min-height: 0;
  }

  .recipe-filters {
    justify-content: center;
  }

  .pagination {
    gap: 1.25rem;
  }

  .page-numbers {
    gap: 1rem;
  }

  .contacto-layout {
    grid-template-columns: 1fr;
  }

  .contacto-illustration {
    order: -1;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero-stage {
    padding: 5.75rem 1rem 2rem;
  }

  .hero-yellow {
    top: 0px;
    right: -28%;
    width: 110vw;
  }

  .hero-eggs {
    top: 5rem;
    right: -18%;
    width: 100vw;
  }

  .hero-content {
    margin-top: 62vw;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }

  .hero p br {
    display: none;
  }

  .productos {
    padding: 1rem 1.25rem 1.75rem;
  }

  .productos-panel {
    padding: 0.9rem 2.55rem 1rem;
    border-radius: 0;
  }

  .productos-panel::before {
    background-image: url("assets/bg-mobile.png");
    border-radius: 0;
  }

  .productos-panel h2 {
    font-size: clamp(1.25rem, 6.5vw, 1.55rem);
  }

  .product-card-media {
    width: 150px;
    height: 118px;
  }

  .product-card-media--bulk {
    width: 186px;
    height: 94px;
  }

  .product-card {
    padding-top: 3.9rem;
  }

  .product-card:has(.product-card-media--bulk) {
    padding-top: 3rem;
  }

  .product-card-body {
    padding-top: 3.35rem;
    padding-bottom: 1rem;
  }

  .product-card-body h3 {
    font-size: 1rem;
  }

  .product-card-body p {
    font-size: 0.875rem;
  }

  .carousel-btn {
    width: 35px;
    height: 35px;
  }

  .recipe-grid,
  .contacto-cards,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .recipe-filters {
    gap: 0.85rem;
  }

  .filter-btn span {
    min-width: 103px;
  }

  .pagination {
    gap: 0.65rem;
  }

  .page-arrow {
    width: 36px;
    height: 36px;
  }

  .page-num {
    font-size: 1.2rem;
  }

  .carousel-next {
    right: 10px;
  }

  .carousel-prev {
    left: 10px;
  }
}