/**
 * Vendor logo sizing
 *
 * Keep the native HivePress vendor image/placeholder logic intact and give the
 * returned image enough room to be legible. The final card contract owns
 * component geometry; this layer only provides reusable logo size tokens and
 * the intentionally larger detail-page media cap.
 */

body.wp-child-theme-marnamic.wp-child-theme-marnamic {
  --marnamic-vendor-card-logo-tile-height: 128px;
  --marnamic-vendor-card-logo-max-height: 96px;
  --marnamic-vendor-profile-logo-tile-height: clamp(176px, 18vw, 220px);
  --marnamic-vendor-profile-logo-max-height: clamp(136px, 14vw, 176px);
}

/* Archive/discovery cards: enlarge the image itself, not just its background. */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__image
  > a,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image
  > a,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image
  > a {
  height: var(--marnamic-vendor-card-logo-tile-height) !important;
  min-height: var(--marnamic-vendor-card-logo-tile-height) !important;
  padding: 8px !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .marnamic-card--vendor
  .hp-vendor__image
  img,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-vendor-discovery
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image
  img,
body.wp-child-theme-marnamic.wp-child-theme-marnamic.marnamic-archive-search-results.marnamic-archive-search-results--vendor
  .hp-vendor--view-block.marnamic-card
  .hp-vendor__image
  img {
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: var(--marnamic-vendor-card-logo-max-height) !important;
  object-fit: contain !important;
}

/*
 * Vendor profile: the previous 112px tile/72px image cap made logos look lost
 * inside the full-width summary card. Landscape and portrait logos can now use
 * the available axis without being cropped.
 */
body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-page
  .hp-vendor__summary
  .hp-vendor__image {
  min-height: var(--marnamic-vendor-profile-logo-tile-height) !important;
  padding: clamp(14px, 2vw, 22px) !important;
}

body.wp-child-theme-marnamic.wp-child-theme-marnamic
  .hp-vendor--view-page
  .hp-vendor__summary
  .hp-vendor__image
  img {
  display: block !important;
  width: auto !important;
  max-width: 94% !important;
  height: auto !important;
  max-height: var(--marnamic-vendor-profile-logo-max-height) !important;
  object-fit: contain !important;
}

@media (max-width: 680px) {
  body.wp-child-theme-marnamic.wp-child-theme-marnamic {
    --marnamic-vendor-card-logo-tile-height: 120px;
    --marnamic-vendor-card-logo-max-height: 90px;
    --marnamic-vendor-profile-logo-tile-height: 160px;
    --marnamic-vendor-profile-logo-max-height: 128px;
  }

}
