/* ═══════════════════════════════════════════
   Image Hotspot Widget v1.1.0
   ═══════════════════════════════════════════ */

.ihw-hotspot-section {
    position: relative;
    width: 100%;
    min-height: 700px;
    padding: 40px 20px;
}

.ihw-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(27,94,163,0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* ── Product Image (contains dots) ────────── */
.ihw-product-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    z-index: 2;
}

.ihw-product-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.18))
            drop-shadow(0 8px 20px rgba(0,0,0,0.10));
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.ihw-product-wrapper:hover img {
    transform: scale(1.03);
}

/* ── SVG Connectors ───────────────────────── */
.ihw-connectors-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.ihw-connector-line {
    fill: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ihw-connector-line.ihw-visible {
    opacity: 1;
}

/* ── Hotspot Dots (inside product-wrapper) ── */
.ihw-hotspot-dot {
    position: absolute;
    width: 52px;
    height: 52px;
    z-index: 5;
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.ihw-dot-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    background: #1b5ea3;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    box-shadow: 0 2px 10px rgba(27,94,163,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ihw-hotspot-dot:hover .ihw-dot-number {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 4px 16px rgba(27,94,163,0.5);
}

.ihw-dot-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(27,94,163,0.12);
    animation: ihwPulse 2.4s ease-out infinite;
}

@keyframes ihwPulse {
    0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.3);  opacity: 0; }
}

/* ── Info Cards ───────────────────────────── */
.ihw-info-card {
    position: absolute;
    background: #ffffff;
    border-radius: 14px;
    padding: 28px 26px;
    width: 260px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    z-index: 3;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.ihw-info-card.ihw-visible {
    opacity: 1;
    transform: translateY(0);
}

.ihw-info-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
}

.ihw-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #1b5ea3;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.ihw-info-card h3 {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    margin-top: 0;
}

.ihw-info-card p {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #5a5a72;
    letter-spacing: 0.01em;
    margin: 0;
}

/* ── Close Button: HIDDEN on desktop ──────── */
.ihw-hotspot-section .ihw-info-card .ihw-card-close {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* ── Mobile Overlay: HIDDEN by default ────── */
.ihw-mobile-overlay {
    display: none;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 767px) {
    .ihw-hotspot-section {
        min-height: auto !important;
        padding: 20px 16px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Image stays centered, dots are inside */
    .ihw-product-wrapper {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 85% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        z-index: 2;
    }

    /* Dots on image */
    .ihw-hotspot-dot {
        z-index: 10 !important;
    }

    .ihw-dot-number {
        width: 26px !important;
        height: 26px !important;
        font-size: 12px !important;
    }

    .ihw-dot-pulse {
        width: 44px !important;
        height: 44px !important;
    }

    /* Cards: hidden, slide up from bottom on click */
    .ihw-hotspot-section .ihw-info-card {
        position: fixed !important;
        top: auto !important;
        left: 16px !important;
        right: 16px !important;
        bottom: 20px !important;
        width: auto !important;
        max-width: none !important;
        opacity: 0 !important;
        transform: translateY(30px) !important;
        pointer-events: none !important;
        z-index: 9999 !important;
        box-shadow: 0 -4px 40px rgba(0,0,0,0.15), 0 8px 32px rgba(0,0,0,0.10) !important;
        border-radius: 16px !important;
        transition: opacity 0.3s ease, transform 0.3s ease !important;
    }

    .ihw-hotspot-section .ihw-info-card.ihw-visible {
        opacity: 0 !important;
        transform: translateY(30px) !important;
        pointer-events: none !important;
    }

    .ihw-hotspot-section .ihw-info-card.ihw-mobile-active {
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }

    /* Close button: VISIBLE on mobile only */
    .ihw-hotspot-section .ihw-info-card .ihw-card-close {
        display: flex !important;
        visibility: visible !important;
        width: 28px !important;
        height: 28px !important;
        overflow: visible !important;
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        background: #f0f0f3 !important;
        border: none !important;
        border-radius: 50% !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 16px !important;
        color: #666 !important;
        line-height: 1 !important;
        z-index: 5 !important;
        padding: 0 !important;
        pointer-events: auto !important;
    }

    .ihw-hotspot-section .ihw-info-card .ihw-card-close:active {
        background: #e0e0e5 !important;
    }

    /* Backdrop overlay */
    .ihw-mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 9998;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .ihw-mobile-overlay.ihw-active {
        display: block;
    }

    /* Active dot highlight */
    .ihw-hotspot-dot.ihw-dot-active .ihw-dot-number {
        transform: translate(-50%, -50%) scale(1.3) !important;
        box-shadow: 0 4px 20px rgba(27,94,163,0.6) !important;
    }

    /* Hide connector lines and glow */
    .ihw-connectors-svg {
        display: none !important;
    }

    .ihw-bg-glow {
        display: none !important;
    }
}
