/* Shared presentation for artwork images across the public portal. */
body .qb-card-media,
body .qb-detail-media,
body .qb-dashboard-image,
body .qb-candidate-image,
body .qb-edit-preview,
body .shop-card > a.artwork-preview,
body .product-image,
body .auction-cover,
body .public-lot-image,
body .auction-art-dialog,
body .site-art-frame {
  position: relative;
  overflow: hidden;
  border: 0;
  background: #ded8cd;
}

body .qb-card-media img,
body .qb-preview img,
body .qb-detail-media > img,
body .qb-dashboard-image img,
body .qb-candidate-image img,
body .qb-edit-preview img,
body .shop-card > a.artwork-preview img,
body .product-image img,
body .auction-cover img,
body .public-lot-image img,
body .auction-art-dialog img,
body .site-art-frame img {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  /* A fixed safe area keeps the white frame clear of every edge. */
  max-width: calc(100% - 36px);
  max-height: calc(100% - 36px);
  border: 2px solid #fff;
  object-fit: contain;
  filter: drop-shadow(0 5px 15px rgba(16, 24, 32, .23));
}

body .product-image {
  height: min(75vh, 780px);
  display: grid;
  place-items: center;
}

body .product-image::before,
body .site-art-frame::before {
  content: "";
  position: absolute;
  inset: -28px;
  background: var(--artwork-source) center / cover no-repeat;
  filter: blur(24px) saturate(.78);
  opacity: .64;
  transform: scale(1.12);
}

body .site-art-frame {
  height: 420px;
  display: grid;
  place-items: center;
}

body .qb-blur,
body .artwork-blur {
  z-index: 0;
}

body .qb-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Keep a clearly visible blurred inset around artworks in gallery cards. */
body .qb-card-media img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 36px);
  max-height: calc(100% - 36px);
}

/* Some legacy component styles force images to fill their containers. */
body .qb-dashboard-image img,
body .qb-candidate-image img,
body .qb-edit-preview img,
body .qb-detail-media > img,
body .shop-card > a.artwork-preview img,
body .auction-cover img,
body .public-lot-image img,
body .auction-art-dialog img {
  width: auto;
  height: auto;
  max-width: calc(100% - 36px);
  max-height: calc(100% - 36px);
  object-position: center;
}

@media (max-width: 640px) {
  body .qb-card-media img,
  body .qb-preview img,
  body .qb-detail-media > img,
  body .qb-dashboard-image img,
  body .qb-candidate-image img,
  body .qb-edit-preview img,
  body .shop-card > a.artwork-preview img,
  body .product-image img,
  body .auction-cover img,
  body .public-lot-image img,
  body .auction-art-dialog img,
  body .site-art-frame img {
    max-width: calc(100% - 28px);
    max-height: calc(100% - 28px);
  }
}

/* Traditional red gallery dot, refined as a readable SOLD seal. */
body .artwork-sold-badge {
  position: absolute;
  z-index: 12;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background: #c82026;
  color: #fff;
  box-shadow: 0 8px 22px rgba(55,0,3,.28);
  font: 700 11px/1 Arial,sans-serif;
  letter-spacing: .14em;
  text-indent: .14em;
  pointer-events: none;
}
body .artwork-sold-badge-detail {right: 20px;bottom: 20px;width: 72px;height: 72px;font-size: 13px}
body .qb-detail-media.has-sold-badge .qb-zoom-label {right: 108px}
@media (max-width:640px){body .artwork-sold-badge{right:10px;bottom:10px;width:50px;height:50px;font-size:10px}body .artwork-sold-badge-detail{width:58px;height:58px}body .qb-detail-media.has-sold-badge .qb-zoom-label{right:78px}}

@media (max-width: 640px) {
  body .site-art-frame {
    height: min(115vw, 520px);
  }
}
