/*
Theme Name: Brick by Brick
Description: A custom block theme for the Brick by Brick custom portrait shop.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Author: Brick by Brick Shop
*/

/* Hide Page Titles */
.wp-block-post-title {
    display: none !important;
}

/* Hide entry title on pages */
.entry-title {
    display: none !important;
}

/* Hide query titles on archives */
.wp-block-query-title {
    display: none !important;
}

/* Show page titles on product pages */
.single-product .wp-block-post-title,
.single-product .entry-title,
.single-product .product_title {
    display: block !important;
}

/* Hide breadcrumbs */
.woocommerce-breadcrumb,
.woocommerce nav.woocommerce-breadcrumb {
    display: none !important;
}

/* Remove underline from Brick by Brick title */
.wp-block-heading a {
    text-decoration: none !important;
}

/* Custom Product Page Layout */
.bbp-product-layout,
.woocommerce div.product {
    max-width: 1200px;
    margin: 0 auto;
}

/* Override WooCommerce default styles */
.woocommerce div.product div.images,
.woocommerce div.product div.summary {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
}

/* Hide default WooCommerce product images for Brick Portrait */
.single-product .woocommerce-product-gallery {
    display: none !important;
}

/* Hide any duplicate plugin sections */
.woocommerce-variation-add-to-cart #bbp-customization-tool {
    display: none !important;
}

/* Hide WooCommerce product tabs and additional content for Brick Portrait */
.single-product .woocommerce-tabs,
.single-product .wc-tabs-wrapper,
.single-product .woocommerce-product-details__short-description,
.single-product .product_meta,
.single-product .woocommerce-product-rating,
.single-product .related.products,
.single-product .up-sells,
.single-product .product_meta,
.single-product .posted_in {
    display: none !important;
}

/* Hide the default WooCommerce summary section completely for Brick Portrait */
.single-product .summary.entry-summary {
    display: none !important;
}

/* Hide any remaining category/meta information */
.single-product .woocommerce-product-meta,
.single-product .sku_wrapper,
.single-product .tagged_as,
.single-product .posted_in {
    display: none !important;
}

/* Hide the specific div class that's still showing */
.single-product .wp-block-columns.alignwide.is-layout-flex.wp-block-columns-is-layout-flex {
    display: none !important;
}

/* Centered Product Header */
.bbp-product-header {
    text-align: center;
    margin-bottom: 60px;
}

.bbp-product-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.bbp-product-short-description {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.bbp-product-price {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

/* Two Column Layout */
.bbp-two-column-section {
    display: flex;
    gap: 60px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.bbp-column-left {
    flex: 1;
}

.bbp-column-right {
    flex: 1;
    padding: 20px;
}

.bbp-product-image {
    padding: 20px;
}

.bbp-product-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.bbp-product-content {
    margin-bottom: 30px;
    line-height: 1.6;
    color: #2c3e50;
}

.bbp-build-button-container {
    text-align: left;
}

.bbp-build-button {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.bbp-build-button:hover {
    background-color: #c0392b;
    color: white;
    text-decoration: none;
}

/* Plugin Section */
.bbp-plugin-section {
    margin-bottom: 40px;
}

/* Cart Section Styling */
.bbp-cart-section {
    text-align: center;
}

/* Hide quantity input */
.bbp-cart-section .quantity,
.bbp-cart-section input[name="quantity"] {
    display: none !important;
}

/* Style the add to cart button */
.bbp-cart-section .single_add_to_cart_button {
    background-color: #e74c3c;
    color: white;
    padding: 15px 60px;
    border-radius: 25px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 200px;
}

.bbp-cart-section .single_add_to_cart_button:hover {
    background-color: #c0392b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bbp-two-column-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .bbp-product-title {
        font-size: 28px;
    }
    
    .bbp-product-short-description {
        font-size: 16px;
    }
    
    .bbp-product-price {
        font-size: 22px;
    }
}

/* Plugin Layout Adjustments */
#bbp-customization-tool .bbp-main-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

#bbp-customization-tool .bbp-left-section {
    flex: 0 0 50%; /* Equal 50% width */
    max-width: none;
}

#bbp-customization-tool .bbp-right-section {
    flex: 0 0 50%; /* Equal 50% width */
    max-width: none;
}

/* Make the upload area smaller when reset button is shown */
#bbp-customization-tool .bbp-upload-area {
    min-height: 120px; /* Default height for upload state */
    max-width: 100%;
    transition: min-height 0.3s ease;
}

/* When photo is uploaded, reduce height to fit just the reset button */
#bbp-customization-tool .bbp-upload-area.has-image {
    min-height: 60px; /* Just enough for reset button and minimal padding */
    padding: 15px;
}

#bbp-customization-tool .bbp-upload-area .bbp-reset-btn {
    margin-top: 10px;
}

/* Center the preview better */
#bbp-customization-tool .bbp-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#bbp-customization-tool .bbp-right-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Style the plugin's add to cart button */
#bbp-customization-tool .bbp-add-cart-btn {
    background-color: #e74c3c !important;
    color: white !important;
    border: none !important;
    padding: 18px 40px !important;
    border-radius: 25px !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

#bbp-customization-tool .bbp-add-cart-btn:hover {
    background-color: #c0392b !important;
}

/* Hide the default add to cart button in cart section */
#wp--skip-link--target > div.bbp-cart-section > form > button {
    display: none !important;
}

/* Mobile responsive for plugin */
@media (max-width: 768px) {
    #bbp-customization-tool .bbp-main-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    #bbp-customization-tool .bbp-left-section {
        flex: none;
        max-width: none;
    }
}

/* Mobile Navigation Styles */
@media (max-width: 781px) {
    /* Center navigation on mobile */
    .wp-block-navigation__responsive-container-content {
        justify-content: center !important;
    }
    
    .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
        justify-content: center !important;
    }
    
    /* Center the navigation items in mobile overlay */
    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
        text-align: center;
    }
    
    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
        flex-direction: column;
        align-items: center;
    }
}