/* Size the embedded video to its existing responsive 16:9 wrapper. */
@media (max-width: 767px) {
  html.surin-redesign #surin-main .surin-product-detail .product-tabs .mobile .full-description .h_iframe-aparat_embed_frame > iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }
}

/* Keep the floating return control clear of the thumbnail rail on short desktops. */
@media (min-width: 1025px) and (max-height: 650px) {
  html.surin-redesign.html-product-details-page .go-to-top {
    right: 6px;
  }
}

/* Cart codes need readable input space in narrow summary columns. */
html.surin-redesign .surin-native-cart .deals .coupon-code {
  flex-wrap: wrap !important;
  gap: 8px;
}
html.surin-redesign .surin-native-cart .deals .coupon-code > input[type="text"] {
  box-sizing: border-box;
  flex: 1 1 160px;
  min-inline-size: min(100%, 160px);
  max-inline-size: 100%;
  padding-inline: 12px;
  margin: 0 !important;
}
html.surin-redesign .surin-native-cart .deals .coupon-code > :is(input[type="submit"], button) {
  max-inline-size: 100%;
  margin: 0 !important;
}

/* Keep the existing back-to-top button in the footer's reserved space. */
html.surin-redesign .sr-site-footer .footer-bottom-inner:has(> .go-to-top) {
  position: relative;
}
html.surin-redesign .sr-site-footer .go-to-top.sr-footer-docked {
  position: absolute;
  right: 14px;
  bottom: 16px;
}

/* The replacement drawer supplies its own close control. */
html.surin-redesign .sr-mobile-counter-host > .backMenu {
  display: none !important;
}

/* Let native gallery controls receive pointer input when the zoom layer is stale after resizing. */
html.surin-redesign.html-product-details-page .zoomContainer {
  pointer-events: none;
}

/* Keep both ends of the RTL thumbnail strip reachable when it overflows. */
@media (max-width: 991px) {
  html.surin-redesign #surin-main .surin-product-detail .gallery .picture-thumbs {
    justify-content: flex-start;
    justify-content: safe center;
  }
}
