<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="IceMakerPrice.com - Expert ice maker price comparison platform. Compare prices on Scotsman, Hoshizaki, Manitowoc ice machines across Amazon, Best Buy and more.">
  <meta name="keywords" content="ice maker prices, Scotsman ice maker, Hoshizaki ice maker, commercial ice machine, portable ice maker, ice maker comparison">
  <title>IceMakerPrice.com - Expert Ice Maker Price Comparison</title>
  <link rel="canonical" href="https://icemakerprice.com/">
  <meta property="og:title" content="IceMakerPrice.com - Expert Ice Maker Price Comparison">
  <meta property="og:description" content="Compare prices on Scotsman, Hoshizaki, Manitowoc ice machines across Amazon, Best Buy and more.">
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://icemakerprice.com/">
  <link rel="stylesheet" href="css/style.css">

  <!-- Structured Data: WebSite + Organization -->
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "WebSite",
    "name": "IceMakerPrice",
    "url": "https://icemakerprice.com/",
    "description": "Expert ice maker price comparison platform. Compare prices on Scotsman, Hoshizaki, Manitowoc ice machines across Amazon, Best Buy and more.",
    "potentialAction": {
      "@type": "SearchAction",
      "target": "https://icemakerprice.com/products.html?q={search_term_string}",
      "query-input": "required name=search_term_string"
    }
  }
  </script>
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Organization",
    "name": "IceMakerPrice",
    "url": "https://icemakerprice.com/",
    "logo": "https://icemakerprice.com/images/logo.png",
    "sameAs": [
      "https://twitter.com/icemakerprice",
      "https://www.facebook.com/icemakerprice"
    ]
  }
  </script>
  <style>
    /* Promotion Banner Styles */
    .promo-banner {
      background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
      color: white;
      padding: 12px 0;
      position: relative;
      z-index: 1000;
      box-shadow: 0 2px 10px rgba(255,107,53,0.3);
    }
    .promo-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 15px;
      flex-wrap: wrap;
      text-align: center;
    }
    .promo-badge {
      background: #fff;
      color: #ff6b35;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: bold;
      text-transform: uppercase;
    }
    .promo-text {
      font-size: 14px;
    }
    .promo-price {
      margin-left: 5px;
    }
    .promo-price s {
      color: rgba(255,255,255,0.6);
    }
    .promo-deal {
      color: #ffd700;
      font-weight: bold;
      font-size: 16px;
    }
    .promo-discount {
      background: #fff;
      color: #ff6b35;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: bold;
      margin-left: 8px;
    }
    .promo-btn {
      background: white;
      color: #ff6b35;
      padding: 8px 20px;
      border-radius: 25px;
      text-decoration: none;
      font-weight: bold;
      font-size: 14px;
      transition: all 0.3s;
    }
    .promo-btn:hover {
      background: #ffd700;
      color: #ff6b35;
      transform: scale(1.05);
    }
    .promo-countdown {
      font-size: 13px;
      color: rgba(255,255,255,0.9);
      background: rgba(0,0,0,0.2);
      padding: 4px 12px;
      border-radius: 15px;
    }
    .promo-close {
      background: rgba(255,255,255,0.2);
      border: none;
      color: white;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 14px;
      transition: background 0.3s;
    }
    .promo-close:hover {
      background: rgba(255,255,255,0.4);
    }
    @media (max-width: 768px) {
      .promo-container {
        gap: 10px;
        font-size: 12px;
      }
      .promo-badge, .promo-countdown {
        display: none;
      }
    }
  </style>
  
  <!-- 搜索引擎验证标签 -->
  <!-- <meta name="google-site-verification" content="YOUR_GOOGLE_CODE"> -->
  <meta name="msvalidate.01" content="B7784F2A4FC8592CE48F9756167AEC87">
  <meta name="baidu-site-verification" content="codeva-jkbDQUkHqx">
  <!-- Best Buy Affiliate Verification -->
  <meta name="bb-verify" content="bb4dc49d-e4a6-4a0f-9713-773da3091b57">
