/**
 * AvvalStock Product System v29.2.0
 * Single-post template compatibility only.
 * No component/card visual styling belongs here.
 */

/* Bakala reserves a Bootstrap col-sm-3 for an empty blog sidebar on posts. */
body.single-post .container-bakala.main-warp > .row.right_sidebar > aside.blog-sidebar {
    display: none !important;
    width: 0 !important;
    max-width: 0 !important;
    flex: 0 0 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-post .container-bakala.main-warp > .row.right_sidebar > section.col-sm-9 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 15px;
    padding-right: 15px;
}

/* Elementor must be allowed to consume the full article column. */
body.single-post .container-bakala.main-warp > .row.right_sidebar > section.col-sm-9 > article,
body.single-post .container-bakala.main-warp > .row.right_sidebar > section.col-sm-9 .entry-content,
body.single-post .container-bakala.main-warp > .row.right_sidebar > section.col-sm-9 .elementor,
body.single-post .container-bakala.main-warp > .row.right_sidebar > section.col-sm-9 .elementor-element,
body.single-post .container-bakala.main-warp > .row.right_sidebar > section.col-sm-9 .e-con-inner {
    max-width: 100%;
}

/*
 * Some single-post content pipelines run wpautop after Elementor rendering.
 * Do not let injected p/br nodes alter the canonical AVS component geometry.
 */
body.single-post .avs-product-system br,
body.single-post .avs-showcase br,
body.single-post .avs-ew-brands br {
    display: none !important;
}

body.single-post .avs-product-system p:empty,
body.single-post .avs-showcase p:empty,
body.single-post .avs-ew-brands p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

body.single-post .avs-product-system > p,
body.single-post .avs-product-system .avs-ew-products__header > p,
body.single-post .avs-product-system .avs-ew-products__stage > p,
body.single-post .avs-product-system .avs-product-card > p,
body.single-post .avs-product-system .avs-product-card__body > p,
body.single-post .avs-product-system .avs-product-card__decision > p,
body.single-post .avs-product-system .avs-product-card__specs > p,
body.single-post .avs-product-system .avs-product-card__footer > p,
body.single-post .avs-product-system .avs-product-price > p,
body.single-post .avs-showcase > p,
body.single-post .avs-showcase__stage > p,
body.single-post .avs-showcase__viewport > p,
body.single-post .avs-ew-brands > p {
    display: contents !important;
    margin: 0 !important;
    padding: 0 !important;
}

/*
 * AVS Article System — Bakala wpautop parity fix (v29.2.6)
 *
 * Bakala's single-post content pipeline can run wpautop after Elementor has
 * rendered a CODE control. Newlines used only to keep article HTML readable
 * are then converted to real <br> elements on the public page. Elementor's
 * editor preview does not apply the same post-processing, so the two views
 * diverge. AVS article components do not use <br> for semantic layout; spacing
 * is owned by the article Design System. Suppress only those post-template
 * artifacts inside the AVS article widget.
 */
body.single-post .avs-article-content br {
    display: none !important;
}

body.single-post .avs-article-content p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Keep contextual links and emphasis in the natural Persian sentence flow. */
body.single-post .avs-article-content p > a,
body.single-post .avs-article-content p > strong,
body.single-post .avs-article-content p > em,
body.single-post .avs-article-content p > span {
    display: inline !important;
    width: auto !important;
    max-width: none !important;
}
