/* Production Image Fallback & Layout Consistency Styles */

.img-fixed-container,
.product-img-box,
.brand-img-box,
.table-img-box,
.cart-watch-img-box,
.summary-product-img-box,
.avatar-img-box {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border-radius: 8px;
  flex-shrink: 0;
  contain: layout paint;
}

/* Image behavior inside containers */
img,
.img-fallback,
.brand-logo-img,
.product-image,
.cart-watch-img,
.summary-product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity 0.2s ease-in-out;
}

/* Specific component containers */

/* Table image cell alignment to prevent row height jumps */
table td img,
table th img,
.table-img-box img {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: contain !important;
  object-position: center !important;
  flex-shrink: 0 !important;
  border-radius: 6px;
  background-color: #ffffff;
  display: inline-block;
  vertical-align: middle;
}

/* Table rows styling */
table tr {
  height: auto;
}

table td {
  vertical-align: middle;
}

/* Brand logos */
.brand-logo-img {
  max-width: 48px;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Profile avatars */
.profile-image,
.avatar-img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  flex-shrink: 0;
}

/* Smooth fallback appearance */
.img-fallback-loaded {
  opacity: 0.95;
  filter: contrast(0.98);
}
