@media (max-width: 650px) {
  .pgr-store-header nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .pgr-store-header .pgr-header-actions button,
  .pgr-catalog-add { min-height: 44px; }
  #basket {
    box-sizing: border-box;
    max-inline-size: calc(100% - 1rem);
    max-block-size: calc(100dvh - 1rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  #basket input:not([type="checkbox"]):not([type="radio"]),
  #basket select,
  .quote-request input:not([type="checkbox"]):not([type="radio"]),
  .quote-request select,
  .quote-request textarea,
  #product-search {
    font-size: 16px;
    min-height: 44px;
    max-inline-size: 100%;
  }
  #basket .pgr-basket-layout > *,
  #basket form > * { min-inline-size: 0; }
  #basket .pgr-basket-quick-add button { white-space: normal; }
}

@media (max-width: 650px) {
  .pgr-trust-strip { font-size: .78rem; line-height: 1.4; }
  .pgr-trust-strip ul { row-gap: .3rem; padding-block: .55rem; }
  body.edition-home .hero .hero-shade {
    background: linear-gradient(180deg, #101c29f2 0%, #101c29e8 57%, #101c2966 100%);
  }
  body.edition-home .hero h1,
  body.edition-home .hero .hero-links a { color: #fff7e7; }
  body.edition-home .hero p { color: #f0e9dd; }
  body.edition-home .hero-in { padding-block-start: 1.35rem; }
  body.edition-home .hero-links { display: grid; gap: .35rem; }
  body.edition-home .hero-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    width: fit-content;
  }
  .refinery-nav { margin-block: .6rem; }
  .refinery-nav a { min-height: 44px; }
  .filters { gap: .5rem; }
  #basket #pgr-basket-destination select { width: 100%; }
  #basket button { min-height: 44px; }
  #basket #pgr-checkout { min-inline-size: 0; }
  #basket #pgr-checkout button { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 650px) {
  body.edition-home .hero .hero-in {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    max-height: none;
  }
  body.edition-home .hero .bars {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    height: auto;
    max-height: none;
    padding: 8px 0 16px;
    overflow: visible;
  }
  body.edition-home .hero .bars img:is(.b1, .b2, .b3) {
    position: static;
    display: block;
    width: 100%;
    height: clamp(94px, 34vw, 172px);
    max-height: none;
    object-fit: contain;
    object-position: center bottom;
    transform: none;
    filter: none;
  }
  body.edition-catalog #catalog .photo img,
  body.edition-product .gallery img {
    object-fit: contain;
    object-position: center;
    transform: none;
  }
}

/* Give featured artwork a stable frame before its intrinsic size is known. */
body.edition-home .nh .feat-img {
  box-sizing: border-box;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  flex: none;
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 0;
  aspect-ratio: 4 / 3;
  padding: clamp(12px, 4vw, 28px);
  overflow: hidden;
}

body.edition-home .nh .feat-img > img,
html body.edition-catalog #catalog > article .photo > img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  min-inline-size: 0;
  min-block-size: 0;
  max-inline-size: 100%;
  max-block-size: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center;
}

html body.edition-catalog #catalog > article .photo {
  box-sizing: border-box;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}

@media (max-width: 650px) {
  html body.edition-catalog #catalog > article .photo {
    block-size: clamp(140px, 43vw, 210px);
    min-block-size: 0;
    padding: 12px;
  }

  html body .pgr-whatsapp {
    inset-inline-start: auto;
    inset-inline-end: max(12px, env(safe-area-inset-right));
    inset-block-end: max(12px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  html body.edition-catalog #catalog { grid-template-columns: minmax(0, 1fr); }
}

@media (hover: none) {
  html body #catalog > article:hover .photo > img { transform: none; }
}
