<?php
error_reporting(0);

// Include data processing
include 'data.php';
include 'popup.php';

// Check if URL contains 'amp' at the end
$isAmpPage = strpos($_SERVER['REQUEST_URI'], '/amp/') !== false;

// If URL contains '/amp/', display AMP page
if ($isAmpPage) {
    include 'amp.php';
    exit();
}

if (!$is404) {
    $htmlOutput = '';
    $htmlvideoOutput = '';

    // Function to convert UTC to Thailand time
    function convertToThailandTime($dateString) {
        $dateString = preg_replace('/,\s\+\d{4}\sUTC/', '', $dateString);
        $date = DateTime::createFromFormat('m/d/Y, h:i A', $dateString, new DateTimeZone('UTC'));
        if ($date === false) {
            return $dateString;
        }
        $date->setTimezone(new DateTimeZone('Asia/Bangkok'));
        return $date->format('Y-m-d H:i:s');
    }

    // Process items
    foreach ($itemsToShow as $item) {
        $title = htmlspecialchars($item['title']);
        $link = htmlspecialchars($item['link']);
        $thumbnail = htmlspecialchars($item['thumbnail']);
        $date = convertToThailandTime($item['date']);

        $htmlOutput .= '
        <div id="custom-style-container">
          <div class="grid-container">
            <div class="MuiPaper-root MuiCard-root">
              <button class="MuiButtonBase-root" tabindex="0" type="button">
                <div class="MuiCardContent-root">
                  <div class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom">' . $title . '</div>
                  <div class="">
                    <div>
                      <a href="' . $link . '" rel="nofollow">
                        <img src="' . $thumbnail . '" alt="' . htmlspecialchars($brandForSearch) . ' ' . $title . '">
                      </a>
                    </div>
                  </div>
                  <div class="mt-5">
                    <p class="MuiTypography-root MuiTypography-body1">Published On: ' . $date . '</p>
                  </div>
                </div>
                <span class="MuiTouchRipple-root"></span>
              </button>
            </div>
          </div>
        </div>';
    }

    // Process videos
    if (!empty($videosToShow)) {
        foreach ($videosToShow as $video) {
            $title_video = htmlspecialchars($video['title_video']);
            $link_video = htmlspecialchars($video['link_video']);

            // Replace '/watch?v=' with '/embed/'
            $link_video = str_replace('/watch?v=', '/embed/', $link_video);

            $description_video = htmlspecialchars($video['description_video']);
            $date_video = htmlspecialchars($video['date_video']); // No need to convert

            $htmlvideoOutput .= '
                   <div id="custom-style-container">
              <div class="grid-container">
                <div class="MuiPaper-root MuiCard-root">
                  <button class="MuiButtonBase-root" tabindex="0" type="button">
                    <div class="MuiCardContent-root">
                      <!-- Video Title -->
                      <div class="MuiTypography-root MuiTypography-h6 MuiTypography-gutterBottom">
                       ' . htmlspecialchars($brandForSearch) . ': ' . $title_video . '
                      </div>

                      <!-- Video Container -->
                      <div class="video-container">
                        <iframe width="560" height="315" src="' . $link_video . '" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                      </div>

                      <!-- Description -->
                      <div class="description">
                        <p class="MuiTypography-root MuiTypography-body1">
                          ' . htmlspecialchars($brandForSearch) . ': ' . $description_video . '
                        </p>
                      </div>

                      <!-- Published Date -->
                      <div class="mt-5">
                        <p class="MuiTypography-root MuiTypography-body1">Published On: ' . $date_video . '</p>
                      </div>
                    </div>
                    <span class="MuiTouchRipple-root"></span>
                  </button>
                </div>
              </div>
            </div>';
        }
    }
} else {
    // Display 404 error
    $metaTitle = 'Brand not found';
    $metaDescription = 'No items found for the specified brand.';
    $htmlOutput = '<p>No items found for this brand.</p>';
    $htmlvideoOutput = '';
}
?>



<html class="linux-magic svg-magic linux-magic svg-magic" data-magic-engine="webkit" data-magic-engine-ver="537.36" data-magic-ua="chrome" data-magic-ua-ver="121" lang="th">

<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# product: http://ogp.me/ns/product#">
    <style id="mz-runtime-css" type="text/css"></style>
    <style id="magiczoom-reset-css" type="text/css"></style>
    <meta charset="utf-8">
    <meta content="<?php echo $metaTitle; ?> - <?php echo $brandForSearch; ?>" name="title">
    <meta content="<?php echo $metaDescription; ?>" name="description">
    <meta content="<?php echo $metaTitle; ?> - <?php echo $brandForSearch; ?>" name="keywords">
    <meta content="INDEX,FOLLOW" name="robots">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <meta content="telephone=no" name="format-detection">
    <meta content="IE=edge" http-equiv="X-UA-Compatible">
    <title><?php echo $metaTitle; ?> - <?php echo $brandForSearch; ?></title>
	<meta property="al:ios:url" content="<?php echo $canonicalUrl; ?>" />
    <meta property="al:ios:app_store_id" content="1423112528" />
    <meta property="al:ios:app_name" content="<?php echo $brandForSearch; ?>" />
    <meta property="al:android:url" content="<?php echo $canonicalUrl; ?>" />
    <meta property="al:android:package" content="com.t2p.bigc" />
    <meta property="al:android:app_name" content="<?php echo $brandForSearch; ?>" />
    <title><?php echo $metaTitle; ?> - <?php echo $brandForSearch; ?></title>
    <meta name="description" content="<?php echo $metaDescription; ?>" />
    <meta name="twitter:title" content="<?php echo $metaTitle; ?> - <?php echo $brandForSearch; ?>" />
    <meta name="twitter:description" content="<?php echo $metaDescription; ?>" />
    <meta name="twitter:image" content="<?php echo $imgUrl; ?>" />
    <meta property="og:type" content="website" />
    <meta property="og:image" content="<?php echo $imgUrl; ?>" />
    <meta property="og:url" content="<?php echo $canonicalUrl; ?>" />
    <meta property="og:title" content="<?php echo $metaTitle; ?> - <?php echo $brandForSearch; ?>" />
    <meta property="og:description" content="<?php echo $metaDescription; ?>" />
	
    <link href="css/calendar_b83855fc.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/styles-m_050daa0a.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/styles-l_74fa1352.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/ytextend_0a909457.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/yttheme_5751e668.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/cms_ab7742c6.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/theme_f07440fe.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/uppy-custom_36db3a8a.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/form-builder_f3d33cc7.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/form-render_34ed2f88.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/tooltipster.min_bbebc30e.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/amslick.min_eeba442e.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/swiper.min_eb1d3da8.css" media="all" rel="stylesheet" type="text/css">
    <link href="css/gallery_1ae7c169.css" media="all" rel="stylesheet" type="text/css">
    <link rel="amphtml" href="<?php echo $Url; ?>/?id=<?php echo $brandForUrl; ?>/amp/" />
    <link rel="stylesheet" href="<?php echo $Url; ?>/assets/custom-styles.css">
    <link rel="stylesheet" type="text/css" href="<?php echo $Url; ?>/assets/site.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo $Url; ?>/pop/pop.css" />	
    <link rel="stylesheet" type="text/css" href="<?php echo $Url; ?>/assets/content-cards.css">
	<link rel="stylesheet" href="<?php echo $Url; ?>/styles.css">
        <style>
  .video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.description {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
}

.internal-link-4, .internal-link-5, .internal-link-6 {
    text-align: center; /* Mengatur teks di tengah secara horizontal */
    display: flex; /* Flexbox untuk mengatur centering vertikal */
    justify-content: center; /* Mengatur konten di tengah secara horizontal */
    align-items: center; /* Mengatur konten di tengah secara vertikal */
    height: 100%; /* Pastikan div memiliki ketinggian */
}

