/* ============================================================
   ShopReel Frontend Reels Player
   Fully self-contained with .shopreel- prefix
   ============================================================ */

:root {
  --shopreel-accent: #6366f1;
  --shopreel-radius: 12px;
  --shopreel-transition: 300ms ease;
  --shopreel-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ── Play-on-hover video in thumbnail cards ── */
.shopreel-carousel-card > video.shopreel-hover-video,
.shopreel-grid-item > video.shopreel-hover-video,
.shopreel-marquee-card > video.shopreel-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.shopreel-carousel-card:hover > video.shopreel-hover-video,
.shopreel-grid-item:hover > video.shopreel-hover-video,
.shopreel-marquee-card:hover > video.shopreel-hover-video {
  opacity: 1;
}

.shopreel-carousel-card:hover .shopreel-play-overlay,
.shopreel-grid-item:hover .shopreel-play-overlay,
.shopreel-marquee-card:hover .shopreel-play-overlay,
.shopreel-stacked-item:hover .shopreel-play-overlay {
  opacity: 0;
}

/* ── Reset for all ShopReel elements ── */
[class^="shopreel-"],
[class*=" shopreel-"] {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--shopreel-font);
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   CAROUSEL LAYOUT
   ============================================================ */

.shopreel-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 16px 0;
}

.shopreel-carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 4px;
}

.shopreel-carousel-track::-webkit-scrollbar {
  display: none;
}

/* Edge fade gradients */
.shopreel-carousel::before,
.shopreel-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--shopreel-transition);
}

.shopreel-carousel::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.95), transparent);
}

.shopreel-carousel::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
}

.shopreel-carousel.shopreel-scroll-left::before,
.shopreel-carousel.shopreel-scroll-right::after {
  opacity: 1;
}

.shopreel-carousel-card {
  flex: 0 0 200px;
  aspect-ratio: 9 / 16;
  border-radius: var(--shopreel-radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #000;
  transition: transform var(--shopreel-transition),
    box-shadow var(--shopreel-transition);
}

.shopreel-carousel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.shopreel-carousel-card > img,
.shopreel-carousel-card > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Nav arrows */
.shopreel-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--shopreel-transition);
  font-size: 18px;
  color: #333;
  line-height: 1;
}

.shopreel-carousel:hover .shopreel-carousel-arrow {
  opacity: 1;
}

.shopreel-carousel-arrow:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.shopreel-carousel-arrow--left {
  left: 8px;
}

.shopreel-carousel-arrow--right {
  right: 8px;
}

/* ============================================================
   GRID LAYOUT
   ============================================================ */

.shopreel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px 0;
}

@media (min-width: 600px) {
  .shopreel-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 960px) {
  .shopreel-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.shopreel-grid-item {
  aspect-ratio: 9 / 16;
  border-radius: var(--shopreel-radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #000;
  transition: transform var(--shopreel-transition),
    box-shadow var(--shopreel-transition);
}

.shopreel-grid-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.shopreel-grid-item > img,
.shopreel-grid-item > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shopreel-grid-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 12px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   STORIES LAYOUT
   ============================================================ */

.shopreel-stories {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 12px 4px;
}

.shopreel-stories::-webkit-scrollbar {
  display: none;
}

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

.shopreel-story-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #f77062, #fe5196, #6366f1);
  transition: transform var(--shopreel-transition);
}

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

.shopreel-story-ring--viewed {
  background: #ccc;
}

.shopreel-story-thumb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid #fff;
}

.shopreel-story-label {
  font-size: 11px;
  color: #333;
  max-width: 74px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 600px) {
  .shopreel-story-ring {
    width: 80px;
    height: 80px;
  }

  .shopreel-story-label {
    max-width: 84px;
    font-size: 12px;
  }
}

/* ============================================================
   MARQUEE LAYOUT (infinite auto-scroll)
   ============================================================ */

.shopreel-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 16px 0;
}

.shopreel-marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: shopreel-marquee-scroll var(--shopreel-marquee-duration, 20s) linear infinite;
}

.shopreel-marquee:hover .shopreel-marquee-track {
  animation-play-state: paused;
}