</head>
<body>
  <!-- Header -->
  <header class="header">
    <div class="header-inner">
      <a href="index.html" class="logo">
        <span class="logo-icon">🧊</span>
        IceMaker<span>Price</span>
      </a>
      <nav class="nav-menu">
        <a href="index.html">Home</a>
        <a href="products.html">Products</a>
        <a href="about.html">About</a>
      </nav>
      <div class="language-selector-wrapper">
        <select id="language-selector" onchange="switchLanguage(this.value)">
          <option value="en" selected>English</option>
          <option value="zh">中文</option>
          <option value="de">Deutsch</option>
          <option value="ja">日本語</option>
        </select>
      </div>
      <button class="mobile-menu-btn" aria-label="Menu">☰</button>
    </div>
  </header>

  <!-- Promotion Banner - Auto-expires 2026-05-05 -->
  <div id="promo-banner" class="promo-banner" style="display:none;">
    <div class="promo-container">
      <span class="promo-badge">🧊 HOT DEAL</span>
      <span class="promo-text">
        <strong>Igloo Ice Maker</strong> - 
        <span class="promo-price"><s>$90</s> <span class="promo-deal">$57</span></span>
        <span class="promo-discount">37% OFF</span>
      </span>
      <a href="products.html?product=igloo" class="promo-btn">Shop Now →</a>
      <span class="promo-countdown" id="promo-countdown"></span>
      <button class="promo-close" onclick="closePromoBanner()">✕</button>
    </div>
  </div>

  <!-- Hero Section -->
  <section class="hero">
    <div class="container">
      <h1>Find the Perfect Ice Maker for You</h1>
      <p>Compare hundreds of ice makers with real-time price tracking across Amazon, Best Buy and other retailers</p>
      <form class="search-box" onsubmit="handleSearch(event)">
        <input type="text" placeholder="Search by brand or model..." aria-label="Search">
        <button type="submit">Search</button>
      </form>
    </div>
  </section>

  <!-- Categories Section -->
  <section class="categories">
    <div class="container">
      <div class="section-title">
        <h2>Browse by Type</h2>
        <p>Find the ice maker type that fits your needs</p>
      </div>
      <div class="categories-grid" id="categories-grid">
        <!-- Loaded via JS -->
      </div>
    </div>
  </section>

  <!-- Featured Products -->
  <section class="products">
    <div class="container">
      <div class="products-header">
        <div class="section-title" style="text-align:left;margin-bottom:0;">
          <h2>Featured Recommendations</h2>
          <p>Most popular ice makers among our users</p>
        </div>
        <a href="products.html" class="btn btn-outline">View All →</a>
      </div>
      <div class="products-grid" id="featured-products">
        <!-- Loaded via JS -->
      </div>
    </div>
  </section>

  <!-- Brands Section -->
  <section class="brands">
    <div class="container">
      <div class="section-title">
        <h2>Popular Brands</h2>
        <p>From world-renowned ice maker manufacturers</p>
      </div>
      <div class="brands-grid" id="brands-grid">
        <!-- Loaded via JS -->
      </div>
    </div>
  </section>

  <!-- Features Section -->
  <section class="categories" style="background:var(--gray-200);">
    <div class="container">
      <div class="section-title">
        <h2>Why Choose Us</h2>
        <p>Your expert ice maker comparison assistant</p>
      </div>
      <div class="categories-grid">
        <div class="category-card" style="cursor:default;">
          <div class="category-icon">📊</div>
          <h3>Real-time Price Tracking</h3>
          <p>Monitor price changes across multiple platforms</p>
        </div>
        <div class="category-card" style="cursor:default;">
          <div class="category-icon">🔗</div>
          <h3>One-Click Comparison</h3>
          <p>Compare prices on Amazon, Best Buy & more</p>
        </div>
        <div class="category-card" style="cursor:default;">
          <div class="category-icon">⭐</div>
          <h3>Authentic Reviews</h3>
          <p>Real feedback from verified buyers</p>
        </div>
        <div class="category-card" style="cursor:default;">
          <div class="category-icon">💰</div>
          <h3>Best Deals</h3>
          <p>Discover hidden discounts and promo codes</p>
        </div>
      </div>
    </div>
  </section>

  <!-- Agent World Promotion -->
  <section class="categories" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 60px 0;">
    <div class="container">
      <div class="section-title" style="color: white;">
        <h2>🤖 Smart Shopping Assistant</h2>
        <p>Get personalized ice maker recommendations powered by AI</p>
      </div>
      <div class="categories-grid" style="display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;">
        <div class="category-card" style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); max-width: 350px; text-align: center; color: white;">
          <div class="category-icon">🔍</div>
          <h3 style="color: white;">Smart Search</h3>
          <p style="color: rgba(255,255,255,0.9);">Ask our AI agent any questions about ice makers and get instant expert answers</p>
        </div>
        <div class="category-card" style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); max-width: 350px; text-align: center; color: white;">
          <div class="category-icon">💡</div>
          <h3 style="color: white;">Personalized Picks</h3>
          <p style="color: rgba(255,255,255,0.9);">Get custom recommendations based on your specific needs and budget</p>
        </div>
        <div class="category-card" style="background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); max-width: 350px; text-align: center; color: white;">
          <div class="category-icon">📊</div>
          <h3 style="color: white;">Price Alerts</h3>
          <p style="color: rgba(255,255,255,0.9);">Set up notifications and never miss a deal on your favorite ice makers</p>
        </div>
      </div>
      <div style="text-align: center; margin-top: 40px;">
        <a href="https://world.coze.site" target="_blank" rel="noopener" class="btn" style="background: white; color: #667eea; padding: 15px 40px; font-size: 16px; border-radius: 30px; text-decoration: none; display: inline-block; transition: transform 0.3s;">
          🚀 Try AI Assistant Now
        </a>
      </div>
    </div>
  </section>

  <!-- Newsletter Section -->
  <section class="newsletter" id="subscribe" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 60px 0; margin-top: 40px;">
    <div class="container" style="max-width: 600px; text-align: center;">
      <h2 style="color: white; font-size: 28px; margin-bottom: 15px;">📬 Get Price Alerts</h2>
      <p style="color: rgba(255,255,255,0.9); font-size: 16px; margin-bottom: 25px;">Subscribe to get notified when ice maker prices drop!</p>
      <form id="subscribeForm" style="display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;">
        <input type="email" id="email" name="email" placeholder="Enter your email" required 
               style="flex: 1; min-width: 200px; padding: 14px 18px; border: none; border-radius: 8px; font-size: 16px; outline: none;">
        <button type="submit" style="padding: 14px 28px; background: #ff6b35; color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.3s;">
          Subscribe
        </button>
      </form>
      <p id="subscribeMessage" style="margin-top: 15px; color: white;"></p>
      <p style="color: rgba(255,255,255,0.6); font-size: 12px; margin-top: 10px;">🔒 No spam, unsubscribe anytime.</p>
    </div>
  </section>

  <!-- Footer -->
  <footer class="footer">
    <div class="container">
      <div class="footer-grid">
        <div class="footer-col">
          <h4>IceMakerPrice</h4>
          <p>Expert ice maker price comparison platform, helping consumers find the best deals.</p>
        </div>
        <div class="footer-col">
          <h4>Product Categories</h4>
          <ul>
            <li><a href="products.html?category=portable">Portable Ice Makers</a></li>
            <li><a href="products.html?category=commercial">Commercial Ice Machines</a></li>
            <li><a href="products.html?category=undercounter">Undercounter Ice Makers</a></li>
            <li><a href="products.html?category=nugget">Nugget Ice Makers</a></li>
          </ul>
        </div>
        <div class="footer-col">
          <h4>Popular Brands</h4>
          <ul>
            <li><a href="products.html?brand=scotsman">Scotsman</a></li>
            <li><a href="products.html?brand=hoshizaki">Hoshizaki</a></li>
            <li><a href="products.html?brand=manitowoc">Manitowoc</a></li>
            <li><a href="products.html?brand=ice-o-matic">Ice-O-Matic</a></li>
          </ul>
        </div>
        <div class="footer-col">
          <h4>Partner Sites</h4>
          <ul>
            <li><a href="https://headphoneprice.com" target="_blank" rel="noopener">HeadphonePrice.com</a> - Headphone comparison</li>
            <li><a href="https://wedigai.com" target="_blank" rel="noopener">WeDigAI.com</a> - AI tools directory</li>
            <li><a href="https://icemakerprice.com" target="_blank" rel="noopener">IceMakerPrice.com</a> - Ice makers</li>
          </ul>
        </div>
        <div class="footer-col">
          <h4>Help & Info</h4>
          <ul>
            <li><a href="about.html">About Us</a></li>
            <li><a href="privacy.html">Privacy Policy</a></li>
            <li><a href="terms.html">Terms of Use</a></li>
            <li><a href="contact.html">Contact Us</a></li>
          </ul>
        </div>
      </div>
      <div class="footer-bottom">
        <p>© 2026 IceMakerPrice.com. All rights reserved.</p>
      </div>
    </div>
  </footer>

  <script src="js/geo-language.js"></script>
  <script src="js/app.js"></script>
  <script>
    // Promotion Banner Logic - Auto-expires 2026-05-05
    (function() {
      const PROMO_END_DATE = new Date('2026-05-05T23:59:59').getTime();
      const STORAGE_KEY = 'imp_promo_closed';
      
      function initPromoBanner() {
        const now = Date.now();
        const closedUntil = localStorage.getItem(STORAGE_KEY);
        
        // Show banner if not expired and not manually closed
        if (now < PROMO_END_DATE && (!closedUntil || now > parseInt(closedUntil))) {
          const banner = document.getElementById('promo-banner');
          if (banner) {
            banner.style.display = 'block';
            updateCountdown();
            setInterval(updateCountdown, 60000); // Update every minute
          }
        }
      }
      
      function updateCountdown() {
        const now = Date.now();
        const diff = PROMO_END_DATE - now;
        
        if (diff <= 0) {
          const banner = document.getElementById('promo-banner');
          if (banner) banner.style.display = 'none';
          return;
        }
        
        const days = Math.floor(diff / (1000 * 60 * 60 * 24));
        const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
        const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
        
        let countdownText = '';
        if (days > 0) countdownText = days + 'd ' + hours + 'h left';
        else if (hours > 0) countdownText = hours + 'h ' + minutes + 'm left';
        else countdownText = minutes + 'm left';
        
        const countdownEl = document.getElementById('promo-countdown');
        if (countdownEl) countdownEl.textContent = '⏰ ' + countdownText;
      }
      
      window.closePromoBanner = function() {
        const banner = document.getElementById('promo-banner');
        if (banner) banner.style.display = 'none';
        // Remember closure for this session (until midnight)
        const midnight = new Date();
        midnight.setHours(24, 0, 0, 0);
        localStorage.setItem(STORAGE_KEY, midnight.getTime().toString());
      };
      
      // Initialize on DOM ready
      if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initPromoBanner);
      } else {
        initPromoBanner();
      }
    })();

    // Newsletter Subscription
    document.getElementById('subscribeForm').addEventListener('submit', async function(e) {
      e.preventDefault();
      const email = document.getElementById('email').value.trim();
      const message = document.getElementById('subscribeMessage');
      const submitBtn = this.querySelector('button[type="submit"]');
      
      if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
        message.textContent = 'Please enter a valid email address.';
        message.style.color = '#ff6b6b';
        return;
      }
      
      submitBtn.disabled = true;
      submitBtn.textContent = 'Subscribing...';
      
      // Use unified Worker API
      const workerUrl = 'https://icemakerprice.com';
      const apiEndpoint = workerUrl + '/api/subscribe';
      
      try {
        const response = await fetch(apiEndpoint, {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({ email: email, domain: 'icemakerprice.com' })
        });
        
        const data = await response.json();
        
        if (response.ok && data.success) {
          message.textContent = '🎉 ' + (data.message || 'Subscribed successfully!');
          message.style.color = '#4ade80';
          this.reset();
        } else {
          message.textContent = data.message || 'Failed to subscribe. Please try again.';
          message.style.color = '#ff6b6b';
        }
      } catch (error) {
        console.error('Subscription error:', error);
        message.textContent = 'Network error. Please try again.';
        message.style.color = '#ff6b6b';
      } finally {
        submitBtn.disabled = false;
        submitBtn.textContent = 'Subscribe';
      }
    });
  </script>
</body>
</html>
