/* Samaneh mobile overflow guard.
 * Keeps intentional carousel/category scrolling inside the widget only.
 */

@media (max-width: 767px) {
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
  }

  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-x: clip;
  }

  /* Elementor layout chain must be shrinkable. */
  #page,
  .site,
  .site-content,
  main,
  .elementor,
  .elementor-location-header,
  .elementor-location-footer,
  .elementor-location-single,
  .elementor-location-archive,
  .elementor-section,
  .elementor-container,
  .elementor-column,
  .elementor-column-wrap,
  .elementor-widget-wrap,
  .elementor-widget,
  .elementor-widget-container,
  .elementor-element,
  .e-con,
  .e-con-inner,
  .e-parent,
  .e-child {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Normal media must never establish a wider page. */
  img,
  picture,
  video,
  iframe,
  canvas,
  svg {
    max-width: 100%;
  }

  /* Samaneh category grid: normal grid stays inside viewport.
     Scroll layouts can still scroll internally. */
  .samaneh-category-grid {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .samaneh-category-card,
  .samaneh-category-media,
  .samaneh-category-content,
  .samaneh-category-heading {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .samaneh-cat-layout-scroll,
  .samaneh-cat-layout-live-scroll .samaneh-category-grid,
  .samaneh-cat-mobile-scroll,
  .samaneh-cat-mobile-scroll-live-yes .samaneh-category-grid {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overscroll-behavior-inline: contain;
  }

  /* Product carousel: scrolling remains inside track, never on page root. */
  .samaneh-product-scroller,
  .samaneh-product-scroller-track,
  .samaneh-timed-sale,
  .samaneh-timed-sale-track {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .samaneh-product-scroller {
    width: 100%;
  }

  .samaneh-product-scroller-track,
  .samaneh-timed-sale.is-mobile-scroll {
    overscroll-behavior-inline: contain;
  }

  /* Product trust / service cards, visible in the supplied screenshots. */
  .stb-product-trust,
  .stb-product-trust-items,
  .stb-product-trust-item,
  .stb-product-trust-item-inner,
  .stb-product-trust-content,
  .stb-about-section,
  .stb-about-content,
  .stb-about-features,
  .stb-about-stats,
  .stb-stats-showcase,
  .stb-stats-grid,
  .stb-stat-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .stb-product-trust,
  .stb-about-section,
  .stb-stats-showcase {
    width: 100%;
  }

  /* Full-width slider uses viewport geometry, but must not enlarge the page. */
  .samaneh-pro-width-full {
    max-width: 100%;
    overflow-x: clip;
  }

  .samaneh-pro-width-full .samaneh-pro-slider {
    max-width: 100vw;
  }

  /* Long labels/URLs must wrap instead of pushing a container wider. */
  .samaneh-category-title,
  .stb-product-trust-title,
  .stb-product-trust-text,
  .stb-about-title,
  .stb-about-description,
  .stb-stat-label,
  .stb-stat-text,
  .elementor-heading-title,
  .elementor-widget-text-editor {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}