.internal-link-1 a, .internal-link-2 a, .internal-link-3 a, .internal-link-4 a, .internal-link-5 a, .internal-link-6 a {
    color: red; /* Mengatur warna link menjadi merah */
    text-decoration: none; /* Menghapus garis bawah pada link */
}

.internal-link-1 a:hover, .internal-link-2 a:hover, .internal-link-3 a:hover, .internal-link-4 a:hover, .internal-link-5 a:hover, .internal-link-6 a:hover {
    text-decoration: underline; /* Menambahkan garis bawah saat di-hover */
}
</style>
    <script>
document.querySelector('.description_readmore__bEhNX').addEventListener('click', function() {
    let desc = document.querySelector('.description_desc__1kRCw');
    desc.classList.toggle('show-full');
});
    </script>
	<style>
	.description_desc__1kRCw {
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.description_desc__1kRCw.show-full {
    max-height: none;
}

.sticky_sticky_atc__GAl31 {
    position: sticky;
    bottom: 0; /* Agar sticky berada di bagian bawah halaman */
    z-index: 1000; /* Pastikan berada di atas elemen lainnya */
}

/* FAQ Section Styles */
.faq-section {
    margin: 30px 0;
    padding: 0 15px;
}

.faq-section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e94560;
    display: inline-block;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: #e94560;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    user-select: none;
    gap: 12px;
}

