/* ============================================================
   PRODUCT REELS — Instagram / TikTok style
   ============================================================ */

/* ── Bubbles row ── */
.reels-bubbles-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.reels-bubbles-row::-webkit-scrollbar { display: none; }

.reel-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.reel-bubble-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #e94560 0%, #1a1a2e 100%);
  transition: transform 0.2s ease;
}

.reel-bubble:hover .reel-bubble-ring {
  transform: scale(1.08);
}

.reel-bubble-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2.5px solid #fff;
  overflow: hidden;
  background: #f0ede8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel-bubble-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-bubble-inner-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: linear-gradient(135deg, #f0ede8, #e0d8cf);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.reel-bubble-label {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1a1a2e;
  text-align: center;
  max-width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Fullscreen viewer overlay ── */
#reel-viewer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  flex-direction: column;
}

#reel-viewer-overlay.open {
  display: flex;
}

/* ── Top navigation bar ── */
.reel-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 48px 20px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, transparent 100%);
}

.reel-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reel-topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #f0ede8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}

.reel-topbar-info {
  display: flex;
  flex-direction: column;
}

.reel-topbar-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.reel-topbar-sub {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
}

.reel-close-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.reel-close-btn:hover { opacity: 1; }

/* ── Progress bars ── */
.reel-progress-bars {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.reel-progress-bar {
  height: 2.5px;
  flex: 1;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
  overflow: hidden;
}

.reel-progress-bar-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 0%;
  transition: width linear;
}

.reel-progress-bar.done .reel-progress-bar-fill { width: 100%; }
.reel-progress-bar.active .reel-progress-bar-fill { width: 0%; }

/* ── Video container ── */
.reel-video-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#reel-main-video {
  max-width: 100%;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* On large screens limit width for vertical videos */
@media (min-width: 768px) {
  #reel-main-video {
    max-width: 420px;
    height: 100vh;
    object-fit: cover;
  }
}

/* ── Side navigation arrows ── */
.reel-nav-prev,
.reel-nav-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}
.reel-nav-prev:hover, .reel-nav-next:hover { background: rgba(255,255,255,0.3); }
.reel-nav-prev { left: 12px; }
.reel-nav-next { right: 12px; }

/* ── Tap zones (mobile) ── */
.reel-tap-prev,
.reel-tap-next {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  z-index: 5;
}
.reel-tap-prev { left: 0; }
.reel-tap-next { right: 0; }

/* ── Bottom overlay (title / mute) ── */
.reel-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.reel-bottom-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.reel-mute-btn {
  background: rgba(0,0,0,0.4);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 12px;
}
