/* ========================================
   Video Reel Slider - 全屏垂直视频流
   ======================================== */

video-reel-slider {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  overflow: hidden;
  touch-action: none;
}

/* 外层 section wrapper 在打开时也需要 fixed */
.reel-video-open #shopline-section-sections--header-group__video-reel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1000;
}

/* 背景锁定 */
body.reel-video-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}

/* Header 联动 */
.reel-video-open #shopline-section-sections--header-group__announcement-bar{
  display: none;
}
.reel-video-open #shopline-section-sections--header-group__header {
  z-index: 1001;
  position: sticky;
  top: 0;
}
.reel-video-open #shopline-section-sections--header-group__header .mobile-slider-navbar{
  display: none;
}

.reel-video-open #shopline-section-sections--header-group__header .header-section {
  background: transparent;
}

/* Header Reels 按钮 */
.header__reels {
  display: none;
}

@media (max-width: 959px) {
  .header__reels {
    font-family: var(--sort-body-font);
    display: inline-flex;
    align-items: center;
    position: relative;
    background: transparent;
    border: 0;
    outline: none;
    white-space: nowrap;
    font-weight: 700;
    margin-left: 24px;
    font-size: 13px;
    cursor: pointer;
    order: 30;
    padding: 0;
  }

  body:not([data-page-type="index"]) .header__reels {
    display: none;
  }

  .header__reels::before {
    content: "";
    position: absolute;
    background-color: #000;
    width: 1px;
    height: 8px;
    top: 50%;
    left: -16px;
    transform: translateY(-50%);
  }

  .header__reels-text {
    position: relative;
    z-index: 10001;
  }

  .header__logo--enable-reelup {
    position: relative;
    --active-left: 15px;
  }

  .header__logo--enable-reelup::after {
    content: "";
    position: absolute;
    background-color: #000;
    width: 20px;
    height: 3px;
    bottom: -10px;
    left: 0;
    transform: translateX(var(--active-left, 0));
    border-radius: 5px;
    transition: all 0.15s ease-in-out;
  }
}

/* Modal 容器 */
.video-reel__modal {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
}

.video-reel__container {
  width: 100%;
  height: 100%;
}

.video-reel__close-btn {
  position: fixed;
  top: 10px;
  right: 20px;
  z-index: 99;
}

.video-reel__wrapper {
  width: 100%;
  height: 100%;
}

.video-reel__wrapper > .swiper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.video-reel__wrapper .swiper-wrapper {
  height: 100%;
  flex-direction: column;
}

.video-reel__wrapper .swiper-slide {
  height: 100%;
  flex-shrink: 0;
}

/* Slide */
.video-reel__slide {
  width: 100%;
  height: 100%;
}

.video-reel__slide-inner {
  position: relative;
  background-color: #000;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.video-reel__video-section {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 8;
}

.video-reel__video-content {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 视频播放器容器 */
.video-reel__video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 99;
  display: flex;
}

.video-reel__video-wrapper::after {
  content: "";
  display: block;
  width: 100%;
  height: 60px;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.46), transparent);
  z-index: 100;
  pointer-events: none;
}

.video-reel__poster {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

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

.video-reel__poster--placeholder {
  background: #000;
}

.video-reel__video-slot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: transparent;
}

/* 播放图标 */
.video-reel__play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 98;
  border-radius: 50%;
  pointer-events: none;
  display: flex;
}

.video-reel__play-btn {
  display: none;
}

.video-reel__play-btn.is-visible {
  display: flex;
}

.video-reel__play-btn svg {
  opacity: 0.65;
}

/* 视频元素 - 由 JS 通过 visibility/opacity 控制显隐 */

/* 底部 Stack */
.video-reel__bottom-stack {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 100;
  bottom: 3%;
  pointer-events: none;
}

/* 操作按钮区域 */
.video-reel__action-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 10px;
  pointer-events: none;
}

.video-reel__mute-btn {
  pointer-events: all;
  cursor: pointer;
}

.video-reel__action-btn {
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  outline: none;
  background: hsla(0, 0%, 100%, 0.06);
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
}

.video-reel__action-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  stroke: none;
}

/* 静音图标切换 */
.video-reel__icon-muted,
.video-reel__icon-unmuted {
  display: none;
}

.video-reel__mute-btn.is-muted .video-reel__icon-muted {
  display: block;
}

.video-reel__mute-btn:not(.is-muted) .video-reel__icon-unmuted {
  display: block;
}

/* 商品 Slider 区域 */
.video-reel__product-slider {
  padding: 0 10px 10px;
  pointer-events: all;
}

.video-reel__product-group {
  width: 100%;
}

.video-reel__product-group-inner {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 5px;
}

.video-reel__product-group-inner::-webkit-scrollbar {
  display: none;
}

/* 商品卡片 */
.video-reel__product-card {
  flex-shrink: 0;
  width: 80%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin: 0 auto;
}

.video-reel__product-link {
  display: flex;
  align-items: center;
  padding: 8px;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.video-reel__product-image {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.video-reel__product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-reel__product-info {
  flex: 1;
  min-width: 0;
}

.video-reel__product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.video-reel__product-price {
  font-size: 13px;
  font-weight: 700;
}

.video-reel__product-card .block-product-card__quick-add{
  background-color: #000;
}
.video-reel__product-card .block-product-card__quick-add svg{
  color: #fff;
}

/* 进度条 */
.video-reel__progress-wrapper {
  width: 100%;
  background-color: #4d4d4d;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 101;
}

.video-reel__progress-bar {
  height: 3px;
  background-color: #fff;
  border-radius: 0 10px 10px 0;
  width: 0%;
  transition: height 130ms ease-in-out;
}

.video-reel__progress-wrapper:hover .video-reel__progress-bar {
  height: 6px;
}

.reel-video-open #shopline-section-sections--header-group__header header.header-section{
  border-bottom: none;
}

.reel-video-open #shopline-section-sections--header-group__header .header__container{
  background-color: transparent;
}

.reel-video-open .header__container-top-wrap{
  color: #fff;
}

.reel-video-open .header__logo--enable-reelup::after,.reel-video-open .header__reels::before{
  background-color: #fff;
}