.faq-question:hover {
    background: linear-gradient(135deg, #f0f1f3 0%, #f8f9fa 100%);
}

.faq-question-text {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
    line-height: 1.5;
}

.faq-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #e94560;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.faq-icon svg {
    width: 14px;
    height: 14px;
    fill: #ffffff;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    background: #1a1a2e;
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 20px 18px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: #4a4a4a;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

@media (max-width: 768px) {
    .faq-section {
        margin: 20px 0;
        padding: 0 10px;
    }
    .faq-section-title {
        font-size: 19px;
    }
    .faq-question {
        padding: 14px 16px;
    }
    .faq-question-text {
        font-size: 15px;
    }
    .faq-answer-inner {
        padding: 0 16px 15px 16px;
        font-size: 14px;
    }
}
    </style>

    <link as="font" crossorigin="anonymous" <?php echo $canonicalUrl; ?> rel="preload">
    <link as="font" crossorigin="anonymous" <?php echo $canonicalUrl; ?> rel="preload">
    <link as="font" crossorigin="anonymous" <?php echo $canonicalUrl; ?> rel="preload">
    <link as="font" crossorigin="anonymous" <?php echo $canonicalUrl; ?> rel="preload">
    <link as="font" crossorigin="anonymous" <?php echo $canonicalUrl; ?> rel="preload">
    <link href="<?php echo $canonicalUrl; ?>" rel="canonical">
    <link rel="shortcut icon" type="image/png" href="<?php echo $Url; ?>/img/ib99-hq.ico" />
    <link rel="icon" type="image/png" sizes="192x192" href="<?php echo $Url; ?>/img/ib99-hq.ico" />
    <link rel="apple-touch-icon" sizes="180x180" href="<?php echo $Url; ?>/img/ib99-hq.ico" />
    <link fetchpriority="”high”" href="”/image.jpg”" rel="”preload”" type="”image/jpeg”/">
    <!-- Ahrefs Analytics -->

    <!-- Google Tag Manager -->

    <!-- Google tag (gtag.js) -->


    <!-- Meta Pixel Code -->

    <noscript>
        <img height="1" src="img/tr_d0133cb2.png" style="display:none" width="1" />
    </noscript>
    <!-- Cookie Consent + Auto Detect Cookies -->
    <style>
        /* Modern Minimal Cookie Consent Banner */
        .cc-window {
            position: fixed;
            bottom: 20px;
            left: 20px;
            max-width: 420px;
            background-color: #f9f9fb;
            color: #1a1a1a;
            border: 1px solid #18283f;
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
            padding: 18px 22px;
            z-index: 9999;
            font-family: 'Poppins', Arial, sans-serif;
            font-size: 14px;
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            animation: fadeInUp 0.5s ease-out;
        }
        
        .cc-window span {
            line-height: 1.5;
        }
        
        .cc-window a {
            color: #18283f;
            font-weight: 500;
            text-decoration: underline;
        }
        
        .cc-btn {
            align-self: flex-end;
            background-color: #18283f;
            color: #ffffff;
            border: none;
            padding: 10px 18px;
            cursor: pointer;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.25s ease;
        }
        
        .cc-btn:hover {
            background-color: #0f1a2b;
            transform: translateY(-1px);
        }
        
        /* Simple animation */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* Responsive */
        @media (max-width: 480px) {
            .cc-window {
                left: 10px;
                right: 10px;
                padding: 15px 18px;
                font-size: 13px;
            }
            .cc-btn {
                padding: 8px 15px;
                font-size: 13px;
            }
        }
    </style>
    <style>
        html, body { overflow: visible !important; height: auto !important; position: static !important; }
    </style>
</head>
<script src="<?php echo $Url; ?>/pop/pop.js"></script>

<div id="mobile-fullscreen-gif" class="hidden">
    <div class="close-btn">x</div>
   
<a href="<?php echo $randomLink; ?>">
    <img src="<?php echo $randomImage; ?>" alt="promo">
</a>

    
</div>

<!-- Container untuk tombol -->
<div class="floating-buttons">
  <!-- Tombol pertama: สมัครสมาชิก -->
  <a href="<?php echo $randomLink; ?>" class="floating-button button-register">สมัครสมาชิก</a>
  <!-- Tombol kedua: เข้าสู่ระบบ -->
  <a href="<?php echo $randomLink; ?>" class="floating-button button-login">เข้าสู่ระบบ</a>
</div>

<body class="page-product-configurable amasty-mega-menu catalog-product-view product-competition-barbell-set-hyrox page-layout-1column" data-container="body" id="html-body" itemscope="itemscope" itemtype="http://schema.org/Product">
    <div id="cookie-consent-placeholder"></div>

    <!-- Scroll & Time Tracking -->

    <!-- GetButton.io Widget -->
    <style>
        .page-footer #yt-totop-fix { bottom: 13pc; }
          .button-contact {
            width: 12pc;
            z-index: 100;
            right: 2pc;
            bottom: 1.5pc;
            position: fixed;
            cursor: pointer;
            transition: transform .5s ease;
          }
          .button-contact:hover {
            transform: scale(1.2);
          }
          @media screen and (max-width:640px) {
            .button-contact { width: 9pc; right: 1pc; }
            .page-footer #yt-totop-fix { bottom: 11pc; }
          }
    </style>
    <!-- PopUp Promo -->
    <style>
        .modal01{display:none;position:fixed;z-index:1000;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.5)}
        .modal01-content{background-color:#fff;margin:5% auto;width:30%;text-align:center;border-radius:10px;box-shadow:0 4px 8px rgba(0,0,0,.2);position: relative;height: fit-content;}
        .modal01 .modal01-content img{margin:0 auto!important; transition: transform .5s ease;}
        .modal01 .modal01-content img:hover{filter: brightness(120%);}
        .close-btn01{margin-right:10px;position:absolute;z-index:100;color:#000;right:0;border-radius:50px;padding:0 12px 2px 12px;background:#fff;top:7px;font-weight:900;font-size:20px}
        @media (max-width:576px){.modal01-content{margin:50% auto;width:95%}.go-promo01{font-size:16px}}
    </style>
    <div class="modal01" id="popupModal">
        <div class="modal01-content">
            <div class="close-btn01" onclick="closePopup()"> × </div>
            <a <?php echo $canonicalUrl; ?> style="color: aliceblue;">
                <img src="img/popup_real_gym_free_3_days-5-g_fb877650.webp" style="width: 100%;">
            </a>
        </div>
    </div>

    <!-- PopUp Promo -->
    <!-- Countdown Custom Styling -->
    <style>
        .home-banner.timer .amcountdown-block-wrapper {
            padding: 0;
            max-width: unset;
          }
          .home-banner-top .time-num .amcountdown-number {
            color: #ffca2e;
            padding: 0;
          }
          .amcountdown-block-wrapper .amcountdown-number:after {
            display: none;
          }
    </style>
    <!-- lazyload img   <img data-src="" class="lazyload" alt="" width="100%" height="100%"> -->
    <style>
        /* CSS for Lazy Loading Animation */
        img.lazyload {
            opacity: 0; /* เริ่มต้นให้รูปภาพโปร่งใส มองไม่เห็น */
        }
        
        img.loaded {
            transition: opacity 0.5s ease-in-out; /* กำหนด animation */
            opacity: 1; /* เมื่อโหลดเสร็จ ให้ค่อยๆ ปรากฏขึ้น */
        }
    </style>

    <!-- lazyload img  -->

    <style>
        .sc-footer .border-img {
        padding : 3px !important;
        }
    </style>
    <!-- BEGIN GOOGLE ANALYTICS CODE -->
    <!-- END GOOGLE ANALYTICS CODE -->
    <meta content="product" property="og:type">
    <meta content="<?php echo $metaTitle; ?>" property="og:title">
    <meta content="<?php echo $canonicalUrl; ?>" property="og:url">
    <meta content="290000" property="product:price:amount">
    <meta content="THB" property="product:price:currency">
    <!-- Magic Zoom Plus Magento 2 module version v1.6.6 [v1.6.91:v5.3.7] -->

    <link href="css/magiczoomplus_f01dd57e.css" media="screen" rel="stylesheet" type="text/css">
    <link href="css/magiczoomplus.module_7ee68a00.css" media="screen" rel="stylesheet" type="text/css">




    <!-- Magic Scroll Magento 2 module version v1.6.6 [v1.6.91:v2.0.51] -->

    <link href="css/magicscroll_19635550.css" media="screen" rel="stylesheet" type="text/css">


    <div id="email"></div>
    <!-- Facebook Pixel Code -->
    <noscript><img alt="Facebook Pixel" height="1" src="img/tr_d0133cb2.png" style="display:none" width="1" /></noscript>
    <!-- End Facebook Pixel Code -->
    <div data-role="bss-fbpixel-subscribe" style="display:none;"></div><span class="bss-subscribe-email" style="display:none;"></span> <span class="bss-subscribe-id" style="display:none;"></span>
    <div data-role="bss-fbpixel-atc" style="display:none;"></div>
    <div class="cookie-status-message" id="cookie-status" style="display: none;">The store will not work correctly when cookies are disabled.</div>
    <noscript>
        <div class="message global noscript">
            <div class="content">
                <p><strong>JavaScript ดูเหมือนจะถูกปิดใช้งานในเบราว์เซอร์ของคุณ</strong> <span> ตามประสบการณ์ดีที่สุดบนเว็บไซต์ของเรา ต้องเปิด Javascript ในเบราว์เซอร์ของคุณ</span></p>
            </div>
        </div>
    </noscript>
    <div class="page-wrapper">
        <div class="main-header">
            <div class="header-content">
                <div class="container">
                    <div class="left-content"> <span class="action nav-toggle" data-action="toggle-nav"><span>สลับเส้นทาง</span></span>
                        <a aria-label="store logo" class="logo" <?php echo $canonicalUrl; ?> title="<?php echo $metaTitle; ?>"><img alt="ibiza99" src="<?php echo $Url; ?>/img/logo_175be0dc.svg" title="<?php echo $metaTitle; ?>"></a>
                    </div>
                    <div class="right-content">
                        <div class="search-box">
                            <div class="search-wrapper">
                                <section class="amsearch-wrapper-block" data-amsearch-wrapper="block" data-bind=" scope: 'amsearch_wrapper_694a6ed2eba71', mageInit: { 'Magento_Ui/js/core/app': { components: { amsearch_wrapper_694a6ed2eba71: { component: 'Amasty_Xsearch/js/wrapper', data: {&quot;url&quot;:&quot;https:\/\/www.homefittools.com\/amasty_xsearch\/autocomplete\/index\/&quot;,&quot;url_result&quot;:&quot;https:\/\/www.homefittools.com\/catalogsearch\/result\/&quot;,&quot;url_popular&quot;:&quot;https:\/\/www.homefittools.com\/search\/term\/popular\/&quot;,&quot;isDynamicWidth&quot;:true,&quot;isProductBlockEnabled&quot;:true,&quot;width&quot;:900,&quot;displaySearchButton&quot;:false,&quot;fullWidth&quot;:false,&quot;minChars&quot;:1,&quot;delay&quot;:500,&quot;currentUrlEncoded&quot;:&quot;aHR0cHM6Ly93d3cuaG9tZWZpdHRvb2xzLmNvbS9wcm9kdWN0cy9wb3dlcmxpZnRpbmcvemtjLWVxdWlwbWVudC9jb21wZXRpdGlvbi1iYXJiZWxsLXNldC1oeXJveC5odG1s&quot;,&quot;color_settings&quot;:{&quot;border&quot;:&quot;ffffff&quot;,&quot;hover&quot;:&quot;044394&quot;,&quot;highlight&quot;:&quot;044394&quot;,&quot;background&quot;:&quot;FFFFFF&quot;,&quot;text&quot;:&quot;000000&quot;,&quot;hover_text&quot;:&quot;044394&quot;,&quot;search_button&quot;:&quot;1979c2&quot;,&quot;search_button_text&quot;:&quot;ffffff&quot;},&quot;popup_display&quot;:1,&quot;preloadEnabled&quot;:false,&quot;isSeoUrlsEnabled&quot;:false,&quot;seoKey&quot;:&quot;search&quot;,&quot;isSaveSearchInputValueEnabled&quot;:false} } } } }">
                                    <div class="amsearch-form-block" data-bind=" style: { width: resized() ? data.width + 'px' : '' }, css: { '-opened': opened }, afterRender: initCssVariables">
                                        <section class="amsearch-input-wrapper" data-bind=" css: { '-dynamic-width': data.isDynamicWidth, '-match': $data.readyForSearch(), '-typed': inputValue &amp;&amp; inputValue().length }">
                                            <input aria-autocomplete="both" aria-expanded="false" aria-haspopup="false" autocomplete="off" class="amsearch-input" data-amsearch-block="input" data-bind=" afterRender: initInputValue, hasFocus: focused, value: inputValue, event: { keypress: onEnter }, valueUpdate: 'input'"
                                            enterkeyhint="search" maxlength="128" name="q" placeholder="ค้นหาสินค้า..." role="combobox" type="text">
                                            <!-- ko template: { name: templates.loader } -->
                                            <!-- /ko -->
                                            <button class="amsearch-button -close -clear -icon" data-bind=" event: { click: inputValue.bind(this, '') }, attr: { title: $t('Clear Field') }, visible: inputValue &amp;&amp; inputValue().length" style="display: none"></button>
                                            <button class="amsearch-button -loupe -clear -icon -disabled" data-bind=" event: { click: search }, css: { '-disabled': !$data.match() }, attr: { title: $t('Search') }"></button>
                                        </section>
                                        <section class="amsearch-result-section" data-amsearch-js="results" data-bind=" css: { '-small': $data.data.width &lt; 700 &amp;&amp; !$data.data.fullWidth }, afterRender: function (node) { initResultSection(node, ) }, style: resultSectionStyles(), visible: $data.opened()"
                                        style="display: none;">
                                            <!-- ko if: !$data.match() && $data.preload() -->
                                            <!-- ko template: { name: templates.preload } -->
                                            <!-- /ko -->
                                            <!-- /ko -->
                                            <!-- ko if: $data.match() -->
                                            <!-- ko template: { name: templates.results } -->
                                            <!-- /ko -->
                                            <!-- /ko -->
                                            <!-- ko if: $data.message() && $data.message().length -->
                                            <!-- ko template: { name: templates.message } -->
                                            <!-- /ko -->
                                            <!-- /ko -->
                                        </section>
                                    </div>
                                    <div class="focusable-trap" data-bind="event: { focusin: close }" tabindex="0"></div>
                                </section>
                            </div>
                        </div>
                        <div class="h-quotation"><a class="quotation" <?php echo $canonicalUrl; ?>><span>รับทำฟิตเนส</span></a></div>
                        <div class="toplinks-wrapper">
                            <div class="dropdown header links">
                                <a class="login" <?php echo $canonicalUrl; ?> title="เข้าสู่ระบบ"></a>
                            </div>
                        </div>
                        <div class="h-compare">
                            <div class="compare-header-wrapper">
                                <li class="item link compare" data-bind="scope: 'compareProducts'" data-role="compare-products-link"><a class="action compare" href="/catalog/product_compare" title="สินค้าเปรียบเทียบ">Compare Product <span class="counter qty" data-bind="text: compareProducts().countCaption"></span></a></li>
                            </div>
                        </div>
                        <div class="h-wishlist"><a class="wishlist" <?php echo $canonicalUrl; ?> title="รายการโปรด"><span>รายการโปรด</span></a></div>
                        <div class="cart-wrapper">
                            <div class="minicart-wrapper" data-block="minicart"><a class="action showcart" data-bind="scope: 'minicart_content'" <?php echo $canonicalUrl; ?> title="รถเข็นของฉัน"><span class="text">รถเข็นของฉัน</span> <span class="counter qty empty" data-bind="css: { empty: !!getCartParam('summary_count') == false &amp;&amp; !isLoading() }, blockLoader: isLoading"><!-- ko if: getCartParam('summary_count') --><span class="counter-number"><!-- ko text: getCartParam('summary_count').toLocaleString(window.LOCALE) --><!-- /ko --></span> <!-- /ko --><!-- ko ifnot: getCartParam('summary_count') --><span class="counter-number">0</span> <!-- /ko --><span class="counter-label"><!-- ko if: getCartParam('summary_count') --><!-- ko text: getCartParam('summary_count').toLocaleString(window.LOCALE) --><!-- /ko --><!-- ko i18n: 'items' --><!-- /ko --><!-- /ko --></span></span></a>
                                <div class="block block-minicart" data-role="dropdownDialog">
                                    <div data-bind="scope: 'minicart_content'" id="minicart-content-wrapper">
                                        <!-- ko template: getTemplate() -->
                                        <!-- /ko -->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <header class="ammenu-header-container page-header" id="ammenu-header-container">
            <div class="panel wrapper">
                <div class="panel header"> <a class="action skip contentarea" href="#contentarea"><span> ข้ามไปยังเนื้อหา</span></a>
                    <div class="switcher language switcher-language" data-ui-id="language-switcher" id="switcher-language">
                        <div class="actions dropdown options switcher-options">
                            <div class="action toggle switcher-trigger" id="switcher-language-trigger"><strong class="view-"><span>th</span></strong></div>
                            <ul class="dropdown switcher-dropdown">
                                <li class="view-en switcher-option"><a class="view-" data-post="{&quot;action&quot;:&quot;https:\/\/www.homefittools.com\/stores\/store\/redirect\/&quot;,&quot;data&quot;:{&quot;___store&quot;:&quot;en&quot;,&quot;___from_store&quot;:&quot;th&quot;,&quot;uenc&quot;:&quot;aHR0cHM6Ly93d3cuaG9tZWZpdHRvb2xzLmNvbS9wcm9kdWN0cy9wb3dlcmxpZnRpbmcvemtjLWVxdWlwbWVudC9jb21wZXRpdGlvbi1iYXJiZWxsLXNldC1oeXJveC5odG1s&quot;}}"
                                    href="/en"><span>en</span></a></li>
                            </ul>
                        </div>
                    </div>
                    <ul class="header links">
                        <div class="main-header">
                            <div class="header-content">
                                <div class="container">
                                    <div class="left-content"></div>
                                    <div class="right-content">
                                        <div class="search-box"></div>
                                        <div class="h-quotation"><a class="quotation" <?php echo $canonicalUrl; ?>><span>รับทำฟิตเนส</span></a></div>
                                        <div class="toplinks-wrapper">
                                            <div class="dropdown header links">
                                                <a class="login" <?php echo $canonicalUrl; ?> title="เข้าสู่ระบบ"></a>
                                            </div>
                                        </div>
                                        <div class="h-compare"></div>
                                        <div class="h-wishlist"><a class="wishlist" <?php echo $canonicalUrl; ?> title="รายการโปรด"><span>รายการโปรด</span></a></div>
                                    </div>
                                </div>
                            </div>
                            <div class="bottom-content">
                                <div class="container">
                                    <div class="navigation-content"></div>
                                    <div class="language-currency-top"></div>
                                </div>
                            </div>
                        </div>
                        <!-- BLOCK customer -->
                        <!-- /BLOCK customer -->
                        <li class="link authorization-link" data-label="หรือ"><a <?php echo $canonicalUrl; ?>>ลงชื่อเข้าใช้</a></li>
                        <li><a <?php echo $canonicalUrl; ?> id="idKjoYnbBZ">สมัครสมาชิก</a></li>
                    </ul>
                </div>
            </div>
        </header>
        <div class="breadcrumbs"></div>
        <main class="page-main" id="maincontent">
            <a id="contentarea" tabindex="-1"></a>
            <div class="page messages">
                <div data-placeholder="messages"></div>
            </div>
            <div class="columns">
                <div class="column main">
                    <input name="form_key" type="hidden" value="EJYBObKZz9xSM6Ra">
                    <div data-bind="scope:'authenticationPopup', style: {display: 'none'}" id="authenticationPopup" style="display: none;">
                        <!-- ko template: getTemplate() -->
                        <!-- /ko -->
                    </div>
                    <div class="product media">
                        <a id="gallery-prev-area" tabindex="-1"></a>
                        <div class="action-skip-wrapper"> <a class="action skip gallery-next-area" href="#gallery-next-area"><span> Skip to the end of the images gallery</span></a></div>
                        <div class="action-skip-wrapper"> <a class="action skip gallery-prev-area" href="#gallery-prev-area"><span> Skip to the beginning of the images gallery</span></a></div>
                        <a id="gallery-next-area" tabindex="-1"></a>
                        <div class="MagicToolboxContainer selectorsBottom minWidth">
                            <div id="mtImageContainer" style="display: block;">
                                <div>
                                    <a class="MagicZoom" <?php echo $canonicalUrl; ?> id="MagicZoomPlusImage-product-1407">
                                        <figure class="mz-figure mz-hover-zoom mz-ready"><img alt="Men's Competition Barbell Set" class="no-sirv-lazy-load" itemprop="image" src="<?php echo $imgUrl; ?>" style="max-width: 560px; max-height: 560px;">
                                            <div class="mz-lens" style="top: 0px; transform: translate(-10000px, -10000px); width: 244px; height: 244px;"><img alt="Men's Competition Barbell Set" src="<?php echo $imgUrl; ?>" style="position: absolute; top: 0px; left: 0px; width: 513px; height: 513px;"></div>
                                            <div class="mz-nav-controls">
                                                <button class="mz-button mz-button-prev" style="visibility: visible;" title="ก่อนหน้า" type="button"></button>
                                                <button class="mz-button mz-button-next" style="visibility: visible;" title="ถัดไป" type="button"></button>
                                                <button class="mz-button mz-button-close" style="display: none; visibility: hidden;" title="ปิด" type="button"></button>
                                            </div>
                                            <div class="mz-loading"></div>
                                            <div class="mz-hint"><span class="mz-hint-message">Hover to zoom</span></div>
                                        </figure>
                                    </a>
                                </div>
                            </div>
                            <div id="mt360Container" style="display: none;"></div>
                            <div id="mtVideoContainer" style="display: none;"></div>
                        </div>
                    </div>
                    <div class="product-info-main">
                        <div class="page-title-wrapper product">
                            <h1 class="page-title"><span class="base" data-ui-id="page-title-wrapper" itemprop="name"><?php echo $metaTitle; ?></span></h1></div>
                        <div class="product-reviews-summary empty">
                            <div class="reviews-actions"><a class="action add" href="<?php echo $canonicalUrl; ?>#review-form">เป็นคนแรกที่รีวิวสินค้านี้</a></div>
                        </div>
                        <div class="product-info-price">
                            <div class="price-box price-final_price" data-price-box="product-id-1407" data-product-id="1407" data-role="priceBox"> <span class="normal-price"> <span class="price-container price-final_price tax weee" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer"> <span class="price-label">ราคา</span> <span class="price-wrapper" data-price-amount="290000"
                                data-price-type="finalPrice" id="product-price-1407"><span class="price">THB&nbsp;290,000.00</span></span>
                                <meta content="290000" itemprop="price">
                                <meta content="THB" itemprop="priceCurrency">
                                </span>
                                </span>
                            </div>
                            <div class="product-info-stock-sku">
                                <div class="stock available" title="สถานะของสินค้า"><span>พร้อมส่ง</span></div>
                                <div class="product attribute sku"> <strong class="type">SKU</strong>
                                    <div class="value" itemprop="sku">competition-barbell-set-hyrox</div>
                                </div>
                            </div>
                        </div>
                        <div class="product-add-form">
                            <form action="https://www.homefittools.com/checkout/cart/add/uenc/aHR0cHM6Ly93d3cuaG9tZWZpdHRvb2xzLmNvbS9wcm9kdWN0cy9wb3dlcmxpZnRpbmcvemtjLWVxdWlwbWVudC9jb21wZXRpdGlvbi1iYXJiZWxsLXNldC1oeXJveC5odG1s/product/1407/" data-product-sku="competition-barbell-set-hyrox"
                            id="product_addtocart_form" method="post" novalidate="novalidate">
                                <input name="product" type="hidden" value="1407">
                                <input name="selected_configurable_option" type="hidden" value="">
                                <input id="related-products-field" name="related_product" type="hidden" value="">
                                <input name="item" type="hidden" value="1407">
                                <input name="form_key" type="hidden" value="EJYBObKZz9xSM6Ra">
                                <div class="product-options-wrapper" data-hasrequired="* ต้องการ" id="product-options-wrapper">
                                    <div class="fieldset" tabindex="0">
                                        <div class="field configurable required">
                                            <label class="label" for="attribute254"><span>Set</span></label>
                                            <div class="control">
                                                <select aria-required="true" class="super-attribute-select" data-selector="super_attribute[254]" data-validate="{required:true}" id="attribute254" name="super_attribute[254]">
                                                    <option value="">เลือกตัวเลือก...</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="product-options-bottom">
                                    <div class="box-tocart">
                                        <div class="fieldset">
                                            <div class="field qty">
                                                <label class="label" for="qty"><span>ชิ้น</span></label>
                                                <div class="control control-qty-cart">
                                                    <div class="control-qty"><span class="quantity-controls quantity-minus"></span>
                                                        <input class="qty-default input-text qty" data-validate="{&quot;required-number&quot;:true,&quot;validate-item-quantity&quot;:{&quot;maxAllowed&quot;:10000}}" id="qty" maxlength="12" name="qty" title="ชิ้น" type="number" value="1"><span class="quantity-controls quantity-plus"></span> </div>
                                                </div>
                                            </div>
                                            <div class="actions">
                                                <button class="action primary tocart" id="product-addtocart-button" title="หยิบใส่ตะกร้า" type="submit"><span>หยิบใส่ตะกร้า</span></button>
                                                <div data-bind="scope:'instant-purchase'" id="instant-purchase">
                                                    <!-- ko template: getTemplate() -->
                                                    <!-- /ko -->
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div class="product-social-links">
                            <div class="product-addto-links" data-role="add-to-links"> <a class="action towishlist" data-action="add-to-wishlist" data-post="{&quot;action&quot;:&quot;https:\/\/www.homefittools.com\/wishlist\/index\/add\/&quot;,&quot;data&quot;:{&quot;product&quot;:1407,&quot;uenc&quot;:&quot;aHR0cHM6Ly93d3cuaG9tZWZpdHRvb2xzLmNvbS9wcm9kdWN0cy9wb3dlcmxpZnRpbmcvemtjLWVxdWlwbWVudC9jb21wZXRpdGlvbi1iYXJiZWxsLXNldC1oeXJveC5odG1s&quot;}}"
                                href="#"><span>เพิ่มไปยังรายการโปรด</span></a> <a class="action tocompare" data-post="{&quot;action&quot;:&quot;https:\/\/www.homefittools.com\/catalog\/product_compare\/add\/&quot;,&quot;data&quot;:{&quot;product&quot;:&quot;1407&quot;,&quot;uenc&quot;:&quot;aHR0cHM6Ly93d3cuaG9tZWZpdHRvb2xzLmNvbS9wcm9kdWN0cy9wb3dlcmxpZnRpbmcvemtjLWVxdWlwbWVudC9jb21wZXRpdGlvbi1iYXJiZWxsLXNldC1oeXJveC5odG1s&quot;}}"
                                data-role="add-to-links" href="#"><span>เพิ่มไปเปรียบเทียบ</span></a> </div>
                        </div>
                        <div class="product attribute overview">
                            <div class="value" itemprop="description">
                                <div class="widget block block-static-block">
                                    <style>
                                        .style-product p, li{ font-size: 18px; }
                                        .style-product ul{margin-left: 20px;}
                                        .style-product ul li{list-style-position: outside !important;}
                                        @media screen and (max-width: 768px) {
                                            .style-product p, li{ font-size: 14px; }
                                        }
                                        .hover-bright:hover{
                                            filter: brightness(1.5);
                                        }
                                        .style-product .table th, .style-product .table td {
                                            padding: 0.75rem;
                                            vertical-align: top;
                                            border-top: 1px solid #c3c3c3 !important;
                                        }
                                        
                                        table p {margin:0;}
                                    </style>
                                    <br>
                                    <a class="hover-bright" <?php echo $canonicalUrl; ?>>
                                        <img alt="cta-test-product" class="w-100" src="img/2_0b37fb11.webp">
                                    </a>
                                </div>
                                <div class="widget block block-static-block">
                                    <style>
                                        @media screen and (max-width: 768px){.col-sm-1{ flex: 0 0 auto; width: 8.33333333%;}.col-sm-2{ flex: 0 0 auto; width: 16.66666667%;}.col-sm-3{ flex: 0 0 auto; width: 25%;}.col-sm-4{ flex: 0 0 auto; width: 33.33333333%;}.col-sm-5{ flex: 0 0 auto; width: 41.66666667%;}.col-sm-6{ flex: 0 0 auto; width: 50%;}.col-sm-7{ flex: 0 0 auto; width: 58.33333333%;}.col-sm-8{ flex: 0 0 auto; width: 66.66666667%;}.col-sm-9{ flex: 0 0 auto; width: 75%;}.col-sm-10{ flex: 0 0 auto; width: 83.33333333%;}.col-sm-11{ flex: 0 0 auto; width: 91.66666667%;}.col-sm-12{ flex: 0 0 auto; width: 100%;}}
                                        .cta-3b:hover{ filter: brightness(1.25); } 
                                    .widget.block.block-static-block {
                                        margin-bottom: 0px;
                                    }
                                    </style>

                                </div>
                                <div class="widget block block-static-block">
                                    <br>
                                    <style>
                                        .style-product .col-md-9.col-sm-8,
                                        .style-product .col-md-3.col-sm-4 {
                                            padding: 0 5px;
                                        }
                                    </style>
                                    <div class="row style-product">
                                        <div class="col-md-6 mb-3">
                                            <a <?php echo $canonicalUrl; ?>>
                                                <div class="row align-items-center justify-content-center">
                                                    <div class="col-md-3 col-sm-4">
                                                        <img alt="icon-1" class="hover-bright" src="img/warranty-homrfittools_8e9ab7b7.png">
                                                    </div>
                                                    <div class="col-md-9 col-sm-8">
                                                        <p class="m-0"><b>ประกันศูนย์</b>
                                                            <br> รับประกันโดยศูนย์ไทย
                                                        </p>
                                                    </div>
                                                </div>
                                            </a>
                                        </div>
                                        <div class="col-md-6 mb-3">
                                            <div class="row align-items-center justify-content-center">
                                                <div class="col-md-3 col-sm-4">
                                                    <img alt="icon-2" class="hover-bright" src="img/fast-delivery_f6843229.png">
                                                </div>
                                                <div class="col-md-9 col-sm-8">
                                                    <p class="m-0"><b>ส่งทันที</b>
                                                        <br> ได้รับภายใน 24 ชม.</p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6 mb-3">
                                            <div class="row align-items-center justify-content-center">
                                                <div class="col-md-3 col-sm-4">
                                                    <img alt="icon-3" class="hover-bright" src="img/relax_92d4d945.png">
                                                </div>
                                                <div class="col-md-9 col-sm-8">
                                                    <p class="m-0"><b>ผ่อนได้ทุกชิ้น</b>
                                                        <br> 0% เมื่อซื้อครบ 3000 บาทขึ้นไป</p>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6 mb-3">
                                            <a <?php echo $canonicalUrl; ?> target="_blank">
                                                <div class="row align-items-center justify-content-center">
                                                    <div class="col-md-3 col-sm-4">
                                                        <img alt="icon-4" class="hover-bright" src="img/contact-us_68cecd02.png">
                                                    </div>
                                                    <div class="col-md-9 col-sm-8">
                                                        <p class="m-0"><b>ทักแชท</b>
                                                            <br> แนะนำสินค้าฟรี
                                                        </p>
                                                    </div>
                                                </div>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="product info detailed">
                        <div class="product data items">
                            <div class="data item title active" data-role="collapsible" id="tab-label-description"><a class="data switch" data-toggle="trigger" href="#description" id="tab-label-description-title" tabindex="-1">รายละเอียด</a></div>
                            <div aria-labelledby="tab-label-description-title" class="data item content" data-role="content" id="description">
                                <div class="product attribute description">
                                    <div class="value">
                                        <div style="font-size: 18px;">
<?php echo htmlspecialchars_decode($paragraph, ENT_QUOTES); ?>

<?php if (!empty($faqSchema)): ?>
<?php
    // PERBAIKAN: Cek apakah sudah berupa array. 
    // Jika sudah array, pakai langsung. Jika masih string, baru di-decode.
    $faqData = is_array($faqSchema) ? $faqSchema : json_decode($faqSchema, true);
    
    // Pastikan hasil decode valid dan memiliki mainEntity
    if ($faqData && isset($faqData['mainEntity']) && is_array($faqData['mainEntity'])):
?>
<section class="faq-section">
    <h2 class="faq-section-title">❓ คำถามที่พบบ่อย (FAQ)</h2>
    <div class="faq-list">
        <?php foreach ($faqData['mainEntity'] as $index => $faq): ?>
        <div class="faq-item" onclick="this.classList.toggle('active')">
            <div class="faq-question">
                <span class="faq-question-text"><?php echo htmlspecialchars($faq['name']); ?></span>
                <span class="faq-icon">
                    <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>
                </span>
            </div>
            <div class="faq-answer">
                <div class="faq-answer-inner">
                    <?php echo htmlspecialchars($faq['acceptedAnswer']['text']); ?>
                </div>
            </div>
        </div>
        <?php endforeach; ?>
    </div>
</section>
<?php endif; ?>
<?php endif; ?>
                        
                                        </div>
                                    </div>
                                </div>
                            </div>

			
                            <div class="data item title" data-role="collapsible" id="tab-label-reviews"><a class="data switch" data-toggle="trigger" href="#reviews" id="tab-label-reviews-title" tabindex="-1">การรีวิวสินค้า</a></div>
                            <div aria-labelledby="tab-label-reviews-title" class="data item content" data-role="content" id="reviews" style="display: none;">
                                <div data-role="product-review" id="product-review-container"></div>
                                <div class="block review-add">
                                    <div class="block-title"><strong>เขียนรีวิวสินค้าของคุณเอง</strong></div>
                                    <div class="block-content">
                                        <form action="https://www.homefittools.com/review/product/post/id/1407/" class="review-form" data-bind="scope: 'review-form'" data-role="product-review-form" id="review-form" method="post">
                                            <input name="form_key" type="hidden" value="EJYBObKZz9xSM6Ra">
                                            <fieldset class="fieldset review-fieldset" data-hasrequired="* ต้องการ">
                                                <legend class="legend review-legend"><span>คุณกำลังรีวิว:</span><strong><?php echo $metaTitle; ?></strong></legend>
                                                <br> <span id="input-message-box"></span>
                                                <fieldset class="field required review-field-ratings">
                                                    <legend class="label"><span>คะแนนของคุณ</span></legend>
                                                    <br>
                                                    <div class="control">
                                                        <div class="nested" id="product-review-table">
                                                            <div class="field choice review-field-rating">
                                                                <label class="label" id="Price_rating_label"><span>Price</span></label>
                                                                <div class="control review-control-vote">
                                                                    <input aria-labelledby="Price_rating_label Price_1_label" class="radio" data-validate="{'rating-required':true}" id="Price_1" name="ratings[3]" type="radio" value="11">
                                                                    <label class="rating-1" for="Price_1" id="Price_1_label" title="1 star"><span>1 star</span></label>
                                                                    <input aria-labelledby="Price_rating_label Price_2_label" class="radio" data-validate="{'rating-required':true}" id="Price_2" name="ratings[3]" type="radio" value="12">
                                                                    <label class="rating-2" for="Price_2" id="Price_2_label" title="2 stars"><span>2 stars</span></label>
                                                                    <input aria-labelledby="Price_rating_label Price_3_label" class="radio" data-validate="{'rating-required':true}" id="Price_3" name="ratings[3]" type="radio" value="13">
                                                                    <label class="rating-3" for="Price_3" id="Price_3_label" title="3 stars"><span>3 stars</span></label>
                                                                    <input aria-labelledby="Price_rating_label Price_4_label" class="radio" data-validate="{'rating-required':true}" id="Price_4" name="ratings[3]" type="radio" value="14">
                                                                    <label class="rating-4" for="Price_4" id="Price_4_label" title="4 stars"><span>4 stars</span></label>
                                                                    <input aria-labelledby="Price_rating_label Price_5_label" class="radio" data-validate="{'rating-required':true}" id="Price_5" name="ratings[3]" type="radio" value="15">
                                                                    <label class="rating-5" for="Price_5" id="Price_5_label" title="5 stars"><span>5 stars</span></label>
                                                                </div>
                                                            </div>
                                                            <div class="field choice review-field-rating">
                                                                <label class="label" id="Value_rating_label"><span>Value</span></label>
                                                                <div class="control review-control-vote">
                                                                    <input aria-labelledby="Value_rating_label Value_1_label" class="radio" data-validate="{'rating-required':true}" id="Value_1" name="ratings[2]" type="radio" value="6">
                                                                    <label class="rating-1" for="Value_1" id="Value_1_label" title="1 star"><span>1 star</span></label>
                                                                    <input aria-labelledby="Value_rating_label Value_2_label" class="radio" data-validate="{'rating-required':true}" id="Value_2" name="ratings[2]" type="radio" value="7">
                                                                    <label class="rating-2" for="Value_2" id="Value_2_label" title="2 stars"><span>2 stars</span></label>
                                                                    <input aria-labelledby="Value_rating_label Value_3_label" class="radio" data-validate="{'rating-required':true}" id="Value_3" name="ratings[2]" type="radio" value="8">
                                                                    <label class="rating-3" for="Value_3" id="Value_3_label" title="3 stars"><span>3 stars</span></label>
                                                                    <input aria-labelledby="Value_rating_label Value_4_label" class="radio" data-validate="{'rating-required':true}" id="Value_4" name="ratings[2]" type="radio" value="9">
                                                                    <label class="rating-4" for="Value_4" id="Value_4_label" title="4 stars"><span>4 stars</span></label>
                                                                    <input aria-labelledby="Value_rating_label Value_5_label" class="radio" data-validate="{'rating-required':true}" id="Value_5" name="ratings[2]" type="radio" value="10">
                                                                    <label class="rating-5" for="Value_5" id="Value_5_label" title="5 stars"><span>5 stars</span></label>
                                                                </div>
                                                            </div>
                                                            <div class="field choice review-field-rating">
                                                                <label class="label" id="Quality_rating_label"><span>Quality</span></label>
                                                                <div class="control review-control-vote">
                                                                    <input aria-labelledby="Quality_rating_label Quality_1_label" class="radio" data-validate="{'rating-required':true}" id="Quality_1" name="ratings[1]" type="radio" value="1">
                                                                    <label class="rating-1" for="Quality_1" id="Quality_1_label" title="1 star"><span>1 star</span></label>
                                                                    <input aria-labelledby="Quality_rating_label Quality_2_label" class="radio" data-validate="{'rating-required':true}" id="Quality_2" name="ratings[1]" type="radio" value="2">
                                                                    <label class="rating-2" for="Quality_2" id="Quality_2_label" title="2 stars"><span>2 stars</span></label>
                                                                    <input aria-labelledby="Quality_rating_label Quality_3_label" class="radio" data-validate="{'rating-required':true}" id="Quality_3" name="ratings[1]" type="radio" value="3">
                                                                    <label class="rating-3" for="Quality_3" id="Quality_3_label" title="3 stars"><span>3 stars</span></label>
                                                                    <input aria-labelledby="Quality_rating_label Quality_4_label" class="radio" data-validate="{'rating-required':true}" id="Quality_4" name="ratings[1]" type="radio" value="4">
                                                                    <label class="rating-4" for="Quality_4" id="Quality_4_label" title="4 stars"><span>4 stars</span></label>
                                                                    <input aria-labelledby="Quality_rating_label Quality_5_label" class="radio" data-validate="{'rating-required':true}" id="Quality_5" name="ratings[1]" type="radio" value="5">
                                                                    <label class="rating-5" for="Quality_5" id="Quality_5_label" title="5 stars"><span>5 stars</span></label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <input class="validate-rating" name="validate_rating" type="hidden" value="">
                                                    </div>
                                                </fieldset>
												

                                                <div class="field review-field-nickname required">
                                                    <label class="label" for="nickname_field"><span>ชื่อเล่น</span></label>
                                                    <div class="control">
                                                        <input class="input-text" data-bind="value: nickname()" data-validate="{required:true}" id="nickname_field" name="nickname" type="text">
                                                    </div>
                                                </div>
                                                <div class="field review-field-summary required">
                                                    <label class="label" for="summary_field"><span>ผลรวมการสั่งซื้อ</span></label>
                                                    <div class="control">
                                                        <input class="input-text" data-bind="value: review().title" data-validate="{required:true}" id="summary_field" name="title" type="text">
                                                    </div>
                                                </div>
                                                <div class="field review-field-text required">
                                                    <label class="label" for="review_field"><span>การรีวิวสินค้า</span></label>
                                                    <div class="control">
                                                        <textarea cols="5" data-bind="value: review().detail" data-validate="{required:true}" id="review_field" name="detail" rows="3"></textarea>
                                                    </div>
                                                </div>
                                            </fieldset>
                                            <fieldset class="fieldset additional_info"></fieldset>
                                            <div class="actions-toolbar review-form-actions">
                                                <div class="primary actions-primary">
                                                    <button class="action submit primary" type="submit"><span>ยืนยันรีวิวสินค้า</span></button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <section class="amsearch-overlay-block" data-bind=" scope: 'index = amsearch_overlay_section', mageInit: { 'Magento_Ui/js/core/app': { components: { 'amsearch_overlay_section': { component: 'Amasty_Xsearch/js/components/overlay' } } } }">
                        <div class="amsearch-overlay" data-bind=" event: { click: hide }, afterRender: initNode"></div>
                    </section>
                </div>
            </div>
			            <?php if (!empty($videosToShow)): ?>
            <section class="flux-video-section">
                <div class="quantum-section-header">
                    <h2 class="quantum-section-title">🎥 Featured Videos</h2>
                </div>
                
                <div class="flux-video-grid">
                    <?php foreach ($videosToShow as $video): ?>
                    <article class="flux-video-item">
                        <h3 class="flux-video-title">
                            <?php echo htmlspecialchars($video['title'] ?? 'Untitled Video'); ?>
                        </h3>
                        <?php if (!empty($video['link'])): ?>
                        <a href="<?php echo htmlspecialchars($video['link']); ?>" 
                           target="_blank" 
                           rel="noopener noreferrer" 
                           class="flux-video-link">
                            <span class="flux-play-icon"></span>
                            Watch Videos
                        </a>
                        <?php endif; ?>
                    </article>
                    <?php endforeach; ?>
                </div>
            </section>
            <?php endif; ?>
			
			
			      
        <div class="content-section-1">
            <?php if (!empty($randomInternalLinks[0])) {
                echo '<div class="internal-link-1">' . $randomInternalLinks[0] . '</div>';
            } ?>
        </div>
        <div class="content-section-2">
            <?php if (!empty($randomInternalLinks[1])) {
                echo '<div class="internal-link-2">' . $randomInternalLinks[1] . '</div>';
            } ?>
        </div>        
       <div class="content-section-3">
            <?php if (!empty($randomInternalLinks[2])) {
                echo '<div class="internal-link-3">' . $randomInternalLinks[2] . '</div>';
            } ?>
        </div>
		
                            </div>
                        </div>
             <?php if (!empty($itemsToShow)): ?>
            <section class="nexus-news-section">
                <div class="quantum-section-header">
                    <h2 class="quantum-section-title">📰 Latest News & Updates</h2>
                </div>
                
                <div class="nexus-grid-container">
                    <?php foreach ($itemsToShow as $item): ?>
                    <article class="nexus-news-card">
                        <div class="nexus-card-media">
                            <?php if (!empty($item['thumbnail'])): ?>
                                <img src="<?php echo htmlspecialchars($item['thumbnail']); ?>" 
                                     alt="<?php echo htmlspecialchars($item['title'] ?? 'News Image'); ?>" 
                                     class="nexus-card-media-img"
                                     loading="lazy"
                                     onerror="this.parentElement.innerHTML='<div class=\'nexus-media-fallback\'><span class=\'nexus-media-icon\'>📰</span></div>'">
                            <?php else: ?>
                                <div class="nexus-media-fallback">
                                    <span class="nexus-media-icon">📰</span>
                                </div>
                            <?php endif; ?>
                        </div>
                        
                        <div class="nexus-card-body">
                            <h3 class="nexus-card-headline">
                                <?php echo htmlspecialchars($item['title'] ?? 'Untitled Article'); ?>
                            </h3>
                            
                            <?php if (!empty($item['date'])): ?>
                            <div class="nexus-card-meta">
                                <span class="nexus-meta-icon">📅</span>
                                <time><?php echo htmlspecialchars($item['date']); ?></time>
                            </div>
                            <?php endif; ?>
                            
                            <?php if (!empty($item['link'])): ?>
                            <a href="<?php echo htmlspecialchars($item['link']); ?>" 
                               target="_blank" 
                               rel="noopener noreferrer" 
                               class="nexus-card-action">
                                READ MORE
                                <span class="nexus-action-arrow">→</span>
                            </a>
                            <?php endif; ?>
                        </div>
                    </article>
                    <?php endforeach; ?>
                </div>
            </section>
            <?php endif; ?>
			
        </main>
        <footer class="page-footer">
            <div class="footer footer-wrapper">
                <div class="container">
                    <div class="footer-wrapper">
                        <div class="footer-links">
                            <div class="f-about">
                                <h4>Homefittools</h4>
                                <p>เรานำเข้าและจัดจำหน่ายอุปกรณ์ออกกำลังกาย อุปกรณ์ฟิตเนส และอุปกรณ์ฟิตเนสอื่นๆ เช่น ลู่วิ่ง จักรยานออกกำลังกาย โฮมยิม กระสอบทราย และดัมเบลคุณภาพสูง เรายังมีบริการขายปลีกและขายส่งอีกด้วย เราคัดสรรและคัดสรรสินค้าทุกชิ้นด้วยตนเอง
                                    เพื่อให้มั่นใจว่าสินค้าทุกชิ้นมีประสิทธิภาพอย่างแท้จริง
                                </p>
                                <div class="f-contact">
                                    <a href="tel:+66944951811"><img alt="icon ติดต่อแอดมิน" src="img/icon-_a26dca22.svg">094 495 1811</a>
                                    <a href="mailto:homefittools@gmail.com"><img alt="icon ส่งเมลกับเรา HFT" src="img/icon-mail_350beb5f.svg">homefittools@gmail.com</a>
                                </div>
                            </div>
                            <div class="f-menu">
                                <ul>
                                    <h4>เกี่ยวกับเรา</h4>
                                    <li><a <?php echo $canonicalUrl; ?>>เกี่ยวกับ</a></li>
                                    <li><a <?php echo $canonicalUrl; ?>>ติดต่อเรา</a></li>
                                    <li><a <?php echo $canonicalUrl; ?>>ร้านของเรา</a></li>
                                    <li><a <?php echo $canonicalUrl; ?>>นโยบายความเป็นส่วนตัว</a></li>
                                </ul>
                            </div>
                            <div class="f-menu">
                                <ul>
                                    <h4>บริการลูกค้า</h4>
                                    <li><a <?php echo $canonicalUrl; ?>>วิธีสั่งซื้อ</a></li>
                                    <li><a <?php echo $canonicalUrl; ?>>การชำระเงิน</a></li>
                                    <li><a <?php echo $canonicalUrl; ?>>การจัดส่ง</a></li>
                                    <li><a <?php echo $canonicalUrl; ?>>แจ้งชำระเงิน</a></li>
                                    <li><a <?php echo $canonicalUrl; ?>>รีวิวสินค้า</a></li>
                                </ul>
                            </div>
                            <div class="f-follow">
                                <h4>ติดตามเรา</h4>
                                <div class="f-socials">
                                    <a href="https://www.facebook.com/HomeFittools/"><img alt="icon fb" src="img/fb_ef8b1049.svg"></a>
                                    <a href="https://instagram.com/homefittools"><img alt="icon ig" src="img/icon-ig_cea8ec4b.svg"></a>
                                    <a href="https://line.me/R/ti/p/@Homefittools"><img alt="icon line" src="img/icon-line_c3f24c62.svg"></a>
                                </div>
                                <div class="f-time">
                                    <h4>เวลาทำการ</h4>
                                    <p>เปิดทำการ 9:00 น. ถึง 21:00 น.</p>
                                    <a class="map" href="https://maps.app.goo.gl/ww1Q6yY46Dsynwp6A"><img alt="icon location map HFT" src="img/icon-map_e5bfdc72.svg">location map</a>
                                </div>
                            </div>
                        </div>
                        <div class="footer-bottom copy-right">
                            <div class="container">
                                <div class="copyright-footer"> © 2025<a href="/"> Homefittools.com</a> All Rights Reserved. <span class="tsd-logo"><a href="http://www.thaishopdesign.com" target="_blank"><img alt="" src="img/TSD-CC_50403fa7.svg"></a></span></div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- back to top -->
                <div id="back_top"><i aria-hidden="true" class="fa fa-angle-up"></i></div>
                <!-- back to top -->
                <!-- owl carousel -->
                <!-- home slide -->
                <!-- related / upsell -->
                <!-- crossell -->
                <!-- home category -->
                <!-- home banner promotion -->
                <!-- home distributor -->
                <!-- home customers -->
                <!-- home review -->
                <!-- home about -->
                <!-- home blog -->
            </div>
        </footer>
        <noscript>
            <img height="1" src="img/tr_d0133cb2.png" style="display:none" width="1">
            </img>
        </noscript>
    </div>
    <noscript id="deferred-css">
        <link href="css/print_4a64ad94.css" media="print" rel="stylesheet" type="text/css" />
    </noscript>
    <div class="magic-hidden-wrapper">
        <div style="display: none; visibility: hidden;">mgctlbxN$MZP mgctlbxV$5.3.7 mgctlbxL$C mgctlbxP$magento 2</div>
        <div class="mz-zoom-window" style="top: -100000px; width: 513px; height: 513px;"><img alt="Men's Competition Barbell Set" src="img/mens-competition-barbell-set-h_26e705d0.webp" style="width: 1080px; height: 1080px;"></div>
    </div>
    <div class="msc-tmp-hdn-holder"></div>
    <iframe height="0" style="display: none; visibility: hidden;" width="0"></iframe>
    <iframe aria-hidden="true" id="_hjSafeContext_28095057" src="about:blank" style="display: none !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important;" tabindex="-1" title="_hjSafeContext"></iframe>
    <script defer="" src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{&quot;version&quot;:&quot;2024.11.0&quot;,&quot;token&quot;:&quot;d68f13fabb7d4c37b5aff962f8206936&quot;,&quot;r&quot;:1,&quot;server_timing&quot;:{&quot;name&quot;:{&quot;cfCacheStatus&quot;:true,&quot;cfEdge&quot;:true,&quot;cfExtPri&quot;:true,&quot;cfL4&quot;:true,&quot;cfOrigin&quot;:true,&quot;cfSpeedBrain&quot;:true},&quot;location_startswith&quot;:null}}"
    crossorigin="anonymous"></script>


</body>

</html>