/* Keep the desktop image sized against its original media container. */
@media (min-width: 750px) {
  #MainContent[data-template='collection.mdr-shop'] :is(.mdr-shop-hero__media, .mdr-cta-banner__media) picture {
    display: contents;
  }
}

@media (max-width: 749px) {
  /* The shop artwork is measured on a 375px viewport. */
  #MainContent[data-template='collection.mdr-shop'] {
    --shop-unit: calc(100vw / 375);
    --shop-heading: 'Times New Roman', Times, serif;
    --shop-copy: 'Mindora Mobile Inter', Arial, sans-serif;
    background: #f4ede3;
  }

  html.mdr-global-mobile-header body:has(.mdr-shop-hero) #header-group .mdr-header:not(.mdr-global-header-scrolled) .mdr-header__bar {
    width: calc(100% - 8vw);
  }
  html.mdr-global-mobile-header body:has(.mdr-shop-hero) #header-group .mdr-header:not(.mdr-global-header-scrolled) .mdr-header__actions .mdr-icon-btn {
    width: 8vw;
    height: 8vw;
    border: 1px solid rgb(255 255 255 / 24%);
    background: rgb(0 0 0 / 24%);
  }

  /* Match the shared mobile foundation's specificity only within this template. */
  body:has(#MainContent .mdr-shop-hero) #MainContent[data-template='collection.mdr-shop'] {
    .mdr-shop-hero {
      width: 100%;
      height: auto;
      min-height: 0;
      aspect-ratio: 750 / 1260;
      touch-action: pan-y pinch-zoom;
    }
    .mdr-shop-hero__media::after, .mdr-cta-banner__media::after { display: none; }
    .mdr-shop-hero__media picture, .mdr-cta-banner__media picture { display: block; height: 100%; }
    .mdr-shop-hero__dots { bottom: calc(23 * var(--shop-unit)); gap: 0; }
    .mdr-shop-hero__dots .mdr-dot {
      display: grid;
      place-items: center;
      width: calc(13 * var(--shop-unit));
      height: calc(20 * var(--shop-unit));
      border: 0;
      background: transparent;
    }
    .mdr-shop-hero__dots .mdr-dot::after {
      content: '';
      width: calc(6 * var(--shop-unit));
      aspect-ratio: 1;
      border-radius: 50%;
      border: 1px solid currentColor;
    }
    .mdr-shop-hero__dots .mdr-dot[aria-current='true']::after { background: currentColor; }

    .mdr-shop-hero__title, .mdr-shop-cat__head .mdr-h2, .mdr-cta-banner .mdr-h2 {
      margin: 0;
      font: 400 calc(27 * var(--shop-unit))/calc(30 * var(--shop-unit)) var(--shop-heading);
      letter-spacing: 0;
    }
    .mdr-shop-hero__title { text-shadow: 0 1px 3px #4b382a; }
    .mdr-section.mdr-shop-cats { padding: calc(64 * var(--shop-unit)) 0; }
    .mdr-shop-cats .mdr-container { width: 90.4%; }
    .mdr-shop-cat + .mdr-shop-cat { margin-top: calc(64 * var(--shop-unit)); }
    .mdr-shop-cat__head { margin: 0 calc(10 * var(--shop-unit)) calc(24 * var(--shop-unit)); }
    .mdr-shop-cat__price {
      margin-top: calc(8 * var(--shop-unit));
      font: 400 calc(12 * var(--shop-unit))/1.25 Arial, Helvetica, sans-serif;
      color: #242424;
    }
    .mdr-shop-cat__mobile-title { display: inline; }
    .mdr-shop-cat__media { aspect-ratio: 678 / 680; border-radius: calc(9 * var(--shop-unit)); }
    .mdr-shop-cat__media:hover img { transform: none; }
    .mdr-shop-cat__media .mdr-btn, .mdr-cta-banner .mdr-btn {
      min-width: 0;
      min-height: calc(34 * var(--shop-unit));
      padding: 0 calc(8 * var(--shop-unit));
      font: 400 calc(12 * var(--shop-unit))/1.25 Arial, Helvetica, sans-serif;
      letter-spacing: 0;
    }
    .mdr-shop-cat__media .mdr-btn {
      left: calc(18 * var(--shop-unit));
      bottom: calc(28 * var(--shop-unit));
      width: calc(143 * var(--shop-unit));
    }
    .mdr-cta-banner {
      min-height: 0;
      aspect-ratio: 750 / 980;
      margin: 0;
      padding: calc(40 * var(--shop-unit)) calc(24 * var(--shop-unit));
      justify-items: start;
      align-content: end;
      text-align: left;
    }
    .mdr-cta-banner__text {
      max-width: calc(296 * var(--shop-unit));
      margin: calc(10 * var(--shop-unit)) 0 0;
      font: 300 calc(11.5 * var(--shop-unit))/1.3 var(--shop-copy);
    }
    .mdr-cta-banner__text br { display: none; }
    .mdr-cta-banner .mdr-btn { min-width: calc(160 * var(--shop-unit)); margin-top: calc(18 * var(--shop-unit)); }
  }
}
