/* Phones: the gallery shares its row with a slice of the next photo (gallery-peek.js). */
.product-carousel-wrapper.has-peek {
    display: flex;
    gap: 6px;
}

.product-carousel-wrapper.has-peek .product-carousel {
    flex: 0 0 86%;
    width: 86%;
}

/* The zoom button stays on the photo, not on the slice (common.css pins it top-right) */
.product-carousel-wrapper.has-peek .gallery-zoom-button:not(.description-zoom-button) {
    right: calc(14% + 1rem) !important;
}

/* The slice is the way forward, so the carousel's own next arrow steps aside */
.product-carousel-wrapper.has-peek .carousel-control-next {
    display: none;
}

.gallery-peek {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 1rem 0 0 1rem;
    overflow: hidden;
    background: var(--bg-secondary);
    cursor: pointer;
}

.gallery-peek img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    opacity: 0.85;
}

.gallery-peek-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.75rem;
    height: 1.75rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Same hint as the next arrow (product.css): once the slice's picture has
   loaded (gallery-peek.js adds .is-ready) it nudges forward twice with a soft
   ring, so every product shows it, however slow its photos are. */
.gallery-peek.is-ready .gallery-peek-arrow {
    animation: galleryPeekHint 1.4s ease-in-out 0.6s 2;
}

@keyframes galleryPeekHint {
    0%, 100% { transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(255, 255, 255, 0.7); }
    35% { transform: translate(calc(-50% + 4px), -50%); }
    70% { transform: translate(-50%, -50%); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0.6rem rgba(255, 255, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-peek.is-ready .gallery-peek-arrow {
        animation: none;
    }
}

.gallery-peek-arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 45%;
    width: 0.5rem;
    height: 0.5rem;
    border-top: 2px solid #121212;
    border-right: 2px solid #121212;
    transform: translate(-50%, -50%) rotate(45deg);
}
