/* ═══════════════════════════════════════════════════════════════
   BAY9JA — Product Image Zoom (cursor-tracking magnifier)
   ═══════════════════════════════════════════════════════════════ */

/* ── Zoom container ────────────────────────────────────────────── */
.zoom-wrap {
    overflow: hidden;
    position: relative;
    cursor: crosshair;
    -webkit-user-select: none;
    user-select: none;
    /* Smooth border on focus */
    transition: box-shadow 0.2s ease;
}
.zoom-wrap:hover {
    box-shadow: 0 0 0 2px #3665f3;
}

/* ── The image that gets scaled ────────────────────────────────── */
.zoom-wrap img.zoom-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.08s linear;
    pointer-events: none;
}

/* Zoomed state (class added by JS) */
.zoom-wrap.is-zooming img.zoom-img {
    transform: scale(2.5);
}

/* ── "Zoom available" hint badge ────────────────────────────────── */
.zoom-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 4px 9px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.zoom-hint svg { flex-shrink: 0; }

.zoom-wrap:hover .zoom-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Swap hint text when zoomed */
.zoom-wrap.is-zooming .zoom-hint-text-idle  { display: none; }
.zoom-wrap:not(.is-zooming) .zoom-hint-text-zoom { display: none; }

/* ── Crosshair cursor overlay (subtle lens ring) ─────────────────── */
.zoom-lens-ring {
    position: absolute;
    width: 64px;
    height: 64px;
    border: 2px solid rgba(54, 101, 243, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    display: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.0);
    transition: opacity 0.1s ease;
    background: rgba(54, 101, 243, 0.06);
}
.zoom-wrap.is-zooming .zoom-lens-ring { display: block; }

/* ── Disable zoom on small screens (touch devices handle natively) ── */
@media (max-width: 767px) {
    .zoom-wrap { cursor: default; }
    .zoom-wrap img.zoom-img { transition: none; }
    .zoom-wrap.is-zooming img.zoom-img { transform: scale(1); }
    .zoom-hint, .zoom-lens-ring { display: none !important; }
}
