/*
 * Storefront comparison table. Colours and radius come from `--pcfw-*`
 * tokens (printed from the Design settings); the fallbacks below match
 * the Minimal template.
 */
.pcfw-table-mount {
  --_surface: var(--pcfw-table-surface, #fff);
  --_text: var(--pcfw-table-text, #14161b);
  /* The text colour as a real value, for inverted parts (see DesignCss). */
  --_ink: var(--pcfw-table-ink, #14161b);
  --_line: var(--pcfw-table-line, #eef0f3);
  --_label: var(--pcfw-table-label-text, #3d4350);
  --_label-bg: var(--pcfw-table-label-bg, var(--_surface));
  --_diff: var(--pcfw-table-diff-bg, #fff6d9);
  --_cart-bg: var(--pcfw-table-cart-bg, #2b59e0);
  --_cart-text: var(--pcfw-table-cart-text, #fff);
  --_radius: var(--pcfw-table-radius, 10px);
  --_muted: color-mix(in srgb, var(--_text) 45%, transparent);

  color: var(--_text);
  font-family: var(--pcfw-table-font, inherit);
  font-size: var(--pcfw-table-font-size, 14px);
}

.pcfw-table__scroll {
  overflow-x: auto;
  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  background: var(--_surface);
  -webkit-overflow-scrolling: touch;
}

/*
 * Inline tables with a sticky header scroll inside their own box: sticky
 * can't follow page scroll from inside an overflow-x container.
 */
.pcfw-table__scroll.is-sticky {
  max-height: calc(100vh - 96px);
  overflow: auto;
}

/* Optional title above inline tables (Table fields › Table title). */
.pcfw-table-mount .pcfw-table__title {
  margin: 0 0 12px;
  color: inherit;
  font-size: 1.25em;
  font-weight: 600;
}

/* Inline tables stack their parts; a heading outside the table (cards,
   empty or loading states) moves above the toolbar. */
.pcfw-table-mount:not(.pcfw-popup-host) {
  display: flex;
  flex-direction: column;
}

.pcfw-table-mount > .pcfw-table__heading {
  order: -1;
}

/* In the table's top-left corner: sits at the top, wraps in the column. */
.pcfw-table__corner .pcfw-table__heading {
  text-align: start;
}

.pcfw-table-mount .pcfw-table__corner .pcfw-table__title {
  margin: 0 0 6px;
  font-size: 1.15em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pcfw-table-mount .pcfw-table__corner .pcfw-table__description {
  margin: 0;
  font-size: 0.93em;
}

/* Optional intro text under the title (Table fields › Table description). */
.pcfw-table-mount .pcfw-table__description,
.pcfw-table-mount .pcfw-popup__description {
  max-width: 70ch;
  margin: 0 0 16px;
  color: color-mix(in srgb, var(--_text) 75%, transparent);
  line-height: 1.5;
  white-space: pre-line;
}

.pcfw-table-mount .pcfw-popup__description {
  margin: 4px 0 2px;
  font-size: 14px;
}

/* Toolbar above inline tables: difference count + "Only differences". */
.pcfw-table__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pcfw-table__count {
  color: var(--_muted);
}

.pcfw-switch {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--_line);
  border-radius: 999px;
  background: var(--_surface);
}

.pcfw-switch__label {
  font-weight: 500;
}

.pcfw-table-mount .pcfw-switch__control {
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c9cdd4;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.pcfw-table-mount .pcfw-switch__control[aria-checked="true"] {
  background: var(--_cart-bg);
}

.pcfw-switch__thumb {
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(16 24 40 / 20%);
  transition: transform 0.15s ease;
}

[aria-checked="true"] > .pcfw-switch__thumb {
  transform: translateX(16px);
}

.pcfw-table-mount .pcfw-switch__control:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

.pcfw-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

/* Themes often border every <table>; the rounded wrapper draws ours. */
.pcfw-table-mount .pcfw-table {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pcfw-table th,
.pcfw-table td {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--_line);
  vertical-align: top;
  text-align: start;
  background: var(--_surface);
}

.pcfw-table tbody tr:last-child > * {
  border-bottom: 0;
}

.pcfw-table__corner,
.pcfw-table__label {
  width: 160px;
}

.pcfw-table__product {
  width: 220px;
}

@media (max-width: 600px) {
  .pcfw-table__corner,
  .pcfw-table__label {
    width: 104px;
  }

  .pcfw-table__product {
    width: 168px;
  }

  .pcfw-table th,
  .pcfw-table td {
    padding: 10px;
  }
}

.pcfw-table__label {
  color: var(--_label);
  background: var(--_label-bg);
  font-weight: var(--pcfw-table-label-weight, 500);
}

.pcfw-table.has-sticky-labels .pcfw-table__label,
.pcfw-table.has-sticky-labels .pcfw-table__corner {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  box-shadow: 1px 0 0 var(--_line);
}

.pcfw-table.has-sticky-header thead th,
.pcfw-table.has-sticky-header thead td {
  position: sticky;
  top: 0;
  z-index: 2;
}

.pcfw-table.has-sticky-header thead .pcfw-table__corner {
  z-index: 3;
}

.pcfw-table__row.is-different > * {
  background: var(--_diff);
}

.pcfw-table__product.is-pinned {
  box-shadow: inset 0 -2px 0 var(--_cart-bg);
}

.pcfw-table__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: calc(var(--_radius) - 4px);
}

.pcfw-table-mount .pcfw-table a.pcfw-table__name {
  display: block;
  margin: 10px 0;
  color: inherit;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.pcfw-table-mount .pcfw-table a.pcfw-table__name:hover {
  text-decoration: underline;
}

/* Beats theme rules like `.entry-content a`. */
.pcfw-table-mount a.pcfw-table__cart:not(.is-theme),
.pcfw-table-mount .pcfw-table a.pcfw-table__cart:not(.is-theme),
.pcfw-table-mount .pcfw-table__retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: calc(var(--_radius) - 2px);
  background: var(--_cart-bg);
  color: var(--_cart-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* Theme style: the theme's button (`.button`, `.wp-element-button`) as is. */
.pcfw-table-mount a.pcfw-table__cart.is-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-decoration: none;
}

.pcfw-table__cart:focus-visible,
.pcfw-table__retry:focus-visible,
.pcfw-table a:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

.pcfw-table__cell p {
  margin: 0 0 0.5em;
}

.pcfw-table__cell .star-rating {
  float: none;
}

.pcfw-table__empty {
  color: var(--_muted);
}

.pcfw-table-state {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 32px 16px;
  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  text-align: center;
}

/* Theme paragraph margins would break the spacing. */
.pcfw-table-mount .pcfw-table-state p {
  margin: 0;
}

.pcfw-table-state__title {
  margin: 0;
  font-weight: 600;
}

.pcfw-table-state__icon {
  color: var(--_muted);
}

.pcfw-table-state__hint {
  color: var(--_muted);
}

.pcfw-table-state.is-loading {
  justify-items: stretch;
}

.pcfw-skeleton {
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--_line), transparent, var(--_line));
  background-size: 200% 100%;
  animation: pcfw-shimmer 1.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .pcfw-skeleton {
    animation: none;
  }
}

@keyframes pcfw-shimmer {
  to {
    background-position: -200% 0;
  }
}

.pcfw-screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Popup (dialog). Animation: none | fade | slide | zoom (Design). */
.pcfw-popup {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
}

.pcfw-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(20 22 27 / 55%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.pcfw-popup__dialog {
  --_inset: 24px;

  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1200px, 100%);
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  overflow: hidden;
  border-radius: 20px;
  background: var(--_surface);
  box-shadow: 0 24px 64px rgb(16 24 40 / 35%);
  opacity: 0;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.pcfw-popup__dialog:focus {
  outline: none;
}

.pcfw-popup--slide .pcfw-popup__dialog {
  transform: translateY(24px);
}

.pcfw-popup--zoom .pcfw-popup__dialog {
  transform: scale(0.96);
}

.pcfw-popup.is-open .pcfw-popup__backdrop,
.pcfw-popup.is-open .pcfw-popup__dialog {
  opacity: 1;
  transform: none;
}

.pcfw-popup--none .pcfw-popup__backdrop,
.pcfw-popup--none .pcfw-popup__dialog {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .pcfw-popup__backdrop,
  .pcfw-popup__dialog {
    transition: none;
  }
}

.pcfw-popup__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 16px var(--_inset);
  border-bottom: 1px solid var(--_line);
}

.pcfw-popup-host .pcfw-popup__title {
  margin: 0;
  color: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.pcfw-popup-host .pcfw-popup__sub {
  margin: 2px 0 0;
  color: var(--_muted);
  font-size: 13px;
}

.pcfw-popup__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pcfw-popup-host a.pcfw-popup__full {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 12px;
  color: var(--_cart-bg);
  font-weight: 500;
  text-decoration: none;
}

.pcfw-popup-host .pcfw-popup__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--_text);
  cursor: pointer;
}

.pcfw-popup-host .pcfw-popup__close:focus-visible,
.pcfw-popup-host a.pcfw-popup__full:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

/* The body scrolls both ways; the table header sticks to its top. */
.pcfw-popup__body {
  flex: 1;
  min-height: 0;
  padding-bottom: 8px;
  overflow: auto;
}

/* Line the table's outer edges up with the header text. */
.pcfw-popup__body .pcfw-table tr > :first-child {
  padding-inline-start: var(--_inset);
}

.pcfw-popup__body .pcfw-table tr > :last-child {
  padding-inline-end: var(--_inset);
}

.pcfw-popup__body .pcfw-table__corner,
.pcfw-popup__body .pcfw-table__label {
  width: calc(136px + var(--_inset));
}

.pcfw-popup__body .pcfw-table thead th,
.pcfw-popup__body .pcfw-table thead td {
  padding-top: 20px;
  padding-bottom: 20px;
}

.pcfw-popup__body .pcfw-table__scroll,
.pcfw-popup__body .pcfw-table__scroll.is-sticky {
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
}

/* No box around the table here: keep the line under the last row. */
.pcfw-popup__body .pcfw-table tbody tr:last-child > * {
  border-bottom: 1px solid var(--_line);
}

.pcfw-popup__body .pcfw-table__hidden {
  margin: 12px var(--_inset) 4px;
}

.pcfw-popup__body .pcfw-table-state {
  margin: 16px;
}

/* Phones: full screen. */
@media (max-width: 600px) {
  .pcfw-popup {
    padding: 0;
  }

  .pcfw-popup__dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .pcfw-popup__dialog {
    --_inset: 16px;
  }

  .pcfw-popup__body .pcfw-table__corner,
  .pcfw-popup__body .pcfw-table__label {
    width: calc(88px + var(--_inset));
  }

  .pcfw-popup__header {
    position: relative;
    padding: 12px 60px 12px var(--_inset);
  }

  /* Close stays in the top corner instead of wrapping under the tools. */
  .pcfw-popup-host .pcfw-popup__close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
  }

  .pcfw-popup-host .pcfw-popup__title {
    font-size: 18px;
  }
}

/* "No differences" message and the repeated price / cart footer. */
.pcfw-table td.pcfw-table__none {
  padding: 24px;
  color: var(--_muted);
  text-align: center;
}

.pcfw-table tfoot th,
.pcfw-table tfoot td {
  border-top: 1px solid var(--_line);
  border-bottom: 0;
}

.pcfw-table tfoot tr + tr > * {
  border-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pcfw-table-mount .pcfw-switch__control,
  .pcfw-switch__thumb {
    transition: none;
  }
}

/*
 * Swipe cards (phones and tablets). `--pcfw-cols` is the number of visible
 * products; the strip and the cart row stick while the rows scroll.
 */
.pcfw-cards {
  --_cols: var(--pcfw-cols, 2);
  --_inset: 16px;

  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  background: var(--_surface);
  touch-action: pan-y;
}

.pcfw-popup__body .pcfw-cards {
  border: 0;
  border-radius: 0;
}

.pcfw-cards__head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px var(--_inset) 12px;
  border-bottom: 1px solid var(--_line);
  background: var(--_surface);
}

.pcfw-cards__strip,
.pcfw-cards__values,
.pcfw-cards__foot {
  display: grid;
  grid-template-columns: repeat(var(--_cols), minmax(0, 1fr));
  gap: 12px;
}

.pcfw-cards__product {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.pcfw-cards__image {
  position: relative;
  display: block;
}

.pcfw-cards__media {
  position: relative;
}

/* Remove (✕) on a card image: the shopper's own list only. */
.pcfw-table-mount .pcfw-cards__remove {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--_surface) 92%, transparent);
  box-shadow: 0 1px 3px rgb(20 22 27 / 16%);
  color: var(--_label);
  cursor: pointer;
}

.pcfw-table-mount .pcfw-cards__remove:hover {
  background: var(--_surface);
  color: var(--_text);
}

.pcfw-table-mount .pcfw-cards__remove:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

.pcfw-table-mount .pcfw-cards__remove:disabled {
  opacity: 0.5;
  cursor: progress;
}

.pcfw-cards__image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: contain;
  background: #f3f4f6;
}

.pcfw-cards__badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #14161b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.pcfw-table-mount a.pcfw-cards__name {
  margin-top: 4px;
  overflow: hidden;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcfw-cards__price {
  color: var(--_label);
}

.pcfw-table-mount .pcfw-cards__pin {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  height: 28px;
  margin: 2px 0 0;
  padding: 0 10px;
  border: 1px solid var(--_line);
  border-radius: 999px;
  background: var(--_surface);
  color: var(--_text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pcfw-cards__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.pcfw-table-mount .pcfw-cards__arrow {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 1px solid #d5d8de;
  border-radius: 50%;
  background: var(--_surface);
  color: var(--_text);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.pcfw-cards__pos {
  min-width: 48px;
  color: var(--_muted);
  font-size: 13px;
  text-align: center;
}

.pcfw-cards__row {
  padding: 10px var(--_inset) 12px;
  border-bottom: 1px solid var(--_line);
}

.pcfw-cards__row.is-different {
  background: var(--_diff);
}

.pcfw-cards__label {
  color: var(--_muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pcfw-cards__values {
  margin-top: 4px;
  font-size: 15px;
}

.pcfw-cards__value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pcfw-cards__value.is-strong {
  font-weight: 600;
}

.pcfw-cards__value p {
  margin: 0;
}

.pcfw-cards__none {
  margin: 0;
  padding: 24px var(--_inset);
  color: var(--_muted);
  text-align: center;
}

.pcfw-cards__foot {
  position: sticky;
  bottom: 0;
  padding: 12px var(--_inset) 16px;
  border-top: 1px solid var(--_line);
  background: var(--_surface);
}

.pcfw-table-mount .pcfw-cards__foot a.pcfw-table__cart {
  box-sizing: border-box;
  justify-content: center;
  width: 100%;
  min-height: 44px;
}

.pcfw-table-mount .pcfw-cards__foot a.pcfw-table__cart:not(.is-theme) {
  border-radius: 999px;
}

.pcfw-table-mount .pcfw-cards a:focus-visible,
.pcfw-table-mount .pcfw-cards button:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

/* Share and Print. */
.pcfw-table__tools,
.pcfw-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pcfw-table-mount .pcfw-share__button {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  gap: 6px;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--_line);
  border-radius: 999px;
  background: var(--_surface);
  color: var(--_text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.pcfw-table-mount .pcfw-share__button:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

.pcfw-share__wrap {
  position: relative;
  display: inline-flex;
}

/* "Share via" menu under the Share button. */
.pcfw-share__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--_line);
  border-radius: calc(var(--_radius) * 0.8);
  background: var(--_surface);
  box-shadow: 0 10px 30px rgb(0 0 0 / 12%);
}

.pcfw-table-mount .pcfw-share__item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--_text);
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

.pcfw-table-mount .pcfw-share__item:hover,
.pcfw-table-mount .pcfw-share__item:focus-visible {
  background: color-mix(in srgb, var(--_text) 7%, transparent);
  color: var(--_text);
  outline: none;
}

.pcfw-table-mount .pcfw-share__item:focus-visible {
  box-shadow: inset 0 0 0 2px var(--_cart-bg);
}

.pcfw-share__icon {
  flex: none;
}

.pcfw-share__menu > a + button {
  border-top: 1px solid var(--_line);
  border-radius: 0 0 6px 6px;
}

.pcfw-share__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--_muted);
  font-size: 13px;
}

.pcfw-share__status:empty {
  display: none;
}

.pcfw-table-mount .pcfw-share__url {
  width: 220px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--_line);
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
}

.pcfw-table-mount .pcfw-shared {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--_radius);
  background: color-mix(in srgb, var(--_cart-bg) 8%, var(--_surface));
}

/* "See my comparison": the notice's own colour, not the theme's link colour. */
.pcfw-table-mount .pcfw-shared a {
  color: inherit;
}

/*
 * Print: the Print button marks one table (`.is-print-target`) and the page
 * (`.pcfw-printing`) so only that table prints; Ctrl+P on the compare page
 * prints the inline table without its controls.
 */
/* "You may also compare": related products under the shopper's list. */
.pcfw-related {
  margin-top: 24px;
}

.pcfw-popup__body .pcfw-related {
  margin: 20px 20px 12px var(--_inset);
}

.pcfw-table-mount .pcfw-related__title {
  margin: 0 0 12px;
  color: inherit;
  font-size: 1em;
  font-weight: 600;
}

.pcfw-related__title:focus,
.pcfw-table-mount[tabindex="-1"]:focus {
  outline: none;
}

.pcfw-table-mount .pcfw-related ul.pcfw-related__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pcfw-table-mount .pcfw-related li.pcfw-related__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 12px;
  row-gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--_line);
  border-radius: var(--_radius);
  background: var(--_surface);
}

