/*
 Theme Name:   FoodbookTheme Child
 Theme URI:    https://themelooks.biz/demo/foodbooktheme/electronics/
 Description:  This is a child theme for FoodbookTheme WordPress Theme
 Author:       ThemeLooks
 Author URI:   http://themelooks.com/
 Template:     foodbooktheme
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         two-columns, three-columns, left-sidebar, right-sidebar, flexible-header, custom-background, custom-colors, custom-header, custom-menu, theme-options, editor-style, featured-images, microformats, post-formats,  sticky-post, threaded-comments, translation-ready
 Text Domain:  foodbooktheme-child
*/

/*  [ Add your custom css below ]
- - - - - - - - - - - - - - - - - - - - */
/*** Remove Home Page Header Title ***/
.page-title-bg {
    display: none;
}

/*** Home - Banner Slider ***/
.banner_slider .single-banner-image img, .banner_slider .single-banner-image {
    border-radius: 5% !important;
}

/*** Home - Banner Location Checker ***/
.ability-checker-shortcode-form .fb-availability-check-buton button {
    min-width: 110px;
}

.ability-checker-shortcode-form .fb-locate-me-wrapper {
    padding-right: 10px;
    margin-right: 10px;
}

/*** Footer Text Color ***/
.footer p, .footer a, .footer li, .footer span {
    color: #000;
}

.banner_slider .single-banner-image {
    padding: 0;
}

/*** My Account Page - Login & Register Side by Side ***/

@media only screen and (min-width: 767px) {
.woocommerce .col2-set .col-1, .woocommerce-page .col2-set .col-1, .woocommerce .col2-set .col-2, .woocommerce-page .col2-set .col-2 {
    float: left;
    width: 50%;
}
}

@media only screen and (min-width: 1300px) {
.banner-slider {
    margin-right: 0;
}
}

@media only screen and (min-width: 1500px) {
.banner-slider {
	margin-right: 0;
}
}






/**
 * Foodbook থিমে WooCommerce মোবাইল নাম্বার ফিল্ডটি Required করা হলো।
 * সর্বোচ্চ অগ্রাধিকার (9999) ব্যবহার করে অন্য সব থিম/প্লাগিনের কোডকে ওভাররাইড করা হলো।
 */
function foodbook_final_phone_required_fix( $fields ) {
    
    // নিশ্চিত ফিল্ড নেম: billing_phone
    if ( isset( $fields['billing']['billing_phone'] ) ) {
        
        // 1. ফিল্ডটিকে Required সেট করা হলো
        $fields['billing']['billing_phone']['required'] = true;
        
        // 2. লেবেল থেকে " (optional)" মুছে ফেলা
        // এটি নিশ্চিত করবে যে required করার পর লেবেলটি পরিষ্কার থাকে।
        $fields['billing']['billing_phone']['label'] = str_replace( ' (optional)', '', $fields['billing']['billing_phone']['label'] );
    }
    
    return $fields;
}

// 9999 মানে এটি প্রায় অন্য সব কোডের পরে রান করবে, যা ওভাররাইড নিশ্চিত করে।
add_filter( 'woocommerce_checkout_fields', 'foodbook_final_phone_required_fix', 9999 );