/* ============================================================
   Página de producto — botella flotando + dónde comprar + recetas
   Color por página con --cat-color (según la categoría).
   ============================================================ */

body {
  --cat-color: #85b2ca;
  margin: 0;
  min-height: 100vh;
  font-family: var(--mil976-font);
  font-weight: var(--mil976-weight-body);
  color: var(--mil976-title);
  /* Base sólida = sin cortes al final por más largo que sea el contenido. */
  background: var(--cat-color);
  -webkit-font-smoothing: antialiased;
}

/* Resplandor blanco fijo a la pantalla (reemplaza background-attachment: fixed,
   que dejaba una franja/corte al final del contenido). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(75% 60% at 50% 36%, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, .18) 42%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 55%);
}

.product-main {
  position: relative;
  padding-top: clamp(150px, 20vh, 210px);
  padding-bottom: clamp(44px, 6vw, 80px);
  padding-inline: clamp(20px, 5vw, 48px);
  overflow: hidden;
}

.product-main::before {
  content: "";
  position: absolute;
  top: -12vh;
  left: -14vw;
  width: 58vmax;
  height: 58vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .32), transparent 62%);
  pointer-events: none;
  animation: prodBlob 15s ease-in-out infinite;
}

.product-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin-inline: auto;
}

/* --- Hero: botella flotando + info --- */
.product-hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  margin-bottom: clamp(48px, 8vw, 100px);
}

.product-hero__media {
  display: grid;
  place-items: center;
  min-height: clamp(320px, 46vh, 560px);
  opacity: 0;
  transform: translateY(30px);
  animation: prodFadeUp .8s var(--mil976-ease) forwards;
}

.product-hero__media img {
  max-height: clamp(320px, 52vh, 600px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 40px 40px rgba(6, 68, 82, .32));
  animation: prodFloat 5.5s ease-in-out infinite;
}

/* El contenido entra escalonado (fade-up). */
.product-hero__info > * {
  opacity: 0;
  transform: translateY(26px);
  animation: prodFadeUp .6s var(--mil976-ease) forwards;
}

.product-hero__info > *:nth-child(1) { animation-delay: .16s; }
.product-hero__info > *:nth-child(2) { animation-delay: .25s; }
.product-hero__info > *:nth-child(3) { animation-delay: .34s; }
.product-hero__info > *:nth-child(4) { animation-delay: .43s; }
.product-hero__info > *:nth-child(5) { animation-delay: .52s; }

.recipes__head {
  opacity: 0;
  transform: translateY(24px);
  animation: prodFadeUp .6s var(--mil976-ease) .1s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .product-hero__media,
  .product-hero__info > *,
  .recipes__head {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.product-hero__eyebrow {
  margin: 0 0 12px;
  color: var(--mil976-accent-strong);
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 900;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .85;
}

.product-hero__eyebrow a {
  color: inherit;
  text-decoration: none;
}

.product-hero__title {
  margin: 0 0 14px;
  color: var(--mil976-title);
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 900;
  line-height: .94;
  letter-spacing: -.03em;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .35);
}

.product-hero__desc {
  margin: 0 0 30px;
  max-width: 48ch;
  color: var(--mil976-text);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: var(--mil976-weight-body);
  line-height: 1.55;
}

/* Dónde comprar */
.product-buy__title {
  margin: 0 0 14px;
  color: var(--mil976-accent-strong);
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.product-buy__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Reutiliza .store-chip de header.css, pero un poco más pequeño aquí. */
.product-buy__stores .store-chip {
  width: clamp(56px, 7vw, 68px);
}

/* --- Recetas del producto --- */
.recipes {
  position: relative;
}

.recipes__head {
  text-align: center;
  margin-bottom: clamp(26px, 4vw, 44px);
}

.recipes__eyebrow {
  margin: 0 0 8px;
  color: var(--mil976-accent-strong);
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 900;
  letter-spacing: .28em;
  text-transform: uppercase;
  opacity: .85;
}

.recipes__title {
  margin: 0;
  color: var(--mil976-title);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -.02em;
}

.recipe-list {
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
}

/* Tarjeta de receta: foto + contenido */
.recipe-card {
  position: relative;
  display: grid;
  grid-template-columns: clamp(180px, 26%, 280px) 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--mil976-radius);
  border: 1px solid rgba(255, 255, 255, .6);
  background: linear-gradient(160deg, rgba(255, 255, 255, .52), rgba(255, 255, 255, .24));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .8),
    0 22px 48px rgba(6, 68, 82, .18);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  transform: translateY(28px);
  opacity: 0;
  animation: prodFadeUp .6s var(--mil976-ease) forwards;
}

.recipe-card:nth-child(1) { animation-delay: .10s; }
.recipe-card:nth-child(2) { animation-delay: .20s; }
.recipe-card:nth-child(3) { animation-delay: .30s; }
.recipe-card:nth-child(4) { animation-delay: .40s; }

/* Foto de la receta (con placeholder elegante si no hay imagen) */
.recipe-card__media {
  aspect-ratio: 1;
  border-radius: var(--mil976-radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .5);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .6), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, .4), rgba(144, 237, 245, .22));
  display: grid;
  place-items: center;
  box-shadow: 0 16px 30px rgba(6, 68, 82, .14);
}

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

.recipe-card__media.is-placeholder::after {
  content: "🍸";
  font-size: 40px;
  opacity: .5;
  filter: saturate(.4);
}

.recipe-card__name {
  margin: 0 0 4px;
  color: var(--mil976-title);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 900;
  letter-spacing: -.01em;
}

.recipe-card__section {
  margin: 16px 0 8px;
  color: var(--mil976-title);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.recipe-card__ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recipe-card__ingredients li {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .38);
  color: var(--mil976-text);
  font-size: 13px;
  font-weight: 700;
}

/* Toda la tarjeta de receta enlaza a la receta (los botones de compartir quedan encima). */
.recipe-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--mil976-radius);
}

.recipe-card .share-row { position: relative; z-index: 2; }

.recipe-card { transition: transform .3s var(--mil976-ease), box-shadow .3s ease; }

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 30px 60px rgba(6, 68, 82, .24);
}

.recipe-card__steps {
  margin: 0;
  color: var(--mil976-text);
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.6;
}

/* --- Compartir --- */
.share-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .5);
}

.share-row__label {
  color: var(--mil976-accent-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.share-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 50%;
  background: rgba(255, 255, 255, .34);
  color: var(--mil976-accent-strong);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 8px 18px rgba(16, 80, 94, .12);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  backdrop-filter: blur(8px) saturate(1.2);
  transition: transform .25s var(--mil976-ease), background .25s ease, color .25s ease;
}

.share-btn svg { width: 19px; height: 19px; }

.share-btn:hover,
.share-btn:focus-visible {
  transform: translateY(-3px);
  background: var(--mil976-accent-strong);
  color: #fff;
  outline: 0;
}

.share-toast {
  color: var(--mil976-accent-strong);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transition: opacity .25s ease;
}

.share-toast.is-visible { opacity: 1; }

/* --- Animaciones --- */
@keyframes prodFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-20px) rotate(2deg); }
}

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

@keyframes prodBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(3vw, 3vh) scale(1.06); }
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .product-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .product-hero__desc { margin-inline: auto; }
  .product-buy__stores { justify-content: center; }

  .recipe-card {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: left;
  }

  .recipe-card__media {
    max-width: 240px;
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-hero__media img,
  .product-main::before { animation: none; }

  .product-hero__info,
  .recipe-card {
    animation: none;
    transform: none;
    opacity: 1;
  }
}
