/* Product comparison page */
body.page-compare {
  background: var(--color-bg);
}

.compare-page {
  padding: 24px 0 56px;
}

.compare-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.compare-header h1 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  margin-bottom: 4px;
}

.compare-header p {
  font-size: 14px;
  color: var(--color-text-muted);
}

.btn-compare-shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
}

.btn-compare-shop:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
}

.compare-table-wrap {
  overflow-x: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  text-align: left;
}

.compare-table__label-col {
  width: 160px;
  min-width: 140px;
  font-weight: 700;
  color: var(--color-text);
  background: #f8fafc;
}

.compare-table tbody th[scope="row"] {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.compare-table__product-col {
  min-width: 200px;
  vertical-align: top;
}

.compare-table__empty-col {
  min-width: 180px;
  background: #fafbfc;
  color: var(--color-text-muted);
  text-align: center;
}

.compare-product-card {
  position: relative;
  text-align: center;
}

.compare-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background var(--transition), color var(--transition);
}

.compare-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}

.compare-product-card__image {
  display: block;
  margin: 0 auto 12px;
  max-width: 140px;
}

.compare-product-card__image img {
  max-height: 120px;
  object-fit: contain;
  margin: 0 auto;
}

.compare-product-card h2 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.compare-product-card h2 a:hover {
  color: var(--color-primary);
}

.compare-product-card__meta {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.compare-product-card__price {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.btn-compare-cart {
  display: inline-block;
  padding: 8px 14px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

.btn-compare-cart:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.compare-out-stock {
  font-size: 12px;
  color: #dc2626;
  font-weight: 600;
}

.compare-slot-empty {
  padding: 24px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.compare-slot-empty i {
  font-size: 24px;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.compare-hint {
  margin-top: 16px;
  text-align: center;
}

.compare-empty {
  text-align: center;
  padding: 56px 24px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.compare-empty i {
  font-size: 40px;
  color: var(--color-primary);
  opacity: 0.6;
  margin-bottom: 16px;
}

.compare-empty h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.compare-empty p {
  color: var(--color-text-muted);
  margin-bottom: 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .compare-table__label-col {
    width: 110px;
    min-width: 100px;
  }
}

/* Toast (shown on any page when adding to compare) */
.compare-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 12px 20px;
  background: #1f2937;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  animation: compare-toast-in 0.25s ease;
}

@keyframes compare-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
