/* Supporting copy on catalogue and related-product cards. Price grids keep their own scale. */
@media screen {
 :is(#products,#saleProducts) .catalog-product-card :is(.product-meta p,.sale-card-info p),
 body .recommendation-card :is(.recommendation-material,.button),
 :is(#products,#saleProducts) .custom-product-card .text-button {
  font-size:13px;line-height:1.45;
 }
 :is(#products,#saleProducts) .catalog-product-card :is(.stock-note,.options-badge,.rental-stock-strip,.rental-stock-mobile,.rental-colours p,.sale-colour-options p,.variant-swatch span,.rate-caption,.sale-module-note),
 :is(#products,#saleProducts) :is(.module-card,.wall-card) .product-meta p,
 body .package-product-card small,
 #saleProducts .sale-card > small,
 body .recommendation-card :is(.rate-caption,small),
 :is(#products,#saleProducts) .custom-product-card :is(.hint,p .mobile-request-copy,p .desktop-request-copy) {
  font-size:11px;line-height:1.45;
 }
 :is(#products,#saleProducts) .catalog-product-card .options-badge {font-weight:400;color:inherit}
 :is(#products,#saleProducts) :is(.product-art > span:not(.rental-stock-strip),.illustration-badge,.sale-kind,.rental-status-badge),
 body .recommendation-card .rental-status-badge,
 :is(#products,#saleProducts) .custom-package-art .eyebrow {font-size:12px}
}
@media screen and (max-width:640px) {
 /* Only category badges over catalogue photos. Status and stock keep their own scale. */
 .catalog-page #products .product-art>span:first-child:not([class]),
 .buy-page #saleProducts .sale-photo>.sale-kind{
  font-size:11px;line-height:1.25;padding:2px 6px;
 }
 :is(#products,#saleProducts) .catalog-product-card h3,
 body .package-product-card strong,
 body .recommendation-card h3 {font-size:15px;line-height:1.35;overflow-wrap:anywhere}
 body .recommendation-card .recommendation-price {font-size:13px}
}

/* Anchor the pricing rows from the bottom of the shared grid. Allow room
   above them for optional swatches, notices and expandable package details. */
@supports (grid-template-rows:subgrid) {
 #products:has(> article > .rental-period-price:not([hidden])) {
  --card-rows:7;
  --optional-rows:0;
  &:has(> article > :is(.rental-colours,.illustration-note,.package-card-contents)) {--optional-rows:1}
  &:has(> article > :is(.rental-colours,.illustration-note) ~ :is(.illustration-note,.package-card-contents)) {--optional-rows:2}
  &:has(> article > .rental-colours ~ .illustration-note ~ .package-card-contents) {--optional-rows:3}

  & > article {grid-row:span calc(var(--card-rows) + var(--optional-rows))}
  & > article > .illustration-note {grid-row:auto}
  & > article > .rental-period-price {grid-row:-5;align-self:start}
  & > article > :is(.rate-grid,.quote-only,.cart-period-price,.rental-price-pending) {grid-row:-4}
  /* The shared period row already separates the rates, even on cards without a period total. */
  & > article > .rate-grid {border-top:0;padding-top:0}
  & > article > .rate-caption {grid-row:-3}
  & > article > :is(.module-build-button,.business-purchase-summary) {grid-row:-2}
  @media (max-width:640px) {
   --card-rows:8;
   & > article.ready-package-card {grid-row:auto}
  }
 }
}
