<.shop_layout
  theme_settings={@theme_settings}
  logo_image={@logo_image}
  header_image={@header_image}
  mode={@mode}
  cart_items={@cart_items}
  cart_count={@cart_count}
  cart_subtotal={@cart_subtotal}
  cart_drawer_open={assigns[:cart_drawer_open] || false}
  cart_status={assigns[:cart_status]}
  active_page="error"
  error_page
>
  <main
    id="main-content"
    class="flex items-center justify-center"
    style="min-height: calc(100vh - 4rem);"
  >
    <div class="max-w-2xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
      <.hero_section
        variant={:error}
        pre_title={@error_code}
        title={@error_title}
        description={@error_description}
        cta_text="Go to Homepage"
        cta_page="home"
        secondary_cta_text="Browse Products"
        secondary_cta_page="collection"
        mode={@mode}
      />

      <.product_grid columns={:fixed_4} gap="gap-4" class="mt-12 max-w-xl mx-auto">
        <%= for product <- Enum.take(@preview_data.products, 4) do %>
          <.product_card
            product={product}
            theme_settings={@theme_settings}
            mode={@mode}
            variant={:minimal}
          />
        <% end %>
      </.product_grid>
    </div>
  </main>
</.shop_layout>
