.ab-compare-dock {
  position: fixed;
  z-index: 1020;
  right: 24px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  color: #fff;
  background: var(--ab-ink, #183d40);
  box-shadow: 0 4px 18px rgba(24, 61, 64, .2);
  font: 600 14px/1.25 var(--ab-font, ElanternaPoppins, Arial, sans-serif);
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.ab-compare-dock[hidden] { display: none; }
.ab-compare-dock:hover { color: #fff; background: #245054; text-decoration: none; }
.ab-compare-dock:focus-visible { outline: 3px solid #e1a75b; outline-offset: 4px; }
.ab-compare-dock svg { flex: 0 0 20px; width: 20px; height: 20px; }
.ab-compare-dock__count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border-radius: 50%;
  color: #183d40;
  background: #e1efeb;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Keep the native feedback and page-end links clear of the compact control. */
/* Preserve the native bottom/centering utilities and add only a vertical offset. */
.ab-compare-has-selection .abpc-toast { translate: 0 calc(-64px - env(safe-area-inset-bottom, 0px)); }
.ab-compare-has-selection::after { content: ''; display: block; height: calc(76px + env(safe-area-inset-bottom, 0px)); }
body:has(.modal.show, .offcanvas.show, dialog[open], .ab-menu-toggle[aria-expanded="true"]) :is(.ab-compare-dock, .abpc-sticky-models) { visibility: hidden; }

@media (max-width: 767.98px) {
  .ab-compare-dock {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    min-height: 46px;
    padding: 9px 12px;
    font-size: 13px;
  }
}

/* Product comparison: keep the image as wide as its card, with a native remove action. */
.abpc-page .abpc-product-media { position: relative; width: 100%; min-width: 0; }
.abpc-page .abpc-product-image-link { display: block; width: 100%; }
.abpc-page .abpc-product-media .abpc-product-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
/* Boat cover thumbnails have square studio padding; keep the side profile compact. */
.abpc-page .abpc-product-media--boat { aspect-ratio: 16 / 9; }
.abpc-page .abpc-product-media--boat .abpc-product-image-link { height: 100%; }
.abpc-page .abpc-product-media--boat .abpc-product-image { height: 100%; object-fit: cover; }
.abpc-page .abpc-product-remove {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #cbd9d7;
  border-radius: 50%;
  color: var(--ab-ink, #183d40);
  background: #fff;
  box-shadow: 0 2px 8px rgba(24, 61, 64, .12);
  cursor: pointer;
}
.abpc-page .abpc-product-remove:hover { color: #a5232c; border-color: currentColor; }
.abpc-page .abpc-product-remove:focus-visible { outline: 3px solid #e1a75b; outline-offset: 2px; }
.abpc-page .abpc-product-remove:disabled { opacity: .5; cursor: wait; }
.abpc-page .abpc-product-remove .material-icons { font-size: 20px; line-height: 1; }

/* Shared datasheet groups, with neutral comparison rather than a better/worse ranking. */
.abpc-page, .abpc-sticky-models {
  --abpc-ink: var(--ab-ink, #183d40);
  --abpc-line: #dce5e2;
  --abpc-soft: #edf3f1;
  --abpc-difference: #fff5e7;
  --abpc-accent: #98612d;
  --abpc-label-width: 220px;
  --abpc-value-width: 250px;
}
.abpc-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin: 22px 0 8px; }
.abpc-tools p { margin: 0; font-size: 13px; line-height: 1.5; }
.abpc-legend { display: flex; align-items: center; gap: 8px; color: var(--abpc-ink); }
.abpc-difference-key { width: 14px; height: 14px; border: 1px solid #bc8d54; border-radius: 3px; background: var(--abpc-difference); }
.abpc-differences-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; cursor: pointer; color: var(--abpc-ink); font-size: 14px; font-weight: 600; }
.abpc-differences-toggle input { width: 20px; height: 20px; margin: 0; accent-color: var(--abpc-ink); cursor: pointer; }
.abpc-tools .abpc-feature-status { margin-inline-start: auto; color: #526764; font-variant-numeric: tabular-nums; }
.abpc-group-nav { display: flex; align-items: stretch; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--abpc-line); }
.abpc-group-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; color: var(--abpc-ink); font-size: 13px; font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.abpc-group-nav a:hover { border-bottom-color: var(--abpc-accent); }
.abpc-group-nav a:focus-visible, .abpc-differences-toggle input:focus-visible, .abpc-comparison-scroll:focus-visible { outline: 3px solid #bc8d54; outline-offset: 3px; }
.abpc-scroll-hint { display: none; }
.abpc-comparison-scroll { border: 1px solid var(--abpc-line); border-radius: 14px; }
.abpc-page .abpc-comparison-table { width: 100%; min-width: calc(var(--abpc-label-width) + var(--abpc-value-width) * var(--abpc-product-count)); table-layout: fixed; border-collapse: separate; border-spacing: 0; color: var(--abpc-ink); }
.abpc-comparison-table .abpc-label-column { width: var(--abpc-label-width); }
.abpc-page .abpc-comparison-table th, .abpc-page .abpc-comparison-table td {
  min-width: 0; max-width: none; padding: 12px 18px; vertical-align: top;
  border: 0; border-bottom: 1px solid var(--abpc-line); border-inline-end: 1px solid var(--abpc-line);
  background: #fff; box-shadow: none; color: inherit; font-size: 14px; line-height: 1.55; text-align: start;
}
.abpc-page .abpc-comparison-table tr > :last-child { border-inline-end: 0; }
.abpc-page .abpc-comparison-table tr > th:first-child { position: sticky; left: 0; z-index: 2; width: var(--abpc-label-width); min-width: 0; font-weight: 500; }
.abpc-page .abpc-comparison-table thead th { padding: 14px; }
.abpc-page .abpc-comparison-table .abpc-corner { vertical-align: bottom; color: #526764; }
.abpc-product-card { min-width: 0; }
.abpc-product-card > a { font-size: 16px; line-height: 1.35; }
.abpc-product-card > .text-primary { color: var(--abpc-ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.abpc-product-card .mcc-secondary { font-size: 12px; color: #526764; }
.abpc-page .abpc-comparison-table .abpc-group-heading th { background: var(--abpc-soft); font-size: 13px; font-weight: 600; vertical-align: middle; }
.abpc-group-title { display: flex; align-items: center; gap: 10px; }
.abpc-group-icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; color: var(--abpc-ink); }
.abpc-group-icon svg { width: 22px; height: 22px; }
.abpc-comparison-table tbody { scroll-margin-top: var(--abpc-sticky-clearance, 76px); }
.abpc-page .abpc-comparison-table .abpc-feature-row--different > * { background: var(--abpc-difference); }
.abpc-difference-label { display: block; width: fit-content; margin-top: 5px; color: #785022; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.abpc-values { margin: 0; padding: 0; list-style: none; }
.abpc-values li + li { margin-top: 6px; }
.abpc-values .abpc-value--different { padding-inline-start: 9px; border-inline-start: 2px solid #bc8d54; font-weight: 600; }
.abpc-unspecified { color: #626b68; font-size: 13px; font-style: italic; }
.abpc-page [hidden] { display: none; }

/* Names stay aligned with the real columns while the page scrolls vertically. */
.abpc-sticky-models {
  position: fixed;
  z-index: 1010;
  height: 52px;
  overflow: hidden;
  color: var(--abpc-ink);
  background: var(--abpc-soft);
  border-bottom: 1px solid var(--abpc-line);
  box-shadow: 0 3px 10px rgba(24, 61, 64, .09);
  font: 600 14px/1.35 var(--ab-font, ElanternaPoppins, Arial, sans-serif);
  pointer-events: none;
}
.abpc-sticky-models[hidden] { display: none; }
.abpc-sticky-models__label, .abpc-sticky-models__name {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 8px 18px;
  border-right: 1px solid var(--abpc-line);
  background: var(--abpc-soft);
}
.abpc-sticky-models__label { left: 0; z-index: 2; font-weight: 500; }
.abpc-sticky-models__name > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

@media (max-width: 767.98px) {
  .abpc-page { --abpc-label-width: 128px; --abpc-value-width: 200px; }
  .abpc-tools { gap: 4px 16px; margin-top: 16px; }
  .abpc-legend { flex-basis: 100%; }
  .abpc-tools .abpc-feature-status { font-size: 12px; }
  .abpc-group-nav { flex-wrap: nowrap; overflow-x: auto; gap: 20px; margin-bottom: 8px; }
  .abpc-group-nav a { flex-shrink: 0; max-width: 230px; font-size: 12px; }
  .abpc-scroll-hint { display: block; margin: 0 0 10px; color: #526764; font-size: 12px; line-height: 1.5; }
  .abpc-page .abpc-comparison-table th, .abpc-page .abpc-comparison-table td { padding: 10px 12px; font-size: 13px; }
  .abpc-page .abpc-comparison-table thead th { padding: 10px; }
  .abpc-page .abpc-comparison-table tr > th:first-child { border-inline-end-color: #c1d0cb; }
  .abpc-page .abpc-comparison-table .abpc-group-heading th { font-size: 12px; }
  .abpc-group-title { flex-direction: column; align-items: flex-start; gap: 4px; }
  .abpc-group-icon { width: 24px; height: 24px; flex-basis: 24px; }
  .abpc-group-icon svg { width: 20px; height: 20px; }
  .abpc-product-card > a { font-size: 14px; }
  .abpc-sticky-models { height: 48px; font-size: 13px; }
  .abpc-sticky-models__label, .abpc-sticky-models__name { padding-inline: 12px; }
}
