/* ============================================
   COMPARE — compare.php (aligned with catalog)
   ============================================ */
body:has(.cmp) {
  background:
    radial-gradient(55% 40% at 10% 0%, rgba(36, 72, 198, 0.06), transparent 55%),
    linear-gradient(180deg, #f4f6fb 0%, #f7f8fc 45%, #fff 100%);
}

.cmp { padding-bottom: 3.5rem; }
.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: 2rem 1.15rem 2.25rem;
}
.cmp-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .cmp-hero-inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }
}
.cmp-hero .shop-eyebrow { color: #9db0ff; }
.cmp-hero .shop-h1 {
  color: #fff;
  margin: 0.3rem 0 0.55rem;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
}
.cmp-hero .shop-lead {
  color: rgba(255, 255, 255, 0.82);
  max-width: 42ch;
  margin: 0 0 1.1rem;
  font-size: 0.98rem;
}
.cmp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.cmp-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
@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.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}
.cmp-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.cmp-stat span {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.74rem;
  opacity: 0.78;
  line-height: 1.3;
}

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

.cmp-toolbar {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
@media (min-width: 720px) {
  .cmp-toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.cmp-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 0.9rem;
  background: rgba(255, 255, 255, 0.88);
  border: none;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(36, 72, 198, 0.1);
}
.cmp-search:focus-within {
  box-shadow:
    inset 0 0 0 1px rgba(36, 72, 198, 0.28),
    0 0 0 3px rgba(36, 72, 198, 0.1);
}
.cmp-search .shop-icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
  flex-shrink: 0;
}
.cmp-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  height: 100%;
}
.cmp-search-clear {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: rgba(36, 72, 198, 0.08);
  color: var(--blue);
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
}
.cmp-search-clear[hidden] { display: none; }

.cmp-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cmp-sort label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.cmp-sort select {
  height: 44px;
  padding: 0 2rem 0 0.8rem;
  border: none;
  border-radius: 12px;
  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='%232448c6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 0.75rem center no-repeat;
  box-shadow: inset 0 0 0 1px rgba(36, 72, 198, 0.12);
  appearance: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  min-width: 150px;
}

/* ——— Chips ——— */
.cmp-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.1rem 0 0.75rem;
  margin: 0 0 0.35rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cmp-chips::-webkit-scrollbar { display: none; }
.cmp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: none;
  box-shadow: inset 0 0 0 1px rgba(36, 72, 198, 0.1);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.cmp-chip .shop-icon {
  width: 14px;
  height: 14px;
  color: var(--blue);
}
.cmp-chip em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: rgba(36, 72, 198, 0.08);
  color: var(--blue);
}
.cmp-chip:hover {
  background: rgba(36, 72, 198, 0.08);
}
.cmp-chip.is-active {
  background: var(--blue);
  box-shadow: none;
  color: #fff;
}
.cmp-chip.is-active .shop-icon { color: #fff; }
.cmp-chip.is-active em {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cmp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.cmp-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.cmp-legend-pts {
  color: var(--blue);
}
.cmp-legend-pts .shop-icon,
.cmp-legend-pts svg {
  width: 13px;
  height: 13px;
}
.cmp-legend-hint {
  margin-left: auto;
  opacity: 0.7;
  font-weight: 500;
}
@media (max-width: 719px) {
  .cmp-legend-hint { display: none; }
}

.cmp-yes,
.cmp-no {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
}
.cmp-yes {
  background: rgba(26, 159, 92, 0.12);
  color: #1a9f5c;
}
.cmp-no {
  background: rgba(6, 18, 47, 0.05);
  color: #a0a8ba;
}
.cmp-yes .shop-icon,
.cmp-no .shop-icon {
  width: 14px;
  height: 14px;
}
.cmp-legend .cmp-yes,
.cmp-legend .cmp-no {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

/* ——— Table ——— */
.cmp-table-wrap {
  display: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.72);
  border: none;
  border-radius: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(36, 72, 198, 0.08),
    0 16px 40px rgba(6, 18, 47, 0.06);
  margin-bottom: 1.35rem;
  backdrop-filter: blur(8px);
}
@media (min-width: 900px) {
  .cmp-table-wrap { display: block; }
}
.cmp-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}
.cmp-table thead th {
  padding: 0.75rem 0.55rem;
  background: rgba(36, 72, 198, 0.05);
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  border-bottom: 1px solid rgba(6, 18, 47, 0.06);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.cmp-table thead th.cmp-sticky {
  text-align: left;
  padding-left: 1rem;
  left: 0;
  z-index: 3;
  background: #eef1fa;
  box-shadow: 4px 0 14px rgba(6, 18, 47, 0.04);
}
.cmp-th-ico {
  display: grid;
  place-items: center;
  margin: 0 auto 0.2rem;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(36, 72, 198, 0.08);
}
.cmp-th-ico-pts {
  background: rgba(36, 72, 198, 0.1);
}
.cmp-th-ico .shop-icon { width: 14px; height: 14px; }
.cmp-th-label { display: block; }

.cmp-table tbody td {
  padding: 0.65rem 0.55rem;
  text-align: center;
  border-bottom: 1px solid rgba(6, 18, 47, 0.05);
  vertical-align: middle;
}
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody tr:hover td { background: rgba(36, 72, 198, 0.035); }

.cmp-sticky {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fbfcfe;
  text-align: left !important;
  box-shadow: 4px 0 14px rgba(6, 18, 47, 0.04);
}
.cmp-row:hover .cmp-sticky { background: #f3f5fc; }

.cmp-brand a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  padding-left: 0.35rem;
  min-width: 188px;
}
.cmp-brand img {
  width: 68px;
  height: 34px;
  object-fit: cover;
  border-radius: 9px;
  background: rgba(36, 72, 198, 0.05);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(6, 18, 47, 0.06);
}
.cmp-brand span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  text-align: left;
}
.cmp-badge {
  display: inline-flex;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(36, 72, 198, 0.09);
  color: var(--blue);
  font-size: 0.66rem;
  font-weight: 700;
}
.cmp-badge-hot {
  background: rgba(252, 42, 0, 0.1);
  color: #e02400;
}

.cmp-range strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cmp-range small {
  color: var(--muted);
  margin-left: 0.12rem;
  font-weight: 600;
}

.cmp-pts span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(36, 72, 198, 0.08);
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
.cmp-pts .shop-icon,
.cmp-pts svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.cmp-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 36px;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.12s;
}
.cmp-buy:hover {
  background: var(--blue);
}
.cmp-buy .shop-icon {
  width: 14px;
  height: 14px;
}
.cmp-buy-block {
  width: 100%;
  height: 42px;
}

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

