/* product-detail.css - ОЧИЩЕННАЯ ВЕРСИЯ */
:root {
  --primary-color: #000000;
  --secondary-color: #000000;
  --accent-color: #FFD700;
  --text-color: #050505;
  --light-gray: #ffffff;
  --border-color: #e0e0e0;
  --success-color: #27ae60;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --info-color: #000000;

  --container-padding: 40px;
  --mobile-padding: 20px;
  --tablet-padding: 25px;
  --gallery-gap: 20px;
  --thumbnails-gap: 12px;
  --section-margin: 30px;
}

/* Основные стили */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.product-detail {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: var(--gallery-gap);
  margin: 40px auto;
  align-items: start;
  max-width: calc(100% - (var(--container-padding) * 2));
  width: auto;
}

/* Галерея */
.product-gallery {
  position: sticky;
  top: 15px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px;
  align-items: start;
  max-width: 100% !important;
  width: 100% !important;
}

.thumbnails-container {
  display: flex;
  flex-direction: column;
  gap: var(--thumbnails-gap);
  align-items: center;
}

.thumbnail {
  width: 90px;
  height: 90px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  flex-shrink: 0;
  padding: 5px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumbnail:hover {
  border-color: var(--info-color);
  transform: scale(1.05);
}

.thumbnail.active {
  border-color: var(--info-color);
  box-shadow: 0 0 0 3px var(--info-color);
}

.thumbnail img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.main-image-container {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  overflow: hidden;
  background: #ffffff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: 100% !important;
  padding: 20px;
  margin: 0;
}

.main-image-container img,
.main-image-container video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.sale-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff4444;
  color: white;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
}

/* Видео контейнер */
.video-container {
  width: 100% !important;
  height: 100% !important;
  background: #000 !important;
  border-radius: 15px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.video-container video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.video-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

/* Информация о товаре */
.product-info {
  padding: 15px;
  background: white;
  width: 95%;
  height: fit-content;
  margin-right: 0;
  margin-left: 40px;
}

.product-title {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text-color);
  line-height: 1.3;
  font-weight: 700;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  color: #ddd;
  font-size: 16px;
}

.star.filled {
  color: var(--warning-color);
}

.rating-text {
  margin-left: 6px;
  font-weight: bold;
  color: var(--text-color);
  font-size: 14px;
}

.review-count {
  color: #7f8c8d;
  font-size: 13px;
}

/* Слайд-шоу отзывов с линиями-разделителями */
.review-preview-container {
  margin: 15px 0;
  width: 100%;
  position: relative;
  border-top: 1px solid #f0f0f0;
}

.reviews-slideshow {
  position: relative;
  width: 100%;
  min-height: 50px;
}

.review-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease-in-out;
  transform: translateY(10px);
}

.review-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  position: relative;
}

