/**
 * Banner promocional entre posts. Fondo crema (#FAFAF8) fijo, igual en tema claro y oscuro. Ilustración con el producto en un lado,
 * texto HTML en el lado libre. En iPhone se apila: imagen arriba, texto y botón debajo.
 */
.lpf-banner {
  --lpf-header-bg: #fafaf8;
  --lpf-header-text: #181818;
  --lpf-header-muted: #595954;
  --lpf-header-border: #d9d9d3;
  position: relative;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: var(--ig-radius-xl);
  background: #fafaf8;
  color: #181818;
  isolation: isolate;
  container-type: inline-size;   /* el texto escala con el ancho real del banner */
}

.lpf-banner--desktop { aspect-ratio: 2304 / 640; }
.lpf-banner--ipad    { aspect-ratio: 1800 / 560; }

.lpf-banner--desktop .lpf-banner__img,
.lpf-banner--ipad .lpf-banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.lpf-banner__body {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40%;
}

.lpf-banner--text-left  .lpf-banner__body { left: clamp(20px, 5%, 64px); }
.lpf-banner--text-right .lpf-banner__body { right: clamp(20px, 5%, 64px); }

.lpf-banner__eyebrow {
  margin: 0 0 clamp(4px, 0.8cqw, 8px);
  font-family: var(--lpf-font-ui);
  font-size: clamp(9px, 0.95cqw, 11px);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lpf-header-muted);
}

.lpf-banner__title {
  margin: 0 0 clamp(8px, 1.4cqw, 16px);
  font-family: var(--lpf-font-brand);
  font-weight: 700;
  font-size: clamp(18px, 3.1cqw, 36px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--lpf-header-text);
  text-wrap: balance;
}

/* Botón: en banners estrechos (feed de escritorio) más compacto, sin bajar de 44 px de alto */
@container (max-width: 640px) {
  .lpf-banner--desktop .lpf-banner__cta,
  .lpf-banner--ipad .lpf-banner__cta { padding: 0 14px; font-size: 13px; }
}

/* iPhone: tarjeta vertical (producto grande arriba, texto y botón debajo) */
.lpf-banner--iphone { margin: var(--ig-space-3); }

.lpf-banner--iphone .lpf-banner__img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1074 / 600;
  z-index: auto;
}

.lpf-banner--iphone .lpf-banner__body {
  position: static;
  transform: none;
  width: auto;
  padding: 0 var(--ig-space-4) var(--ig-space-4);
}

.lpf-banner--iphone .lpf-banner__eyebrow { font-size: 11px; margin-bottom: 6px; }
.lpf-banner--iphone .lpf-banner__title { font-size: 24px; margin-bottom: var(--ig-space-3); }
.lpf-banner--iphone .lpf-banner__cta { display: flex; width: 100%; min-height: 48px; font-size: 16px; }

/* ===== Entrada suave (una sola vez, al entrar en pantalla) =====
   Solo se activa si el JS añade html.lpf-anim (y no hay "reducir movimiento"). Sin JS el banner se ve normal. */
@keyframes lpfBannerText { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes lpfBannerImgFromRight { from { opacity: 0; transform: translateX(56px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes lpfBannerImgFromLeft  { from { opacity: 0; transform: translateX(-56px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes lpfBannerImgUp        { from { opacity: 0; transform: translateY(34px) scale(0.92); } to { opacity: 1; transform: none; } }

html.lpf-anim .lpf-banner:not(.is-in) :is(.lpf-banner__img, .lpf-banner__eyebrow, .lpf-banner__title, .lpf-banner__cta) { opacity: 0; }

html.lpf-anim .lpf-banner.is-in .lpf-banner__img { animation: lpfBannerImgFromRight 1s cubic-bezier(0.16, 0.8, 0.2, 1) 0.2s backwards; }
html.lpf-anim .lpf-banner--text-right.is-in .lpf-banner__img { animation-name: lpfBannerImgFromLeft; }
html.lpf-anim .lpf-banner--iphone.is-in .lpf-banner__img { animation-name: lpfBannerImgUp; animation-delay: 0.05s; }

html.lpf-anim .lpf-banner.is-in .lpf-banner__eyebrow { animation: lpfBannerText 0.8s cubic-bezier(0.16, 0.8, 0.2, 1) 0.25s backwards; }
html.lpf-anim .lpf-banner.is-in .lpf-banner__title   { animation: lpfBannerText 0.8s cubic-bezier(0.16, 0.8, 0.2, 1) 0.4s backwards; }
html.lpf-anim .lpf-banner.is-in .lpf-banner__cta     { animation: lpfBannerText 0.8s cubic-bezier(0.16, 0.8, 0.2, 1) 0.55s backwards; }

/* Escritorio: zoom muy lento del producto al pasar el ratón */
@media (hover: hover) {
  .lpf-banner--desktop .lpf-banner__img { transition: transform 1.4s ease; }
  .lpf-banner--desktop:hover .lpf-banner__img { transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
  html.lpf-anim .lpf-banner :is(.lpf-banner__img, .lpf-banner__eyebrow, .lpf-banner__title, .lpf-banner__cta) { opacity: 1 !important; animation: none !important; transition: none !important; transform: none !important; }
}
