/* ——— Страница сравнения товаров ——— */

.emmet-compare-page {
  max-width: 1500px;
}

.emmet-compare-page .emmet-breadcrumb {
  margin-bottom: 1rem;
}

.emmet-compare-page__head {
  margin-bottom: 1.35rem;
}

.emmet-compare-page__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--emmet-accent-ink, #1a1a1a);
}

.emmet-compare-page__lead {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

.emmet-compare-page__lead strong {
  color: #1a1a1a;
}

/* Пустое состояние */
.emmet-compare-empty {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  background: linear-gradient(180deg, #fafafa 0%, #fff 55%);
  border: 1px dashed #ddd;
  border-radius: 20px;
  max-width: 520px;
  margin: 0 auto;
}

.emmet-compare-empty__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(245, 196, 0, 0.2);
  color: #b38f00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.emmet-compare-empty__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1a1a;
}

.emmet-compare-empty__text {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #666;
}

.emmet-compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.emmet-compare-btn--primary {
  background: var(--emmet-accent, #f5c400);
  color: var(--emmet-accent-ink, #1a1a1a);
  box-shadow: 0 4px 16px rgba(245, 196, 0, 0.35);
}

.emmet-compare-btn--primary:hover {
  background: #e6b800;
  color: #1a1a1a;
  transform: translateY(-1px);
}

.emmet-compare-btn--cart {
  width: 100%;
  background: var(--emmet-accent-ink, #1a1a1a);
  color: #fff;
}

.emmet-compare-btn--cart:hover {
  background: #333;
  color: #fff;
}

.emmet-compare-btn--ghost {
  width: 100%;
  margin-top: 0.45rem;
  background: #fff;
  color: #555;
  border: 1px solid #ddd;
}

.emmet-compare-btn--ghost:hover {
  border-color: var(--emmet-accent, #f5c400);
  color: #1a1a1a;
}

/* Таблица */
.emmet-compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 4px 4px 12px;
}

.emmet-compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.06);
}

.emmet-compare-table th,
.emmet-compare-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.emmet-compare-table tr:last-child th,
.emmet-compare-table tr:last-child td {
  border-bottom: none;
}

.emmet-compare-table__label-col {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 140px;
  max-width: 180px;
  background: #fafafa;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #666;
  border-right: 1px solid #eee !important;
}

.emmet-compare-table__product-col {
  min-width: 200px;
  max-width: 240px;
  background: #fff;
  vertical-align: top;
}

.emmet-compare-table tbody tr:nth-child(even) td:not(.emmet-compare-table__label-col) {
  background: #fcfcfc;
}

.emmet-compare-table tbody tr:nth-child(even) .emmet-compare-table__label-col {
  background: #f5f5f5;
}

.emmet-compare-table__group-row td {
  background: linear-gradient(90deg, rgba(245, 196, 0, 0.12) 0%, #fff 100%) !important;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #eee !important;
}

.emmet-compare-table__group-row .emmet-compare-table__label-col {
  background: rgba(245, 196, 0, 0.12) !important;
}

.emmet-compare-table__value {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #333;
}

.emmet-compare-table__value--empty {
  color: #bbb;
}

.emmet-compare-table__value.description {
  font-size: 0.85rem;
  color: #555;
}

/* Карточка товара в шапке */
.emmet-compare-product {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  text-align: center;
}

.emmet-compare-product__remove {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e5e5;
  color: #888;
  font-size: 0.75rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.emmet-compare-product__remove:hover {
  background: #fee;
  border-color: #f5c6c6;
  color: #c62828;
}

.emmet-compare-product__media {
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 1;
  max-width: 160px;
}

.emmet-compare-product__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.emmet-compare-product__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  color: #1a1a1a;
  text-decoration: none;
}

.emmet-compare-product__name:hover {
  color: #b38f00;
}

.emmet-compare-product__price {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a1a;
}

.emmet-compare-product__price .price-old {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #999;
  text-decoration: line-through;
}

.emmet-compare-product__price .price-new {
  color: #c62828;
}

.emmet-compare-product__actions {
  margin-top: 0.25rem;
}

.emmet-compare-table .rating {
  font-size: 0.85rem;
  color: #f5c400;
}

.emmet-compare-table .rating .fa-solid.fa-star {
  color: #f5c400;
}

.emmet-compare-availability--in {
  color: #1a9b6e;
  font-weight: 700;
}

.emmet-compare-availability--out {
  color: #c62828;
  font-weight: 600;
}

.emmet-compare-page .alert {
  border-radius: 12px;
  margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
  .emmet-compare-table__label-col {
    min-width: 110px;
    max-width: 120px;
    font-size: 0.75rem;
    padding: 0.65rem 0.75rem;
  }

  .emmet-compare-table__product-col {
    min-width: 168px;
  }

  .emmet-compare-product__media {
    max-width: 130px;
  }
}