.shopreel-marquee-card {
  flex: 0 0 200px;
  aspect-ratio: 9 / 16;
  border-radius: var(--shopreel-radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #000;
  transition: transform var(--shopreel-transition),
    box-shadow var(--shopreel-transition);
}

.shopreel-marquee-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.shopreel-marquee-card > img,
.shopreel-marquee-card > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes shopreel-marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   STACKED LAYOUT (coverflow-style carousel)
   ============================================================ */

.shopreel-stacked {
  position: relative;
  width: 100%;
  padding: 24px 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.shopreel-stacked-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 0;
  padding-bottom: min(500px, 130vw);
  overflow: hidden;
}

@media (min-width: 600px) {
  .shopreel-stacked-stage {
    padding-bottom: min(480px, 50vw);
  }
}

.shopreel-stacked-item {
  position: absolute;
  top: 50%;
  left: 50%;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  will-change: transform, width, opacity;
}

.shopreel-stacked-item--active {
  z-index: 5;
  cursor: pointer;
}

.shopreel-stacked-item > video,
.shopreel-stacked-item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Product overlay on stacked cards */
.shopreel-stacked-product {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  z-index: 3;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.shopreel-stacked-title {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

/* Title moves up when product card is present */
.shopreel-stacked-item--has-product .shopreel-stacked-title {
  bottom: 60px;
}

/* Navigation arrows */
.shopreel-stacked-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #333;
  line-height: 1;
  transition: opacity 0.3s ease, transform 0.15s ease, background 0.2s ease;
}

.shopreel-stacked-nav:hover {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.shopreel-stacked-nav:active {
  transform: translateY(-50%) scale(0.93);
}

.shopreel-stacked-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.shopreel-stacked-nav--left {
  left: max(8px, calc(50% - min(140px, 50vw) - 56px));
}

.shopreel-stacked-nav--right {
  right: max(8px, calc(50% - min(140px, 50vw) - 56px));
}

@media (min-width: 600px) {
  .shopreel-stacked-nav--left {
    left: max(16px, calc(50% - 185px));
  }
  .shopreel-stacked-nav--right {
    right: max(16px, calc(50% - 185px));
  }
}

/* ============================================================
   POPUP LAYOUT (floating sticky button)
   ============================================================ */

.shopreel-popup {
  position: fixed;
  z-index: 99999;
}

.shopreel-popup--bottom-right { bottom: 24px; right: 24px; }
.shopreel-popup--bottom-left { bottom: 24px; left: 24px; }
.shopreel-popup--top-right { top: 24px; right: 24px; }
.shopreel-popup--top-left { top: 24px; left: 24px; }

.shopreel-popup-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 6px 16px 6px 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shopreel-popup-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.4);
}

.shopreel-popup-trigger-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.shopreel-popup-trigger-play {
  position: absolute;
  top: 50%;
  left: 30px;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
}

.shopreel-popup-label {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--shopreel-font);
}

/* Pulse animation for popup */
@keyframes shopreel-popup-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 4px 24px rgba(99, 102, 241, 0.5); }
}

.shopreel-popup-trigger {
  animation: shopreel-popup-pulse 3s ease-in-out infinite;
}

.shopreel-popup-trigger:hover {
  animation: none;
}

/* ============================================================
   SHARED: PLAY BUTTON OVERLAY (iOS-style)
   ============================================================ */

.shopreel-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.shopreel-play-icon {
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.shopreel-carousel-card:hover .shopreel-play-overlay,
.shopreel-grid-item:hover .shopreel-play-overlay,
.shopreel-marquee-card:hover .shopreel-play-overlay,
.shopreel-stacked-item:hover .shopreel-play-overlay {
  opacity: 0;
}

.shopreel-play-icon::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
}

/* ============================================================
   SPINNER
   ============================================================ */

.shopreel-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.shopreel-spinner::after {
  content: "";
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: shopreel-spin 0.7s linear infinite;
}

@keyframes shopreel-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   FULLSCREEN MODAL PLAYER
   ============================================================ */

.shopreel-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(30px) saturate(1.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--shopreel-transition),
    visibility var(--shopreel-transition);
}

.shopreel-modal--open {
  opacity: 1;
  visibility: visible;
}

