/* Fill catalogue frames without padding; retain each product's focal point. */
.product-card .card-picture img {
  object-fit:cover;
  padding:0;
}

.product-card .card-picture > a:first-child:hover img {
  transform:none;
}

.pdp-main-image {
  padding:0;
}

.pdp-main-image > img {
  object-fit:contain;
  object-position:center;
  padding:10px;
}

/* A full-width toolbar keeps every control clear of the photograph and rail. */
.pdp-gallery-toolbar {
  display:grid;
  grid-template-columns:44px minmax(0,1fr) 44px;
  align-items:center;
  gap:8px;
  margin-top:8px;
  min-height:44px;
}
.pdp-image-expand {
  position:static;
  transform:none;
  justify-self:center;
  min-height:44px;
  white-space:nowrap;
  padding:8px 10px;
}
.pdp-save { position:static; width:44px; height:44px; }
.pdp-image-count { position:static; text-align:center; padding:6px 4px; }

.pdp-thumbnails button { padding:4px; }
.pdp-thumbnails button[aria-pressed="true"] { padding:3px; }
.pdp-thumbnails img {
  object-fit:contain;
  object-position:center;
  border-radius:0;
}

.pdp-selected-product img,.bag-photo img {
  object-fit:contain;
  object-position:center;
  padding:5px;
}

.image-dialog { padding:44px 12px 12px; }
.image-dialog > img {
  width:auto;
  height:auto;
  max-width:calc(95vw - 30px);
  max-height:calc(95dvh - 62px);
  object-fit:contain;
  object-position:center;
  margin:auto;
}
.image-dialog > .icon-button { position:absolute; right:4px; top:0; }

@media (max-width:767.98px), (max-width:900px) and (max-height:500px) {
  /* Keep faces and garment necklines visible in the compact mobile crop. */
  .product-card .card-picture img { object-position:center top !important; }

  /* Let the frame follow the full photo, including portrait and landscape shots. */
  .pdp-main-image > img { height:auto; max-height:none; padding:0; }
  .pdp-gallery-media { position:relative; min-width:0; }
  .pdp-gallery-media.has-thumbnails { padding-right:68px; }
  .pdp-gallery-media .pdp-thumbnails {
    position:absolute;
    inset:0 0 0 auto;
    display:flex;
    flex-direction:column;
    width:60px;
    gap:8px;
    margin:0;
    padding:2px;
    overflow-x:hidden;
    overflow-y:auto;
    scrollbar-width:thin;
  }
  .pdp-gallery-media .pdp-thumbnails button {
    flex:0 0 66px;
    width:100%;
    height:66px;
    min-height:66px;
    max-height:none;
    padding:2px;
    border-radius:9px;
    outline-offset:-2px;
  }
  .pdp-gallery-media .pdp-thumbnails button[aria-pressed="true"] { padding:1px; }
  .pdp-gallery-media .pdp-thumbnails img { object-fit:cover; object-position:center top; border-radius:5px; }
}
