/* ── Reels Product Slider — Frontend CSS ── */

/* ── WRAPPER ── */
.rps-slider-wrap {
    width: 100%;
    padding: 24px 0;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.rps-slider-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── TRACK ── */
.rps-track-wrap {
    overflow: hidden;
    flex: 1;
    border-radius: 0;
}

.rps-track {
    display: flex;
    gap: 16px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ── SLIDE ── */
.rps-slide {
    flex-shrink: 0;
    width: calc(25% - 12px); /* 4 columns default */
}

/* ── VIDEO CARD ── */
.rps-video-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.06);
}
.rps-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

/* ── VIDEO AREA ── */
.rps-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #111;
    overflow: hidden;
    cursor: pointer;
}

.rps-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.rps-video-wrap:hover .rps-video-thumb { transform: scale(1.03); }

.rps-no-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

/* PLAY BUTTON */
.rps-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.1);
    transition: background 0.2s;
}
.rps-play-overlay:hover { background: rgba(0,0,0,0.25); }
.rps-play-btn {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    padding-left: 4px;
}
.rps-play-overlay:hover .rps-play-btn {
    transform: scale(1.1);
    background: #fff;
}
.rps-play-overlay.playing { display: none; }

/* PLATFORM TAG */
.rps-platform-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 18px;
    background: rgba(0,0,0,0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

/* VIEWS */
.rps-views-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

/* LIKE / SHARE */
.rps-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rps-action-btn {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a1a2e;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.rps-action-btn:hover { background: #fff; transform: scale(1.1); color: #e94560; }
.rps-like-btn.liked svg { fill: #e94560; stroke: #e94560; }

/* EMBED IFRAME */
.rps-embed-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 5;
}

/* ── PRODUCT CARD ── */
.rps-product-card {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rps-product-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    flex: 1;
}

.rps-product-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #f3f4f6;
}
.rps-product-img-placeholder {
    width: 44px;
    height: 44px;
    background: #f9fafb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    border: 1px solid #f3f4f6;
}

.rps-product-info { flex: 1; min-width: 0; }

.rps-product-title {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rps-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}
.rps-price {
    font-size: 14px;
    font-weight: 800;
    color: #1a1a2e;
}
.rps-original-price {
    font-size: 11px;
    color: #9ca3af;
    text-decoration: line-through;
}
.rps-discount {
    font-size: 11px;
    font-weight: 700;
    color: #16a34a;
}

/* BUY BUTTON */
.rps-buy-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
}
.rps-buy-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.rps-out-of-stock { opacity: 0.7; cursor: not-allowed !important; }
.rps-out-of-stock:hover { opacity: 0.7; transform: none; }

/* ── NAV ARROWS ── */
.rps-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    transition: all 0.2s;
    z-index: 5;
}
.rps-nav:hover { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.rps-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.rps-nav-prev { margin-right: 12px; }
.rps-nav-next { margin-left: 12px; }

/* ── DOTS ── */
.rps-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.rps-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}
.rps-dot.active {
    background: #1a1a2e;
    width: 24px;
    border-radius: 4px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .rps-slide { width: calc(33.33% - 11px); }
}
@media (max-width: 768px) {
    .rps-slide { width: calc(50% - 8px); }
    .rps-nav { width: 34px; height: 34px; }
    .rps-slider-inner { padding: 0 10px; }
}
@media (max-width: 480px) {
    .rps-slide { width: calc(100% - 0px); }
    .rps-nav-prev { margin-right: 8px; }
    .rps-nav-next { margin-left: 8px; }
}
