<?php
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://';
$host = $_SERVER['HTTP_HOST'];

if ($host == 'localhost' || $host == '127.0.0.1') {
    // Adjust 'mysite' to your specific local folder name if needed (e.g., C:/xampp/htdocs/mysite)
    define('BASE_URL', $protocol . $host . '/precicraft/');
} else {
    // Live server (often just the domain root, potentially with a subdirectory if applicable)
    // Most live sites are hosted at the root, so '/' should work
    define('BASE_URL', $protocol . $host . '/precicraft/');
}
?>

<!DOCTYPE html>
<html lang="en">

<head>

    <!-- Basic -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title><?php echo $title; ?></title>

    <meta name="keywords" content="VMC, CNC Machines" />
    <meta name="description" content="PRECI Craft is a leading manufacturer of high-quality CNC machines and precision components.">
    <meta name="author" content="Preci Craft">

    <!-- Mobile Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no">

    <!-- Web Fonts  -->
    <link
        href="https://fonts.googleapis.com/css?family=Montserrat:100,300,400,500,600,700,900%7COpen+Sans:300,400,600,700,800"
        rel="stylesheet" type="text/css">

    <!-- Vendor CSS -->
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/font-awesome/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/animate/animate.min.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/linear-icons/css/linear-icons.min.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/owl.carousel/assets/owl.carousel.min.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/owl.carousel/assets/owl.theme.default.min.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/magnific-popup/magnific-popup.min.css">

    <!-- Theme CSS -->
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>css/theme.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>css/theme-elements.css">

    <!-- Current Page CSS -->
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/rs-plugin/css/settings.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/rs-plugin/css/layers.css">
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>vendor/rs-plugin/css/navigation.css">

    <!-- Skin CSS -->
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>css/skins/default.css">
    <script src="<?php echo BASE_URL; ?>master/style-switcher/style.switcher.localstorage.js"></script>

    <!-- Theme Custom CSS -->
    <link rel="stylesheet" href="<?php echo BASE_URL; ?>css/custom.css">

    <!-- Head Libs -->
    <script src="<?php echo BASE_URL; ?>vendor/modernizr/modernizr.min.js"></script>

</head>

<body>