/* pageproduct.css - Стили для страницы товара */

.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;
}

/* Элементы управления слайдером */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: absolute;
  top: 42%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 5;
  padding: 0 20px;
}
.to__basket a {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-medium);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.to__basket a:hover {
    background: #00b347;
    transform: translateY(-2px);
}
.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;
}

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

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

.slider-counter {
  font-weight: 600;
  position: absolute;
  left: 50%;
  bottom:10px;
  color: white;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 12px;
  border-radius: 12px;
  pointer-events: none;
}
/* Счетчик слайдов в левом нижнем углу изображения */
.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);
}
/* Счетчик слайдов в верхней части при зуме */
.fullscreen-counter-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100;

}

/* Обновим стили для элементов управления (уберем счетчик из центра) */
.fullscreen-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 100;
  padding: 0 20px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .fullscreen-counter-top {
    top: 15px;
        font-size: 14px;
        padding: 4px 12px;
  }
}

@media (max-width: 576px) {
  .fullscreen-counter-top {
    top: 13px;
        font-size: 12px;
        padding: 4px 12px;

  }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .slider-counter-bottom {
    bottom: 10px;
    left: 10px;
    padding: 4px 6px;
    font-size: 0.88rem;
  }
}

@media (max-width: 576px) {
  .slider-counter-bottom {
    bottom: 8px;
    left: 8px;
    padding: 2px 4px;
    font-size: 0.75rem;
  }
}

/* Миниатюры */
.image-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.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;
  position: relative;
}

.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);
}

/* Стили для полноэкранного слайдера */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.fullscreen-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 35px;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10000;
  transition: opacity 0.3s;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
}

.fullscreen-close:hover {
  opacity: 0.7;
}

/* Элементы управления для полноэкранного режима */
.fullscreen-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 100;
  padding: 0 20px;
}

.fullscreen-arrow {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  pointer-events: all;
}

.fullscreen-arrow:hover {
  opacity: 0.7;
  
}

.fullscreen-arrow svg {
  width: 24px;
  height: 24px;
  color: white;
}

.fullscreen-counter {
  font-weight: 600;
  color: white;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 12px;
  border-radius: 12px;
  pointer-events: none;
}

.slider-container-fullscreen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.slides-track-fullscreen {
  display: flex;
  height: 100%;
  will-change: transform;
  cursor: grab;
}

.slides-track-fullscreen:active {
  cursor: grabbing;
}

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

.slide-fullscreen img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Адаптивность для мобильных устройств */
@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;
  }
  
  .fullscreen-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;
  }
  
  .fullscreen-close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 24px;
  }
}

@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;
  }
}

/* Скрытие верхнего поиска на мобильных */
@media (max-width: 1000px) {
  .header_center {
    display: none;
  }
}
@media (max-width: 1001px) {
  header {
    padding: 0rem 0 0rem 0;
    padding-top: 0rem;
  }
}

