/* ── ShopReels WP — Product Overlay (Frontend) ────────────────────────────── */

/* ── Hotspot pins on the video ────────────────────────────────────────────── */
.srwp-hotspot-pin {
    position: absolute;
    width: 26px;
    height: 26px;
    transform: translate(-50%, -100%);
    cursor: pointer;
    z-index: 20;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.srwp-hotspot-pin:hover {
    transform: translate(-50%, -100%) scale(1.25);
}

.srwp-hotspot-pin svg { width: 100%; height: 100%; }

/* Pulse ring on pin */
.srwp-hotspot-pin::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(124,58,237,0.35);
    transform: translate(-50%, -55%);
    animation: srwp-pulse 2s ease-out infinite;
}

@keyframes srwp-pulse {
    0%   { transform: translate(-50%,-55%) scale(0.8); opacity: 0.8; }
    70%  { transform: translate(-50%,-55%) scale(1.8); opacity: 0; }
    100% { transform: translate(-50%,-55%) scale(1.8); opacity: 0; }
}

/* ── Product overlay panel ────────────────────────────────────────────────── */
.srwp-product-overlay {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 30;
    padding: 0 12px 12px;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94), opacity 0.3s ease;
}

.srwp-product-overlay.pos-bottom {
    bottom: 0;
    transform: translateY(100%);
}

.srwp-product-overlay.pos-top {
    top: 0;
    transform: translateY(-100%);
}

.srwp-product-overlay.is-visible {
    transform: translateY(0);
    pointer-events: all;
    opacity: 1;
}

.srwp-product-overlay.pos-bottom::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; top: -80px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    pointer-events: none;
    z-index: -1;
}

/* ── Product scroll rail ──────────────────────────────────────────────────── */
.srwp-product-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.srwp-product-rail::-webkit-scrollbar { display: none; }

/* ── Individual product card ──────────────────────────────────────────────── */
.srwp-product-card {
    flex-shrink: 0;
    width: 160px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    scroll-snap-align: start;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.srwp-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}

.srwp-product-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.srwp-product-card-body {
    padding: 9px 11px 10px;
}

.srwp-product-card-name {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 3px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.srwp-product-card-price {
    font-size: 12px;
    font-weight: 600;
    color: #7c3aed;
    margin: 0 0 8px;
}

/* Star rating */
.srwp-product-card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
}
.srwp-stars { font-size: 10px; color: #f59e0b; letter-spacing: 0.5px; }
.srwp-rating-count { font-size: 10px; color: #999; }

/* Add to cart button */
.srwp-atc-btn {
    width: 100%;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.15s, transform 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.srwp-atc-btn:hover { background: #6d28d9; }
.srwp-atc-btn:active { transform: scale(0.97); }

.srwp-atc-btn.is-loading {
    background: #a78bfa;
    pointer-events: none;
}

.srwp-atc-btn.is-added {
    background: #059669;
}

.srwp-atc-btn.is-loading::after {
    content: '';
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: srwp-spin 0.6s linear infinite;
}

/* ── Toast notification ───────────────────────────────────────────────────── */
.srwp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1a1a2e;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 24px;
    z-index: 999999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.srwp-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Out-of-stock badge ───────────────────────────────────────────────────── */
.srwp-oos-badge {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    margin-bottom: 6px;
}

/* ── Cart count bubble (attaches to existing WC mini-cart) ───────────────── */
.srwp-cart-bubble {
    position: fixed;
    bottom: 72px;
    right: 20px;
    background: #7c3aed;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(124,58,237,0.5);
    cursor: pointer;
    z-index: 9999;
    text-decoration: none;
    transform: scale(0);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.srwp-cart-bubble.show {
    transform: scale(1);
}
