/* ============================================
   COMPARE — compare.php
   ============================================ */
.cmp { padding-bottom: 3rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Hero ——— */
.cmp-hero {
  background:
    radial-gradient(700px 280px at 100% 0%, rgba(61, 95, 217, 0.22), transparent 55%),
    linear-gradient(160deg, #031b4e 0%, #15358a 55%, #2448c6 120%);
  color: #fff;
  padding: 2.25rem 1.15rem 2.5rem;
}
.cmp-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 900px) {
  .cmp-hero-inner {
    grid-template-columns: 1.35fr 1fr;
    align-items: end;
  }
}
.cmp-hero .shop-eyebrow { color: #9db0ff; }
.cmp-hero .shop-h1 {
  color: #fff;
  margin: 0.35rem 0 0.65rem;
  font-size: clamp(1.85rem, 4.5vw, 2.85rem);
}
.cmp-hero .shop-lead {
  color: rgba(255, 255, 255, 0.82);
  max-width: 44ch;
  margin: 0 0 1.25rem;
}
.cmp-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
@media (min-width: 520px) {
  .cmp-hero-stats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  .cmp-hero-stats { grid-template-columns: 1fr 1fr; }
}
.cmp-stat {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}
.cmp-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.cmp-stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  opacity: 0.8;
  line-height: 1.3;
}

/* ——— Body ——— */
.cmp-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.35rem 1.15rem 0;
}

.cmp-toolbar {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
  position: relative;
  top: auto;
  z-index: 1;
  background: transparent;
  padding: 0;
}
@media (min-width: 720px) {
  .cmp-toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.cmp-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 52px;
  padding: 0 1rem;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.cmp-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 72, 198, 0.14);
}
.cmp-search .shop-icon {
  width: 20px;
  height: 20px;
  color: var(--blue);
  flex-shrink: 0;
}
.cmp-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  height: 100%;
}
.cmp-search-clear {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-mist);
  color: var(--blue);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.cmp-search-clear[hidden] { display: none; }

.cmp-sort {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.cmp-sort label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.cmp-sort select {
  height: 48px;
  padding: 0 2.2rem 0 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23031b4e' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 0.85rem center no-repeat;
  appearance: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  min-width: 160px;
}

/* ——— Chips ——— */
.cmp-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.85rem;
  margin: 0 -0.25rem 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cmp-chips::-webkit-scrollbar { display: none; }
.cmp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cmp-chip .shop-icon {
  width: 16px;
  height: 16px;
  color: var(--blue);
}
.cmp-chip em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--blue-mist);
  color: var(--blue);
}
.cmp-chip:hover {
  border-color: rgba(36, 72, 198, 0.35);
  background: var(--blue-wash);
}
.cmp-chip.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.cmp-chip.is-active .shop-icon { color: #fff; }
.cmp-chip.is-active em {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.cmp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.cmp-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.cmp-legend-hint {
  margin-left: auto;
  opacity: 0.75;
}
@media (max-width: 719px) {
  .cmp-legend-hint { display: none; }
}

.cmp-yes,
.cmp-no {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
}
.cmp-yes {
  background: rgba(26, 159, 92, 0.12);
  color: #1a9f5c;
}
.cmp-no {
  background: rgba(3, 27, 78, 0.06);
  color: #9aa3b8;
}
.cmp-yes .shop-icon,
.cmp-no .shop-icon {
  width: 16px;
  height: 16px;
}

/* ——— Table ——— */
.cmp-table-wrap {
  display: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid rgba(3, 27, 78, 0.07);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
}
@media (min-width: 900px) {
  .cmp-table-wrap { display: block; }
}
.cmp-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
.cmp-table thead th {
  padding: 1rem 0.75rem;
  background: var(--blue-wash);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.cmp-table thead th.cmp-sticky {
  text-align: left;
  padding-left: 1.15rem;
  left: 0;
  z-index: 3;
  box-shadow: 4px 0 12px rgba(3, 27, 78, 0.04);
}
.cmp-th-ico {
  display: grid;
  place-items: center;
  margin: 0 auto 0.25rem;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
}
.cmp-th-ico .shop-icon { width: 15px; height: 15px; }
.cmp-th-label { display: block; }

.cmp-table tbody td {
  padding: 0.85rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(3, 27, 78, 0.06);
  vertical-align: middle;
}
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:hover td { background: var(--blue-wash); }
.cmp-table tbody tr.is-special td {
  background: linear-gradient(90deg, rgba(36, 72, 198, 0.06), transparent 40%);
}
.cmp-table tbody tr.is-special:hover td {
  background: rgba(36, 72, 198, 0.09);
}

.cmp-sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  text-align: left !important;
  box-shadow: 4px 0 12px rgba(3, 27, 78, 0.04);
}
.cmp-row:hover .cmp-sticky { background: var(--blue-wash); }
.cmp-row.is-special .cmp-sticky {
  background: linear-gradient(90deg, rgba(36, 72, 198, 0.08), #fff);
}

.cmp-brand a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  padding-left: 0.4rem;
  min-width: 200px;
}
.cmp-brand img {
  width: 72px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--blue-wash);
  flex-shrink: 0;
}
.cmp-brand span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: left;
}
.cmp-badge {
  display: inline-flex;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--blue-mist);
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
}
.cmp-badge-hot {
  background: rgba(252, 42, 0, 0.1);
  color: #fc2a00;
}

