<main class="fjord-main">
  <?php echo fjord_clone_render_hero_block(); ?>

  <section class="fjord-info fjord-reveal">
    <div class="fjord-info__inner">
      <div class="fjord-info__item">
        <span class="fjord-info__icon" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M3 7h11v8H3z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
            <path d="M14 10h4l3 3v2h-7z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
            <circle cx="7" cy="18" r="1.6" fill="none" stroke="currentColor" stroke-width="1.6"></circle>
            <circle cx="18" cy="18" r="1.6" fill="none" stroke="currentColor" stroke-width="1.6"></circle>
          </svg>
        </span>
        <span>Free Shipping over 500€</span>
      </div>
      <div class="fjord-info__item">
        <span class="fjord-info__icon" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2Z" fill="none" stroke="currentColor" stroke-width="1.6"></path>
            <path d="M2 12h20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
            <path d="M12 2c2.8 3.2 2.8 14.8 0 20-2.8-3.2-2.8-14.8 0-20Z" fill="none" stroke="currentColor" stroke-width="1.6"></path>
          </svg>
        </span>
        <span>Worldwide Shipping</span>
      </div>
      <div class="fjord-info__item">
        <span class="fjord-info__icon" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M4 8l8-4 8 4-8 4-8-4Z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
            <path d="M4 8v8l8 4 8-4V8" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
            <path d="M12 12v8" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
          </svg>
        </span>
        <span>Free Returns</span>
      </div>
      <div class="fjord-info__item">
        <span class="fjord-info__icon" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M4 12h16a2 2 0 0 1 2 2v4H2v-4a2 2 0 0 1 2-2Z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
            <path d="M6 12V9a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3v3" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
            <path d="M4 18v2m16-2v2" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
          </svg>
        </span>
        <span>5-Year Warranty</span>
      </div>
    </div>
  </section>

  <section class="fjord-favorites">
    <div class="fjord-favorites__pill fjord-reveal">
      <h2>Our Favorites</h2>
    </div>
    <div class="fjord-carousel" data-carousel>
      <button class="fjord-carousel__control fjord-carousel__control--prev" type="button" aria-label="Previous">
        <img src="https://framerusercontent.com/images/6tTbkXggWgQCAJ4DO2QEdXXmgM.svg" alt="">
      </button>
      <div class="fjord-carousel__track">
        <?php
        $favorite_products = [];
        if (function_exists('wc_get_products')) {
          $favorite_products = wc_get_products([
            'status' => 'publish',
            'featured' => true,
            'limit' => 12,
          ]);
          if (!$favorite_products) {
            $favorite_products = wc_get_products([
              'status' => 'publish',
              'orderby' => 'date',
              'order' => 'DESC',
              'limit' => 12,
            ]);
          }
        }
        ?>
        <?php if ($favorite_products) : ?>
          <?php foreach ($favorite_products as $product) : ?>
            <?php
            $product_id = $product->get_id();
            $product_name = $product->get_name();
            $discount_percent = null;
            if ($product->is_on_sale()) {
              $regular_price = (float) $product->get_regular_price();
              $sale_price = (float) $product->get_sale_price();
              if ($regular_price > 0 && $sale_price > 0 && $sale_price < $regular_price) {
                $discount_percent = (int) round((($regular_price - $sale_price) / $regular_price) * 100);
              }
            }
            ?>
            <article class="fjord-product">
              <div class="fjord-product__badge"><?php echo esc_html($product_name); ?></div>
              <?php if ($discount_percent) : ?>
                <span class="fjord-product__discount"><?php echo esc_html($discount_percent); ?>% OFF</span>
              <?php endif; ?>
              <div class="fjord-product__image">
                <a href="<?php echo esc_url(get_permalink($product_id)); ?>">
                  <?php echo $product->get_image('woocommerce_single', ['alt' => $product_name]); ?>
                </a>
              </div>
              <div class="fjord-product__cta">
                <span><?php echo wp_kses_post($product->get_price_html()); ?></span>
                <a class="fjord-product__cta-link" href="<?php echo esc_url(get_permalink($product_id)); ?>">Ver</a>
              </div>
            </article>
          <?php endforeach; ?>
        <?php endif; ?>
      </div>
      <button class="fjord-carousel__control fjord-carousel__control--next" type="button" aria-label="Next">
        <img src="https://framerusercontent.com/images/11KSGbIZoRSg4pjdnUoif6MKHI.svg" alt="">
      </button>
    </div>
    <div class="fjord-favorites__pill fjord-favorites__pill--collections fjord-reveal">
      <h2>Collections</h2>
    </div>
    <div class="fjord-collections-wrap fjord-reveal">
      <div class="fjord-collections-grid">
      <article class="fjord-collection-card fjord-collection-card--wood" style="--wood-image:url('https://framerusercontent.com/images/oaJMCWVJsdqXc6aQzq9Tl9QeDAc.webp?width=1400&height=1000');">
        <div class="fjord-collection-card__content fjord-collection-card__content--dark">
          <h3>Wood</h3>
          <p>Our Wood Collection celebrates the natural beauty of wood.</p>
          <a class="fjord-collection-card__link" href="#">Ver producto</a>
        </div>
      </article>
      <div class="fjord-collections-grid__right">
        <div class="fjord-collection-card fjord-collection-card--image fjord-collection-card--people" style="background-image:url('https://framerusercontent.com/images/TRNAt6di5Swwdq8nGr6m4FLg4AU.webp?width=2000&height=1000');"></div>
        <div class="fjord-collection-card fjord-collection-card--light fjord-collection-card--dark">
          <h3>Dark</h3>
          <p>Rrefined finishes bring an air of sophistication and drama to any room.</p>
          <a class="fjord-collection-card__link" href="#">Ver producto</a>
        </div>
        <div class="fjord-collections-grid__row">
          <div class="fjord-collection-card fjord-collection-card--light fjord-collection-card--modern">
            <h3>Modern</h3>
            <p>The Modern Collection brings together graceful lines and luxurious finishes.</p>
            <a class="fjord-collection-card__link" href="#">Ver producto</a>
          </div>
          <div class="fjord-collection-card fjord-collection-card--image fjord-collection-card--chair" style="background-image:url('https://framerusercontent.com/images/yWfiT9hCK49Xggoq1k9TvLHyUY.webp?width=2400&height=1200');">
          </div>
        </div>
      </div>
      </div>
    </div>
  </section>

  <section class="fjord-about fjord-reveal">
    <div class="fjord-section__head">
      <h2>About Us</h2>
    </div>
    <div class="fjord-about__grid fjord-reveal">
      <div class="fjord-about__image">
        <img src="https://framerusercontent.com/images/4edEXYzlI9czhhBmZMvj3fhSs.webp?width=2000&height=2400" alt="About Fjord">
      </div>
      <div class="fjord-about__content">
        <h3>Designing Spaces,<br>Inspiring Connection</h3>
        <p>At Hanssen, our mission is to create furniture that brings people together, inspired by the simplicity and warmth of Scandinavian design.</p>
        <a class="fjord-about__link fjord-collection-card__link" href="#">Ir a tienda</a>
      </div>
    </div>
  </section>

  <section class="fjord-steps fjord-reveal">
    <div class="fjord-steps__grid">
      <article class="fjord-step">
        <div class="fjord-step__content">
          <p>Compra online</p>
          <span class="fjord-step__icon" aria-hidden="true">
            <svg viewBox="0 0 24 24" focusable="false">
              <path d="M3 5h2l2.2 9.5a2 2 0 0 0 2 1.5h7.6a2 2 0 0 0 2-1.4l1.6-6.6H7.2" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"></path>
              <circle cx="10" cy="20" r="1.6" fill="none" stroke="currentColor" stroke-width="1.6"></circle>
              <circle cx="17" cy="20" r="1.6" fill="none" stroke="currentColor" stroke-width="1.6"></circle>
            </svg>
          </span>
        </div>
        <span class="fjord-step__check" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M7 17l10-10M9 7h8v8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
          </svg>
        </span>
      </article>
      <article class="fjord-step">
        <div class="fjord-step__content">
          <p>Cotiza tu despacho</p>
          <span class="fjord-step__icon" aria-hidden="true">
            <svg viewBox="0 0 24 24" focusable="false">
              <path d="M4 8l8-4 8 4-8 4-8-4Z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
              <path d="M4 8v8l8 4 8-4V8" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
              <path d="M12 12v8" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
            </svg>
          </span>
        </div>
        <span class="fjord-step__check" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M7 17l10-10M9 7h8v8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
          </svg>
        </span>
      </article>
      <article class="fjord-step">
        <div class="fjord-step__content">
          <p>Nos contactamos</p>
          <span class="fjord-step__icon" aria-hidden="true">
            <svg viewBox="0 0 24 24" focusable="false">
              <path d="M5 6h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H9l-4 3v-3H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
            </svg>
          </span>
        </div>
        <span class="fjord-step__check" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M7 17l10-10M9 7h8v8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
          </svg>
        </span>
      </article>
      <article class="fjord-step">
        <div class="fjord-step__content">
          <p>Preparamos el producto</p>
          <span class="fjord-step__icon" aria-hidden="true">
            <svg viewBox="0 0 24 24" focusable="false">
              <path d="M3 12h7l11-6" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
              <path d="M3 16h7l11-6" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
              <path d="M3 20h7l11-6" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
            </svg>
          </span>
        </div>
        <span class="fjord-step__check" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M7 17l10-10M9 7h8v8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
          </svg>
        </span>
      </article>
      <article class="fjord-step">
        <div class="fjord-step__content">
          <p>Se envía</p>
          <span class="fjord-step__icon" aria-hidden="true">
            <svg viewBox="0 0 24 24" focusable="false">
              <path d="M3 7h11v8H3z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
              <path d="M14 10h4l3 3v2h-7z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
              <circle cx="7" cy="18" r="1.6" fill="none" stroke="currentColor" stroke-width="1.6"></circle>
              <circle cx="18" cy="18" r="1.6" fill="none" stroke="currentColor" stroke-width="1.6"></circle>
            </svg>
          </span>
        </div>
        <span class="fjord-step__check" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M7 17l10-10M9 7h8v8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
          </svg>
        </span>
      </article>
      <article class="fjord-step">
        <div class="fjord-step__content">
          <p>Se monta y ¡listo!</p>
          <span class="fjord-step__icon" aria-hidden="true">
            <svg viewBox="0 0 24 24" focusable="false">
              <path d="M4 9h16v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9Z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"></path>
              <path d="M8 9V7a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"></path>
            </svg>
          </span>
        </div>
        <span class="fjord-step__check" aria-hidden="true">
          <svg viewBox="0 0 24 24" focusable="false">
            <path d="M7 17l10-10M9 7h8v8" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
          </svg>
        </span>
      </article>
    </div>
  </section>
</main>
