/*
Theme Name: Bricksy Child
Theme URI: 
Author: Mahdi Hasan
Author URI: 
Description: Posh Hub and Category Layouts for Go Wear This.
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: bricksy
Text Domain: bricksy-child
Tags: 
*/

/* 1. Force the container to center */
body.single-post .wp-block-image {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
    width: 100%; /* Ensures the container takes full available width to center properly */
}

/* 2. Force the image size and style */
body.single-post .wp-block-image img {
    /* "important" is required here to override the inline style="width:480px" */
    width: 450px !important; 
    
    /* Ensures the image doesn't overflow on mobile screens */
    max-width: 100%; 
    
    /* Keeps the image from stretching/skewing */
    height: auto !important; 
    
    /* Adds your requested rounded corners */
    border-radius: 21px; 
    
    /* Ensures centering logic applies to the image */
    display: inline-block;
}

/* Center Kadence Buttons on Single Posts */
body.single-post .wp-block-kadence-advancedbtn.kb-buttons-wrap {
    display: flex !important; /* Ensures the button container allows centering */
    justify-content: center !important; /* Forces the button to the middle */
    width: 100% !important; /* Ensures the container spans the full width */
}

/* For sidebar stacking on tablets */
@media (max-width: 1024px) {
    /* Forces ONLY the main sidebar layout to stack on tablet screens */
    .wp-block-columns.has-sidebar-layout {
        flex-wrap: wrap !important;
    }
    
    /* Targets only the direct child columns of the layout, protecting nested columns */
    .wp-block-columns.has-sidebar-layout > .wp-block-column {
        flex-basis: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
    }
}