body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .mmx-auction-gallery,
body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_left_part {
  min-height: clamp(500px, 47vw, 680px);
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .mmx-auction-gallery > .mmx-gallery-count,
body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_left_part > .mmx-gallery-count {
  display: flex !important;
  margin: 0 0 12px auto !important;
  position: static !important;
  width: max-content;
  z-index: auto !important;
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_image_main {
  --mmx-gallery-height: clamp(440px, 43vw, 620px);
  align-items: start;
  direction: ltr;
  display: grid !important;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 92px;
  min-height: var(--mmx-gallery-height) !important;
  width: 100%;
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_main_image_div {
  grid-column: 1;
  min-width: 0;
  width: 100%;
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .hikashop_product_main_image_thumb,
body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .hikashop_product_main_image {
  display: grid !important;
  height: var(--mmx-gallery-height) !important;
  min-height: var(--mmx-gallery-height) !important;
  place-items: center;
  width: 100% !important;
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .hikashop_product_main_image_subdiv,
body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .hikashop_product_main_image_subdiv > a[data-fancybox="gallery"] {
  display: block !important;
  height: 100%;
  width: 100% !important;
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_image_main img:not(.hikashop_child_image) {
  display: block !important;
  width: 100% !important;
  height: var(--mmx-gallery-height) !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_small_image_div {
  align-content: start;
  align-self: stretch;
  direction: rtl;
  display: flex !important;
  flex-direction: column;
  gap: 9px;
  grid-column: 2;
  height: var(--mmx-gallery-height);
  justify-content: flex-start;
  max-height: var(--mmx-gallery-height);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 3px 4px;
  scrollbar-color: #d99a00 transparent;
  scrollbar-width: thin;
  width: 92px !important;
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_small_image_div > a {
  background: #fff;
  border: 2px solid #dbe3ec;
  border-radius: 12px;
  box-sizing: border-box;
  display: block !important;
  flex: 0 0 76px;
  float: none !important;
  height: 76px;
  margin: 0 !important;
  overflow: hidden;
  padding: 3px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  width: 76px !important;
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_small_image_div > a:hover,
body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_small_image_div > a:focus-visible,
body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_small_image_div > a.hikashop_active_thumbnail {
  border-color: #e3a008;
  box-shadow: 0 0 0 3px rgba(227, 160, 8, .16);
  outline: none;
  transform: translateY(-1px);
}

body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_small_image_div img.hikashop_child_image {
  border-radius: 7px;
  display: block !important;
  height: 66px !important;
  margin: 0 !important;
  max-height: none !important;
  max-width: none !important;
  object-fit: cover;
  width: 66px !important;
}

/* HikaAuction's two bid actions were inheriting fixed percentage widths and
   single-line text. Long RTL prices could therefore be clipped or collide.
   Keep each action full-width, readable, and consistent with the site theme. */
body.mmx-auction-detail-page #hikaauction_bidder_amount .hikaauction_bid_buttons {
  align-items: stretch !important;
  box-sizing: border-box;
  direction: rtl;
  display: grid !important;
  float: none !important;
  gap: 10px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-content: stretch !important;
  padding: 12px 16px 18px !important;
  width: 100% !important;
}

body.mmx-auction-detail-page #hikaauction_bidder_amount .hikaauction_bid_buttons > button {
  align-items: center !important;
  box-sizing: border-box !important;
  display: flex !important;
  float: none !important;
  height: auto !important;
  justify-content: center !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  min-height: 52px !important;
  min-width: 0 !important;
  overflow: visible !important;
  padding: 11px 16px !important;
  text-align: center !important;
  white-space: normal !important;
  width: 100% !important;
}

body.mmx-auction-detail-page #hikaauction_bidder_amount .hikaauction_bid_buttons > button > span {
  direction: rtl;
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
  unicode-bidi: plaintext;
}

body.mmx-auction-detail-page #hikaauction_bidder_amount .hikaauction_bid_button.hikabtn-success {
  background: linear-gradient(100deg, #f2bd3b, #e3a008) !important;
  border: 2px solid #e3a008 !important;
  color: #061d38 !important;
  box-shadow: 0 8px 18px rgba(227, 160, 8, .22);
}

body.mmx-auction-detail-page #hikaauction_bidder_amount .hikaauction_maxbid_btn {
  background: #fff !important;
  border: 2px solid #061d38 !important;
  color: #061d38 !important;
}

/* The global auction-card decorator also matches the status wrapper because its
   class name contains "auction_product". Keep the decorative gavel on cards,
   but never let it cover the Live/Ended status pill on a product page. */
body.mmx-auction-detail-page .mmx-heading-status > .mmx-card-gavel {
  display: none !important;
}

@media (min-width: 761px) {
  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .mmx-product-details > .is-delivery {
    grid-column: 1 / -1;
    width: 100%;
  }

  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .mmx-product-details > .is-delivery > ul {
    display: grid !important;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  }

  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .mmx-product-details > .is-delivery .mmx-product-delivery-item {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 72px;
  }
}

@media (max-width: 760px) {
  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .mmx-auction-gallery,
  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_left_part {
    min-height: 0;
  }

  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .mmx-auction-gallery > .mmx-gallery-count,
  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_left_part > .mmx-gallery-count {
    margin-bottom: 8px !important;
  }

  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_image_main,
  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) .hikashop_product_main_image {
    --mmx-gallery-height: clamp(300px, 92vw, 440px);
    min-height: clamp(300px, 92vw, 440px) !important;
  }

  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_image_main {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
  }

  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_main_image_div {
    grid-column: 1;
    grid-row: 1;
  }

  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_product_image_main img:not(.hikashop_child_image) {
    height: clamp(300px, 92vw, 440px) !important;
  }

  body:is(.mmx-auction-detail-page, .mmx-fixed-detail-page) #hikashop_small_image_div {
    align-self: auto;
    direction: ltr;
    flex-direction: row;
    grid-column: 1;
    grid-row: 2;
    height: 86px;
    max-height: 86px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100% !important;
  }
}
