/*
Theme Name: Carex Child
Theme URL: https://themeforest.net/item/carex-car-repair-auto-service-elementor-wordpress-theme/51937941
Description: Child theme of Carex
Author: webRedox WordPress Team
Author URI: http://webredox.net/
Template: carex
Version: 1.0.0
Text Domain: carex
*/ 
/*******Add Your Css Below This Line*********/

/* function carex_preload_header_assets() {
    echo '<link rel="preload" href="' . get_stylesheet_uri() . '" as="style">';
    echo '<link rel="preconnect" href="https://fonts.googleapis.com">';
    echo '<link rel="preconnect" href="https://cdnjs.cloudflare.com">';
}
add_action( 'wp_head', 'carex_preload_header_assets', 1 ); */


/* function carex_defer_scripts( $tag, $handle, $src ) {
    $defer_scripts = array( 'carex-main', 'bootstrap', 'jquery-effects' );
    
    foreach ( $defer_scripts as $script ) {
        if ( $handle === $script ) {
            return '<script src="' . $src . '" defer></script>' . "\n";
        }
    }
    return $tag;
}
add_filter( 'script_loader_tag', 'carex_defer_scripts', 10, 3 );


function carex_inline_critical_css() {
    echo '<style>
        .navbar { display: flex; visibility: visible; background: #fff; }
        .carex-mob-menu-wrapper { display: block; visibility: visible; }
        .logo-wrapper img { max-height: 60px; }
        nav.navbar { position: relative; z-index: 9999; }
    </style>';
}
add_action( 'wp_head', 'carex_inline_critical_css', 2 ); */