.review-preview-link {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  color: inherit !important;
  width: 100% !important;
  padding: 12px 0 !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

.review-preview-link:hover {
  background: transparent !important;
  border-color: #007bff !important;
  transform: none !important;
  box-shadow: none !important;
  color: #007bff !important;
}

.review-preview-link:hover .review-author,
.review-preview-link:hover .review-preview-text,
.review-preview-link:hover .review-arrow {
  color: #007bff !important;
}

.review-thumbnail {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-thumbnail {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

.image-thumb {
  width: 28px !important;
  height: 28px !important;
  object-fit: cover !important;
  border: 1px solid #e9ecef !important;
}

.video-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: 1px solid #667eea !important;
}

.no-media-thumb {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
}

.review-preview-content {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.review-author {
  flex-shrink: 0 !important;
  font-weight: 700 !important;
  color: #2c3e50 !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  transition: color 0.3s ease !important;
}

.review-preview-text {
  flex: 1 !important;
  color: #495057 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  transition: color 0.3s ease !important;
}

.review-arrow {
  color: #6c757d !important;
  font-weight: bold !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  font-size: 16px !important;
  transition: color 0.3s ease !important;
}

/* Форма добавления в корзину */
.quantity-selector {
  margin: 20px 0;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-color);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: bold;
}

.quantity-btn:hover {
  background: var(--light-gray);
  border-color: var(--info-color);
}

.quantity-input {
  width: 60px;
  height: 40px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
}

.add-to-cart-section {
  margin: 20px 0;
}

.add-to-cart-btn {
  background: linear-gradient(135deg, #323232, #000000);
  color: white;
  border: none;
  padding: 18px 12px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 70px;
  box-shadow: 0 4px 15px rgba(106, 13, 173, 0.3);
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #020202, #000000);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.add-to-cart-btn.disabled {
  background: var(--border-color);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-text {
  font-size: 16px;
  font-weight: 700;
}

.btn-price {
  font-size: 20px;
  font-weight: 800;
}

.btn-old-price {
  font-size: 14px;
  text-decoration: line-through;
  opacity: 0.8;
  margin-right: 6px;
}

/* Социальные кнопки */
.social-share {
  margin: 15px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-share span {
  font-weight: bold;
  color: var(--text-color);
  font-size: 14px;
}

.social-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.social-btn:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(106, 13, 173, 0.3);
}

/* Описание товара */
.product-description {
  margin: 15px 0;
  padding: 12px;
  background: var(--light-gray);
  border-radius: 10px;
  border-left: 3px solid var(--info-color);
}

.product-description h3 {
  margin-bottom: 8px;
  color: var(--text-color);
  font-size: 16px;
  font-weight: 600;
}

.product-description p {
  line-height: 1.5;
  color: #555;
  font-size: 13px;
  margin: 0;
}

/* Хлебные крошки */
.breadcrumb {
  width: 100%;
  margin: 0 auto 15px auto;
  max-width: 100% !important;
}

.breadcrumb ol {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  color: #000000;
  font-size: 16px;
}

.breadcrumb a {
  color: var(--info-color);
  text-decoration: none;
  font-size: 13px;
}

.breadcrumb a:hover {
  text-decoration: none !important;
}

.breadcrumb .active {
  display: none;
}

/* Секции характеристик, отзывов и похожих товаров */
.product-specifications,
.product-reviews,
.related-products {
  margin: var(--section-margin) auto;
  padding: 0;
  max-width: 100% !important;
  width: 100% !important;
}

.product-specifications {
  background: var(--light-gray);
  padding: 20px;
  border-radius: 12px;
}

.product-specifications h2,
.product-reviews h2,
.related-products h2 {
  margin-bottom: 15px;
  color: var(--text-color);
  font-size: 20px;
  text-align: center;
}

.specs-table {
  display: grid;
  gap: 8px;
}

.spec-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-name {
  font-weight: bold;
  color: var(--text-color);
  font-size: 14px;
}

.spec-value {
  color: #555;
  font-size: 14px;
}

/* Отзывы */
.reviews-stats {
  margin-bottom: 20px;
}

.overall-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.rating-value {
  font-size: 1.6rem;
  font-weight: bold;
  color: #ffa500;
}

.add-review-form {
  background: #ffffff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.form-group {
  flex: 1;
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  margin-bottom: 3px;
  font-weight: bold;
  font-size: 13px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
}

.form-group textarea {
  resize: vertical;
  min-height: 70px;
}

.rating-selector {
  margin-bottom: 12px;
}

.stars-input {
  display: flex;
  gap: 3px;
  margin-top: 3px;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.stars-input input[type="radio"] {
  display: none;
}

.stars-input label {
  font-size: 1.3rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
}

.stars-input label:hover,
.stars-input label:hover ~ label,
.stars-input input[type="radio"]:checked ~ label {
  color: #ffa500;
}

.submit-review-btn {
  background: var(--primary-color);
  color: white;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.3s ease;
}

.submit-review-btn:hover {
  background: var(--secondary-color);
}

.review-item {
  border-bottom: 1px solid #ffffff;
  padding: 12px 0;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.review-author {
  font-weight: bold;
  font-size: 13px;
}

.review-rating {
  display: flex;
  gap: 1px;
}

.review-date {
  color: #666;
  font-size: 11px;
}

.review-content p {
  margin: 0;
  line-height: 1.4;
  font-size: 13px;
}

.no-reviews {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}

/* Стили для медиа в отзывах */
.review-media {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.review-image, .review-video {
  position: relative;
  cursor: pointer;
}

.review-image img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.review-image img:hover {
  border-color: #007bff;
  transform: scale(1.05);
}

.video-preview {
  position: relative;
  width: 120px;
  height: 80px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.media-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

/* Модальное окно для медиа */
.media-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 90%;
  max-width: 800px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
}

.close-modal {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: #ccc;
}

#mediaContainer img,
#mediaContainer video {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* Статистика медиа */
.media-stats {
  margin-top: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.media-count {
  font-size: 14px;
  color: #6c757d;
}

/* Поля загрузки медиа */
.media-upload-section {
  border: 1px solid #e9ecef;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.media-input {
  margin-bottom: 10px;
}

/* Похожие товары */
.related-products .products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 12px;
}

.related-products .product-card {
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  
  transition: all 0.3s ease;
  
}

.product-card h3 a{ 
  text-align: center; 
  color: #000000 !important;
  text-decoration: none !important;
  
}

.related-products .product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-products .product-card img {
  max-width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 6px;
}

.related-products .current-price {
  font-size: 14px;
  color: var(--danger-color);
  font-weight: bold;
  text-decoration: none !important;
}

.related-products .original-price {
  font-size: 12px;
  color: #95a5a6;
  text-decoration: none !important;
}

/* Отзывы в похожих товарах */
.related-products .related-product-reviews {
  margin: 8px 0;
  padding: 8px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.related-products .rating-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  justify-content: center;
}

.related-products .rating-mini .star {
  font-size: 14px;
  color: #ddd;
}

.related-products .rating-mini .star.filled {
  color: #ffc107;
}

.related-products .rating-value {
  font-size: 12px;
  color: #666;
  font-weight: bold;
  margin-left: 5px;
}

.related-products .review-count-mini {
  font-size: 12px;
  color: #666;
  text-align: center;
}

/* Адаптивность */
@media (max-width: 1200px) {
  .product-detail {
    grid-template-columns: 1fr 350px;
    gap: var(--gallery-gap);
  }
  .container {
    padding: 0 var(--tablet-padding) !important;
  }
  .product-gallery {
    grid-template-columns: 90px 1fr;
  }
  
  .thumbnail {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 968px) {
  .container {
    padding: 0 var(--mobile-padding) !important;
  }
  
  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--gallery-gap);
  }
  
  .product-gallery {
    grid-template-columns: 80px 1fr;
    max-width: 100% !important;
    margin: 0 auto;
  }
  
  .product-info {
    max-width: 100% !important;
    margin: 0 auto;
  }
  
  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .product-gallery {
    grid-template-columns: 70px 1fr;
    gap: var(--thumbnails-gap);
  }
  
  .thumbnail {
    width: 70px;
    height: 70px;
  }
  
  .product-info {
    padding: 12px;
  }
  
  .add-to-cart-btn {
    padding: 15px 10px;
    min-height: 60px;
  }
  
  .btn-price {
    font-size: 18px;
  }
  
  .review-preview-link {
    padding: 10px 0 !important;
    gap: 10px !important;
  }
  
  .media-thumbnail {
    width: 24px !important;
    height: 24px !important;
  }
  
  .review-author {
    font-size: 13px !important;
  }
  
  .review-preview-text {
    font-size: 13px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--mobile-padding) !important;
  }
  
  .product-gallery {
    grid-template-columns: 1fr;
    gap: var(--thumbnails-gap);
  }
  
  .thumbnails-container {
    flex-direction: row;
    justify-content: center;
    order: 2;
  }
  
  .thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .product-title {
    font-size: 20px;
  }
  
  .add-to-cart-btn {
    padding: 12px 8px;
    min-height: 55px;
  }
  
  .btn-price {
    font-size: 16px;
  }
  
  .social-btn {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }
  
  .review-preview-content {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }
  
  .review-author {
    font-size: 12px !important;
  }
  
  .review-preview-text {
    font-size: 12px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
  
  .review-preview-link {
    gap: 8px !important;
    padding: 8px 0 !important;
  }
}

/* Убираем рамки у основного изображения */
.main-image-container {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Убираем рамки у миниатюр */
.thumbnail {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.thumbnail:hover {
  border: none !important;
  transform: scale(1.05);
}

.thumbnail.active {
  border: none !important;
  box-shadow: 0 0 0 2px var(--info-color) !important;
}

/* Заголовок отзывов с поменянными местами */
.reviews-header-swapped {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  gap: 20px;
}

.review-btn-left {
  flex-shrink: 0;
}

.reviews-stats-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rating-big {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffa500;
  line-height: 1;
}

.stars-medium {
  display: flex;
  gap: 2px;
}

.stars-medium .star {
  font-size: 24px;
  color: #ddd;
}

.stars-medium .star.filled {
  color: #ffc107;
}

.stats-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.reviews-count {
  font-size: 1rem;
  color: #666;
  font-weight: 600;
}

.media-stats {
  font-size: 0.9rem;
  color: #6c757d;
  text-align: right;
}

/* Компактная кнопка */
.compact-review-btn {
  background: #1f1f1f;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  white-space: nowrap;
}

.compact-review-btn:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 59, 59, 0.4);
}

.compact-review-btn.active {
  background: #000000;
}

.btn-icon {
  font-size: 16px;
}

.btn-text {
  font-size: 14px;
}

/* Компактная форма */
.compact-review-form {
  display: none;
  margin-bottom: 30px;
}

.compact-review-form.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.form-container {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

/* Компактные поля формы */
.form-row-compact {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group-compact {
  flex: 1;
  margin-bottom: 15px;
}

.form-group-compact input,
.form-group-compact textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.15s ease-in-out;
}

.form-group-compact input:focus,
.form-group-compact textarea:focus {
  border-color: #404040;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group-compact textarea {
  resize: vertical;
  min-height: 80px;
}

.rating-selector-compact {
  margin-bottom: 20px;
}

.rating-selector-compact label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
}

.stars-input-compact {
  display: flex;
  gap: 2px;
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.stars-input-compact input[type="radio"] {
  display: none;
}

.stars-input-compact label {
  font-size: 1.8rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
  margin-bottom: 0;
}

.stars-input-compact label:hover,
.stars-input-compact label:hover ~ label,
.stars-input-compact input[type="radio"]:checked ~ label {
  color: #ffa500;
}

/* Кнопки медиа */
.media-toggle-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.media-toggle-btn {
  flex: 1;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  color: #495057;
}

.media-toggle-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.media-toggle-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

/* Поля медиа */
.media-fields-container {
  margin-bottom: 20px;
}

.media-fields {
  display: none;
  margin-bottom: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.media-fields.show {
  display: block;
  animation: slideDown 0.2s ease;
}

.media-fields .form-group-compact {
  margin-bottom: 12px;
}

.media-fields .form-group-compact:last-child {
  margin-bottom: 0;
}

.media-fields small {
  font-size: 11px;
  color: #6c757d;
  display: block;
  margin-top: 4px;
}

/* Кнопки действий */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.cancel-btn {
  padding: 10px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-btn:hover {
  background: #5a6268;
}

.submit-btn {
  padding: 10px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.submit-btn:hover {
  background: #218838;
}

/* Анимации */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .reviews-header-swapped {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 15px;
  }
  
  .reviews-stats-right {
    justify-content: center;
  }
  
  .rating-display {
    justify-content: center;
    text-align: center;
  }
  
  .stats-text {
    align-items: center;
  }
  
  .form-container {
    padding: 20px 15px;
  }
  
  .form-row-compact {
    flex-direction: column;
    gap: 10px;
  }
  
  .media-toggle-buttons {
    flex-direction: column;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .rating-big {
    font-size: 2rem;
  }
  
  .stars-medium .star {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .reviews-header-swapped {
    padding: 15px;
  }
  
  .form-container {
    padding: 15px 12px;
  }
  
  .compact-review-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Секция кнопки "Связаться" */
.contact-section {
  margin: 25px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.contact-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.contact-btn:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-icon {
  font-size: 18px;
}

/* Модальные окна связи */
.contact-modal {
  display: none;
  position: fixed;
  z-index: 10002;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.contact-modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

.form-modal {
  max-width: 450px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-contact-modal,
.close-contact-form {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 20px;
  transition: color 0.3s ease;
}

.close-contact-modal:hover,
.close-contact-form:hover {
  color: #000;
}

.contact-modal h3 {
  margin-bottom: 8px;
  color: var(--text-color);
  font-size: 24px;
  text-align: center;
}

.contact-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 25px;
  font-size: 14px;
}

/* Варианты связи */
.contact-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  background: #f8f9fa;
}

.contact-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: #e9ecef;
}

.contact-option.telegram:hover {
  background: #0088cc;
  color: white;
  border-color: #0088cc;
}

.contact-option.vk:hover {
  background: #4a76a8;
  color: white;
  border-color: #4a76a8;
}

.contact-option.form-option:hover {
  background: #28a745;
  color: white;
  border-color: #28a745;
  cursor: pointer;
}

.contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: white;
  flex-shrink: 0;
}

.contact-option.telegram .contact-icon {
  color: #0088cc;
}

.contact-option.vk .contact-icon {
  color: #4a76a8;
}

.contact-option.form-option .contact-icon {
  color: #28a745;
}

.contact-option:hover .contact-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-title {
  font-weight: 600;
  font-size: 16px;
}

.contact-desc {
  font-size: 13px;
  color: #666;
  opacity: 0.8;
}

.contact-option:hover .contact-desc {
  color: white;
  opacity: 0.9;
}

.contact-arrow {
  font-weight: bold;
  font-size: 18px;
  opacity: 0.7;
}

.contact-option:hover .contact-arrow {
  opacity: 1;
}

/* Футер модального окна */
.contact-footer {
  border-top: 1px solid #e9ecef;
  padding-top: 20px;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.contact-meta span {
  font-size: 13px;
  color: #666;
}

/* Форма обратной связи */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group textarea {
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Чекбокс */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 3px;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #007bff;
  border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 12px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.submit-contact-form {
  background: #007bff;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.submit-contact-form:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
  .contact-modal-content {
    margin: 10% auto;
    padding: 25px 20px;
    width: 95%;
  }
  
  .contact-option {
    padding: 15px;
  }
  
  .contact-icon {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .contact-modal-content {
    margin: 5% auto;
    padding: 20px 15px;
  }
  
  .contact-option {
    padding: 12px;
    gap: 12px;
  }
  
  .contact-title {
    font-size: 15px;
  }
  
  .contact-desc {
    font-size: 12px;
  }
}

/* Стили для WhatsApp */
.contact-option.whatsapp:hover {
  background: #25D366;
  color: white;
  border-color: #25D366;
}

.contact-option.whatsapp .contact-icon {
  color: #25D366;
}

.contact-option.whatsapp:hover .contact-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Примечания под описанием */
.contact-note {
  font-size: 11px;
  opacity: 0.7;
  font-style: italic;
  margin-top: 2px;
}

/* Блок уведомления о перенаправлении */
.redirect-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: #e3f2fd;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
  margin: 20px 0;
}

.notice-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.4;
  color: #1565c0;
}

.notice-text strong {
  display: block;
  margin-bottom: 4px;
}

/* Улучшаем отображение контактной информации */
.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-desc {
  font-size: 13px;
  color: #666;
  opacity: 0.8;
}

.contact-option:hover .contact-desc {
  color: white;
  opacity: 0.9;
}

/* Адаптивность для уведомления */
@media (max-width: 480px) {
  .redirect-notice {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .notice-icon {
    align-self: center;
  }
}

/* Улучшаем отображение уведомлений */
.contact-note {
  font-size: 11px;
  opacity: 0.7;
  font-style: italic;
  margin-top: 2px;
  display: block;
}

/* Выделяем рекомендуемый способ */
.contact-option.vk {
  border: 2px solid #4a76a8;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.contact-option.vk .contact-icon {
  background: #4a76a8;
  color: white;
}

/* Адаптивность для уведомления */
@media (max-width: 480px) {
  .redirect-notice {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .notice-icon {
    align-self: center;
  }
}

/* Улучшенные стили для чекбокса в форме обратной связи */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.checkbox-label:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #4a76a8;
    cursor: pointer;
}

.checkbox-label .checkbox-text {
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.checkbox-label .checkbox-note {
    color: #6c757d;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

/* Стили для кнопки избранного на странице товара */
/* Стили для кнопки избранного на странице товара */
.favorite-section-detail {
    margin: 20px 0;
    text-align: center;
}

.favorite-section-detail .favorite-btn {
    transition: all 0.3s ease !important;
}

.favorite-section-detail .favorite-btn:hover {
    background: #e74c3c !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
}

.favorite-section-detail .favorite-btn:active {
    transform: translateY(0) !important;
}

.favorite-section-detail .favorite-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.favorite-section-detail .favorite-btn.active {
    background: #e74c3c !important;
    color: white !important;
}

.related-products .product-card .current-price {
  text-decoration: none !important;
}