/* Product Sync Pro – A1Box imported SINGLE product presentation (v1.29)
 * IMPORTANT: every selector is scoped to .pcs-imported-product-page.
 * Homepage, shop grid, related products and sliders are intentionally untouched.
 */

/* Product Sync Pro stock badge. */
body.pcs-imported-product-page .pcs-product-stock-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    margin:8px 0 10px;
    padding:4px 11px;
    border:1px solid #b7e4c7;
    border-radius:999px;
    background:#effaf3;
    color:#087f3d;
    font-size:12px;
    font-weight:600;
    line-height:1.35;
}
body.pcs-imported-product-page .pcs-product-stock-badge:before{
    content:"";
    display:block;
    width:6px;
    height:6px;
    border-radius:50%;
    background:currentColor;
}
body.pcs-imported-product-page .pcs-product-stock-badge.is-out{
    border-color:#efc0c0;
    background:#fff3f3;
    color:#a61b1b;
}

/* Imported summary content; typography is inherited from A1Box. */
body.pcs-imported-product-page .pcs-a1box-summary-meta .pcs-a1box-intro{margin:0 0 14px;}
body.pcs-imported-product-page .pcs-a1box-summary-meta p{margin:0 0 10px;}
body.pcs-imported-product-page .pcs-a1box-summary-meta hr{
    margin:0 0 10px;
    border:0;
    border-top:1px solid rgba(0,0,0,.10);
}

/* Tags remain synchronized, but do not clutter the single-product meta row. */
body.pcs-imported-product-page .product_meta .tagged_as{display:none!important;}

/* Stale sidebar safety only for this imported single-product page. */
body.single-product.pcs-imported-product-page #Content .sections_group{
    width:100%!important;
    max-width:100%!important;
    float:none!important;
}
body.single-product.pcs-imported-product-page #Content .sidebar{display:none!important;}

/*
 * v1.29: BeTheme gallery must end at the REAL image height. The large blank
 * area seen in v1.28 came from gallery/image-frame wrappers retaining a fixed
 * or minimum height and vertically centering a smaller image.
 *
 * These resets apply only to the imported product single page. The actual
 * column widths, fonts and normal A1Box spacing remain controlled by BeTheme.
 */
@media only screen and (min-width:960px){
    body.single-product.pcs-imported-product-page .product_wrapper,
    body.single-product.pcs-imported-product-page .product_wrapper .product_image_wrapper,
    body.single-product.pcs-imported-product-page .product_wrapper .product_image_wrapper .image_frame,
    body.single-product.pcs-imported-product-page .product_wrapper .product_image_wrapper .image_wrapper,
    body.single-product.pcs-imported-product-page .product_wrapper .product_image_wrapper .images,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery .flex-viewport,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery__wrapper,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery__image,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery__image > a{
        min-height:0!important;
        max-height:none!important;
        height:auto!important;
    }

    body.single-product.pcs-imported-product-page .product_wrapper .product_image_wrapper,
    body.single-product.pcs-imported-product-page .product_wrapper .product_image_wrapper .image_frame,
    body.single-product.pcs-imported-product-page .product_wrapper .product_image_wrapper .image_wrapper,
    body.single-product.pcs-imported-product-page .product_wrapper .product_image_wrapper .images,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery__wrapper,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery__image,
    body.single-product.pcs-imported-product-page .product_wrapper .woocommerce-product-gallery__image > a{
        margin-top:0!important;
        padding-top:0!important;
        vertical-align:top!important;
    }

    /* If any of the BeTheme wrappers is flex, align the image to the top. */
    body.single-product.pcs-imported-product-page .product_image_wrapper .image_frame,
    body.single-product.pcs-imported-product-page .product_image_wrapper .image_wrapper,
    body.single-product.pcs-imported-product-page .woocommerce-product-gallery__image,
    body.single-product.pcs-imported-product-page .woocommerce-product-gallery__image > a{
        align-items:flex-start!important;
    }

    /* Keep horizontal centering, but never vertical centering. */
    body.single-product.pcs-imported-product-page .woocommerce-product-gallery__image > a{
        justify-content:center!important;
    }

    body.single-product.pcs-imported-product-page .woocommerce-product-gallery__image img.wp-post-image{
        display:block!important;
        height:auto!important;
        max-height:none!important;
        margin-top:0!important;
        margin-bottom:0!important;
        object-fit:contain!important;
        object-position:center top!important;
    }

    /* The product wrapper should collapse exactly after the taller column. */
    body.single-product.pcs-imported-product-page .product_wrapper{
        padding-bottom:0!important;
    }
}
