.compare-toggle {
  position: absolute;
  z-index: 8;
  top: 12px;
  right: 12px;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid #607078;
  border-radius: 11px;
  background: rgb(7 12 15 / 90%);
  color: #f5f7f3;
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgb(0 0 0 / 34%);
  backdrop-filter: blur(10px);
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.compare-toggle:hover,
.compare-toggle:focus-visible {
  border-color: var(--lime);
  color: var(--lime);
  transform: translateY(-1px);
}

.compare-toggle.is-selected,
.compare-toggle[aria-pressed="true"] {
  border-color: var(--lime);
  background: var(--lime);
  color: #0a0d0e;
  box-shadow: 0 0 0 3px rgb(199 255 46 / 12%), 0 8px 24px rgb(199 255 46 / 18%);
}

.compare-toggle.is-limit-reached {
  border-color: #ff5f5f;
  color: #ff5f5f;
  animation: compare-shake .35s ease both;
}

.product-compare-toggle {
  position: relative;
  inset: auto;
  display: inline-flex;
  width: auto;
  min-height: 44px;
  margin-top: 12px;
  gap: 9px;
  padding: 0 17px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 900;
}

.product-compare-toggle .sr-only {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  overflow: visible;
  white-space: normal;
}

.header-compare-link {
  isolation: isolate;
}

.compare-count {
  position: absolute;
  top: -7px;
  right: 7px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #0a0f12;
  border-radius: 999px;
  background: var(--lime);
  color: #0a0d0e !important;
  font-size: .59rem !important;
  font-weight: 1000;
  line-height: 1;
}

.compare-count[hidden] {
  display: none;
}

.compare-tray {
  position: fixed;
  z-index: 69;
  right: 0;
  bottom: 18px;
  left: 0;
  pointer-events: none;
}

.compare-tray-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 11px 13px 11px 18px;
  border: 1px solid #46545a;
  border-radius: 15px;
  background: rgb(7 12 15 / 96%);
  box-shadow: 0 20px 60px rgb(0 0 0 / 54%), 0 0 34px rgb(0 217 197 / 7%);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.compare-tray-summary {
  display: grid;
  gap: 3px;
  min-width: 142px;
}

.compare-tray-summary strong {
  color: var(--lime);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.compare-tray-summary span {
  color: #9ca8ac;
  font-size: .7rem;
}

.compare-tray-chips {
  display: flex;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.compare-chip {
  display: inline-flex;
  min-width: 0;
  max-width: 210px;
  align-items: center;
  gap: 7px;
  padding: 7px 7px 7px 10px;
  border: 1px solid #303b40;
  border-radius: 9px;
  background: #11181c;
  color: #dce3e4;
  font-size: .7rem;
}

.compare-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-chip-remove,
.compare-remove,
.compare-page-head > button {
  border: 1px solid #46545a;
  background: transparent;
  color: #c9d1d3;
  cursor: pointer;
}

.compare-chip-remove {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  padding: 0;
  border-radius: 7px;
  line-height: 1;
}

.compare-chip-remove:hover,
.compare-remove:hover,
.compare-page-head > button:hover {
  border-color: #ff6666;
  color: #ff7777;
}

.compare-tray-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border-radius: 10px;
  background: var(--lime);
  color: #080b0c;
  font-size: .78rem;
  font-weight: 1000;
  white-space: nowrap;
}

.compare-hero {
  overflow: hidden;
  padding: 68px 0 45px;
  border-bottom: 1px solid rgb(255 255 255 / 7%);
  background:
    radial-gradient(circle at 80% 45%, rgb(199 255 46 / 11%), transparent 27%),
    radial-gradient(circle at 72% 42%, rgb(0 217 197 / 9%), transparent 38%),
    #080d10;
}

.compare-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.6rem, 5.8vw, 5rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.compare-hero h1 span {
  color: var(--lime);
}

.compare-hero p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #aeb9bc;
  font-size: 1rem;
  line-height: 1.65;
}

.compare-page {
  min-height: 480px;
  padding: 38px 0 90px;
}

.compare-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
}

