/* A shared portrait presentation, sized to each real source once it loads.
   These rules affect catalog covers only. The complete-photo viewers retain
   their zoom, controls and original sources. */
.pma-readable :is(.section-media,.type-media,.photo-button,.combo-product-visual){
  display:block;
  position:relative;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
  flex:none;
  aspect-ratio:var(--catalog-image-ratio,3 / 4);
  overflow:hidden;
  padding:0;
  background:#f5f2ec;
}
.pma-readable :is(.section-media,.type-media,.photo-button,.combo-product-visual)>img{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  max-width:100%;
  max-height:none;
  object-fit:contain;
  object-position:center;
}
.pma-readable .combo-cover-error{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
  text-align:center;
}
.pma-readable .combo-cover-error[hidden]{display:none}
.pma-readable .combo-product-visual>img[hidden]{display:none}

.product-body .catalog-description { margin: 0; padding: 0; }
.catalog-description > summary {
  cursor: pointer;
  color: #255e52;
  padding: .28rem 0;
  font-size: .9375rem;
  line-height: 1.35;
}
.catalog-description[open] > :not(summary) { margin-block: .35rem; }
.catalog-description > summary:focus-visible { outline: 2px solid currentColor; }

/* Keep the complete photo and put both actions on one short line. */
.pma-readable .product-grid .product .product-body:has(.catalog-description) {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-content: start;
  align-items: center;
  gap: 2px 4px;
  padding: 5px 7px 7px;
}
.pma-readable .product .product-body:has(.catalog-description) > * { grid-column: 1 / -1; margin: 0; }
.pma-readable .product-grid .product .product-body h3 { font-size: 1rem; line-height: 1.14; }
.pma-readable .product .catalog-description > summary { font-size: .875rem; line-height: 1.2; padding: 4px 0; }
.pma-readable .product .product-body:has(.catalog-description) > :is(.text-button,.primary) {
  min-height: 32px; padding: 4px 6px; font-size: .875rem!important; line-height: 1.15;
}
.pma-readable .product .product-body:has(.catalog-description) > .text-button { grid-column: 1; padding-inline: 0; }
.pma-readable .product .product-body:has(.catalog-description) > .text-button + .primary { grid-column: 2; }
@media (max-width: 600px) {
  .pma-readable .product-grid:has(.catalog-description) { gap: 9px 7px; }
}
