/* ==========================================================
   components.css — Botones, tarjetas, WhatsApp, lightbox
   ========================================================== */

/* --- Botones ----------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border: 1px solid var(--tinta);
  border-radius: 999px;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  color: var(--tinta);
  transition: color .45s var(--ease), border-color .45s var(--ease);
  font-family: var(--sans);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tinta);
  transform: translateY(101%);
  transition: transform .5s var(--ease);
  z-index: -1;
}

.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--crema-claro); }

.btn--relleno {
  background: var(--rosa);
  border-color: var(--rosa);
  color: var(--crema-claro);
}

.btn--relleno::before { background: var(--rosa-oscuro); }
.btn--relleno:hover { border-color: var(--rosa-oscuro); }

.btn--claro {
  border-color: var(--crema-claro);
  color: var(--crema-claro);
}

.btn--claro::before { background: var(--crema-claro); }
.btn--claro:hover { color: var(--tinta); }

.btn svg { width: 17px; height: 17px; flex: none; }

/* --- Tarjeta de producto ----------------------------------- */

.producto {
  background: var(--blanco);
  border: 1px solid var(--linea);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}

.producto:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px -24px rgba(46, 35, 32, .38);
}

.producto__foto {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--crema);
}

.producto__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Realce suave: las fotos originales son de teléfono */
  filter: saturate(1.06) contrast(1.05) brightness(1.02);
  transition: transform 1.1s var(--ease), filter .6s var(--ease);
}

.producto:hover .producto__foto img {
  transform: scale(1.07);
  filter: saturate(1.12) contrast(1.07) brightness(1.04);
}

.producto__etiqueta {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(246, 243, 236, .93);
  color: var(--rosa-oscuro);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}

.producto__lupa {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(46, 35, 32, .28);
  opacity: 0;
  cursor: zoom-in;
  transition: opacity .45s var(--ease);
}

.producto__foto:hover .producto__lupa { opacity: 1; }

.producto__cuerpo {
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}

.producto__cuerpo p {
  color: var(--tinta-suave);
  font-size: .92rem;
  margin: 0;
  flex: 1;
}

.producto__pedir {
  margin-top: 14px;
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rosa-oscuro);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color .4s var(--ease), gap .4s var(--ease);
}

.producto__pedir:hover {
  border-color: var(--rosa-oscuro);
  gap: 14px;
}

/* --- Filtros ----------------------------------------------- */

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.filtro {
  background: transparent;
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  cursor: pointer;
  transition: all .4s var(--ease);
}

.filtro:hover { border-color: var(--rosa); color: var(--rosa-oscuro); }

.filtro.activo {
  background: var(--rosa);
  border-color: var(--rosa);
  color: var(--crema-claro);
}

/* --- Tarjeta de valor / pasos ------------------------------ */

.valores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(24px, 3vw, 46px);
}

.valor__num {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--rosa-suave);
  line-height: 1;
  display: block;
  margin-bottom: .5rem;
}

.franja .valor__num { color: var(--crema); opacity: .55; }

.valor h3 { margin-bottom: .5rem; }

.valor p {
  color: var(--tinta-suave);
  font-size: .95rem;
  margin: 0;
}

.franja .valor p { color: rgba(246, 243, 236, .85); }

/* --- Bloque de imagen editorial ---------------------------- */

.figura {
  position: relative;
  overflow: hidden;
}

.figura img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
  transition: transform 1.2s var(--ease);
}

.figura:hover img { transform: scale(1.04); }

.figura--ancha img { aspect-ratio: 16 / 10; }

/* --- Mosaico de galería ------------------------------------ */