.compare-page-head h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.compare-page-head p,
.compare-page-status {
  margin: 0;
  color: #9ca8ac;
  font-size: .82rem;
}

.compare-page-head > button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
}

.compare-page-head > button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.compare-page-status {
  min-height: 22px;
  margin-bottom: 18px;
}

.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid #344147;
  border-radius: 16px;
  background: #0b1114;
  box-shadow: 0 20px 54px rgb(0 0 0 / 23%);
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.compare-table th,
.compare-table td {
  min-width: 190px;
  padding: 18px;
  border-right: 1px solid #273238;
  border-bottom: 1px solid #273238;
  text-align: left;
  vertical-align: top;
}

.compare-table th:last-child,
.compare-table td:last-child {
  border-right: 0;
}

.compare-table tbody tr:last-child > * {
  border-bottom: 0;
}

.compare-table .compare-row-label {
  position: sticky;
  z-index: 2;
  left: 0;
  width: 150px;
  min-width: 150px;
  background: #0d1518;
  color: #93a0a4;
  font-size: .69rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.compare-product-head {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding-right: 28px;
}

.compare-product-head img {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  background: #f4f6f3;
  object-fit: contain;
}

.compare-product-head a {
  color: #f4f7f5;
  font-size: .82rem;
  line-height: 1.35;
}

.compare-product-head a:hover,
.compare-detail-link:hover {
  color: var(--lime);
}

.compare-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  font-size: 1rem;
}

.compare-table td {
  color: #e4e9e7;
  font-size: .82rem;
  line-height: 1.45;
}

.compare-table tbody tr:first-child td {
  color: var(--lime);
  font-size: 1.08rem;
  font-weight: 1000;
}

.compare-missing {
  color: #788489 !important;
  font-weight: 500 !important;
}

.compare-detail-link {
  display: inline-flex;
  color: var(--mint);
  font-size: .76rem;
  font-weight: 900;
}

.compare-empty {
  display: grid;
  max-width: 720px;
  min-height: 300px;
  margin: 0 auto;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 45px 24px;
  border: 1px dashed #3d4c52;
  border-radius: 17px;
  background: rgb(255 255 255 / 2%);
  text-align: center;
}

.compare-empty > span {
  color: var(--lime);
  font-size: 2.6rem;
}

.compare-empty h3 {
  margin: 0;
  font-size: 1.4rem;
}

.compare-empty p {
  max-width: 510px;
  margin: 0;
  color: #9ca8ac;
  line-height: 1.55;
}

.compare-empty a {
  margin-top: 12px;
  padding: 12px 17px;
  border-radius: 9px;
  background: var(--lime);
  color: #080b0c;
  font-size: .8rem;
  font-weight: 1000;
}

@keyframes compare-shake {
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}

@media (max-width: 760px) {
  .compare-toggle {
    width: 35px;
    height: 35px;
    top: 10px;
    right: 10px;
  }

  .product-compare-toggle {
    width: 100%;
    min-height: 44px;
  }

  .home-v1-bottom-nav .compare-count {
    top: 5px;
    right: calc(50% - 24px);
  }

  .compare-tray {
    right: 10px;
    bottom: 84px;
    left: 10px;
  }

  .compare-tray-inner {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  .compare-tray-summary {
    display: none;
  }

  .compare-tray-chips {
    grid-column: 1;
  }

  .compare-chip {
    max-width: 132px;
  }

  .compare-tray-cta {
    grid-column: 2;
    font-size: .68rem;
  }

  .compare-hero {
    padding: 48px 0 35px;
  }

  .compare-hero h1 {
    font-size: 2.8rem;
  }

  .compare-page {
    padding-top: 28px;
  }

  .compare-page-head {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }

  .compare-table th,
  .compare-table td {
    padding: 14px;
  }
}

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

  .compare-toggle.is-limit-reached {
    animation: none;
  }
}
