# 🏪 Factorize Storefront

> The real store, on the home page — photo band and visit map.
>
> **Suite identity:** icon 🏪 · accent `#4ea3d8` · part of the [Factorize suite](../README-FACTORIZE.md)

## What it does

Provides the storefront photography features extracted from the store's theme: the `[empire_storefront]` shortcode (full-width storefront photo band with a tagline overlay), the `[empire_visit]` shortcode (store-visit section with a dark map embed, address, hours, and Start Route / Call buttons), and the hero-photo wiring that publishes the hero image URL as the `--et-hero-photo` CSS custom property on `wp_head`. Photo attachment IDs are read from the `et_hero_image` and `et_storefront_image` options, so the photos can be swapped from the media library without touching code.

## Configuration

| Key | Default | Effect |
| --- | --- | --- |
| `maps_zoom` | `10` | The `z=` zoom level in the Google Maps embed URL inside `[empire_visit]`. |

Configuration is read through `empire_storefront_config( $key )`. Defaults can be overridden by saving an array to the `factorize-storefront_options` option (e.g. `update_option( 'factorize-storefront_options', array( 'maps_zoom' => 12 ) )`), or filtered at runtime with the `factorize-storefront_config` filter, which receives the merged defaults + option array. The legacy `empire-storefront-sections_options` option is still read as a fallback when the new option is empty.

## Works with

- The **companion theme** (`empire-tools`) supplies all CSS for these sections (`.et-storefront*`, `.et-visit*`, `.et-btn`, and the `--et-hero-photo` mask/fade in `style.css`). Without the theme the shortcodes still render valid markup and the hero CSS variable is still printed, but they will be unstyled.
- Calls no functions from sibling plugins and needs none of them; other code may call `empire_tools_store_image( 'hero' | 'storefront' )`, which this plugin now defines. It degrades gracefully: if the image options are unset, `[empire_storefront]` outputs nothing and the hero style tag is omitted.

## Hooks it registers

- `wp_head` (priority 20) — prints the `<style id="et-hero-photo">` tag with the `--et-hero-photo` CSS variable when a hero image is set.
- Shortcode `empire_storefront` — storefront photo band with tagline/sub copy (both overridable via shortcode attributes).
- Shortcode `empire_visit` — store-visit block with map embed, address, hours, and action buttons.

## Publishing

`readme.txt` (the WordPress.org listing, exact wp.org format) and `QUICKSTART.md` (the 5-minute setup guide) live alongside this file and are the public-facing docs for the WordPress.org release.
