/* UMagical media-ratios R1 — additive source-scoped overrides.
   Responsive aspect-ratio concerns the layout box; images/videos retain natural
   geometry through object-fit. No hero-video or product-image changes. */

/* Sponsored stage: flexible 9:4 across desktop, tablet and mobile.
   Intentionally supersedes legacy --sponsor-height fixed-pixel setting. */
#sponsored .sponsor-stage {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 9 / 4;
}
#sponsored .sponsor-stage .sponsor-slide {
  height: 100%;
}
#sponsored .sponsor-stage .sponsor-slide img {
  object-fit: cover;
}

/* Brands and categories: consistent square boxes in all displays. */
.icon-frame,
#brands .icon-frame,
#categories .icon-frame {
  aspect-ratio: 1 / 1;
  height: auto;
}
.icon-frame .icon-image {
  object-fit: contain;
}

/* Seller location map: responsive square, not viewport-height clamp. */
.seller-map-wrap,
main.seller-page .seller-map-wrap {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 1 / 1;
}
.seller-map-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* Explore menu tiles: ratio-controlled (2:1) rather than min-height pixels. */
.um-halo__panel .um-halo__tile {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 2 / 1;
}
@media (max-width: 767px) {
  .um-halo__panel .um-halo__tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: clamp(5px, 1.6vw, 9px);
  }
  .um-halo__panel .um-halo__tile-icon {
    flex: 0 0 auto;
    width: clamp(23px, 7vw, 32px);
    height: clamp(23px, 7vw, 32px);
  }
  .um-halo__panel .um-halo__tile > span:last-child { min-width: 0; }
  .um-halo__panel .um-halo__tile strong {
    margin-top: 0;
    font-size: clamp(10px, 2.65vw, 13px);
    overflow-wrap: anywhere;
    line-height: 1.12;
  }
  .um-halo__panel .um-halo__tile > span:last-child > span {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.1;
  }
}
@media (max-width: 420px) {
  /* Compact square-safe 2:1 tiles have no room for secondary descriptions. */
  .um-halo__panel .um-halo__tile > span:last-child > span {
    display: none;
  }
}

/* Login logo: square artwork box for mobile and short desktop only.
   Contain the original SVG rather than distorting its paths. */
@media (max-width: 720px) {
  .um-login-page .um-login__logo {
    display: block;
    width: min(100%, 114px);
    max-width: 114px;
    height: auto;
    max-height: none;
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }
}
@media (min-width: 721px) and (max-height: 740px) {
  .um-login-page .um-login__logo {
    display: block;
    width: min(100%, 92px);
    max-width: 92px;
    height: auto;
    max-height: none;
    aspect-ratio: 1 / 1;
    object-fit: contain;
  }
}
