:root {
  --hxs-media-surface: #ffffff;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

img,
picture,
video,
iframe,
svg {
  max-width: 100%;
}

figure,
.wp-caption,
.elementor-widget-image,
.elementor-widget-image .elementor-widget-container {
  max-width: 100%;
}

img[src*="/_local/hexingsheng-logo.svg"] {
  width: auto !important;
  max-width: min(100%, 260px) !important;
  height: auto !important;
  object-fit: contain !important;
}

img[data-hxs-product] {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  background: var(--hxs-media-surface);
}

.woocommerce-product-gallery img[data-hxs-product],
.woocommerce-product-gallery__image img[data-hxs-product],
.flex-control-thumbs img[data-hxs-product] {
  object-fit: contain !important;
}

.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image,
.woocommerce-product-gallery__image > a,
.woocommerce-product-gallery__image > div {
  width: 100% !important;
  max-width: 100% !important;
}

img[data-hxs-generated] {
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

.elementor-posts-container,
.products,
.woocommerce ul.products,
.woocommerce-page ul.products {
  max-width: 100%;
}

.woocommerce nav.woocommerce-pagination ul,
.elementor-pagination,
.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}

form,
.elementor-form,
.elementor-form-fields-wrapper,
.elementor-field-group,
input,
select,
textarea,
button {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .elementor-container,
  .e-con-inner,
  .elementor-widget-wrap,
  .site-main,
  main,
  article {
    max-width: 100%;
  }

  .elementor-nav-menu--dropdown a,
  .elementor-nav-menu--dropdown .elementor-item {
    white-space: normal !important;
  }
}

@media (max-width: 767px) {
  body {
    width: 100%;
  }

  img[data-hxs-generated] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }

  .elementor-widget-image:has(img[data-hxs-generated]),
  .elementor-widget-image:has(img[data-hxs-generated]) .elementor-widget-container,
  figure:has(img[data-hxs-generated]),
  picture:has(img[data-hxs-generated]) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  img[data-hxs-product] {
    min-height: 0 !important;
    max-height: none !important;
  }

  .woocommerce-product-gallery,
  .woocommerce-product-gallery__wrapper,
  .woocommerce-product-gallery__image,
  .woocommerce-product-gallery__image img[data-hxs-product] {
    min-height: 0 !important;
    max-height: none !important;
  }

  .elementor-widget-search,
  .elementor-search-form,
  .elementor-search-form__container,
  .elementor-search-form__input {
    width: 100% !important;
    max-width: 100% !important;
  }

  .elementor-menu-toggle {
    flex: 0 0 auto;
  }

  .elementor-nav-menu--dropdown,
  .elementor-nav-menu--dropdown .elementor-nav-menu,
  .elementor-nav-menu--dropdown .menu-item,
  .elementor-nav-menu--dropdown a {
    max-width: 100% !important;
  }

  .woocommerce div.product,
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary,
  .woocommerce-page div.product div.images,
  .woocommerce-page div.product div.summary {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .elementor-form-fields-wrapper {
    margin-inline: 0 !important;
  }

  .elementor-field-group,
  .elementor-field-group > input,
  .elementor-field-group > select,
  .elementor-field-group > textarea,
  .elementor-field-group > button {
    width: 100% !important;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}