.cmp-range strong {
  font-weight: 700;
  color: var(--ink);
}
.cmp-range small {
  color: var(--muted);
  margin-left: 0.15rem;
}

.cmp-buy {
  padding: 0.45rem 0.85rem !important;
  font-size: 0.82rem !important;
  min-height: 0 !important;
  white-space: nowrap;
}
.cmp-buy .shop-icon { width: 14px; height: 14px; }

.cmp-empty-row td {
  padding: 2.5rem 1rem !important;
  color: var(--muted);
  font-weight: 600;
}

/* ——— Mobile cards ——— */
.cmp-cards {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 560px) {
  .cmp-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .cmp-cards { display: none; }
}
.cmp-card {
  background: #fff;
  border: 1px solid rgba(3, 27, 78, 0.07);
  border-radius: 22px;
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.cmp-card.is-special {
  border-color: rgba(36, 72, 198, 0.35);
  box-shadow: 0 0 0 2px rgba(36, 72, 198, 0.12), var(--shadow);
}
.cmp-card-top {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.cmp-card-top img {
  width: 96px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--blue-wash);
  flex-shrink: 0;
}
.cmp-card-top h2 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.cmp-card-top p {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}
.cmp-card-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.cmp-card-feats li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--blue-wash);
}
.cmp-card-feats li.is-off {
  background: transparent;
  opacity: 0.55;
}
.cmp-card-feats li > .shop-icon:first-child {
  width: 16px;
  height: 16px;
  color: var(--blue);
}
.cmp-card-feats li.is-on > .shop-icon:last-child { color: #1a9f5c; width: 16px; height: 16px; }
.cmp-card-feats li.is-off > .shop-icon:last-child { color: #9aa3b8; width: 16px; height: 16px; }

.cmp-card[hidden],
.cmp-row[hidden] { display: none !important; }

.cmp.is-empty-search .cmp-table-wrap,
.cmp.is-empty-search .cmp-cards { display: none !important; }

.cmp-empty-live {
  text-align: center;
  padding: 2.5rem 1.25rem;
  background: #fff;
  border-radius: 22px;
  border: 1px dashed var(--line);
  margin-bottom: 1.75rem;
}
.cmp-empty-live[hidden] { display: none; }
.cmp-empty-live strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.cmp-empty-live p {
  margin: 0 0 1rem;
  color: var(--muted);
}

/* ——— Guide ——— */
.cmp-guide {
  margin: 2rem 0 2.25rem;
}
.cmp-guide-head { margin-bottom: 1.15rem; max-width: 480px; }
.cmp-guide-head .shop-h2 { margin: 0 0 0.4rem; }
.cmp-guide-head .shop-lead { margin: 0; }
.cmp-guide-grid {
  display: grid;
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .cmp-guide-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .cmp-guide-grid { grid-template-columns: repeat(3, 1fr); }
}
.cmp-guide-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.05rem;
  background: #fff;
  border: 1px solid rgba(3, 27, 78, 0.07);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cmp-guide-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.cmp-guide-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--blue-mist);
  color: var(--blue);
}
.cmp-guide-ico .shop-icon { width: 20px; height: 20px; }
.cmp-guide-item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
  color: var(--ink);
}
.cmp-guide-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.cmp-guide-item > .shop-icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

/* ——— CTA ——— */
.cmp-cta {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  background: linear-gradient(135deg, var(--blue-mist), var(--blue-wash));
  border: 1px solid rgba(36, 72, 198, 0.14);
  border-radius: 28px;
  padding: 1.65rem 1.35rem;
}
@media (min-width: 720px) {
  .cmp-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.25rem;
  }
}
.cmp-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.cmp-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 42ch;
}
.cmp-cta-actions {
  flex-shrink: 0;
}
