:root{
  /* Default fallback if theme doesn't provide its own container width */
  --pnwa-target-width: 1200px;
}

/* WooCommerce catalog-like views */
body.woocommerce-shop .site-content .ast-container,
body.post-type-archive-product .site-content .ast-container,
body.tax-product_cat .site-content .ast-container,
body.tax-product_tag .site-content .ast-container,
body.tax-product_attribute .site-content .ast-container{
  /* Use plugin variable; it will be set from Astra variable via inline CSS fallback */
  max-width: var(--pnwa-target-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Ensure the inner shop grid aligns as on single product */
.woocommerce.archive .ast-container .ast-article-single,
.woocommerce.archive .ast-container .ast-woocommerce-container{
  max-width: 100%;
}

/* Hide default sorting dropdown and results count on catalog pages */
body.woocommerce-shop .woocommerce-result-count,
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count,
body.woocommerce-shop .woocommerce-ordering,
body.post-type-archive-product .woocommerce-ordering,
body.tax-product_cat .woocommerce-ordering,
body.tax-product_tag .woocommerce-ordering{
  display: none !important;
}

/* Remove thin separator line between header and page content (Astra and generic header/site containers) */
/* Astra header bars */
body.woocommerce-shop .main-header-bar,
body.post-type-archive-product .main-header-bar,
body.tax-product_cat .main-header-bar,
body.tax-product_tag .main-header-bar,
body.woocommerce-shop .ast-primary-header-bar,
body.post-type-archive-product .ast-primary-header-bar,
body.tax-product_cat .ast-primary-header-bar,
body.tax-product_tag .ast-primary-header-bar{
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}
/* Generic site header wrappers */
body.woocommerce-shop header.site-header,
body.post-type-archive-product header.site-header,
body.tax-product_cat header.site-header,
body.tax-product_tag header.site-header,
body.woocommerce-shop .site-header,
body.post-type-archive-product .site-header,
body.tax-product_cat .site-header,
body.tax-product_tag .site-header{
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}
/* In case the line is applied on the content container instead (top border) */
body.woocommerce-shop .site-content,
body.post-type-archive-product .site-content,
body.tax-product_cat .site-content,
body.tax-product_tag .site-content,
body.woocommerce-shop .content-area,
body.post-type-archive-product .content-area,
body.tax-product_cat .content-area,
body.tax-product_tag .content-area{
  border-top: 0 !important;
  box-shadow: none !important;
}

/* Aggressive: also remove pseudo-elements and common separators that may render the line */
body.woocommerce-shop .main-header-bar:before,
body.woocommerce-shop .main-header-bar:after,
body.post-type-archive-product .main-header-bar:before,
body.post-type-archive-product .main-header-bar:after,
body.tax-product_cat .main-header-bar:before,
body.tax-product_cat .main-header-bar:after,
body.tax-product_tag .main-header-bar:before,
body.tax-product_tag .main-header-bar:after,
body.woocommerce-shop .ast-primary-header-bar:before,
body.woocommerce-shop .ast-primary-header-bar:after,
body.post-type-archive-product .ast-primary-header-bar:before,
body.post-type-archive-product .ast-primary-header-bar:after,
body.tax-product_cat .ast-primary-header-bar:before,
body.tax-product_cat .ast-primary-header-bar:after,
body.tax-product_tag .ast-primary-header-bar:before,
body.tax-product_tag .ast-primary-header-bar:after,
body.woocommerce-shop header.site-header:before,
body.woocommerce-shop header.site-header:after,
body.post-type-archive-product header.site-header:before,
body.post-type-archive-product header.site-header:after,
body.tax-product_cat header.site-header:before,
body.tax-product_cat header.site-header:after,
body.tax-product_tag header.site-header:before,
body.tax-product_tag header.site-header:after{
  content: none !important;
  display: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
  height: 0 !important;
}

/* Remove sticky header bottom borders too */
body.woocommerce-shop .ast-sticky-active .main-header-bar,
body.post-type-archive-product .ast-sticky-active .main-header-bar,
body.tax-product_cat .ast-sticky-active .main-header-bar,
body.tax-product_tag .ast-sticky-active .main-header-bar{
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* Hide common separators at the top of content */
body.woocommerce-shop .site-content hr,
body.post-type-archive-product .site-content hr,
body.tax-product_cat .site-content hr,
body.tax-product_tag .site-content hr,
body.woocommerce-shop .entry-content hr,
body.post-type-archive-product .entry-content hr,
body.tax-product_cat .entry-content hr,
body.tax-product_tag .entry-content hr,
body.woocommerce-shop .wp-block-separator,
body.post-type-archive-product .wp-block-separator,
body.tax-product_cat .wp-block-separator,
body.tax-product_tag .wp-block-separator,
body.woocommerce-shop .elementor-divider,
body.post-type-archive-product .elementor-divider,
body.tax-product_cat .elementor-divider,
body.tax-product_tag .elementor-divider,
body.woocommerce-shop .elementor-divider-separator,
body.post-type-archive-product .elementor-divider-separator,
body.tax-product_cat .elementor-divider-separator,
body.tax-product_tag .elementor-divider-separator{
  display: none !important;
  border: 0 !important;
  background: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* As a last resort, remove any top border on the first child of .site-content */
body.woocommerce-shop .site-content > *:first-child,
body.post-type-archive-product .site-content > *:first-child,
body.tax-product_cat .site-content > *:first-child,
body.tax-product_tag .site-content > *:first-child{
  border-top: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* Remove Astra archive description bottom border (separator line) */
body.woocommerce-shop .site-content section.ast-archive-description,
body.post-type-archive-product .site-content section.ast-archive-description,
body.tax-product_cat .site-content section.ast-archive-description,
body.tax-product_tag .site-content section.ast-archive-description,
body.tax-product_attribute .site-content section.ast-archive-description{
  border-bottom: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Ensure Woo breadcrumbs are visible (in case a theme rule hides them) */
body.woocommerce-shop .woocommerce-breadcrumb,
body.post-type-archive-product .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb,
body.tax-product_tag .woocommerce-breadcrumb,
body.tax-product_attribute .woocommerce-breadcrumb,
body.single-product .woocommerce-breadcrumb{
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  margin: 0 0 1rem 0;
}

/* Ensure breadcrumbs on single product occupy full row and do not shift columns */
body.single-product .woocommerce-breadcrumb{
  float: none !important;
  clear: both !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  grid-column: 1 / -1 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Astra sometimes styles breadcrumbs via .ast-breadcrumbs wrapper */
body.woocommerce-shop .ast-breadcrumbs,
body.post-type-archive-product .ast-breadcrumbs,
body.tax-product_cat .ast-breadcrumbs,
body.tax-product_tag .ast-breadcrumbs,
body.tax-product_attribute .ast-breadcrumbs,
body.single-product .ast-breadcrumbs{
  display: block !important;
  visibility: visible !important;
}

/* In case global separators hiding hit breadcrumb separators, restore spacing */
body.woocommerce .woocommerce-breadcrumb a,
body.woocommerce .woocommerce-breadcrumb{
  border: 0 !important;
  background: none !important;
}

/* Optional: narrow containers on very wide screens similar to Astra single */
@media (min-width: 1201px){
  body.woocommerce-shop .site-content .ast-container,
  body.post-type-archive-product .site-content .ast-container,
  body.tax-product_cat .site-content .ast-container,
  body.tax-product_tag .site-content .ast-container{
    max-width: var(--pnwa-target-width);
  }
}
