/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * 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.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */
.cphomeslider-container {
  margin-bottom: 50px;
  position: relative;
  float: left;
  width: 100%;
}

.cphomeslider {
  position: relative;
  list-style: none;
  overflow: hidden;
  width: 100%;
  padding: 0;
  margin: 0;
}

.cphomeslider li {
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
}

.cphomeslider img {
  display: block;
  position: relative;
  z-index: 1;
  height: auto;
  width: 100%;
  border: 0;
}

.cphomeslider .caption {
  display: block;
  position: absolute;
  z-index: 2;
  font-size: 1em;
  text-shadow: none;
  color: #fff;
  background: #000;
  background: rgba(0,0,0, .6);
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 20px;
  margin: 0;
  max-width: none;
}

.cphomeslider_nav {
  position: absolute;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  top: 52%;
  left: 0;
  opacity: 0.7;
  z-index: 3;
  text-indent: -9999px;
  overflow: hidden;
  text-decoration: none;
  height: 61px;
  width: 38px;
  background: transparent url("../cphomeslider.gif") no-repeat left top;
  margin-top: -45px;
}

.cphomeslider_nav:active {
  opacity: 1.0;
}

.cphomeslider_nav.next {
  left: auto;
  background-position: right top;
  right: 0;
}


/* PS9 / PRS02043 homepage slider compact fix
   Keeps uploaded slides visually close to the CoderPlace demo: full width, fixed compact aspect, cropped instead of stretching page height. */
#cp-imageslider-carousel.cp-home-slider {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 35px;
  overflow: hidden;
  background: #f5f5f5;
}

#cp-imageslider-carousel.cp-home-slider,
#cp-imageslider-carousel.cp-home-slider .carousel-inner,
#cp-imageslider-carousel.cp-home-slider .carousel-item,
#cp-imageslider-carousel.cp-home-slider .carousel-item figure {
  height: clamp(320px, 28vw, 500px);
  min-height: 0;
}

#cp-imageslider-carousel.cp-home-slider .carousel-inner {
  display: block;
}

#cp-imageslider-carousel.cp-home-slider .carousel-item figure {
  margin: 0;
  position: relative;
  width: 100%;
}

#cp-imageslider-carousel.cp-home-slider .carousel-item a {
  display: block;
  width: 100%;
  height: 100%;
}

#cp-imageslider-carousel.cp-home-slider .carousel-item img,
#cp-imageslider-carousel.cp-home-slider .cp-imageslider__image {
  display: block;
  width: 100%;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  object-position: center 65%;
}

#cp-imageslider-carousel.cp-home-slider .carousel-item .caption {
  height: 100%;
}

@media (min-width: 1450px) {
  #cp-imageslider-carousel.cp-home-slider,
  #cp-imageslider-carousel.cp-home-slider .carousel-inner,
  #cp-imageslider-carousel.cp-home-slider .carousel-item,
  #cp-imageslider-carousel.cp-home-slider .carousel-item figure {
    height: 500px;
  }
}

@media (max-width: 1199px) {
  #cp-imageslider-carousel.cp-home-slider,
  #cp-imageslider-carousel.cp-home-slider .carousel-inner,
  #cp-imageslider-carousel.cp-home-slider .carousel-item,
  #cp-imageslider-carousel.cp-home-slider .carousel-item figure {
    height: clamp(260px, 32vw, 400px);
  }

  #cp-imageslider-carousel.cp-home-slider .carousel-item .caption .slide-text {
    top: 12%;
  }
}

@media (max-width: 767px) {
  #cp-imageslider-carousel.cp-home-slider {
    margin-bottom: 25px;
  }

  #cp-imageslider-carousel.cp-home-slider,
  #cp-imageslider-carousel.cp-home-slider .carousel-inner,
  #cp-imageslider-carousel.cp-home-slider .carousel-item,
  #cp-imageslider-carousel.cp-home-slider .carousel-item figure {
    height: clamp(150px, 42vw, 260px);
  }

  #cp-imageslider-carousel.cp-home-slider .carousel-control.left,
  #cp-imageslider-carousel.cp-home-slider .carousel-control.right {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 480px) {
  #cp-imageslider-carousel.cp-home-slider,
  #cp-imageslider-carousel.cp-home-slider .carousel-inner,
  #cp-imageslider-carousel.cp-home-slider .carousel-item,
  #cp-imageslider-carousel.cp-home-slider .carousel-item figure {
    height: 170px;
  }
}

