/*
 * Sepahan 2.2.3 — homepage container spacing only.
 *
 * Clean-base fix: this stylesheet changes only the horizontal geometry of
 * boxed Elementor page containers and Sepahan widget outer wrappers on the
 * WordPress front page. It does not define colors, backgrounds, typography,
 * vertical sizing, overflow, positioning, animation, pointer/touch behavior,
 * header geometry, footer geometry, or JavaScript-related state.
 */

/* Shared width used by the first boxed landing slider and the widgets below. */
body.home .elementor[data-elementor-type="wp-page"],
body.home .elementor[data-elementor-type="page"] {
  --sepahan-home-container-width: 1280px;
  --sepahan-home-container-gutter: 1rem;
}

/*
 * Widen only top-level BOXED Elementor page containers. Nested Elementor
 * containers retain their own column/grid settings. Header and footer
 * documents are excluded by the page-document selector.
 */
body.home .elementor[data-elementor-type="wp-page"] > .elementor-element.e-con.e-parent.e-con-boxed,
body.home .elementor[data-elementor-type="page"] > .elementor-element.e-con.e-parent.e-con-boxed {
  --content-width: var(--sepahan-home-container-width) !important;
  --container-max-width: var(--sepahan-home-container-width) !important;
}

body.home .elementor[data-elementor-type="wp-page"] > .elementor-element.e-con.e-parent.e-con-boxed > .e-con-inner,
body.home .elementor[data-elementor-type="page"] > .elementor-element.e-con.e-parent.e-con-boxed > .e-con-inner,
body.home .elementor[data-elementor-type="wp-page"] > .elementor-element.elementor-section-boxed > .elementor-container,
body.home .elementor[data-elementor-type="page"] > .elementor-element.elementor-section-boxed > .elementor-container {
  width: 100% !important;
  max-width: var(--sepahan-home-container-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

/*
 * Normalize only the OUTER content wrapper of Sepahan widgets. This selector
 * intentionally does not touch widget roots, cards, sliders, controls, title
 * lines, colors, or nested layout elements.
 */
body.home .elementor[data-elementor-type="wp-page"] .elementor-widget[class*="elementor-widget-sepahan_"]:not(.elementor-widget-sepahan_advanced_footer):not(.elementor-widget-sepahan_footer_two):not(.elementor-widget-sepahan_footer_three):not(.elementor-widget-sepahan_header_builder):not(.elementor-widget-sepahan_nav_menu):not(.elementor-widget-sepahan_fullwidth_slider):not(.elementor-widget-sepahan_mobile_square_slider) .container,
body.home .elementor[data-elementor-type="page"] .elementor-widget[class*="elementor-widget-sepahan_"]:not(.elementor-widget-sepahan_advanced_footer):not(.elementor-widget-sepahan_footer_two):not(.elementor-widget-sepahan_footer_three):not(.elementor-widget-sepahan_header_builder):not(.elementor-widget-sepahan_nav_menu):not(.elementor-widget-sepahan_fullwidth_slider):not(.elementor-widget-sepahan_mobile_square_slider) .container,
body.home .elementor[data-elementor-type="wp-page"] .elementor-widget-sepahan_image_categories .sepahan-image-cats-width-container,
body.home .elementor[data-elementor-type="page"] .elementor-widget-sepahan_image_categories .sepahan-image-cats-width-container,
body.home .elementor[data-elementor-type="wp-page"] .elementor-widget-sepahan_category_grid .sepahan-category-grid-container,
body.home .elementor[data-elementor-type="page"] .elementor-widget-sepahan_category_grid .sepahan-category-grid-container,
body.home .elementor[data-elementor-type="wp-page"] .elementor-widget-sepahan_brands .sepahan-brands-container,
body.home .elementor[data-elementor-type="page"] .elementor-widget-sepahan_brands .sepahan-brands-container,
body.home .elementor[data-elementor-type="wp-page"] .elementor-widget-sepahan_two_products_showcase .sepahan-two-inner,
body.home .elementor[data-elementor-type="page"] .elementor-widget-sepahan_two_products_showcase .sepahan-two-inner {
  width: 100% !important;
  max-width: var(--sepahan-home-container-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--sepahan-home-container-gutter) !important;
  padding-right: var(--sepahan-home-container-gutter) !important;
  box-sizing: border-box !important;
}

/* Respect the Visual Categories widget's explicit full-width option. */
body.home .elementor[data-elementor-type="wp-page"] .elementor-widget-sepahan_image_categories .sepahan-image-cats-width-full,
body.home .elementor[data-elementor-type="page"] .elementor-widget-sepahan_image_categories .sepahan-image-cats-width-full {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

@media (min-width: 1536px) {
  body.home .elementor[data-elementor-type="wp-page"],
  body.home .elementor[data-elementor-type="page"] {
    --sepahan-home-container-width: 1440px;
  }
}

@media (max-width: 767px) {
  body.home .elementor[data-elementor-type="wp-page"],
  body.home .elementor[data-elementor-type="page"] {
    --sepahan-home-container-width: 100%;
    --sepahan-home-container-gutter: 12px;
  }
}
