/* pageproduct.css – исходные стили + переопределение для защиты от slider.css */

/* Исправляем конфликт с slider.css: гарантируем вертикальное расположение */
.product-images .slider-container {
  display: block !important; /* отключаем flex, элементы встают друг под другом */
  position: relative;
}

.product-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.product-container {
  display: flex;
  gap: 40px;
  margin-bottom: 60px;
}

.product-images {
  flex: 1;
  max-width: 600px;
}

.slider-container {
  position: relative;
}

.main-slider {
  width: 100%;
  height: 620px;
  border-radius: var(--radius-medium);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: grab;
  user-select: none;
}

.main-slider:active {
  cursor: grabbing;
}

.slides-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.back-button-image {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.back-button-image:hover {
  opacity: 0.8;
}

.back-button-image img {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%);
}

.image-favourite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-favourite-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  transition: var(--transition);
  z-index: 1;
}

.image-favourite-btn.active::before {
  /* стили активного состояния */
}

.image-favourite-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  background-size: contain;
  background-repeat: no-repeat;
  transition: var(--transition);
  z-index: 2;
}

.image-favourite-btn:hover::after {
  transform: translate(-50%, -50%) scale(1.1);
}

.image-favourite-btn:hover {
  background: white;
  opacity: 0.9;
}

/* Элементы управления слайдером (стрелки) – уточнённые селекторы */
.product-page .slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 42%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 5;
  padding: 0 20px;
}

.product-page .slider-arrow {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  pointer-events: all;
  position: static; /* отменяем возможный absolute из других стилей */
  top: auto;
  transform: none;
  box-shadow: var(--shadow-sm);
}

.product-page .slider-arrow:hover {
  opacity: 0.7;
}

.product-page .slider-arrow svg {
  width: 20px;
  height: 20px;
  color: var(--text-color);
}

.slider-counter-bottom {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 6px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 10;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.image-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  /* принудительное выравнивание по левому краю */
  justify-content: flex-start;
}

.thumbnail {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-small);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
  border: 2px solid transparent;
  flex-shrink: 0;
}

.thumbnail.active,
.thumbnail:hover {
  opacity: 1;
  border-color: var(--primary-color);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
  max-width: 500px;
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 16px;
  line-height: 1.3;
}

.product-price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 24px;
}

.product-description {
  margin-bottom: 30px;
  line-height: 1.6;
  color: var(--text-light);
}

.product-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}

.add-to-cart-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: var(--radius-medium);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
}

.to__basket_a {
  background: var(--success-color);
  text-align: center;
  text-decoration: none;
}

.to__basket_a:hover {
  background: #00b347;
  transform: translateY(-2px);
  opacity: 0.9;
}

.add-to-cart-btn:hover {
  opacity: 0.9;
}

.product-details {
  border-top: 1px solid var(--gray-medium);
  padding-top: 24px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-light);
}

.detail-label {
  font-weight: 600;
  color: var(--text-color);
}

.detail-value {
  color: var(--text-light);
}

@media (max-width: 1000px) {
  .product-container {
    flex-direction: column;
    gap: 30px;
  }
  
  .product-images,
  .product-info {
    max-width: 100%;
  }

  .product-info,
  .image-thumbnails {
    padding-left: 17px;
    padding-right: 17px;
  }
  
  .main-slider {
    height: 600px;
    border-radius: 0;
  }
  
  .product-title {
    font-size: 1.6rem;
  }
  
  .product-price {
    font-size: 1.8rem;
  }
  
  .back-button-image,
  .image-favourite-btn {
    width: 36px;
    height: 36px;
  }
  
  .back-button-image img {
    width: 20px;
    height: 20px;
  }
  
  .image-favourite-btn::before {
    width: 20px;
    height: 20px;
  }
  
  .image-favourite-btn::after {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 768px) {
  .slider-controls {
    display: none;
  }

  .product-info,
  .image-thumbnails {
    padding-left: 10px;
    padding-right: 10px;
  }

  .product-page {
    padding: 0;
  }
  
  .main-slider {
    height: 650px;
  }
  
  .thumbnail {
    width: 70px;
    height: 70px;
  }
  
  .product-title {
    font-size: 1.4rem;
  }
  
  .product-price {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .product-info,
  .image-thumbnails {
    padding-left: 7px;
    padding-right: 7px;
  }

  .product-page {
    padding: 0px;
  }
  
  .main-slider {
    height: 440px;
  }
  
  .thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .product-title {
    font-size: 1.3rem;
  }
  
  .product-price {
    font-size: 1.4rem;
  }
  
  .back-button-image,
  .image-favourite-btn {
    width: 32px;
    height: 32px;
    top: 8px;
  }
  
  .back-button-image {
    left: 8px;
  }
  
  .image-favourite-btn {
    right: 8px;
  }
  
  .back-button-image img {
    width: 18px;
    height: 18px;
  }
  
  .image-favourite-btn::before {
    width: 18px;
    height: 18px;
  }
  
  .image-favourite-btn::after {
    width: 20px;
    height: 20px;
  }
  .product-page .slider-arrow{
    display: none;
  }
}

@media (max-width: 1000px) {
  .header_center {
    display: none;
  }
}

@media (max-width: 1001px) {
  header {
    padding: 0rem 0 0rem 0;
    padding-top: 0rem;
  }
}