/* CP Image Slider - buton Shop Now compact ca în demo */
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text a,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .btn,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .slider-button,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .sliderbutton,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .slidershopnow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: auto !important;
  max-width: max-content !important;
  min-width: 150px !important;
  height: 52px !important;

  padding: 0 34px !important;
  margin-top: 28px !important;

  background: #fab505;
  color: #000000 !important;
  border: 0 !important;
  border-radius: 5px !important;

  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 52px !important;
  text-align: center !important;
  text-transform: none !important;
  text-decoration: none !important;

  box-shadow: none !important;
  float: none !important;
}

/* Hover ca în demo */
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text a:hover,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .btn:hover,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .slider-button:hover,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .sliderbutton:hover,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .slidershopnow:hover {
  background: #000000 !important;
  color: #ffffff !important;
}

/* Să nu mai apară bară full-width galbenă */
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text p,
#cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text div {
  max-width: fit-content;
}

/* Mobile */
@media (max-width: 767px) {
  #cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text a,
  #cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .btn,
  #cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .slider-button,
  #cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .sliderbutton,
  #cp-imageslider-carousel.cp-imageslider.cp-home-slider .carousel-item .caption .slide-text .slidershopnow {
    min-width: 120px !important;
    height: 42px !important;
    line-height: 42px !important;
    padding: 0 22px !important;
    margin-top: 14px !important;
    font-size: 14px !important;
  }
}


/* PS9 final compact override for PRS02043 homepage slider.
   This selector matches the real HTML: #cp-imageslider-carousel.carousel.slide.cp-imageslider.cp-home-slider */
#cp-imageslider-carousel.cp-home-slider,
#cp-imageslider-carousel.cp-home-slider .carousel-inner,
#cp-imageslider-carousel.cp-home-slider .carousel-item,
#cp-imageslider-carousel.cp-home-slider .carousel-item figure {
  height: clamp(320px, 28vw, 500px) !important;
  max-height: 500px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
#cp-imageslider-carousel.cp-home-slider .carousel-item figure,
#cp-imageslider-carousel.cp-home-slider .carousel-item a {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}
#cp-imageslider-carousel.cp-home-slider .carousel-item a {
  height: 100% !important;
}
#cp-imageslider-carousel.cp-home-slider .carousel-item img,
#cp-imageslider-carousel.cp-home-slider .cp-imageslider__image {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center 65% !important;
  display: block !important;
}
@media (max-width: 1199px) {
  #cp-imageslider-carousel.cp-home-slider,
  #cp-imageslider-carousel.cp-home-slider .carousel-inner,
  #cp-imageslider-carousel.cp-home-slider .carousel-item,
  #cp-imageslider-carousel.cp-home-slider .carousel-item figure {
    height: clamp(260px, 32vw, 400px) !important;
    max-height: 400px !important;
  }
}
@media (max-width: 767px) {
  #cp-imageslider-carousel.cp-home-slider,
  #cp-imageslider-carousel.cp-home-slider .carousel-inner,
  #cp-imageslider-carousel.cp-home-slider .carousel-item,
  #cp-imageslider-carousel.cp-home-slider .carousel-item figure {
    height: clamp(150px, 42vw, 260px) !important;
    max-height: 260px !important;
  }
}

/* PS9 3.2.9: align only the slider caption/content with the theme container.
   The slide image remains full width; only text/buttons use the same container alignment as header/CMS blocks. */
#cp-imageslider-carousel.cp-home-slider .carousel-item .caption.cp-imageslider-caption,
#cp-imageslider-carousel.cp-home-slider .carousel-item .cp-imageslider-caption {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  max-width: none !important;
  pointer-events: none;
}

#cp-imageslider-carousel.cp-home-slider .cp-imageslider-caption-container {
  position: relative !important;
  height: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
  pointer-events: none;
}

#cp-imageslider-carousel.cp-home-slider .cp-imageslider-caption-container .slide-text {
  position: absolute !important;
  left: 0 !important;
  top: 14% !important;
  right: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 620px !important;
  transform: none !important;
  box-sizing: border-box !important;
  pointer-events: auto;
}

#cp-imageslider-carousel.cp-home-slider .cp-imageslider-caption-container .slide-text.container {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 620px !important;
}

#cp-imageslider-carousel.cp-home-slider .cp-imageslider-caption-container a {
  pointer-events: auto;
}

@media (max-width: 1199px) {
  #cp-imageslider-carousel.cp-home-slider .cp-imageslider-caption-container .slide-text {
    top: 12% !important;
    max-width: 520px !important;
  }
}

@media (max-width: 767px) {
  #cp-imageslider-carousel.cp-home-slider .cp-imageslider-caption-container .slide-text {
    left: 0 !important;
    top: 10% !important;
    max-width: calc(100% - 30px) !important;
  }
}
