/* ── ShopReels WP — Frontend Styles ───────────────────────────────────────── */

/* ── Carousel container ────────────────────────────────────────────────────── */
.srwp-carousel {
    display: grid;
    grid-template-columns: repeat(var(--srwp-columns, 4), 1fr);
    gap: var(--srwp-gap, 12px);
    width: 100%;
    box-sizing: border-box;
}

/* ── Individual reel card ──────────────────────────────────────────────────── */
.srwp-reel-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a2e;
    cursor: pointer;
    aspect-ratio: 9 / 16;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.srwp-reel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ── Media area ────────────────────────────────────────────────────────────── */
.srwp-reel-media {
    position: relative;
    width: 100%;
    height: 100%;
}

.srwp-video,
.srwp-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Placeholder when no video ─────────────────────────────────────────────── */
.srwp-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b69 100%);
}

.srwp-placeholder .dashicons {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
}

/* ── Overlay (title + CTA) ─────────────────────────────────────────────────── */
.srwp-reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.srwp-reel-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.srwp-cta-btn {
    display: inline-block;
    background: #7c3aed;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    align-self: flex-start;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.srwp-cta-btn:hover {
    background: #6d28d9;
    color: #fff;
    text-decoration: none;
}

/* ── Mute button ───────────────────────────────────────────────────────────── */
.srwp-mute-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    transition: background 0.15s;
    z-index: 10;
}

.srwp-mute-btn:hover {
    background: rgba(0,0,0,0.75);
}

/* ── Play/pause indicator ──────────────────────────────────────────────────── */
.srwp-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    pointer-events: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    opacity: 0;
    z-index: 10;
}

.srwp-play-indicator.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ── "No reels" message ────────────────────────────────────────────────────── */
.srwp-no-reels {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* ── Responsive breakpoints ────────────────────────────────────────────────── */
@media ( max-width: 768px ) {
    .srwp-carousel {
        grid-template-columns: repeat(var(--srwp-mobile-columns, 2), 1fr);
    }
}

@media ( max-width: 480px ) {
    .srwp-carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .srwp-reel-title {
        font-size: 11px;
    }
}
