/* ==========================================================================
   Water Sponge Balls - comparison block
   Reference: section #EDF9FE, margin-top 30px, padding 28px 10px 26px,
   column gap 12px, panels 160px tall, VS pinned at top 62px,
   table grid 86px | 1fr | 1fr with 9px 8px cells.
   All selectors scoped to .wsb-compare so theme styles cannot win.
   --wsbc-bleed: set to the horizontal padding of the column this block sits
   in, so the tinted band runs edge to edge like the mockup. 0 leaves it inset.
   ========================================================================== */

.wsb-compare {
  --wsbc-blue: #38b6ff;
  --wsbc-blue-dark: #1483c7;
  --wsbc-ink: #1c2b36;
  --wsbc-heading: #20323c;
  --wsbc-muted: #485760;
  --wsbc-line: #edf2f6;
  --wsbc-line-blue: #dceffb;
  --wsbc-border: #cfe9f7;
  --wsbc-good-bg: #f2faff;
  --wsbc-green: #15803d;
  --wsbc-red: #b42318;
  --wsbc-bg: #edf9fe;
  --wsbc-col: 86px;
  --wsbc-bleed: 0px;
  --wsbc-font: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wsbc-font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;

  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 30px calc(var(--wsbc-bleed) * -1) 0;
  padding: 28px 10px 26px;
  background: var(--wsbc-bg);
  font-family: var(--wsbc-font);
  font-size: 14px;
  color: var(--wsbc-ink);
  text-align: center;
  box-sizing: border-box;
}

.wsb-compare *,
.wsb-compare *::before,
.wsb-compare *::after {
  box-sizing: border-box;
}

.wsb-compare p,
.wsb-compare h2,
.wsb-compare div,
.wsb-compare span,
.wsb-compare table {
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
}

.wsb-compare .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

/* --- intro ---------------------------------------------------------------- */

.wsb-compare .wsb-compare__intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wsb-compare .wsb-compare__eyebrow {
  font-family: var(--wsbc-font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--wsbc-blue-dark);
}

.wsb-compare .wsb-compare__heading {
  font-family: var(--wsbc-font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--wsbc-heading);
}

.wsb-compare .wsb-compare__sub {
  padding: 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--wsbc-heading);
}

/* --- visual panels -------------------------------------------------------- */

.wsb-compare .wsb-compare__visual {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
}

.wsb-compare .wsb-compare__panel {
  position: relative;
  height: 160px;
  border-radius: 14px;
  overflow: hidden;
  background: #e3efd9;
}

.wsb-compare .wsb-compare__panel--good {
  background: #c9ecfc;
}

.wsb-compare .wsb-compare__panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 28px 8px 36px;
  object-fit: contain;
}

.wsb-compare .wsb-compare__tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--wsbc-ink);
  white-space: nowrap;
}

.wsb-compare .wsb-compare__tag--good {
  color: var(--wsbc-blue-dark);
}

.wsb-compare .wsb-compare__caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--wsbc-red);
}

.wsb-compare .wsb-compare__panel--good .wsb-compare__caption {
  color: var(--wsbc-green);
}

.wsb-compare .wsb-compare__vs {
  position: absolute;
  left: 50%;
  top: 62px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0d5bd7;
  color: #fff;
  font-family: var(--wsbc-font-display);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* --- table ---------------------------------------------------------------- */

.wsb-compare .wsb-compare__table {
  display: block;
  width: 100%;
  border: 1px solid var(--wsbc-border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  text-align: left;
}

.wsb-compare .wsb-compare__table thead,
.wsb-compare .wsb-compare__table tbody {
  display: block;
}

.wsb-compare .wsb-compare__table tr {
  display: grid;
  grid-template-columns: var(--wsbc-col) minmax(0, 1fr) minmax(0, 1fr);
}

.wsb-compare .wsb-compare__table th,
.wsb-compare .wsb-compare__table td {
  display: block;
  margin: 0;
  padding: 9px 8px;
  border: 0;
  background: #fff;
  font-weight: 400;
  text-align: left;
}

.wsb-compare .wsb-compare__table thead th {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--wsbc-muted);
}

.wsb-compare .wsb-compare__table thead th.wsb-compare__th--good {
  background: var(--wsbc-blue);
  color: #fff;
  font-family: var(--wsbc-font-display);
}

.wsb-compare .wsb-compare__table tbody th {
  border-top: 1px solid var(--wsbc-line);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--wsbc-ink);
}

