/* TreatShelf guide compare matrix — horizontal, crawlable <table> */
.ts-compare {
  margin: 2.25rem 0 0;
  padding: 1.35rem 0 0;
  border-top: 1px solid var(--line, #d5ddd8);
}
.ts-compare__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
}
.ts-compare__head h2 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink, #14201c);
}
.ts-compare__lede {
  margin: 0 0 0.9rem;
  max-width: 38rem;
  color: var(--muted, #6a7872);
  font-size: 0.98rem;
  line-height: 1.5;
}
.ts-compare__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.65rem;
  min-height: 1.5rem;
}
.ts-compare__swipe {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--brand, #0f3d32);
  font-size: 0.9rem;
  font-weight: 700;
}
.ts-compare__swipe svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  animation: ts-compare-nudge 1.4s ease-in-out infinite;
}
@keyframes ts-compare-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
.ts-compare__dots {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.ts-compare__dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5d2cb;
}
.ts-compare__dots span.is-on {
  background: var(--brand, #0f3d32);
  width: 16px;
  border-radius: 999px;
}

.ts-compare__scroller {
  position: relative;
  border: 1px solid var(--line, #d5ddd8);
  border-radius: var(--radius, 14px);
  background: #fff;
  overflow: hidden;
}
.ts-compare__scroller::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2.25rem;
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95));
  z-index: 3;
}
.ts-compare__scroller.is-end::after { opacity: 0; }
.ts-compare__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.ts-compare-matrix {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  min-width: 100%;
}
.ts-compare-matrix th,
.ts-compare-matrix td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line, #d5ddd8);
  border-right: 1px solid var(--line, #d5ddd8);
  vertical-align: top;
  background: #fff;
}
.ts-compare-matrix tr:last-child th,
.ts-compare-matrix tr:last-child td { border-bottom: 0; }
.ts-compare-matrix th:last-child,
.ts-compare-matrix td:last-child { border-right: 0; }

.ts-compare-matrix .attr {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 6.25rem;
  min-width: 6.25rem;
  max-width: 6.25rem;
  background: #fff;
  color: var(--muted, #6a6a6a);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.25;
  box-shadow: 1px 0 0 var(--line, #e5e0e2);
  overflow: visible;
}
.ts-compare-score-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: uppercase;
}
.ts-compare-matrix .attr--score .score-info__btn {
  width: 1rem;
  height: 1rem;
  font-size: 0.62rem;
  letter-spacing: 0;
  text-transform: none;
}
.ts-compare-matrix .attr--score .score-info__panel {
  z-index: 100;
  width: min(17.5rem, calc(100vw - 2.5rem));
  text-transform: none;
  letter-spacing: 0;
}
/* Fixed tip — never toggle scroller overflow (that resets swipe position) */
.ts-compare-matrix .attr--score .score-info[open] > .score-info__panel {
  position: fixed;
  left: 1rem;
  right: auto;
  bottom: auto;
  transform: none;
}
.ts-compare-matrix .attr--score .score-info[open] > .score-info__panel::after {
  display: none;
}
.ts-compare-matrix thead .attr {
  z-index: 4;
  background: #fff;
  color: var(--lacquer-deep, #7a0c22);
  font-size: 0.78rem;
}

.ts-compare-matrix .pick {
  width: min(62vw, 12.5rem);
  min-width: min(62vw, 12.5rem);
  max-width: 13.5rem;
}
@media (min-width: 720px) {
  .ts-compare-matrix .pick {
    width: 10.5rem;
    min-width: 10.5rem;
  }
  .ts-compare-matrix .attr {
    width: 7.75rem;
    min-width: 7.75rem;
    max-width: 7.75rem;
    font-size: 0.78rem;
  }
}

.ts-compare-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 0;
}
.ts-compare-pick__rank {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lacquer-deep, #7a0c22);
  line-height: 1;
  height: 1.25rem;
  margin-bottom: 0.45rem;
  width: 100%;
}
.ts-compare-pick__rank span {
  color: var(--muted, #6a6a6a);
  font-size: 0.75rem;
  font-weight: 650;
  font-family: var(--font-body, system-ui, sans-serif);
  margin-left: 0.15rem;
}
.ts-compare-pick img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line, #e5e0e2);
  margin: 0 0 0.55rem;
  display: block;
  padding: 0.2rem;
  box-sizing: border-box;
}
.ts-compare-pick__name {
  margin: 0;
  width: 100%;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 4.6rem;
}
.ts-compare-pick__name .brand {
  display: block;
  color: var(--lacquer-deep, #7a0c22);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.25;
  margin-bottom: 0.15rem;
}
.ts-compare-pick__name .brand:hover { text-decoration: underline; }
.ts-compare-pick__name .product {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-height: 1.25;
  color: var(--ink, #14201c);
}

.ts-compare-matrix .cell {
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink, #14201c);
  white-space: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.ts-compare-matrix .cell-best {
  min-width: 11rem;
  max-width: 16rem;
  font-size: 0.84rem;
}
.ts-compare-matrix .actions {
  padding-top: 0.55rem;
  padding-bottom: 0.75rem;
}
.ts-compare__buy,
.ts-compare__jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ts-compare__buy {
  background: #ff9900;
  color: #111 !important;
}
.ts-compare__jump {
  margin-top: 0.35rem;
  background: transparent;
  border-color: var(--ink, #0a090a);
  color: var(--ink, #0a090a) !important;
}
.ts-compare__jump:hover {
  background: var(--ink, #0a090a);
  color: #fff !important;
}

/* Edyt theme overrides */
.ts-compare {
  --ink: #0a090a;
  --muted: #7a7076;
  --line: #e8e0e3;
  --brand: #7a0c22;
  --safe: #9b1b34;
  --paper: #f3ebed;
  --paper-deep: #ebe0e4;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --radius: 0;
  border-top-color: var(--line);
}
.ts-compare__head h2 {
  font-family: var(--font-display);
  font-weight: 500;
}
.ts-compare__swipe { color: var(--brand); }
.ts-compare__dots span { background: #d8ccd0; }
.ts-compare__dots span.is-on { background: var(--brand); }
.ts-compare-pick__swatch {
  width: 52px;
  height: 52px;
  border-radius: 999px 999px 40% 40%;
  border: 1px solid var(--line);
  margin: 0 0 0.55rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
.ts-compare__jump {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink) !important;
}
.ts-compare__jump:hover {
  background: var(--ink);
  color: #fff !important;
}
.ts-compare-score-label .score-info__btn {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.ts-compare-score-label .score-info[open] > .score-info__btn,
.ts-compare-score-label .score-info__btn:hover {
  background: var(--brand);
  border-color: var(--brand);
}

/* Guard: site CSS must not turn .pick into display:grid */
.ts-compare-matrix th.pick,
.ts-compare-matrix td.pick {
  display: table-cell !important;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line, #d5ddd8);
  border-right: 1px solid var(--line, #d5ddd8);
  vertical-align: top;
  background: #fff;
  gap: unset;
  grid-template-columns: unset;
}
