/**
 * DRTV Shop WOW — native Elementor Full Width bridge.
 *
 * Shared Elementor Rail owns the only responsive page gutter and the only
 * application boundary. This file does one job: release the JNews/Elementor
 * ancestor chain that contains the active Shop application. It never targets
 * the header, footer, global sidebars or unrelated pages.
 */

/*
 * WooCommerce products and archives are native routes rather than ordinary
 * Elementor pages. :has() limits the release to wrappers that actually contain
 * this request's .dptv-shop-wow-app root; footer rows cannot match.
 */
body.dptv-shop-wow-elementor-full-width .jeg_main:has(.dptv-shop-wow-app),
body.dptv-shop-wow-elementor-full-width .jeg_main :is(
  .jeg_container,
  .jeg_main_content,
  .jeg_content,
  .jeg_inner_content,
  .content-inner,
  .site-content,
  .main-content,
  .entry-content,
  main#primary,
  .container,
  .row,
  [class^="col-"],
  [class*=" col-"]
):has(.dptv-shop-wow-app),
body.dptv-shop-wow-elementor-full-width .elementor:has(.dptv-shop-wow-app),
body.dptv-shop-wow-elementor-full-width .elementor :is(
  .elementor-element,
  .elementor-section-wrap,
  .elementor-section,
  .elementor-container,
  .elementor-column,
  .elementor-widget-wrap,
  .elementor-widget-shortcode,
  .elementor-widget-container
):has(.dptv-shop-wow-app) {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  float: none !important;
  flex: 0 0 100% !important;
  box-sizing: border-box !important;
}

/* Application roots are full-canvas; their immediate shared rail owns gutters. */
body.dptv-shop-wow-elementor-full-width .dptv-shop-wow-app {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dptv-shop-wow-elementor-full-width .dptv-shop-wow-app,
body.dptv-shop-wow-elementor-full-width .dptv-shop-wow-app *,
body.dptv-shop-wow-elementor-full-width .dptv-shop-wow-app *::before,
body.dptv-shop-wow-elementor-full-width .dptv-shop-wow-app *::after {
  box-sizing: border-box;
}

body.dptv-shop-wow-elementor-full-width .dptv-shop-wow-app > *,
body.dptv-shop-wow-elementor-full-width :is(
  .dptv-wow-single-shell,
  .dptv-wow-single-top,
  .dptv-wow-gallery,
  .dptv-wow-buyrail,
  .dptv-wow-buybox,
  .dptv-wow-shell--archive,
  .dptv-wow-main,
  .dptv-wow-shop-sidebar,
  .dptv-wow-shop-flow-content,
  .dptv-checkout-v2__engine
) {
  min-width: 0;
}

body.dptv-shop-wow-elementor-full-width .dptv-shop-wow-app :is(
  img,
  picture,
  video,
  iframe,
  canvas,
  svg
) {
  max-width: 100%;
}

/* The Shop landing artwork is canvas-width; its content already uses the rail. */
body.dptv-shop-wow-landing .jeg_main:has(.dptv-wow-shop-landing-page),
body.dptv-shop-wow-landing .jeg_main :is(
  .jeg_container,
  .jeg_main_content,
  .jeg_content,
  .jeg_inner_content,
  .content-inner,
  .entry-content,
  main#primary
):has(.dptv-wow-shop-landing-page) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.dptv-shop-wow-elementor-full-width .dptv-shop-hub,
body.dptv-shop-wow-elementor-full-width .dptv-shop-hub__banner-canvas,
body.dptv-shop-wow-elementor-full-width .dptv-shop-hub__banner-canvas > .dptv-shop-hub-slider {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

body.single-product.dptv-shop-wow-elementor-full-width .dptv-wow-gallery__main img {
  display: block;
  max-width: 100% !important;
}

@media (max-width: 767px) {
  body.single-product.dptv-shop-wow-elementor-full-width .dptv-wow-gallery__main img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }
}
