/* The shortlist stays compact above the mobile navigation. */
.listing-info .compare-toggle,
.detail-actions .compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.listing-info .compare-toggle {
  min-height: 34px;
  margin-top: 8px;
  padding: 3px 8px;
  border: 1px solid #dfddd8;
  border-radius: 8px;
  background: #fff;
  color: #534d44;
  font-size: 11px;
  font-weight: 650;
}
.compare-toggle svg { width: 16px; height: 16px; flex: 0 0 auto; }
.compare-toggle[aria-pressed="true"] {
  border-color: #e2b9a9;
  background: #fff2ea;
  color: #853818;
}
.catalog-compare-dock {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100vw - 20px);
  padding: 6px 8px 6px 15px;
  background: #302c27;
  font-variant-numeric: tabular-nums;
  z-index: 70;
}
.catalog-compare-dock[hidden],
body:has(.modal-backdrop:not(.hidden)) .catalog-compare-dock { display: none; }
.catalog-compare-dock button {
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 8px;
}
.catalog-compare-dock [data-oc-action="compare"] {
  background: #fff;
  color: #302c27;
}
.catalog-compare-dock [data-compare-clear] { font-size: 20px; }
.modal:has(.compare-scroll) { width: min(900px, 100%); }
.compare-panel h2 { overflow-wrap: anywhere; }
.compare-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.compare-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-weight: 650;
  cursor: pointer;
}
.compare-mode input { width: 16px; height: 16px; accent-color: #a44327; }
.compare-toolbar .text-button { min-height: 36px; color: #7c3b27; }
.compare-notice { background: #fff5e9; border-radius: 8px; padding: 8px 11px; }
.compare-swipe { display: none; margin: 2px 0 8px; }
.compare-scroll {
  overflow-x: auto;
  border: 1px solid #ece9e3;
  border-radius: 10px;
  scrollbar-width: thin;
}
.compare-scroll:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.compare-table {
  --label-width: 120px;
  --listing-width: 148px;
  table-layout: fixed;
  min-width: calc(var(--label-width) + var(--listing-width) * var(--columns));
  border-collapse: separate;
  border-spacing: 0;
}
.compare-table[data-columns="1"] { --columns: 1; }
.compare-table[data-columns="2"] { --columns: 2; }
.compare-table[data-columns="3"] { --columns: 3; }
.compare-table[data-columns="4"] { --columns: 4; }
.compare-table :is(th, td) {
  min-width: 0;
  padding: 9px 10px;
  font-size: 13px;
  color: #302c27;
  overflow-wrap: anywhere;
}
.compare-table thead th { background: #fff; }
.compare-table tbody tr:last-child :is(th, td) { border-bottom: 0; }
.compare-table tbody tr:first-child td { font-weight: 750; color: #79351d; }
.compare-table .compare-spacer,
.compare-table tbody th {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--label-width);
  background: #f7f5f1;
  color: #514940;
}
.compare-listing { position: relative; }
.compare-open-listing {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: inherit;
  text-align: left;
  font-weight: 700;
}
.compare-photo {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 152px;
  overflow: hidden;
  border-radius: 7px;
  background: #efede8;
  color: #6b635a;
  font-size: 11px;
}
.compare-photo img { width: 100%; height: 100%; object-fit: cover; }
.compare-listing-title { overflow-wrap: anywhere; line-height: 1.3; }
.compare-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  border: 1px solid #ede9e1;
  border-radius: 8px;
  background: #fff;
  color: #392f2a;
  font-size: 20px;
  line-height: 1;
}
.compare-identical, .compare-differences .compare-same { display: none; }
.compare-differences .compare-identical { display: table-row; }
@media (max-width: 650px) {
  .catalog-compare-dock { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .compare-swipe { display: block; }
  .compare-table { --label-width: 84px; --listing-width: 94px; }
  .compare-table :is(th, td) { padding: 8px 6px; font-size: 12px; }
  .compare-open-listing { gap: 6px; }
}
@media (max-width: 350px) {
  .compare-table { --listing-width: 86px; }
}