.wsb-compare .wsb-compare__table tbody td {
  display: flex;
  gap: 5px;
  border-top: 1px solid var(--wsbc-line);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--wsbc-muted);
}

.wsb-compare .wsb-compare__table tbody td.wsb-compare__td--good {
  border-top: 1px solid var(--wsbc-line-blue);
  background: var(--wsbc-good-bg);
  font-weight: 700;
  color: var(--wsbc-ink);
}

.wsb-compare .wsb-compare__mark {
  flex: none;
  display: block;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.wsb-compare .wsb-compare__mark--no {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='10' r='10' fill='%23FFE8E4'/><path d='M6.5 6.5l7 7M13.5 6.5l-7 7' stroke='%23E5341F' stroke-width='2' stroke-linecap='round'/></svg>");
}

.wsb-compare .wsb-compare__mark--yes {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='10' r='10' fill='%2315803D'/><path d='M5.8 10.4l2.8 2.8 5.6-6' fill='none' stroke='%23FFFFFF' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* --- footer --------------------------------------------------------------- */

.wsb-compare .wsb-compare__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--wsbc-green);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--wsbc-ink);
  text-align: left;
}

.wsb-compare .wsb-compare__footer .wsb-compare__mark {
  width: 18px;
  height: 18px;
  margin-top: 0;
}

.wsb-compare .wsb-compare__footer strong {
  font-weight: 800;
}

/* --- tablet --------------------------------------------------------------- */

@media (min-width: 600px) {
  .wsb-compare {
    --wsbc-col: 110px;
    padding: 30px 16px 28px;
    border-radius: 16px;
  }

  .wsb-compare .wsb-compare__heading {
    font-size: 23px;
  }

  .wsb-compare .wsb-compare__sub {
    font-size: 13.5px;
  }

  .wsb-compare .wsb-compare__panel {
    height: 190px;
  }

  .wsb-compare .wsb-compare__vs {
    top: 50%;
    margin-top: -18px;
  }

  .wsb-compare .wsb-compare__tag,
  .wsb-compare .wsb-compare__caption {
    font-size: 12px;
  }

  .wsb-compare .wsb-compare__table thead th,
  .wsb-compare .wsb-compare__table tbody th,
  .wsb-compare .wsb-compare__table tbody td {
    padding: 11px 10px;
    font-size: 12.5px;
  }
}

/* --- desktop -------------------------------------------------------------- */

@media (min-width: 900px) {
  .wsb-compare {
    --wsbc-col: 140px;
    padding: 34px 24px 30px;
  }

  .wsb-compare .wsb-compare__heading {
    font-size: 26px;
  }

  .wsb-compare .wsb-compare__sub {
    font-size: 15px;
  }

  .wsb-compare .wsb-compare__panel {
    height: 230px;
  }

  .wsb-compare .wsb-compare__vs {
    width: 42px;
    height: 42px;
    margin-left: -21px;
    margin-top: -21px;
    font-size: 13px;
  }

  .wsb-compare .wsb-compare__table thead th,
  .wsb-compare .wsb-compare__table tbody th,
  .wsb-compare .wsb-compare__table tbody td {
    padding: 13px 14px;
    font-size: 13.5px;
  }

  .wsb-compare .wsb-compare__mark {
    width: 16px;
    height: 16px;
  }

  .wsb-compare .wsb-compare__footer {
    font-size: 14px;
    padding: 12px 16px;
  }
}