.mosaico {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.mosaico .figura { cursor: zoom-in; }
.mosaico .figura img { aspect-ratio: 1; }
.mosaico .figura:nth-child(1),
.mosaico .figura:nth-child(6) { grid-column: span 2; grid-row: span 2; }
.mosaico .figura:nth-child(1) img,
.mosaico .figura:nth-child(6) img { aspect-ratio: 1; height: 100%; }

/* --- Sección WhatsApp -------------------------------------- */

.whatsapp-bloque {
  background: var(--tinta);
  color: var(--crema);
  border-radius: 4px;
  padding: clamp(36px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}

.whatsapp-bloque h2 { color: var(--crema-claro); }
.whatsapp-bloque p { color: rgba(232, 228, 217, .75); }

.wa-form {
  display: grid;
  gap: 14px;
}

.wa-campo {
  display: grid;
  gap: 7px;
}

.wa-campo label {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rosa-suave);
}

.wa-campo input,
.wa-campo select,
.wa-campo textarea {
  background: rgba(246, 243, 236, .06);
  border: 1px solid rgba(232, 228, 217, .2);
  color: var(--crema-claro);
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: .95rem;
  border-radius: 2px;
  transition: border-color .35s var(--ease), background .35s var(--ease);
}

.wa-campo textarea { resize: vertical; min-height: 92px; }

.wa-campo input:focus,
.wa-campo select:focus,
.wa-campo textarea:focus {
  outline: none;
  border-color: var(--rosa-suave);
  background: rgba(246, 243, 236, .1);
}

.wa-campo select option { color: var(--tinta); }

.wa-form .btn { justify-content: center; width: 100%; }

.wa-datos {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: .9rem;
  font-size: .95rem;
}

.wa-datos li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(232, 228, 217, .82);
}

.wa-datos svg {
  width: 18px; height: 18px;
  flex: none;
  margin-top: 4px;
  color: var(--rosa-suave);
}

/* --- Botón flotante WhatsApp ------------------------------- */

.wa-flotante {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 950;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6);
  transform: scale(0);
  transition: transform .5s var(--ease), box-shadow .4s var(--ease);
}

.wa-flotante.visible { transform: scale(1); }
.wa-flotante:hover { box-shadow: 0 16px 38px -6px rgba(37, 211, 102, .8); }
.wa-flotante svg { width: 30px; height: 30px; }

.wa-flotante::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: pulso 2.6s var(--ease) infinite;
}

/* --- Lightbox ---------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  /* <figure> trae margin:1em 40px del navegador; en un elemento
     fixed con inset:0 ese margen encoge la caja y el fondo deja
     franjas sin cubrir. Hay que anularlo siempre. */
  margin: 0;
  padding: 0;

  background: rgba(30, 22, 20, .96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;

  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s;
}

.lightbox.abierto { opacity: 1; visibility: visible; }

.lightbox__figura {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  /* Deja libre el alto de las zonas de cerrar y del pie */
  max-height: 100%;
  padding: 72px 16px 24px;
  box-sizing: border-box;
}

.lightbox img {
  max-width: 100%;
  max-height: 74svh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  transform: scale(.94);
  transition: transform .5s var(--ease);
}

.lightbox.abierto img { transform: scale(1); }

.lightbox figcaption {
  color: var(--crema);
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3.4vw, 1.4rem);
  line-height: 1.3;
  margin: 0;
}

.lightbox__cerrar {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  background: rgba(246, 243, 236, .12);
  border: 0;
  border-radius: 50%;
  color: var(--crema);
  font-size: 1.6rem;
  line-height: 1;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .35s var(--ease);
}

.lightbox__cerrar:hover { background: rgba(246, 243, 236, .24); }

.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  z-index: 2;
  background: rgba(30, 22, 20, .55);
  border: 1px solid rgba(232, 228, 217, .3);
  color: var(--crema);
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background .35s var(--ease);
}

.lightbox__nav:hover { background: rgba(232, 228, 217, .22); }
.lightbox__nav.prev { left: 3vw; }
.lightbox__nav.next { right: 3vw; }

/* El flotante de WhatsApp no debe asomarse sobre el visor */
body.visor-abierto .wa-flotante {
  opacity: 0;
  pointer-events: none;
}

/* --- Marquesina -------------------------------------------- */

.marquesina {
  overflow: hidden;
  border-block: 1px solid var(--linea);
  padding-block: 20px;
  background: var(--crema);
}

.marquesina__pista {
  display: flex;
  gap: 46px;
  width: max-content;
  animation: desplazar 34s linear infinite;
}

.marquesina span {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  color: var(--rosa-oscuro);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 46px;
}

.marquesina span::after {
  content: "✦";
  font-size: .7em;
  color: var(--rosa-suave);
}