.shopreel-modal--open .shopreel-modal-viewport {
  animation: shopreel-modalIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes shopreel-modalIn {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.shopreel-modal-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 420px;
  max-height: 100vh;
  overflow: hidden;
}

@media (min-width: 600px) {
  .shopreel-modal-viewport {
    height: 92vh;
    max-height: 92vh;
    border-radius: 16px;
  }
}

.shopreel-modal-slide-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform var(--shopreel-transition);
}

.shopreel-modal-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.shopreel-modal-slide > video,
.shopreel-modal-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Progress bars ── */
.shopreel-progress-bar-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: 8px 12px 0;
  z-index: 10;
}

.shopreel-progress-segment {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

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

/* ── Top controls ── */
.shopreel-modal-top {
  position: absolute;
  top: 20px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.shopreel-modal-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  flex: 1;
  text-align: center;
  padding: 0 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shopreel-modal-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  aspect-ratio: 1;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(0, 0, 0, 0.45) !important;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--shopreel-transition);
  flex-shrink: 0;
  line-height: 1;
  padding: 0 !important;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none !important;
}

.shopreel-modal-btn:hover {
  background: rgba(0, 0, 0, 0.7) !important;
}

/* ── Tap zone (Instagram stories style: detects left/center/right by click position) ── */
.shopreel-tap-zone {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 120px;
  z-index: 8;
  cursor: pointer;
}

/* ── Pause icon flash ── */
.shopreel-pause-flash {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 9;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.shopreel-pause-flash--visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.shopreel-pause-flash svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* ── CTA Product Overlay ── */
.shopreel-cta-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 16px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  z-index: 10;
}

.shopreel-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 50px;
  border: none;
  background: var(--shopreel-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--shopreel-transition),
    transform var(--shopreel-transition);
  white-space: nowrap;
  font-family: var(--shopreel-font);
}

.shopreel-cta-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ── Navigation arrows in modal (removed – using tap zones instead) ── */

/* ── Body scroll lock ── */
body.shopreel-no-scroll {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}

/* ── Accessibility: focus-visible ── */
.shopreel-modal-btn:focus-visible,
.shopreel-cta-btn:focus-visible,
.shopreel-carousel-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Slide transitions (horizontal, Instagram stories style) ── */
.shopreel-modal-slide--enter-next {
  animation: shopreel-slideInRight var(--shopreel-transition) forwards;
}

.shopreel-modal-slide--enter-prev {
  animation: shopreel-slideInLeft var(--shopreel-transition) forwards;
}

.shopreel-modal-slide--exit-next {
  animation: shopreel-slideOutLeft var(--shopreel-transition) forwards;
}

.shopreel-modal-slide--exit-prev {
  animation: shopreel-slideOutRight var(--shopreel-transition) forwards;
}

@keyframes shopreel-slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes shopreel-slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes shopreel-slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes shopreel-slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ── Product card overlay ── */
.shopreel-product-card {
  position: absolute;
  bottom: 16px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 5;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.shopreel-product-card:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.25);
}

.shopreel-product-card-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
}

.shopreel-product-card-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.shopreel-product-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.shopreel-product-card-price {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

.shopreel-product-card-price span {
  color: rgba(255, 255, 255, 0.8);
}

.shopreel-product-card-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: rgba(255,255,255,0.6);
}

/* ── Thumbnail product card overlay (carousel/grid) ── */
.shopreel-card-product {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  z-index: 3;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.shopreel-card-product-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
}

.shopreel-card-product-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.shopreel-card-product-name {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.shopreel-card-product-price {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  margin-top: 1px;
}

.shopreel-card-product-price span {
  color: rgba(255,255,255,0.85);
}

/* ── Side action buttons (like, share) ── */
.shopreel-actions {
  position: absolute;
  right: 12px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 9;
}

.shopreel-actions-left {
  position: absolute;
  left: 12px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 9;
}

.shopreel-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer;
  color: #fff;
  padding: 0 !important;
  margin: 0;
  font-family: var(--shopreel-font);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
}

.shopreel-action-btn:hover,
.shopreel-action-btn:focus,
.shopreel-action-btn:active {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none;
}

.shopreel-action-btn:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 2px;
  border-radius: 4px;
}

