/**
 * Product Page Styles
 * Externalized from product.twig for caching
 */

/* Product Gallery Layout */
.product-gallery-flex {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: flex-start;
}

/* Carrossel de Thumbnails Vertical */
.product-thumbnails-carousel {
  width: 100px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0,0,0,.02);
  padding: 8px;
}

.product-thumbnails-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  height: 100%;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
  cursor: grab;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: #e91e63 #f0f0f0;
}

.product-thumbnails-left:active {
  cursor: grabbing;
}

.product-thumbnails-left::-webkit-scrollbar {
  width: 6px;
}

.product-thumbnails-left::-webkit-scrollbar-thumb {
  background: #e91e63;
  border-radius: 3px;
}

.product-thumbnails-left::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.product-thumbnails-left .thumbnail {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: block;
  border: 2px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.3s;
  margin-bottom: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.product-thumbnails-left .thumbnail:hover {
  border-color: #e91e63;
}

.product-thumbnails-left .thumbnail.active {
  border-color: #e91e63;
}

.product-thumbnails-left img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.product-main-image {
  flex: 1;
}

.product-main-image .thumbnail {
  display: block;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.product-main-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Keen Slider Mobile Only */
.keen-slider-mobile {
  display: none;
}

.keen-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 30px 0;
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 10;
}

.keen-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
}

.keen-slider-dot.active {
  background: #e91e63;
  border-color: #e91e63;
  width: 24px;
  border-radius: 4px;
}

/* Mobile: Keen Slider */
@media (max-width: 767px) {
  /* Hide desktop gallery */
  .product-gallery-flex {
    display: none !important;
  }
  
  /* Show Keen Slider */
  .keen-slider-mobile {
    display: block;
    position: relative;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: 15px;
    contain: layout size;
    height: 510px;
    overflow: hidden;
  }
  
  .keen-slider-mobile .keen-slider {
    overflow: hidden;
    height: 100%;
  }
  
  .keen-slider-mobile .keen-slider__slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 467px;
    position: relative;
  }
  
  .keen-slider-mobile .keen-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .keen-slider-mobile .discount-bar {
    position: absolute;
    background: rgb(233 30 99 / 80%);
    color: white;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 0 #c2175b;
    z-index: 10;
    text-transform: uppercase;
  }
  
  #content {
    border-radius: 0px;
    padding: 0px 20px 0px 20px;
  }
  
  /* Hide breadcrumb on mobile */
  .product-breadcrumb {
    display: none;
  }
}

/* Breadcrumb Minimalista */
.product-breadcrumb {
  padding: 8px 0;
  margin: 10px 0 20px 0;
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.product-breadcrumb li {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.product-breadcrumb li + li:before {
  content: "/";
  padding: 0 8px;
  color: #999;
}

.product-breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.product-breadcrumb a:hover {
  color: #e91e63;
}

.product-breadcrumb li:last-child a {
  color: #333;
  font-weight: 500;
}
