.chippc-compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  background: #fff;
  border-top: 1px solid rgba(0, 54, 120, 0.12);
  box-shadow: 0 -8px 30px rgba(0, 22, 40, 0.12);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  transform: translateY(0);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.chippc-compare-bar[hidden] {
  display: block !important;
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.chippc-compare-bar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: center;
}

.chippc-compare-bar__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chippc-compare-bar__title {
  color: #003678;
  font-size: 0.95rem;
}

.chippc-compare-bar__count {
  font-size: 0.8rem;
  font-weight: 800;
  color: #5b6678;
}

.chippc-compare-bar__slots {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chippc-compare-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  max-width: 240px;
  background: #f7fafc;
  border: 1px solid rgba(0, 54, 120, 0.1);
  border-radius: 12px;
  padding: 8px;
}

.chippc-compare-slot.is-empty {
  justify-content: center;
  color: #94a3b8;
  font-size: 1.4rem;
  min-width: 56px;
  max-width: 56px;
  border-style: dashed;
  background: #fff;
}

.chippc-compare-slot__thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
}

.chippc-compare-slot__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chippc-compare-slot__meta {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.chippc-compare-slot__meta strong {
  font-size: 0.78rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chippc-compare-slot__remove {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.chippc-compare-bar__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.chippc-compare-bar__toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -44px;
  background: #001228;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.chippc-compare-add.is-selected {
  background: rgba(0, 54, 120, 0.08);
  border-color: #003678;
}

button.chippc-compare-add.cta-secondary-btn {
  cursor: pointer;
  font: inherit;
}

.chippc-compare-pdp-wrap {
  display: inline-flex;
}

.chippc-compare-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.chippc-compare-product-col {
  border: 1px solid rgba(0, 54, 120, 0.12);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.chippc-compare-product-col__img {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  margin-bottom: 10px;
}

.chippc-compare-product-col__title {
  font-size: 1rem;
  margin: 0 0 6px;
}

.chippc-compare-product-col__sku {
  font-size: 0.82rem;
  color: #5b6678;
  margin-bottom: 8px;
}

.chippc-compare-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chippc-compare-badges .badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 54, 120, 0.08);
  color: #003678;
}

.chippc-compare-product-col__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chippc-compare-table-scroll {
  overflow-x: auto;
}

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

.chippc-compare-table th,
.chippc-compare-table td {
  border-bottom: 1px solid rgba(0, 54, 120, 0.1);
  padding: 12px 14px;
  vertical-align: top;
  text-align: left;
}

.chippc-compare-table th {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  width: 180px;
  color: #003678;
  font-weight: 800;
}

.chippc-compare-table tr.is-diff td {
  background: rgba(112, 212, 255, 0.12);
}

@media (max-width: 767px) {
  .chippc-compare-bar__inner {
    grid-template-columns: 1fr;
  }
  .chippc-compare-bar__actions {
    justify-content: stretch;
  }
  .chippc-compare-bar__actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chippc-compare-bar {
    transition: none;
  }
}