.shopreel-action-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.shopreel-action-btn:hover .shopreel-action-icon {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.shopreel-action-icon svg {
  width: 22px;
  height: 22px;
}

.shopreel-action-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1;
}

.shopreel-action-btn--liked .shopreel-action-icon {
  background: rgba(239, 68, 68, 0.25);
}

.shopreel-action-btn--liked .shopreel-action-icon svg {
  fill: #ef4444;
  color: #ef4444;
}

@keyframes shopreel-heartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.shopreel-action-btn--liked .shopreel-action-icon {
  animation: shopreel-heartPop 0.4s ease;
}

/* ── Add to Cart button on product card ── */
.shopreel-product-card-atc {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  font-family: var(--shopreel-font);
  white-space: nowrap;
}

.shopreel-product-card-atc:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

.shopreel-product-card-atc--added {
  background: #22c55e;
  color: #fff;
}

/* ── Star ratings ── */
.shopreel-product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.shopreel-stars {
  display: flex;
  gap: 1px;
}

.shopreel-stars svg {
  width: 12px;
  height: 12px;
}

.shopreel-star-filled {
  color: #fbbf24;
  fill: #fbbf24;
}

.shopreel-star-empty {
  color: rgba(255, 255, 255, 0.3);
  fill: rgba(255, 255, 255, 0.3);
}

.shopreel-rating-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Thumbnail ratings ── */
.shopreel-card-product-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
}

.shopreel-card-product-rating .shopreel-stars svg {
  width: 10px;
  height: 10px;
}

.shopreel-card-product-rating .shopreel-rating-count {
  font-size: 10px;
}

/* ── View counter badge ── */
.shopreel-view-badge {
  position: absolute;
  top: 52px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  z-index: 5;
  pointer-events: none;
}

.shopreel-view-badge svg {
  width: 14px;
  height: 14px;
}

/* ============================================================
   ONBOARDING OVERLAY (first-time tutorial)
   ============================================================ */

.shopreel-onboarding {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease;
  cursor: pointer;
  border-radius: inherit;
}

.shopreel-onboarding--hidden {
  opacity: 0;
  pointer-events: none;
}

.shopreel-onboarding-zones {
  position: absolute;
  inset: 0;
  display: flex;
}

.shopreel-onboarding-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Tap circle with ripple */
.shopreel-onboarding-tap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.shopreel-onboarding-tap::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  animation: shopreel-onboard-ripple 1.5s ease-out infinite;
}

.shopreel-onboarding-tap svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  opacity: 0.9;
}

/* Finger tap animation */
.shopreel-onboarding-finger {
  position: absolute;
  bottom: -8px;
  right: -4px;
  width: 28px;
  height: 28px;
  animation: shopreel-onboard-tap 1.5s ease-in-out infinite;
}

.shopreel-onboarding-finger svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.shopreel-onboarding-label {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  line-height: 1.3;
}

.shopreel-onboarding-hint {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* Zone-specific delays for staggered animation */
.shopreel-onboarding-zone:nth-child(1) .shopreel-onboarding-tap {
  animation: shopreel-onboard-pop 0.5s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.shopreel-onboarding-zone:nth-child(2) .shopreel-onboarding-tap {
  animation: shopreel-onboard-pop 0.5s 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.shopreel-onboarding-zone:nth-child(3) .shopreel-onboarding-tap {
  animation: shopreel-onboard-pop 0.5s 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.shopreel-onboarding-zone:nth-child(1) .shopreel-onboarding-label {
  animation: shopreel-onboard-fadeIn 0.4s 0.5s ease both;
}

.shopreel-onboarding-zone:nth-child(2) .shopreel-onboarding-label {
  animation: shopreel-onboard-fadeIn 0.4s 0.8s ease both;
}

.shopreel-onboarding-zone:nth-child(3) .shopreel-onboarding-label {
  animation: shopreel-onboard-fadeIn 0.4s 1.1s ease both;
}

@keyframes shopreel-onboard-pop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shopreel-onboard-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shopreel-onboard-ripple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes shopreel-onboard-tap {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.9;
  }
  50% {
    transform: translate(-2px, -4px) scale(0.9);
    opacity: 0.6;
  }
}
