/* Imágenes de composición de la comparativa y de las fichas. */
#compare .cmp-table {
  table-layout: fixed;
}

#compare .cmp-image-row td {
  padding: 20px 16px 16px;
  vertical-align: top;
  border-top: 0;
}

.rc-product-composition {
  --rc-composition-image-width: 760px;
}

.rc-product-composition h2 {
  text-align: center;
}

:is(#compare, .rc-product-composition) .cmp-image-link {
  display: block;
  width: 100%;
  max-width: var(--rc-composition-image-width, 440px);
  margin: 0 auto;
  color: #555;
  text-decoration: none;
  cursor: zoom-in;
}

:is(#compare, .rc-product-composition) .cmp-image-link img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e5e0da;
  border-radius: 10px;
  background: #eee9e3;
}

:is(#compare, .rc-product-composition) .cmp-image-caption {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
}

:is(#compare, .rc-product-composition) .cmp-image-link:hover .cmp-image-caption {
  color: #c93d00;
  text-decoration: underline;
  text-underline-offset: 3px;
}

:is(#compare, .rc-product-composition) .cmp-image-link:focus-visible {
  outline: 3px solid #ff5c1a;
  outline-offset: 4px;
  border-radius: 10px;
}

html.cmp-viewer-open,
html.cmp-viewer-open body {
  overflow: hidden;
}

.cmp-image-viewer {
  position: fixed;
  inset: 0;
  width: min(1200px, calc(100vw - 24px));
  max-width: none;
  max-height: 92vh;
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #171717;
  box-shadow: 0 20px 80px #0006;
  overflow: hidden;
}

.cmp-image-viewer[open] {
  display: flex;
  flex-direction: column;
}

.cmp-image-viewer::backdrop {
  background: rgb(0 0 0 / 78%);
}

.cmp-image-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e0da;
}

.cmp-image-viewer-toolbar h3 {
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.3;
}

.cmp-image-viewer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 16px;
  border: 0;
  border-radius: 6px;
  background: #171717;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.cmp-image-viewer-close span {
  font-size: 24px;
  line-height: 1;
}

.cmp-image-viewer-close:hover {
  background: #c93d00;
}

.cmp-image-viewer-close:focus-visible {
  outline: 3px solid #ff5c1a;
  outline-offset: 3px;
}

.cmp-image-viewer-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.cmp-image-viewer-content img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  #compare .cmp-image-row td {
    padding: 12px 8px !important;
  }

  :is(#compare, .rc-product-composition) .cmp-image-caption {
    margin-top: 8px;
    font-size: 11px;
  }
}
