/* =================================================
   ACCESSORY VIDEO CAROUSEL – isolated
================================================= */

/* Carousel wrapper */
.accessory-video-carousel{
  position: relative;
  overflow: visible; /* allow arrows outside */
}

/* Video area */
.accessory-video-carousel .carousel-inner{
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;

  max-width: 1200px;   /* NEW */
  margin-left: auto;   /* NEW */
  margin-right: auto;  /* NEW */

  border-radius: 16px;
  overflow: hidden;
  background: #000;

  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;

  -webkit-mask-image: -webkit-radial-gradient(white, black);
  transform: translateZ(0);
}


.accessory-video-carousel .carousel-item{
  height: 100%;
}

.accv-box{
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

/* Poster always visible */
.accv-poster{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.accv-poster--empty{
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

/* Video fills area but is hidden until activated */
.accv-video{
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: none; /* shown after activation */
  background: #000;
}

/* Remove 1px black hairline caused by sub-pixel rounding */
.accv-video{
  inset: -1px; /* was 0 */
  width: calc(100% + 2px) !important;
  height: calc(100% + 2px) !important;
}

/* Overlay catches swipe + tap */
.accv-overlay{
  position: absolute;
  inset: 0;
  z-index: 50;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}

/* Play icon */
.accv-overlay::after{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.accv-overlay::before{
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 18px solid #111;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  left: 50%;
  top: 50%;
  transform: translate(-35%,-50%);
  z-index: 60;
}

/* Active state */
.accv-box.is-active .accv-video{ display: block; }
.accv-box.is-active .accv-poster{ display: none; }
.accv-box.is-active .accv-overlay::before,
.accv-box.is-active .accv-overlay::after{ display: none; }

/* Title on overlay – centered at bottom */
.accv-box{
  position: relative;
}

.accv-title{
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  pointer-events: none; /* don't block clicks/swipes */
  z-index: 5;
}

/* =================================================
   Swipe zones
================================================= */

.accv-swipezones{
  position: absolute;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

.accv-swipezone{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  touch-action: pan-y;
  cursor: grab;
}

.accv-swipezone--left{ left: 0; }
.accv-swipezone--right{ right: 0; }

/* =================================================
   Fullscreen button
================================================= */

.accv-fs-btn{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 70;

  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;

  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

@media (hover:hover){
  .accv-fs-btn:hover{
    transform: scale(1.06);
    box-shadow: 0 14px 36px rgba(0,0,0,.3);
  }
}

.accv-fs-btn::before{
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: url("../assets/icons/full-screen-icon.svg") no-repeat center / contain;
}

/* =================================================
   VIDEO slider – arrows (FIX: vertically centered to slider)
================================================= */

/* Controls must be taken out of normal flow */
.accessory-video-carousel .carousel-control-prev,
.accessory-video-carousel .carousel-control-next{
  position: absolute;       /* IMPORTANT: prevents being below the slider */
  top: 50%;                 /* vertical anchor */
  transform: translateY(-50%);
  z-index: 80;

  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  border: 0;
  background: transparent;
}

/* Default: keep inside edges (fallback) */
.accessory-video-carousel .carousel-control-prev{ left: 12px; }
.accessory-video-carousel .carousel-control-next{ right: 12px; }

/* Icon button */
.accessory-video-carousel .carousel-control-prev-icon,
.accessory-video-carousel .carousel-control-next-icon{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #fff;

  background-size: 22px 22px;
  background-position: center;
  background-repeat: no-repeat;

  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.accessory-video-carousel .carousel-control-prev-icon:hover,
.accessory-video-carousel .carousel-control-next-icon:hover{
  box-shadow: 0 10px 28px rgba(0,0,0,0.20);
  transform: scale(1.06);
}

/* LEFT – line arrow */
.accessory-video-carousel .carousel-control-prev-icon{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}

/* RIGHT – line arrow */
.accessory-video-carousel .carousel-control-next-icon{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}

/* Desktop: push arrows outside the video area (but still centered to it) */
@media (min-width: 768px){
  .accessory-video-carousel .carousel-control-prev{ left: -58px; }
  .accessory-video-carousel .carousel-control-next{ right: -58px; }
}

/* Mobile: hide arrows */
@media (max-width: 767.98px){
  .accessory-video-carousel, .st-img-gallery {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .accessory-video-carousel .carousel-control-prev,
  .accessory-video-carousel .carousel-control-next{
    display: none !important;
  }
}

/* =================================================
   Mobile progress bar (your markup: .accessory-progress)
================================================= */

.accessory-progress{
  width: 100%;
}

.accessory-progress-track{
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  overflow: hidden;
}

.accessory-progress-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(0,0,0,.85);
  transition: width .25s ease;
}

@media (max-width: 767.98px){
  .accessory-progress{ margin-top: 14px; }
    .accessory-video-carousel{
    margin-bottom:100px;
  }
}

/* =================================================
   OVERRIDE – VIDEO carousel arrows BELOW slider
================================================= */

@media (min-width: 768px){

  /* Put arrows into normal document flow */
  .accessory-video-carousel .carousel-control-prev,
  .accessory-video-carousel .carousel-control-next{
    position: static !important;
    inset: auto !important;
    transform: none !important;

    width: auto !important;
    height: auto !important;

    margin: 24px 8px 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: transparent !important;
  }

  /* Center arrows under slider */
  .accessory-video-carousel{
    text-align: center;
    margin-bottom:160px;
  }

  /* Optional: keep icons size consistent */
  .accessory-video-carousel .carousel-control-prev-icon,
  .accessory-video-carousel .carousel-control-next-icon{
    width: 48px;
    height: 48px;
  }
}

/* Mobile: arrows still hidden */
@media (max-width: 767.98px){
  .accessory-video-carousel .carousel-control-prev,
  .accessory-video-carousel .carousel-control-next{
    display: none !important;
  }
}