.pcfw-related__image {
  grid-row: 1 / 4;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: calc(var(--_radius) * 0.6);
  background: color-mix(in srgb, var(--_text) 4%, transparent);
}

.pcfw-table-mount .pcfw-related a.pcfw-related__link {
  min-width: 0;
  color: inherit;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.pcfw-related__name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcfw-table-mount .pcfw-related a.pcfw-related__link:hover {
  text-decoration: underline;
}

.pcfw-related__price {
  color: var(--_muted);
  font-size: 0.93em;
}

.pcfw-table-mount .pcfw-related__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  justify-self: start;
  align-self: end;
  max-width: 100%;
  margin-top: 6px;
  padding: 5px 10px;
  border: 1px solid var(--_line);
  border-radius: calc(var(--_radius) * 0.8);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.93em;
  font-weight: 500;
  line-height: 1.2;
  text-align: start;
  cursor: pointer;
}

.pcfw-table-mount .pcfw-related__add:hover {
  background: color-mix(in srgb, var(--_text) 6%, transparent);
}

.pcfw-table-mount .pcfw-related__add:focus-visible {
  outline: 2px solid var(--_cart-bg);
  outline-offset: 2px;
}

.pcfw-table-mount .pcfw-related__add:disabled {
  opacity: 0.6;
  cursor: progress;
}

