/* Общие стили контейнера сравнения */
.wc-compare-container {
  color: #000000;
}

.wc-compare-wrap {
  margin-top: 15px;
  height: 40px;
}

.product_text .wc-compare-button-loop {
  margin-top: 10px;
}
.wc-compare-button-loop {
  border: 1px solid #f5f5f5;
  background-color: #fff;
  color: #000000;
  padding: 5px 13px;
  height: 100%;

  border-radius: 6px;

  transition: 0.2s ease-in-out;
}

.wc-compare-button-loop:hover {
  border: 1px solid #ad9884;
}

/* Заголовок сравнения */
.wc-compare-container h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #000000;
}

.wc-compare-icon {
  font-size: 18px;
}
/* Кнопка очистки списка */
.wc-compare-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.wc-compare-actions .wc-clear-compare {
  background-color: #fff;
  border: 1px solid #f5f5f5;
  color: #000000;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wc-compare-actions .wc-clear-compare:hover {
  background-color: #e8e8e8;
}

/* Стили обертки таблицы */
.wc-compare-table-wrap {
  overflow-x: auto;
}

/* Основная таблица */
.wc-compare-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #f5f5f5;
  background-color: #fff;
}

/* Заголовки таблицы */
.wc-compare-table thead th {
  padding: 15px;
  background-color: #fff;
  border-bottom: 1px solid #f5f5f5;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.wc-compare-attribute-name {
  background-color: #fff;
  font-weight: 600;
  padding: 12px 15px;
  text-align: left !important;
  width: 300px;
  border-right: 1px solid #f5f5f5;
  position: sticky;
  left: 0;
  z-index: 9;
}

/* Стили ячеек */
.wc-compare-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #f5f5f5;
  text-align: center;
  vertical-align: middle;
}

.wc-compare-value {
  border-right: 1px solid #f5f5f5;
}

/* Стили для товаров */
.wc-compare-product {
  min-width: 230px;
  vertical-align: top;
  position: relative;
}

.wc-compare-product-image {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  height: 150px;
}

.wc-compare-product-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.wc-compare-product-image img:hover {
  transform: scale(1.05);
}

.wc-compare-product-title {
  font-size: 16px;
  font-weight: 600;
  margin: 10px 0;
  text-align: center;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Кнопка удаления из сравнения */
.wc-compare-remove {
  position: absolute;
  top: 5px;
  right: 5px;
}

.wc-compare-remove a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #999;
  font-size: 18px;
  text-decoration: none;
  border: 1px solid #f5f5f5;
  transition: all 0.3s ease;
}

.wc-compare-remove a:hover {
  background-color: #f44336;
  color: white;
  border-color: #f44336;
}

/* Цены товаров */
.wc-compare-table .woocommerce-Price-amount {
  font-weight: 600;
  color: #ad9884;
}

/* Зебра для строк */
.wc-compare-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.wc-compare-table tbody tr:hover {
  background-color: #f5f5f5;
}

h1.post-title {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin: 25px 0 20px;
  padding: 0 0 10px;
  border-bottom: 2px solid #f0f0f0;
  position: relative;
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.3;
}

/* Декоративный элемент под заголовком */
h1.post-title:after {
  content: '';
  position: absolute;
  width: 120px;
  height: 2px;
  background-color: #ad9884; /* Основной акцентный цвет */
  bottom: -2px;
  left: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
  h1.post-title {
    font-size: 24px;
    margin: 20px 0 15px;
  }
  .wc-compare-attribute-name {
    width: 150px;
    z-index: 20 !important;
  }

  .wc-compare-product {
    min-width: 180px;
  }

  .wc-compare-product-title {
    font-size: 14px;
  }
}

/* Оптимизация для печати */
@media print {
  .wc-compare-actions,
  .wc-compare-remove {
    display: none;
  }

  .wc-compare-table {
    border: 1px solid #ccc;
  }

  .wc-compare-table th,
  .wc-compare-table td {
    border: 1px solid #ccc;
  }
}

/* Стили для артикула товара */
.wc-compare-product .product-sku {
  font-size: 12px;
  color: #777;
  text-align: center;
  margin-bottom: 10px;
}

/* Улучшения для скорости загрузки */
.wc-compare-table img {
  content-visibility: auto;
  contain-intrinsic-size: 150px;
}

/* Анимация при наведении на строки таблицы */
.wc-compare-table tbody tr {
  transition: background-color 0.2s ease;
}
