:root {
  --compare-primary: #5bb318;
  --compare-secondary: #0d1f12;
  --compare-bg: #f8faf8;
  --compare-border: rgba(91, 179, 24, 0.1);
}

.compare-hero {
  background: linear-gradient(135deg, var(--compare-secondary) 0%, #1a3a1e 40%, #2d5a27 100%);
  padding: 5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
.compare-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1600&q=20") center/cover no-repeat;
  opacity: 0.12;
}
.compare-hero .hero-inner {
  position: relative;
  z-index: 1;
}
.compare-hero .hero-badge {
  background: rgba(91, 179, 24, 0.2);
  color: #a8e063;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem 1.25rem;
  border: 1px solid rgba(168, 224, 99, 0.2);
}

.compare-container {
  margin-top: 3rem;
  position: relative;
}

.compare-card {
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(17, 24, 39, 0.08);
  background: #fff;
  overflow: hidden;
  border: 1px solid #edf1eb;
}

.compare-table-wrapper {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--compare-primary) transparent;
}
.compare-table-wrapper::-webkit-scrollbar {
  height: 6px;
}
.compare-table-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--compare-primary);
  border-radius: 10px;
}

.compare-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.compare-table th, .compare-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f1;
  vertical-align: middle;
}
.compare-table th:first-child {
  background: #fcfdfc;
  width: 220px;
  min-width: 220px;
  font-weight: 700;
  color: #4b5563;
  border-right: 2px solid var(--compare-border);
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.02);
}
.compare-table th:first-child .attr-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.compare-table th:first-child .attr-label iconify-icon {
  font-size: 1.25rem;
  color: var(--compare-primary);
  opacity: 0.8;
}
.compare-table .compare-col {
  min-width: 280px;
  text-align: center;
  background: #fff;
  transition: all 0.2s ease;
}
.compare-table .attribute-group {
  background: #f8faf8;
  border: none;
}
.compare-table .attribute-group th {
  background: #f8faf8;
  padding: 0.75rem 1.5rem;
  color: var(--compare-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--compare-border);
  border-right: none;
  border-left: none;
}
.compare-table .attribute-group td {
  background: #f8faf8;
  border-bottom: 2px solid var(--compare-border);
}
.compare-table .row-identity th {
  background: #fff;
  border-bottom: 2px solid var(--compare-border);
}
.compare-table .row-identity td {
  background: #fff;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--compare-border);
}

.compare-product-card {
  padding: 0.5rem;
  display: grid;
  place-items: center;
}
.compare-product-card .image-wrap {
  position: relative;
  width: 200px;
  height: 150px;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: #f9faf8;
  border: 1px solid #f1f4ef;
}
.compare-product-card .image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transition: transform 0.5s ease;
}
.compare-product-card:hover .image-wrap img {
  transform: scale(1.08);
}
.compare-product-card .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #ef4444;
  border: none;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.2s;
}
.compare-product-card .remove-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: scale(1.1);
}
.compare-product-card .product-name {
  font-size: 1rem;
  font-weight: 800;
  color: #111827;
  text-decoration: none;
  display: block;
  line-height: 1.4;
}
.compare-product-card .product-name:hover {
  color: var(--compare-primary);
}

.compare-badge-yes {
  background: #f0fdf4;
  color: #15803d;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.compare-badge-no {
  background: #fef2f2;
  color: #b91c1c;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.compare-empty {
  text-align: center;
  padding: 6rem 2rem;
  background: #fff;
  border-radius: 32px;
  border: 1px solid #edf1eb;
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.05);
}
.compare-empty .empty-illustration {
  width: 140px;
  height: 140px;
  margin: 0 auto 2rem;
  background: rgba(91, 179, 24, 0.05);
  border-radius: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--compare-primary);
}
.compare-empty .empty-illustration iconify-icon {
  font-size: 4.5rem;
  opacity: 0.35;
}

@media (max-width: 767.98px) {
  .compare-container {
    margin-top: -1.5rem;
  }
  .compare-table th:first-child {
    min-width: 140px;
    width: 140px;
    padding: 1rem 0.75rem;
    font-size: 0.8rem;
  }
  .compare-table .compare-col {
    min-width: 220px;
  }
  .compare-product-card .image-wrap {
    border-radius: 12px;
  }
}