@media (max-width: 600px) {
  .pcfw-popup__body .pcfw-related {
    margin: 16px 12px 12px;
  }
}

@media print {
  html.pcfw-printing body * {
    visibility: hidden;
  }

  html.pcfw-printing .is-print-target,
  html.pcfw-printing .is-print-target * {
    visibility: visible;
  }

  html.pcfw-printing .is-print-target {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

  .pcfw-popup,
  .pcfw-popup__dialog {
    position: static;
    max-height: none;
    overflow: visible;
    box-shadow: none;
  }

  .pcfw-popup__backdrop,
  .pcfw-popup__actions,
  .pcfw-table__tools,
  .pcfw-table-mount .pcfw-table__cart,
  .pcfw-cards__nav,
  .pcfw-cards__pin,
  .pcfw-cards__remove,
  .pcfw-cards__foot,
  .pcfw-related {
    display: none;
  }

  .pcfw-popup__body,
  .pcfw-table__scroll,
  .pcfw-table__scroll.is-sticky {
    max-height: none;
    overflow: visible;
  }

  .pcfw-table thead th,
  .pcfw-table thead td,
  .pcfw-table__label,
  .pcfw-cards__head {
    position: static;
  }

  .pcfw-table tr {
    break-inside: avoid;
  }
}

/* Right-to-left: mirror the switch movement and the sticky label edge. */
[dir="rtl"] [aria-checked="true"] > .pcfw-switch__thumb {
  transform: translateX(-16px);
}

[dir="rtl"] .pcfw-table.has-sticky-labels .pcfw-table__label,
[dir="rtl"] .pcfw-table.has-sticky-labels .pcfw-table__corner {
  box-shadow: -1px 0 0 var(--_line);
}

/*
 * Cards inside the popup: shorter images, and on short screens the product
 * strip scrolls away instead of sticking, so the rows always have room.
 */
.pcfw-popup__body .pcfw-cards__image img {
  height: 150px;
  aspect-ratio: auto;
}

@media (max-height: 820px) {
  .pcfw-cards__head {
    position: static;
  }
}
