/**
* 2007-2025 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2025 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/

:root {
    --swiper-navigation-size: 24px;
}

.product-cover.slider-for {
    padding-left: 32px;
    padding-right: 32px;
}

.product-cover:before {
    display: none;
}

.swiper-thumbs {
    padding: 2px;
}

.swiper-thumbs .swiper-slide .swiper-slide-inner {
    border: 1px solid #AAA;
    background-color: #FFF;
}

.swiper-thumbs .swiper-slide.swiper-slide-thumb-active .swiper-slide-inner {
    box-shadow: 0 0 0 1px #AAA;
}

.swiper-thumbs:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    gap: 10px;
}

/* Fiecare slide ocupă 1/7 din lățime, minus gap */
.swiper-thumbs:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc((100% - (6 * 10px)) / 7); /* 7 thumbs, 6 spații de 10px */
    max-width: calc((100% - (6 * 10px)) / 7);
}

.swiper-main {
    border: #aaa 1px solid;
}

.pswp-thumbs img {
    background: #fff;
}

.swiper-main {
    margin-bottom: 25px;
}

.images-container img, .images-quickviews img {
    display: block !important; 
}

.swiper-button-next, .swiper-button-prev {
    color: #888;
}

.swiper-main .swiper-button-next, .swiper-main .swiper-button-prev {
    height: 50px;
    width: 50px;
}

.pswp-thumbs-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
  }
  
  .pswp-thumbs {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    max-width: 80vw;
    overflow-x: auto;
  }
  
  .pswp-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    border: 2px solid transparent;
  }
  
  .pswp-thumb:hover {
    opacity: 0.8;
  }
  
  .pswp-thumb.active {
    opacity: 1;
    border-color: white;
  }

/* Drift Zoom Styles */
.drift-zoom-pane-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 568px;
  z-index: 1000;
  border: 1px solid #ddd;
  background: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drift-zoom-pane-container.drift-zoom-pane-loader,
.drift-zoom-pane-container.drift-zoom-pane {
  opacity: 1;
  visibility: visible;
}

/* Afișează containerul la hover pe imaginea principală */
.swiper-main .swiper-slide-active img:hover + .drift-zoom-pane-container,
.swiper-main .swiper-slide-active:hover .drift-zoom-pane-container {
  opacity: 1;
  visibility: visible;
}

.pswp.pswp--open .pswp__img {
    background-color: #fff;
}

.drift-zoom-pane {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-repeat: no-repeat;
}

.drift-bounding-box {
  border: 2px solid rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}

.thumbnail-video-slide, .video-slide {
  aspect-ratio: 1 / 1;
}

.video-slide .swiper-slide-main-inner, .thumbnail-video-slide .swiper-slide-inner {
  height: 100%;
}

.thumbnail-video-slide .swiper-slide-inner {
  overflow: hidden;
}

.thumbnail-video-slide .swiper-slide-inner img {
    width: 195%;
    max-width: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

.thumbnail-video-slide .swiper-slide-inner {
  position: relative; 
}

.swiper-main:not(.swiper-initialized) .video-slide {
  display: none;
}

.thumbnail-video-slide svg {
  position: absolute;
  top: 0;
  width: 20px;
  left: 0;
  right: 0;
  margin: auto;
}

iframe.swiper-slide-main-inner-video {
  width: 100%;
  height: 100%;
}

@media (max-width: 992px) {
  .drift-zoom-pane-container {
    display: none !important;
  }
}

/* PhotoSwipe Video Support */
.pswp-video-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #000;
}

.pswp-video-container iframe {
  width: 95%;
  height: 95%;
  max-width: 1400px;
  max-height: 1000px;
  border: none;
}

/* Dimensiuni responsive pentru video */
@media (min-width: 768px) {
  .pswp-video-container iframe {
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 900px;
  }
}

@media (min-width: 1200px) {
  .pswp-video-container iframe {
    width: 85%;
    height: 85%;
    max-width: 1400px;
    max-height: 1050px;
  }
}

@media (min-width: 1600px) {
  .pswp-video-container iframe {
    width: 80%;
    height: 80%;
    max-width: 1600px;
    max-height: 1200px;
  }
}

@media (min-width: 1920px) {
  .pswp-video-container iframe {
    width: 90%;
    height: 80%;
    max-width: 1800px;
    max-height: 1350px;
  }
}

/* PhotoSwipe Thumbnail Containers */
.pswp-thumb-container {
  position: relative;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
  border: 2px solid transparent;
}

.pswp-thumb-container:hover {
  opacity: 0.8;
}

.pswp-thumb-container.active {
  opacity: 1;
  border-color: white;
}

.pswp-thumb-container .pswp-thumb {
  width: 60px;
  height: 40px;
  object-fit: cover;
  display: block;
}

/* Video Thumbnail Specific Styles */
.pswp-thumb-video {
  position: relative;
  width: 60px;
  height: 40px;
  overflow: hidden;
  border-radius: 3px;
}

.pswp-thumb-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pswp-thumb-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 14px;
  pointer-events: none;
}

.pswp-thumb-play-icon svg {
  width: 100%;
  height: 100%;
}

/* Responsive adjustments for PhotoSwipe thumbnails */
@media (max-width: 768px) {
  .pswp-thumbs {
    max-width: 95vw;
    gap: 5px;
    padding: 8px;
  }
  
  .pswp-thumb-container .pswp-thumb,
  .pswp-thumb-video {
    width: 50px;
    height: 33px;
  }
  
  .pswp-thumb-play-icon {
    width: 16px;
    height: 11px;
  }
}
