/* ========== Custom Styles ========== 
Стартира се като се вкара в header.twig
catalog/view/theme/your_theme_name/template/common/header.twig
след
<link href="catalog/view/theme/{{ theme_directory }}/stylesheet/stylesheet.css" rel="stylesheet">
-----
<link href="catalog/view/theme/{{ theme_directory }}/stylesheet/custom.css" rel="stylesheet">


*/
/* From MY-----------------начало промени popup ляво */

.custom-thumbnail-gallery {
/* Като ширината на стила от ширината на целия ред 16.6666666667*/    
    display: flex;
    flex-direction: column;
    width: 100%; 
}

.custom-main-image {
    
    width: 50%; /* Основното изображение заема от стила 66.6666666667% */
}

.custom-product-info {
    width: 33.3333333333%; /* Информацията за продукта заема останалите % */
}
.thumbnail-gallery {
    display: flex;
    flex-direction: column;
/*    gap: 10px; /* Разстояние между миниатюрите */
}

.thumbnail-gallery .thumbnail-image img {
    width: 100%;
    cursor: pointer;
}
.main-image {
    max-width: 100%;
}

/* край промени popup ляво */
.col-sm-22 {
/* from my----22---float: left;  16.6666666667-----------*/      
    flex: 0 0 auto;
    float: left;  
    width: 16.6666666667%;
    
  } 
.col-sm-44 {
/* from my----44---float: left;  -----------*/      
    flex: 0 0 auto; 
    float: left;   
    width: 33.3333333333%;
  }
.col-sm-66 {
/* from my----66---float: left;  --66.6666666667---------*/      
    flex: 0 0 auto; 
    float: left;      
    width: 75%; /*  */
  }
  
.thumbnail-swiper {
  height: 400px;
  width: 100%;
}

.thumbnail-swiper .swiper-slide {
  text-align: center;
}

.thumbnail-swiper img {
  cursor: pointer;
  border: 1px solid #ddd;
  transition: transform 0.2s;
}

.thumbnail-swiper img:hover {
  transform: scale(1.05);
}

/*--------------------------*/

.custom-thumbnail-slider {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px; /* височина на колоната с миниатюри */
  overflow-y: auto;   /* вертикално скролиране, ако има повече изображения */
}

.custom-thumbnail-slider img {
  width: 100%;
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.slide {
  flex-shrink: 0;
}
/* --------- za cookis */
@media (max-width: 767px) {
    #cookie-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        padding: 15px;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
    }
    #cookie-banner .btn {
        display: block;
        width: 100%;
        margin-top: 10px;
    }
}

/* ----------------------*/
.custom-thumbnail-slider {
  display: flex;
  flex-direction: column;
}

.custom-thumbnail-slider {
  max-height: 400px;
  overflow-y: auto;
}

.custom-thumbnail-slider .slide {
  margin-bottom: 10px;
}

.custom-thumbnail-slider .slide:last-child {
  margin-bottom: 0;
}

/* Контейнер на миниатюрите */
/*
.custom-thumbnail-slider {
  display: flex;
  flex-direction: column;
  max-height: 400px; /* задава височина на видимата част 
  overflow: hidden;   /* скрива излишното, когато се ползват стрелки 
  position: relative;
}

/* Отделна миниатюра */

.custom-thumbnail-slider .slide {
  margin-bottom: 10px; /* разстояние между миниатюрите */
}

.custom-thumbnail-slider .slide:last-child {
  margin-bottom: 0;
}

/* Слайд стрелки */
.custom-thumbnail-slider .arrow-up,
.custom-thumbnail-slider .arrow-down {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background-color: rgba(0,0,0,0.5);
  color: white;
  text-align: center;
  line-height: 30px;
  cursor: pointer;
  z-index: 10;
  font-weight: bold;
  border-radius: 50%;
}

.custom-thumbnail-slider .arrow-up {
  top: 5px;
}

.custom-thumbnail-slider .arrow-down {
  bottom: 5px;
}

/* Скролиране при клик на стрелки */
.custom-thumbnail-slider.scrolling {
  overflow-y: auto;
}

/*--------------------------*/
/* Основно изображение */
/*
.main-image-wrapper {
    width: 100%;
    max-width: 500px; 
    overflow: hidden;
    margin: 0 auto;
    
    position: relative;
    display: inline-block;
}
*/
#main-product-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    cursor: crosshair;
    transition: opacity 0.2s ease;
}
.thumbnail-gallery img {
  cursor: pointer;
  border: 1px solid #ddd;
  transition: transform 0.2s ease;
}

.thumbnail-gallery img:hover {
  transform: scale(1.1);
  border-color: #aaa;
}
/*-------za lupa-------------------*/

.zoom-container {
    position: relative;
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    overflow: hidden;
    line-height: 0;
}
.zoom-container > a {
    display: block;
    line-height: 0;
}
/* Слой с увеличението — точно върху миниатюрата */
.zoom-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-color: #fff;
    display: none;             /* показва се само при hover */
    pointer-events: none;      /* не блокира mouse events */
    z-index: 10;
}

/* Миниатюри */
.custom-thumbnail-gallery {
    display: flex;
    flex-direction: column; /* вертикално подредени */
    gap: 10px; /* разстояние между миниатюрите */
}

.custom-thumbnail-gallery img {
    cursor: pointer;
    width: 60px;  /* размер на миниатюрата */
    height: 60px;
    object-fit: cover;
}

/* Mobile: миниатюри над основното изображение, horizontal scroll */
@media (max-width: 768px) {
    .custom-thumbnail-gallery {
        flex-direction: row;
        overflow-x: auto;
        width: 100%;
    }
    .custom-thumbnail-gallery img {
        width: 80px;
        height: 80px;
        margin-right: 10px;
    }
}
/*------------------------------*/
.custom-thumbnail-gallery img:hover {
    border: 2px solid #999;
}
.slick-prev, .slick-next {
    background: #f8f8f8;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    border-radius: 50%;
}
.slick-prev:hover, .slick-next:hover {
    background: #ddd;
}

/* Breadcrumb fix */
.breadcrumb {
  flex-wrap: wrap;
  white-space: normal;
  font-size: 13px;
}

.breadcrumb-item a {
  color: #333;
}


/* Универсално центриране на банери/слайдъри */
.banner, .slideshow, .swiper-container, .owl-carousel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.banner img, .slideshow img, .swiper-slide img, .owl-carousel img {
    width: auto !important;       /* Запазваме пропорциите */
    max-width: 100% !important;   /* Не излиза извън контейнера */
    height: auto !important;
    display: block;
    margin: 0 auto;
    object-fit: contain;           /* Не се изрязва изображението */
}

/* За мобилни устройства */
@media (max-width: 767px) {
    .banner, .slideshow, .swiper-container, .owl-carousel {
        width: 100% !important;
        margin: 0 auto !important;
    }

    .banner img, .slideshow img, .swiper-slide img, .owl-carousel img {
        width: 100% !important;
        height: auto !important;
        margin: 0 auto;
    }
}
/* за по 4 продукта в ред*/
/* === Фиксиран layout за продуктите === */
 /* Контейнер за продуктите */


/* за по 4 продукта в ред end*/


 

/* Hover zoom effect */