/* ——— Mobile cards ——— */
.cmp-cards {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 560px) {
  .cmp-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .cmp-cards { display: none; }
}
.cmp-card {
  background: rgba(255, 255, 255, 0.88);
  border: none;
  border-radius: 18px;
  padding: 0.9rem;
  box-shadow:
    inset 0 0 0 1px rgba(36, 72, 198, 0.08),
    0 10px 28px rgba(6, 18, 47, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cmp-card-top {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.cmp-card-top img {
  width: 88px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(36, 72, 198, 0.05);
  flex-shrink: 0;
}
.cmp-card-top h2 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.cmp-card-top p {
  margin: 0 0 0.3rem;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}
.cmp-card-pts {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-bottom: 0.3rem;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: rgba(36, 72, 198, 0.08);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
}
.cmp-card-pts .shop-icon,
.cmp-card-pts svg {
  width: 12px;
  height: 12px;
}
.cmp-card-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}
.cmp-card-feats li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(36, 72, 198, 0.05);
}
.cmp-card-feats li.is-off {
  background: transparent;
  opacity: 0.5;
}
.cmp-card-feats li > .shop-icon:first-child {
  width: 14px;
  height: 14px;
  color: var(--blue);
}
.cmp-card-feats li.is-on > .shop-icon:last-child { color: #1a9f5c; width: 14px; height: 14px; }
.cmp-card-feats li.is-off > .shop-icon:last-child { color: #a0a8ba; width: 14px; height: 14px; }

.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.25rem 1.15rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(36, 72, 198, 0.1);
  margin-bottom: 1.5rem;
}
.cmp-empty-live[hidden] { display: none; }
.cmp-empty-live strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.cmp-empty-live p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

/* ——— Guide ——— */
.cmp-guide {
  margin: 1.75rem 0 2rem;
}
.cmp-guide-head { margin-bottom: 1rem; max-width: 460px; }
.cmp-guide-head .shop-h2 { margin: 0 0 0.35rem; }
.cmp-guide-head .shop-lead { margin: 0; font-size: 0.95rem; }
.cmp-guide-grid {
  display: grid;
  gap: 0.55rem;
}
@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.7rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: inset 0 0 0 1px rgba(36, 72, 198, 0.08);
  transition: transform 0.18s ease, background 0.18s;
}
.cmp-guide-item:hover {
  transform: translateY(-2px);
  background: #fff;
}
.cmp-guide-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(36, 72, 198, 0.09);
  color: var(--blue);
}
.cmp-guide-ico .shop-icon { width: 18px; height: 18px; }
.cmp-guide-item strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.1rem;
  color: var(--ink);
}
.cmp-guide-item span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.35;
}
.cmp-guide-item > .shop-icon {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

/* ——— CTA ——— */
.cmp-cta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background:
    linear-gradient(135deg, rgba(36, 72, 198, 0.1), rgba(36, 72, 198, 0.04));
  border: none;
  border-radius: 22px;
  padding: 1.4rem 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(36, 72, 198, 0.12);
}
@media (min-width: 720px) {
  .cmp-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.65rem 1.85rem;
  }
}
.cmp-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.6rem);
  margin: 0 0 0.3rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.cmp-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 42ch;
}
.cmp-cta-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
