/*
 * La foto de la ficha a pantalla completa y su icono de expandir (13/09/2026).
 * Lo monta `assets/js/foto-pantalla-completa.js`.
 */

.gp-preview-product-page .gp-single-product__media .gp-preview-product-gallery {
  position: relative;
}

.gp-preview-product-page .gp-single-product__media .gp-preview-product-image {
  cursor: zoom-in;
}

/*
 * El icono: pequeño, en la esquina de arriba a la derecha de la foto, blanco
 * translúcido con desenfoque para que se lea sobre fotos claras y oscuras.
 */
.gp-foto-completa-abrir {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(16, 17, 20, 0.08);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(16, 17, 20, 0.14);
  color: #101114;
  cursor: pointer;
  display: inline-flex;
  height: 2.25rem;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 0.875rem;
  top: 0.875rem;
  transition: transform 180ms ease, background-color 180ms ease;
  width: 2.25rem;
  z-index: 3;
}

.gp-foto-completa-abrir svg,
.gp-foto-completa svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gp-foto-completa-abrir svg {
  height: 1rem;
  stroke-width: 2;
  width: 1rem;
}

.gp-foto-completa-abrir:hover {
  background: #fff;
  transform: scale(1.08);
}

.gp-foto-completa-abrir:focus-visible,
.gp-foto-completa button:focus-visible {
  outline: 2px solid #c7f000;
  outline-offset: 2px;
}

/* El visor. */
html.gp-foto-completa-abierta,
html.gp-foto-completa-abierta body {
  overflow: hidden !important;
}

.gp-foto-completa {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  align-items: center;
  background: rgba(10, 10, 12, 0.94);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  position: fixed;
  transition: opacity 260ms ease;
  z-index: 10000;
}

.gp-foto-completa.is-abierto {
  opacity: 1;
}

.gp-foto-completa[hidden] {
  display: none !important;
}

.gp-foto-completa__marco {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  height: 100%;
  justify-content: center;
  margin: 0;
  padding: 4.5rem 5.5rem 4rem;
  width: 100%;
}

.gp-foto-completa__img {
  border-radius: 1rem;
  display: block;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 280ms ease, transform 420ms cubic-bezier(0.32, 0.72, 0, 1);
  width: auto;
}

.gp-foto-completa.is-abierto .gp-foto-completa__img.is-lista {
  opacity: 1;
  transform: none;
}

.gp-foto-completa__cerrar,
.gp-foto-completa__flecha {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  padding: 0;
  position: absolute;
  transition: background-color 180ms ease;
  z-index: 1;
}

.gp-foto-completa__cerrar:hover,
.gp-foto-completa__flecha:hover {
  background: rgba(255, 255, 255, 0.22);
}

.gp-foto-completa__cerrar {
  height: 2.75rem;
  right: 1.25rem;
  top: 1.25rem;
  width: 2.75rem;
}

.gp-foto-completa__cerrar svg {
  height: 1.25rem;
  stroke-width: 2;
  width: 1.25rem;
}

.gp-foto-completa__flecha {
  height: 3rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
}

.gp-foto-completa__flecha[hidden] {
  display: none;
}

.gp-foto-completa__flecha--prev {
  left: 1.25rem;
}

.gp-foto-completa__flecha--next {
  right: 1.25rem;
}

.gp-foto-completa__flecha svg {
  height: 1.35rem;
  stroke-width: 2;
  width: 1.35rem;
}

.gp-foto-completa__contador {
  bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  left: 50%;
  letter-spacing: 0.04em;
  margin: 0;
  position: absolute;
  transform: translateX(-50%);
}

/* En el teléfono la foto va a lo ancho y las flechas bajan junto al contador. */
@media (max-width: 820px) {
  .gp-foto-completa__marco {
    padding: 4rem 0.75rem 5.5rem;
  }

  .gp-foto-completa__img {
    border-radius: 0.75rem;
  }

  .gp-foto-completa__flecha {
    bottom: 1rem;
    top: auto;
    transform: none;
  }

  .gp-foto-completa__contador {
    bottom: 1.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gp-foto-completa,
  .gp-foto-completa__img {
    transition: none;
  }

  .gp-foto-completa__img {
    transform: none;
  }
}
