{"id":1439,"date":"2026-01-16T00:35:10","date_gmt":"2026-01-16T00:35:10","guid":{"rendered":"https:\/\/integralhcprod.wpenginepowered.com\/emplacements\/"},"modified":"2026-07-10T22:41:32","modified_gmt":"2026-07-10T22:41:32","slug":"emplacements","status":"publish","type":"page","link":"https:\/\/integralhockey.com\/fr\/emplacements\/","title":{"rendered":"Emplacements"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1439\" class=\"elementor elementor-1439 elementor-62\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-84de7cc e-con-full e-flex e-con e-parent\" data-id=\"84de7cc\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e6c1626 elementor-widget__width-inherit elementor-widget elementor-widget-html\" data-id=\"e6c1626\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<style id=\"ihs-location-styles-inline\">\/**\n * Integral Hockey Location Search Styles\n * Store\/franchise locator with map and list views\n *\/\n\n\/* =========================================\n   VARIABLES & DESIGN TOKENS\n   ========================================= *\/\n:root {\n    \/* Design System Variables (defined in integral-hockey-search\/includes\/class-design-system-admin.php) *\/\n    \/* These are now managed centrally via: WooCommerce \u2192 Design System *\/\n\n    \/* Fallback local radius variables (use Design System equivalents) *\/\n    --location-radius-sm: 4px;\n    --location-radius-md: var(--ihs-input-radius, 8px);\n    --location-radius-lg: var(--ihs-card-radius, 16px);\n    --location-radius-full: 999px;\n\n    \/* Fallback local shadows (use Design System equivalents) *\/\n    --location-shadow-sm: var(--ihs-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));\n    --location-shadow-md: var(--ihs-shadow-md, 0 2px 4px rgba(0, 0, 0, 0.06));\n    --location-shadow-lg: var(--ihs-shadow-lg, 0 4px 8px rgba(0, 0, 0, 0.08));\n    --location-focus-ring: var(--ihs-focus-ring, 0 0 0 3px rgba(0, 140, 210, 0.10));\n}\n\n.ihs-location-search-wrapper {\n    font-family: var(--ihs-font-family-base);\n    color: var(--ihs-gray-700);\n    line-height: var(--ihs-line-height-normal);\n    background: transparent;\n    padding: 24px;\n    \/* All inner containers must use the same width budget *\/\n    --loc-inner-max: 1400px;\n}\n\n.ihs-location-search-wrapper * {\n    box-sizing: border-box;\n}\n\n\/* ===========================================\n   SEARCH HEADER\n   =========================================== *\/\n.ihs-location-header {\n    background: white;\n    border: var(--ihs-card-border, 1px solid rgba(0, 0, 0, 0.07));\n    border-radius: var(--ihs-card-radius, 16px);\n    padding: 16px 24px;\n    margin-bottom: 16px;\n    position: relative; \/* for sub-region modal positioning \u2014 must NOT be sticky or high z-index so site nav stays on top *\/\n    box-shadow:\n        0 2px 4px rgba(0, 0, 0, 0.04),\n        0 8px 24px rgba(0, 0, 0, 0.06);\n    \/* Match content width so both containers align *\/\n    max-width: var(--loc-inner-max, 1400px);\n    margin-left: auto;\n    margin-right: auto;\n}\n\n.ihs-location-header-top {\n    display: flex;\n    gap: 16px;\n    align-items: center;\n    justify-content: space-between;\n    margin-bottom: 8px;\n}\n\n\/* Region Filters *\/\n.ihs-location-regions {\n    flex: 1;\n    position: relative; \/* anchor for sub-region modal *\/\n}\n\n.ihs-region-buttons {\n    display: flex;\n    gap: 8px;\n    flex-wrap: wrap;\n    justify-content: center;\n}\n\n.ihs-region-btn {\n    padding: var(--ihs-space-xs) var(--ihs-space-md);\n    background: white;\n    border: 1px solid var(--ihs-gray-200);\n    border-radius: var(--location-radius-full);\n    color: var(--ihs-gray-700);\n    font-size: 0.875rem;\n    font-weight: 600;\n    cursor: pointer;\n    transition: all 0.15s ease;\n    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);\n}\n\n.ihs-region-btn:hover {\n    border-color: var(--ihs-primary);\n    color: var(--ihs-primary);\n    box-shadow: 0 2px 8px rgba(0, 140, 210, 0.15);\n}\n\n.ihs-region-btn.active {\n    background: var(--ihs-primary, #008cd2);\n    border-color: var(--ihs-primary, #008cd2);\n    color: #ffffff;\n    box-shadow: 0 2px 8px rgba(0, 140, 210, 0.30), 0 4px 16px rgba(0, 140, 210, 0.15);\n}\n\n\/* Detect Location Button *\/\n.ihs-location-detect {\n    flex-shrink: 0;\n}\n\n.ihs-detect-btn {\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    padding: 10px 18px;\n    background: var(--ihs-primary, var(--ihs-primary, #008CD2));\n    border: none;\n    border-radius: var(--location-radius-full);\n    color: #ffffff;\n    font-size: 0.875rem;\n    font-weight: 600;\n    cursor: pointer;\n    transition: all 0.15s ease;\n    white-space: nowrap;\n    box-shadow: 0 2px 8px rgba(0, 140, 210, 0.30), 0 4px 16px rgba(0, 140, 210, 0.15);\n}\n\n.ihs-detect-btn:hover {\n    background: var(--ihs-primary-hover, #0078b8);\n    box-shadow: 0 4px 12px rgba(0, 140, 210, 0.35), 0 8px 24px rgba(0, 140, 210, 0.18);\n    transform: translateY(-1px);\n}\n\n.ihs-detect-btn.detecting {\n    color: #ffffff;\n    opacity: 0.7;\n    pointer-events: none;\n}\n\n.ihs-detect-btn.detecting svg {\n    animation: spin 1s linear infinite;\n}\n\n.ihs-detect-btn.detected {\n    background: var(--ihs-success, #10b981);\n    color: white;\n}\n\n@keyframes spin {\n    from { transform: rotate(0deg); }\n    to { transform: rotate(360deg); }\n}\n\n\/* Stats Row *\/\n.ihs-location-stats-row {\n    padding-top: 4px;\n}\n\n.ihs-location-stats {\n    font-size: 0.8125rem;\n    color: var(--ihs-gray-600);\n    font-weight: 500;\n    margin-bottom: 8px;\n}\n\n\/* Map Legend *\/\n.ihs-location-legend {\n    display: flex;\n    gap: 16px;\n    align-items: center;\n    justify-content: center;\n    flex-wrap: wrap;\n    padding: 8px 0;\n    border-top: 1px solid rgba(0, 0, 0, 0.06);\n}\n\n.ihs-legend-item {\n    display: flex;\n    align-items: center;\n    gap: 6px;\n    font-size: 0.75rem;\n    font-weight: 500;\n    color: var(--ihs-gray-700);\n    white-space: nowrap;\n}\n\n.ihs-legend-item svg {\n    flex-shrink: 0;\n}\n\n\/* ===========================================\n   MAIN CONTENT: LIST (LEFT) + MAP (RIGHT)\n   =========================================== *\/\n.ihs-location-content {\n    display: flex;\n    max-width: var(--loc-inner-max, 1400px);\n    margin: 0 auto;\n    height: calc(100vh - 200px);\n    min-height: 500px;\n    gap: 0;\n    border-radius: 0 0 0 16px;\n    border: 1px solid rgba(0, 0, 0, 0.07);\n    border-right: none;\n    overflow: hidden;\n    box-shadow:\n        0 2px 4px rgba(0, 0, 0, 0.04),\n        0 8px 24px rgba(0, 0, 0, 0.06),\n        0 24px 56px rgba(0, 0, 0, 0.06);\n}\n\n\/* Location List Sidebar (LEFT) *\/\n.ihs-location-list-container {\n    width: 380px;\n    background: #ffffff;\n    border-right: 1px solid rgba(0, 0, 0, 0.06);\n    overflow-y: auto;\n}\n\n.ihs-location-hits {\n    padding: 16px;\n    background: #ffffff;\n}\n\n\/* Map Container (RIGHT) *\/\n.ihs-location-map-container {\n    flex: 1;\n    position: relative;\n    background: #ffffff;\n    overflow: hidden;\n}\n\n.ihs-location-map {\n    width: 100%;\n    height: 100%;\n    min-height: 400px;\n    background: #ffffff;\n}\n\n\/* ===========================================\n   LOCATION CARDS \u2014 bento tile\n   =========================================== *\/\n.ihs-location-card {\n    background: var(--ihs-white);\n    border: 1px solid var(--ihs-gray-200);\n    border-radius: var(--location-radius-lg);\n    padding: 0;\n    margin-bottom: 10px;\n    cursor: pointer;\n    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;\n    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);\n    width: 100%;\n    box-sizing: border-box;\n    display: flex;\n    flex-direction: row;\n    overflow: hidden;\n}\n\n\/* Left accent stripe \u2014 sits inside the outer border, no overlap *\/\n.ihs-location-card::before {\n    content: '';\n    display: block;\n    width: 3px;\n    flex-shrink: 0;\n    background: transparent;\n    transition: background 0.2s ease;\n    border-radius: var(--location-radius-lg) 0 0 var(--location-radius-lg);\n    margin: 1px 0 1px 1px; \/* inset from outer border *\/\n}\n\n.ihs-location-card:hover {\n    border-color: var(--ihs-gray-300);\n    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 140, 210, 0.10);\n    transform: translateY(-1px);\n}\n\n.ihs-location-card:hover::before,\n.ihs-location-card.highlighted::before {\n    background: var(--ihs-primary);\n}\n\n.ihs-location-card.highlighted {\n    border: 2.5px solid var(--ihs-primary);\n    background: rgba(0, 140, 210, 0.03);\n    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 140, 210, 0.16);\n}\n\n\/* Inner content wrapper (needed because of ::before stripe) *\/\n.ihs-location-card-inner {\n    flex: 1;\n    padding: 14px 16px;\n    display: flex;\n    flex-direction: column;\n    min-width: 0;\n}\n\n.ihs-location-card-header {\n    display: flex;\n    justify-content: space-between;\n    align-items: flex-start;\n    gap: 12px;\n    margin-bottom: 6px;\n}\n\n.ihs-location-name {\n    font-size: 0.9375rem;\n    font-weight: 600;\n    color: var(--ihs-gray-900);\n    margin: 0 0 8px;\n    line-height: 1.3;\n}\n\n.ihs-location-card-body {\n    margin-bottom: 10px;\n}\n\n.ihs-location-address {\n    font-size: 0.8125rem;\n    color: var(--ihs-gray-600);\n    margin: 0 0 4px;\n    line-height: 1.4;\n}\n\n.ihs-location-owner-name {\n    font-size: 0.8125rem;\n    font-weight: 600;\n    color: var(--ihs-gray-800, #1f2937);\n    margin: 0 0 3px;\n}\n\n.ihs-location-phone,\n.ihs-location-email {\n    font-size: 0.8125rem;\n    color: var(--ihs-gray-600);\n    margin: 0 0 3px;\n    line-height: 1.4;\n}\n\n.ihs-location-phone a,\n.ihs-location-email a {\n    color: var(--ihs-primary, var(--ihs-primary, #008CD2));\n    text-decoration: none;\n}\n\n.ihs-location-phone a:hover,\n.ihs-location-email a:hover {\n    text-decoration: underline;\n}\n\n.ihs-location-distance {\n    font-size: 0.75rem;\n    font-weight: 600;\n    color: var(--ihs-primary);\n    margin: 4px 0 0;\n    display: inline-block;\n    background: rgba(0, 140, 210, 0.08);\n    padding: 2px 8px;\n    border-radius: 99px;\n}\n\n.ihs-location-region-badge {\n    display: inline-block;\n    padding: 2px 8px;\n    background: var(--ihs-gray-100);\n    border-radius: var(--location-radius-full);\n    font-size: 0.6875rem;\n    font-weight: 600;\n    letter-spacing: 0.04em;\n    text-transform: uppercase;\n    color: var(--ihs-gray-600);\n}\n\n.ihs-location-card-actions {\n    display: flex;\n    gap: 8px;\n    margin-top: auto;\n}\n\n\/* Primary CTA \u2014 solid blue *\/\n.ihs-location-set-store-btn {\n    flex: 1;\n    padding: 7px 14px;\n    background: var(--ihs-primary, var(--ihs-primary, #008CD2));\n    border: none;\n    border-radius: var(--location-radius-sm);\n    color: #ffffff;\n    font-size: 0.8125rem;\n    font-weight: 600;\n    cursor: pointer;\n    transition: all 0.15s ease;\n    box-shadow: 0 1px 3px rgba(0, 140, 210, 0.20), 0 4px 10px rgba(0, 140, 210, 0.12);\n}\n\n.ihs-location-set-store-btn:hover {\n    background: var(--ihs-primary-hover, #0078b8);\n    box-shadow: 0 2px 8px rgba(0, 140, 210, 0.30), 0 6px 16px rgba(0, 140, 210, 0.15);\n    transform: translateY(-1px);\n}\n\n\/* Secondary CTA \u2014 ghost blue (now an <a> tag) *\/\n.ihs-location-view-btn {\n    flex: 1;\n    padding: 7px 14px;\n    background: transparent;\n    border: 1.5px solid var(--ihs-primary, var(--ihs-primary, #008CD2));\n    border-radius: var(--location-radius-sm);\n    color: var(--ihs-primary, var(--ihs-primary, #008CD2));\n    font-size: 0.8125rem;\n    font-weight: 600;\n    cursor: pointer;\n    transition: all 0.15s ease;\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    text-decoration: none;\n    text-align: center;\n}\n\n.ihs-location-view-btn:hover {\n    background: var(--ihs-primary, var(--ihs-primary, #008CD2));\n    color: #ffffff;\n    box-shadow: 0 2px 8px rgba(0, 140, 210, 0.25);\n    transform: translateY(-1px);\n    text-decoration: none;\n}\n\n\/* ===========================================\n   SUB-REGION OVERLAY MODAL\n   =========================================== *\/\n.ihs-subregion-modal {\n    position: absolute;\n    top: calc(100% + 8px);\n    left: 0;\n    z-index: 500;\n    background: #ffffff;\n    border: 1px solid rgba(0, 0, 0, 0.1);\n    border-radius: 14px;\n    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);\n    width: 260px;\n    max-width: calc(100vw - 32px);\n    animation: ihs-modal-pop 0.18s ease;\n    overflow: hidden;\n}\n\n@keyframes ihs-modal-pop {\n    from { opacity: 0; transform: translateY(-6px) scale(0.97); }\n    to   { opacity: 1; transform: translateY(0) scale(1); }\n}\n\n.ihs-subregion-modal-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    padding: 12px 16px 10px;\n    border-bottom: 1px solid #f1f5f9;\n}\n\n.ihs-subregion-modal-label {\n    font-size: 0.72rem;\n    font-weight: 700;\n    text-transform: uppercase;\n    letter-spacing: 0.08em;\n    color: var(--ihs-primary, #008cd2);\n}\n\n.ihs-subregion-modal-close {\n    background: none;\n    border: none;\n    cursor: pointer;\n    color: #94a3b8;\n    font-size: 1.1rem;\n    line-height: 1;\n    padding: 2px 4px;\n    border-radius: 4px;\n    transition: color 0.1s ease;\n}\n\n.ihs-subregion-modal-close:hover {\n    color: #1e293b;\n}\n\n.ihs-subregion-modal-loading {\n    padding: 16px;\n    font-size: 0.85rem;\n    color: #94a3b8;\n    text-align: center;\n}\n\n.ihs-subregion-modal-list {\n    max-height: 320px;\n    overflow-y: auto;\n    padding: 6px 0;\n}\n\n.ihs-subregion-option {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    width: 100%;\n    padding: 9px 16px;\n    background: none;\n    border: none;\n    font-size: 0.875rem;\n    font-weight: 500;\n    color: #374151;\n    cursor: pointer;\n    text-align: left;\n    transition: background 0.12s ease;\n    gap: 8px;\n}\n\n.ihs-subregion-option:hover {\n    background: #f0f9ff;\n    color: var(--ihs-primary, #008cd2);\n}\n\n.ihs-subregion-option.active {\n    background: rgba(0, 140, 210, 0.08);\n    color: var(--ihs-primary, #008cd2);\n    font-weight: 700;\n}\n\n.ihs-subregion-count {\n    font-size: 0.75rem;\n    font-weight: 600;\n    color: #94a3b8;\n    background: #f1f5f9;\n    padding: 2px 7px;\n    border-radius: 999px;\n    flex-shrink: 0;\n}\n\n\/* ===========================================\n   NO-RESULTS STATE\n   =========================================== *\/\n.ihs-location-no-results {\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    text-align: center;\n    padding: 40px 24px;\n    gap: 10px;\n}\n\n.ihs-location-no-results-icon {\n    color: #cbd5e1;\n    margin-bottom: 4px;\n}\n\n.ihs-location-no-results-title {\n    font-size: 1rem;\n    font-weight: 700;\n    color: var(--ihs-gray-800, #1e293b);\n    margin: 0;\n}\n\n.ihs-location-no-results-sub {\n    font-size: 0.875rem;\n    color: var(--ihs-gray-500, #6b7280);\n    margin: 0;\n    line-height: 1.5;\n}\n\n.ihs-location-franchise-btn {\n    display: inline-flex;\n    align-items: center;\n    margin-top: 8px;\n    padding: 9px 20px;\n    background: var(--ihs-primary, #008cd2);\n    border: none;\n    border-radius: 999px;\n    color: #ffffff;\n    font-size: 0.875rem;\n    font-weight: 600;\n    text-decoration: none;\n    cursor: pointer;\n    transition: background 0.15s ease, transform 0.15s ease;\n    box-shadow: 0 2px 8px rgba(0, 140, 210, 0.25);\n}\n\n.ihs-location-franchise-btn:hover {\n    background: var(--ihs-primary-hover, #0078b8);\n    transform: translateY(-1px);\n    text-decoration: none;\n    color: #ffffff;\n}\n\n\/* ===========================================\n   LOCATION DETAIL PANEL\n   ========================================= *\/\n.ihs-location-detail-overlay {\n    position: fixed;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    background: rgba(0, 0, 0, 0.75);\n    z-index: 999;\n    opacity: 0;\n    visibility: hidden;\n    transition: visibility 0.3s ease;\n}\n\n.ihs-location-detail-overlay.visible {\n    opacity: 1;\n    visibility: visible;\n}\n\n.ihs-location-detail-panel {\n    position: fixed;\n    top: 0;\n    right: 0;\n    width: 500px;\n    max-width: 100%;\n    height: 100vh;\n    background: #ffffff;\n    box-shadow: var(--location-shadow-lg);\n    z-index: 1000;\n    transform: translateX(100%);\n    transition: transform 0.3s ease;\n    overflow-y: auto;\n}\n\n.ihs-location-detail-panel.open {\n    transform: translateX(0);\n}\n\n.ihs-location-detail-close {\n    position: absolute;\n    top: 16px;\n    right: 16px;\n    width: 40px;\n    height: 40px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    background: var(--ihs-gray-50);\n    border: none;\n    border-radius: 50%;\n    cursor: pointer;\n    color: var(--ihs-gray-700);\n    transition: all 0.2s ease;\n}\n\n.ihs-location-detail-close:hover {\n    background: var(--ihs-gray-200);\n}\n\n.ihs-location-detail-content {\n    padding: 24px;\n    padding-top: 60px;\n    background: #ffffff;\n    min-height: 100vh;\n}\n\n.ihs-detail-header {\n    margin-bottom: 24px;\n}\n\n.ihs-detail-header h2 {\n    font-size: 1.5rem;\n    font-weight: 700;\n    color: var(--ihs-gray-900);\n    margin: 0 0 8px;\n}\n\n.ihs-detail-region-badge {\n    display: inline-block;\n    padding: 4px 12px;\n    background: var(--ihs-primary);\n    border-radius: var(--location-radius-full);\n    font-size: 0.8125rem;\n    font-weight: 500;\n    color: var(--ihs-white);\n}\n\n.ihs-detail-body {\n    margin-bottom: 32px;\n}\n\n.ihs-detail-body p {\n    display: flex;\n    align-items: flex-start;\n    gap: 8px;\n    margin: 0 0 12px;\n    font-size: 0.9375rem;\n    color: var(--ihs-gray-700);\n}\n\n.ihs-detail-body p svg {\n    flex-shrink: 0;\n    margin-top: 2px;\n    color: var(--ihs-gray-600);\n}\n\n.ihs-detail-distance {\n    color: var(--ihs-primary);\n    font-weight: 500;\n}\n\n.ihs-detail-contacts {\n    margin-top: 12px;\n}\n\n.ihs-detail-contacts a {\n    outline: none;\n}\n\n.ihs-detail-contacts a:focus {\n    outline: none;\n}\n\n.ihs-detail-actions {\n    display: flex;\n    flex-direction: column;\n    gap: 12px;\n}\n\n.ihs-detail-btn {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 8px;\n    padding: 14px 24px;\n    border-radius: var(--ihs-radius);\n    font-size: 1rem;\n    font-weight: 600;\n    text-decoration: none;\n    cursor: pointer;\n    transition: all 0.2s ease;\n}\n\n.ihs-detail-btn-primary {\n    background: var(--ihs-primary);\n    border: none;\n    color: var(--ihs-white);\n}\n\n.ihs-detail-btn-primary:hover {\n    background: var(--ihs-primary-hover);\n}\n\n.ihs-detail-btn-primary.saved {\n    background: var(--ihs-success);\n}\n\n.ihs-detail-btn-secondary {\n    background: var(--ihs-white);\n    border: 1px solid var(--ihs-primary);\n    color: var(--ihs-primary);\n}\n\n.ihs-detail-btn-secondary:hover {\n    background: rgba(0, 140, 210, 0.04);\n    border-color: var(--ihs-primary-hover);\n    color: var(--ihs-primary-hover);\n}\n\n.ihs-detail-btn-tertiary {\n    background: var(--ihs-white);\n    border: 1px solid var(--ihs-primary);\n    color: var(--ihs-primary);\n}\n\n.ihs-detail-btn-tertiary:hover {\n    background: rgba(0, 140, 210, 0.04);\n    border-color: var(--ihs-primary-hover);\n    color: var(--ihs-primary-hover);\n}\n\n\/* ===========================================\n   MAP INFO WINDOW\n   ========================================= *\/\n.ihs-map-info-window {\n    padding: 8px;\n    max-width: 250px;\n}\n\n.ihs-map-info-window h4 {\n    font-size: 1rem;\n    font-weight: 600;\n    color: var(--ihs-gray-900);\n    margin: 0 0 4px;\n}\n\n.ihs-map-info-window p {\n    font-size: 0.8125rem;\n    color: var(--ihs-gray-600);\n    margin: 0 0 8px;\n    line-height: 1.4;\n}\n\n.ihs-map-distance {\n    color: var(--ihs-primary);\n    font-weight: 500;\n}\n\n.ihs-map-info-actions {\n    margin-top: 12px;\n}\n\n.ihs-map-info-btn {\n    display: inline-block;\n    padding: 6px 12px;\n    background: var(--ihs-primary, #008cd2);\n    border: none;\n    border-radius: var(--location-radius-sm, 6px);\n    color: #ffffff;\n    font-size: 0.8125rem;\n    font-weight: 500;\n    cursor: pointer;\n    text-decoration: none;\n}\n\n.ihs-map-info-btn:hover {\n    background: var(--ihs-primary-hover, #0078b8);\n    color: #ffffff;\n    text-decoration: none;\n}\n\n\/* ===========================================\n   RESPONSIVE STYLES\n   ========================================= *\/\n@media (max-width: 1024px) {\n    .ihs-location-header-top {\n        flex-direction: column;\n        align-items: flex-start;\n        gap: 12px;\n    }\n\n    .ihs-location-header-right {\n        width: 100%;\n        flex: 1;\n    }\n\n    .ihs-location-searchbox-wrapper {\n        max-width: 100%;\n        flex: 1;\n        min-width: auto;\n    }\n\n    .ihs-detect-btn {\n        width: 100%;\n        justify-content: center;\n    }\n\n    .ihs-location-content {\n        flex-direction: column;\n        height: auto;\n    }\n\n    .ihs-location-map-container {\n        height: 400px;\n    }\n\n    .ihs-location-list-container {\n        width: 100%;\n        border-right: none;\n        border-top: 1px solid rgba(0, 0, 0, 0.06);\n        max-height: 500px;\n    }\n}\n\n@media (max-width: 768px) {\n    .ihs-location-header {\n        padding: 16px;\n    }\n\n    .ihs-location-header-top {\n        flex-direction: column;\n        gap: 12px;\n    }\n\n    .ihs-location-regions {\n        width: 100%;\n    }\n\n    .ihs-region-buttons {\n        justify-content: center;\n    }\n\n    .ihs-location-header-right {\n        width: 100%;\n        flex-direction: column;\n    }\n\n    .ihs-location-searchbox-wrapper {\n        width: 100%;\n        max-width: 100%;\n        min-width: auto;\n    }\n\n    .ihs-detect-btn {\n        width: 100%;\n        justify-content: center;\n    }\n\n    .ihs-location-map-container {\n        height: 300px;\n    }\n\n    .ihs-location-detail-panel {\n        width: 100%;\n    }\n}\n\n@media (max-width: 480px) {\n    .ihs-region-btn {\n        flex: 1;\n        min-width: calc(50% - 4px);\n        text-align: center;\n    }\n\n    .ihs-location-card {\n        padding: 12px;\n    }\n\n    .ihs-location-name {\n        font-size: 0.9375rem;\n    }\n}\n\n\/* ===========================================\n   ALGOLIA OVERRIDES\n   ========================================= *\/\n.ihs-location-search-wrapper .ais-SearchBox-loadingIndicator {\n    display: none;\n}\n\n.ihs-location-search-wrapper .ais-Hits-list {\n    list-style: none;\n    margin: 0;\n    padding: 0;\n}\n\n.ihs-location-search-wrapper .ais-Hits-item {\n    margin: 0;\n    padding: 0;\n}\n\n.ihs-location-search-wrapper .ais-Stats {\n    margin: 0;\n}\n<\/style>\n<div class=\"ihs-location-search-wrapper\">\n\n    <!-- Header: Region Filters (centred) -->\n    <div class=\"ihs-location-header\">\n        <div class=\"ihs-location-header-top\">\n\n            <!-- Region Filter Buttons -->\n            <div class=\"ihs-location-regions\">\n                <div class=\"ihs-region-buttons\" id=\"ihs-region-buttons\">\n                    <button type=\"button\" class=\"ihs-region-btn active\" data-region=\"\">\n                        Toutes les r\u00e9gions                    <\/button>\n                    <button type=\"button\" class=\"ihs-region-btn\" data-region=\"Canada\">\n                        Canada                    <\/button>\n                    <button type=\"button\" class=\"ihs-region-btn\" data-region=\"United States\">\n                        \u00c9tats-Unis                    <\/button>\n                    <button type=\"button\" class=\"ihs-region-btn\" data-region=\"Europe\">\n                        Europe                    <\/button>\n                <\/div>\n\n                <!-- Sub-region modal is injected by JS -->\n            <\/div>\n\n            <!-- Use My Location button -->\n            <div class=\"ihs-location-detect\">\n                <button type=\"button\" class=\"ihs-detect-btn\" id=\"ihs-detect-btn\">\n                    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n                        <circle cx=\"12\" cy=\"12\" r=\"10\"><\/circle>\n                        <circle cx=\"12\" cy=\"12\" r=\"3\"><\/circle>\n                        <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"6\"><\/line>\n                        <line x1=\"12\" y1=\"18\" x2=\"12\" y2=\"22\"><\/line>\n                        <line x1=\"2\" y1=\"12\" x2=\"6\" y2=\"12\"><\/line>\n                        <line x1=\"18\" y1=\"12\" x2=\"22\" y2=\"12\"><\/line>\n                    <\/svg>\n                    <span>Utiliser ma position<\/span>\n                <\/button>\n            <\/div>\n        <\/div>\n\n        <!-- Stats Row -->\n        <div class=\"ihs-location-stats-row\">\n            <div id=\"location-stats\" class=\"ihs-location-stats\"><\/div>\n\n            <!-- Map Legend -->\n            <div class=\"ihs-location-legend\">\n                <span class=\"ihs-legend-item\">\n                    <svg width=\"10\" height=\"15\" viewBox=\"0 0 24 36\" style=\"flex-shrink:0;\"><path d=\"M12 0C6.48 0 2 4.48 2 10c0 7.2 10 22 10 22s10-14.8 10-22c0-5.52-4.48-10-10-10z\" fill=\"#1d4ed8\"\/><\/svg>\n                    Si\u00e8ge social                <\/span>\n                <span class=\"ihs-legend-item\">\n                    <svg width=\"9\" height=\"14\" viewBox=\"0 0 24 36\" style=\"flex-shrink:0;\"><path d=\"M12 0C6.48 0 2 4.48 2 10c0 7.2 10 22 10 22s10-14.8 10-22c0-5.52-4.48-10-10-10z\" fill=\"#dc2626\"\/><\/svg>\n                    Ventes                <\/span>\n                <span class=\"ihs-legend-item\">\n                    <svg width=\"8\" height=\"13\" viewBox=\"0 0 24 36\" style=\"flex-shrink:0;\"><path d=\"M12 0C6.48 0 2 4.48 2 10c0 7.2 10 22 10 22s10-14.8 10-22c0-5.52-4.48-10-10-10z\" fill=\"#16a34a\"\/><\/svg>\n                    Point de d\u00e9p\u00f4t                <\/span>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Main Content: List (left) + Map (right) -->\n    <div class=\"ihs-location-content\">\n        <!-- Location List Sidebar (LEFT) -->\n        <div class=\"ihs-location-list-container\">\n            <div id=\"location-hits\" class=\"ihs-location-hits\"><\/div>\n        <\/div>\n\n        <!-- Map Container (RIGHT) -->\n        <div class=\"ihs-location-map-container\" id=\"location-map-container\">\n            <div id=\"location-map\" class=\"ihs-location-map\"><\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Location Detail Overlay (for click-outside-to-close) -->\n    <div class=\"ihs-location-detail-overlay\" id=\"ihs-location-detail-overlay\"><\/div>\n\n    <!-- Location Detail Panel (slide-in when location clicked) -->\n    <div class=\"ihs-location-detail-panel\" id=\"ihs-location-detail\">\n        <button type=\"button\" class=\"ihs-location-detail-close\" id=\"ihs-location-detail-close\" aria-label=\"Close details\">\n            <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n                <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"><\/line>\n                <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"><\/line>\n            <\/svg>\n        <\/button>\n        <div class=\"ihs-location-detail-content\" id=\"ihs-location-detail-content\">\n            <!-- Dynamic content inserted by JS -->\n        <\/div>\n    <\/div>\n\n<\/div>\n<script id=\"ihs-location-js-inline\" type=\"text\/javascript\">\/**\n * Integral Hockey Location Search\n * Algolia-powered store\/franchise locator with map and list views\n *\/\ndocument.addEventListener('DOMContentLoaded', function() {\n    \/\/ ===========================================\n    \/\/ CONFIGURATION CHECK\n    \/\/ ===========================================\n    if (typeof ihsLocationConfig === 'undefined') {\n        console.error('IHS Location: Configuration not found');\n        return;\n    }\n\n    \/\/ ===========================================\n    \/\/ STATE\n    \/\/ ===========================================\n    var userLocation = null;\n    var selectedRegion = '';\n    var map = null;\n    var markers = [];\n    var infoWindows = [];\n    var currentHits = [];\n    var activeMarker = null;\n\n    \/\/ ===========================================\n    \/\/ COOKIE HELPERS\n    \/\/ ===========================================\n    function getCookie(name) {\n        var nameEQ = name + \"=\";\n        var ca = document.cookie.split(';');\n        for (var i = 0; i < ca.length; i++) {\n            var c = ca[i];\n            while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n            if (c.indexOf(nameEQ) === 0) {\n                try {\n                    return JSON.parse(decodeURIComponent(c.substring(nameEQ.length, c.length)));\n                } catch (e) {\n                    return null;\n                }\n            }\n        }\n        return null;\n    }\n\n    function setCookie(name, value, days) {\n        var expires = '';\n        if (days) {\n            var date = new Date();\n            date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n            expires = '; expires=' + date.toUTCString();\n        }\n        document.cookie = name + '=' + encodeURIComponent(JSON.stringify(value)) + expires + '; path=\/; SameSite=Lax';\n    }\n\n    \/\/ ===========================================\n    \/\/ STORE URL HELPER\n    \/\/ ===========================================\n    \/\/ Algolia records hold a bare path (e.g. \/store\/slug\/). Join it onto the\n    \/\/ language-aware home URL from PHP so WPML prefixes (\/fr\/) are preserved.\n    \/\/ Older records may still hold an absolute URL from another environment \u2014\n    \/\/ reduce those to their path first.\n    function buildStoreUrl(rawUrl) {\n        if (!rawUrl) return '';\n        var path = rawUrl;\n        if (\/^https?:\\\/\\\/\/i.test(rawUrl)) {\n            try {\n                path = new URL(rawUrl).pathname;\n            } catch (e) {}\n        }\n        var base = (ihsLocationConfig.homeUrl || '\/').replace(\/\\\/+$\/, '');\n        if (path.charAt(0) !== '\/') path = '\/' + path;\n        return base + path;\n    }\n\n    \/\/ ===========================================\n    \/\/ DISTANCE CALCULATION\n    \/\/ ===========================================\n    function calculateDistance(lat1, lng1, lat2, lng2) {\n        var R = 6371; \/\/ Earth's radius in km\n        var dLat = (lat2 - lat1) * Math.PI \/ 180;\n        var dLng = (lng2 - lng1) * Math.PI \/ 180;\n        var a = Math.sin(dLat \/ 2) * Math.sin(dLat \/ 2) +\n                Math.cos(lat1 * Math.PI \/ 180) * Math.cos(lat2 * Math.PI \/ 180) *\n                Math.sin(dLng \/ 2) * Math.sin(dLng \/ 2);\n        var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n        return R * c;\n    }\n\n    function formatDistance(km) {\n        if (km < 1) {\n            return Math.round(km * 1000) + ' m';\n        } else if (km < 10) {\n            return km.toFixed(1) + ' km';\n        } else {\n            return Math.round(km) + ' km';\n        }\n    }\n\n    \/\/ ===========================================\n    \/\/ GEOLOCATION\n    \/\/ ===========================================\n    function detectUserLocation(callback) {\n        \/\/ First check Cloudflare headers\n        if (ihsLocationConfig.cfGeo && ihsLocationConfig.cfGeo.lat) {\n            userLocation = {\n                lat: ihsLocationConfig.cfGeo.lat,\n                lng: ihsLocationConfig.cfGeo.lng\n            };\n            if (callback) callback(userLocation);\n            return;\n        }\n\n        \/\/ Use browser geolocation\n        if (navigator.geolocation) {\n            var detectBtn = document.getElementById('ihs-detect-btn');\n            if (detectBtn) {\n                detectBtn.classList.add('detecting');\n                detectBtn.querySelector('span').textContent = 'Detecting...';\n            }\n\n            navigator.geolocation.getCurrentPosition(\n                function(position) {\n                    userLocation = {\n                        lat: position.coords.latitude,\n                        lng: position.coords.longitude\n                    };\n                    if (detectBtn) {\n                        detectBtn.classList.remove('detecting');\n                        detectBtn.classList.add('detected');\n                        detectBtn.querySelector('span').textContent = 'Location Found';\n                    }\n                    if (callback) callback(userLocation);\n                },\n                function(error) {\n                    console.warn('Geolocation error:', error.message);\n                    if (detectBtn) {\n                        detectBtn.classList.remove('detecting');\n                        detectBtn.querySelector('span').textContent = 'Use My Location';\n                    }\n                    if (callback) callback(null);\n                },\n                {\n                    enableHighAccuracy: false,\n                    timeout: 10000,\n                    maximumAge: 300000\n                }\n            );\n        } else {\n            if (callback) callback(null);\n        }\n    }\n\n    \/\/ ===========================================\n    \/\/ ALGOLIA INSTANTSEARCH SETUP\n    \/\/ ===========================================\n    \/\/ ===========================================\n    \/\/ SUB-REGION STATE\n    \/\/ ===========================================\n    var selectedSubRegion = ''; \/\/ the exact value stored in Algolia (state or country field)\n    var subRegionField    = 'state'; \/\/ which field to filter on ('state' or 'country')\n    var subRegionModal    = null;    \/\/ reference to open modal element\n\n    \/\/ ===========================================\n    \/\/ ALGOLIA SETUP\n    \/\/ ===========================================\n    var searchClient = algoliasearch(ihsLocationConfig.algolia.appId, ihsLocationConfig.algolia.searchKey);\n\n    var search = instantsearch({\n        indexName: ihsLocationConfig.algolia.indexName,\n        searchClient: searchClient\n    });\n\n    \/\/ ===========================================\n    \/\/ CONFIGURE WIDGET\n    \/\/ ===========================================\n    function buildFilters() {\n        var parts = [];\n        \/\/ Exclude hidden stores using facetFilter instead of regular filter\n        \/\/ This is more reliable for boolean\/status fields\n\n        if (selectedRegion) {\n            parts.push('region:\"' + selectedRegion + '\"');\n        }\n        if (selectedSubRegion && subRegionField) {\n            parts.push(subRegionField + ':\"' + selectedSubRegion + '\"');\n        }\n\n        var filterString = parts.length > 0 ? parts.join(' AND ') : '';\n        return filterString;\n    }\n\n    function getConfigureOptions() {\n        var options = {\n            hitsPerPage: 1000,\n            getRankingInfo: true\n        };\n\n        if (userLocation) {\n            options.aroundLatLng = userLocation.lat + ', ' + userLocation.lng;\n            options.aroundRadius = 'all';\n        }\n\n        var filters = buildFilters();\n        if (filters) {\n            options.filters = filters;\n        }\n\n        \/\/ Filter to only show active (non-hidden) stores using internal IHS field\n        options.filters = (options.filters ? options.filters + ' AND ' : '') + '_ihs_visibility:active';\n\n        console.log('IHS Location Search Filters:', options.filters);\n\n        return options;\n    }\n\n    var configureWidget = instantsearch.widgets.configure(getConfigureOptions());\n    search.addWidgets([configureWidget]);\n\n    \/\/ ===========================================\n    \/\/ VIEWPORT FILTER STATE\n    \/\/ ===========================================\n    var viewportFilterActive = false;\n    var userHasInteractedWithMap = false;\n\n    \/\/ Stats\n    search.addWidgets([\n        instantsearch.widgets.stats({\n            container: '#location-stats',\n            templates: {\n                text: function(data) {\n                    var regionText = selectedRegion ? ' in ' + selectedRegion : '';\n                    return data.nbHits + ' ' + (data.nbHits === 1 ? 'location' : 'locations') + ' found' + regionText;\n                }\n            }\n        })\n    ]);\n\n    \/\/ Hits (location cards)\n    search.addWidgets([\n        instantsearch.widgets.hits({\n            container: '#location-hits',\n            transformItems: function(items) {\n                \/\/ Add distance only when user has shared their location\n                items.forEach(function(item) {\n                    if (userLocation && item._geoloc && item._geoloc.lat && item._geoloc.lng) {\n                        item._distance = calculateDistance(\n                            userLocation.lat,\n                            userLocation.lng,\n                            item._geoloc.lat,\n                            item._geoloc.lng\n                        );\n                    }\n                    \/\/ Normalise address field \u2014 Algolia record uses store_address\n                    if (!item.address && item.store_address) {\n                        item.address = item.store_address;\n                    }\n                });\n\n                \/\/ Sort by distance if available\n                if (userLocation) {\n                    items.sort(function(a, b) {\n                        if (a._distance === undefined) return 1;\n                        if (b._distance === undefined) return -1;\n                        return a._distance - b._distance;\n                    });\n                }\n\n                currentHits = items;\n\n                \/\/ Update map markers after hits are ready\n                setTimeout(function() {\n                    updateMapMarkers(items);\n                }, 100);\n\n                return items;\n            },\n            templates: {\n                item: function(hit) {\n                    var addr = hit.store_address || hit.address || '';\n                    var storeUrl = buildStoreUrl(hit.store_url);\n                    var lat = hit._geoloc ? hit._geoloc.lat : 0;\n                    var lng = hit._geoloc ? hit._geoloc.lng : 0;\n\n                    var contactsHtml = window.ihsRenderContacts({\n                        ownerName:    hit.owner_name    || '',\n                        phone:        hit.store_phone   || '',\n                        email:        hit.store_email   || '',\n                        contact2Name: hit.contact2_name  || '',\n                        contact2Phone:hit.contact2_phone || '',\n                    });\n                    var addrHtml  = addr ? '<p class=\"ihs-location-address\">' + escapeHtml(addr) + '<\/p>' : '';\n                    var distHtml  = (hit._distance !== undefined && userLocation)\n                        ? '<p class=\"ihs-location-distance\">' + formatDistance(hit._distance) + ' away<\/p>'\n                        : '';\n\n                    return '<div class=\"ihs-location-card\" data-vendor-id=\"' + hit.vendor_id + '\" data-lat=\"' + lat + '\" data-lng=\"' + lng + '\">' +\n                        '<div class=\"ihs-location-card-inner\">' +\n                            '<h3 class=\"ihs-location-name\">Integral Hockey ' + escapeHtml(hit.store_name) + '<\/h3>' +\n                            '<div class=\"ihs-location-card-body\">' +\n                                contactsHtml +\n                                addrHtml +\n                                distHtml +\n                            '<\/div>' +\n                            '<div class=\"ihs-location-card-actions\">' +\n                                (storeUrl ? '<a href=\"' + escapeHtml(storeUrl) + '\" class=\"ihs-location-view-btn\">View Store &rarr;<\/a>' : '') +\n                                '<button type=\"button\" class=\"ihs-location-set-store-btn\" onclick=\"ihsSetStoreFromCard(' + hit.vendor_id + ', \\'' + escapeHtml(hit.store_name) + '\\', \\'' + escapeHtml(addr) + '\\', ' + lat + ', ' + lng + ')\">Set as My Store<\/button>' +\n                            '<\/div>' +\n                        '<\/div>' +\n                    '<\/div>';\n                },\n                empty: function(results) {\n                    return '<div class=\"ihs-location-no-results\">' +\n                        '<div class=\"ihs-location-no-results-icon\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"40\" height=\"40\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z\"><\/path><circle cx=\"12\" cy=\"10\" r=\"3\"><\/circle><\/svg><\/div>' +\n                        '<p class=\"ihs-location-no-results-title\">No locations found<\/p>' +\n                        '<p class=\"ihs-location-no-results-sub\">No Integral Hockey locations in this area yet.<\/p>' +\n                        '<a href=\"\/franchise-inquiry\/\" class=\"ihs-location-franchise-btn\">Inquire About a Franchise<\/a>' +\n                    '<\/div>';\n                }\n            }\n        })\n    ]);\n\n    \/\/ Start the search\n    search.start();\n\n    \/\/ ===========================================\n    \/\/ MAP FUNCTIONALITY\n    \/\/ ===========================================\n    function initializeMap() {\n        if (map) return;\n\n        var center = userLocation\n            ? { lat: userLocation.lat, lng: userLocation.lng }\n            : { lat: ihsLocationConfig.defaultLocation.lat, lng: ihsLocationConfig.defaultLocation.lng };\n\n        var mapElement = document.getElementById('location-map');\n        if (!mapElement) return;\n\n        \/\/ Check if Google Maps is available\n        if (typeof google === 'undefined' || typeof google.maps === 'undefined') {\n            mapElement.innerHTML = '<div style=\"display:flex;align-items:center;justify-content:center;height:100%;background:#f5f5f5;color:#666;text-align:center;padding:20px;\"><div><p><strong>Map unavailable<\/strong><\/p><p>Google Maps could not be loaded. Please check the API key configuration.<\/p><\/div><\/div>';\n            console.error('IHS Location: Google Maps API not loaded');\n            return;\n        }\n\n        try {\n            map = new google.maps.Map(mapElement, {\n                center: center,\n                zoom: userLocation ? 8 : 3,\n                styles: [\n                    {\n                        featureType: \"poi\",\n                        elementType: \"labels\",\n                        stylers: [{ visibility: \"off\" }]\n                    }\n                ],\n                mapTypeControl: false,\n                streetViewControl: false,\n                fullscreenControl: true,\n                gestureHandling: 'greedy'\n            });\n\n            \/\/ Don't filter cards by viewport on initial load\n            \/\/ Wait 3 seconds, then enable viewport filtering\n            setTimeout(function() {\n                userHasInteractedWithMap = true;\n            }, 3000);\n\n            \/\/ Filter cards by viewport only after initial load period\n            map.addListener('idle', function() {\n                if (userHasInteractedWithMap) {\n                    filterCardsByViewport();\n                }\n            });\n\n            \/\/ Add user location marker if available\n            if (userLocation) {\n                new google.maps.Marker({\n                    position: { lat: userLocation.lat, lng: userLocation.lng },\n                    map: map,\n                    icon: {\n                        path: google.maps.SymbolPath.CIRCLE,\n                        scale: 8,\n                        fillColor: \"#4285f4\",\n                        fillOpacity: 1,\n                        strokeColor: \"white\",\n                        strokeWeight: 2\n                    },\n                    title: \"Your Location\",\n                    zIndex: 1000\n                });\n            }\n            \/\/ Legend moved to header - no longer injected here\n        } catch (error) {\n            console.error('IHS Location: Error initializing map:', error);\n            mapElement.innerHTML = '<div style=\"display:flex;align-items:center;justify-content:center;height:100%;background:#f5f5f5;color:#666;text-align:center;padding:20px;\"><div><p><strong>Map error<\/strong><\/p><p>There was an error loading the map. Please check the browser console for details.<\/p><\/div><\/div>';\n        }\n    }\n\n    function filterCardsByViewport() {\n        \/\/ Viewport filtering is disabled - cards should always be visible\n        \/\/ Users can scroll through the full list and see markers on the map\n        return;\n    }\n\n    function updateMapMarkers(hits) {\n        if (!map) {\n            initializeMap();\n        }\n\n        if (!map) return;\n\n        \/\/ Clear existing markers\n        markers.forEach(function(marker) {\n            marker.setMap(null);\n        });\n        markers = [];\n        infoWindows = [];\n\n        var bounds = new google.maps.LatLngBounds();\n        var hasMarkers = false;\n\n        \/\/ Add user location to bounds if available\n        if (userLocation) {\n            bounds.extend(new google.maps.LatLng(userLocation.lat, userLocation.lng));\n            hasMarkers = true;\n        }\n\n        \/\/ Pin icon with hole in center \u2014 standard location marker with circular cutout\n        var PIN_PATH = 'M12 2C6.48 2 2 6.48 2 12c0 7.2 10 22 10 22s10-14.8 10-22c0-5.52-4.48-10-10-10zm0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z';\n\n        function makeLocCard(label, labelColor, title, ownerName, phone, email, address, distanceHtml, storeUrl, contact2Name, contact2Phone, vendorId, storeName, lat, lng) {\n            var contactsHtml = window.ihsRenderContacts({\n                ownerName:    ownerName    || '',\n                phone:        phone        || '',\n                email:        email        || '',\n                contact2Name: contact2Name  || '',\n                contact2Phone:contact2Phone || '',\n            });\n            var addrHtml  = address ? '<div style=\"font-size:12px;color:#6b7280;line-height:1.4;margin-bottom:' + (distanceHtml ? '3' : '0') + 'px;\">' + escapeHtml(address) + '<\/div>' : '';\n            var labelHtml = label ? '<div style=\"font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:' + labelColor + ';margin-bottom:5px;\">' + label + '<\/div>' : '';\n            var setStoreBtn = (vendorId !== undefined && vendorId !== null && vendorId !== '')\n                ? '<button type=\"button\" class=\"ihs-location-set-store-btn\" style=\"display:inline-block;margin-top:10px;margin-left:8px;\" onclick=\"ihsSetStoreFromCard(' + vendorId + ', \\'' + escapeHtml(storeName || '') + '\\', \\'' + escapeHtml(address || '') + '\\', ' + (lat || 0) + ', ' + (lng || 0) + ')\">Set as My Store<\/button>'\n                : '';\n\n            return '<div style=\"padding:10px 14px 12px;min-width:220px;max-width:280px;font-family:-apple-system,BlinkMacSystemFont,\\'Segoe UI\\',sans-serif;\">' +\n                labelHtml +\n                '<div style=\"font-size:15px;font-weight:700;color:#111827;line-height:1.3;margin-bottom:6px;\">' + escapeHtml(title) + '<\/div>' +\n                contactsHtml +\n                addrHtml +\n                (distanceHtml ? '<div style=\"font-size:12px;color:#6b7280;\">' + distanceHtml + '<\/div>' : '') +\n                (storeUrl ? '<a href=\"' + escapeHtml(storeUrl) + '\" style=\"display:inline-block;margin-top:10px;padding:6px 14px;background:#008CD2;color:#fff;font-size:12px;font-weight:600;text-decoration:none;border-radius:4px;\">View Store \u2192<\/a>' : '') +\n                setStoreBtn +\n                '<\/div>';\n        }\n\n        hits.forEach(function(hit) {\n            if (!hit._geoloc || !hit._geoloc.lat || !hit._geoloc.lng) return;\n\n            var position = { lat: hit._geoloc.lat, lng: hit._geoloc.lng };\n            bounds.extend(position);\n            hasMarkers = true;\n\n            var isHq = (hit.store_name && hit.store_name.toLowerCase() === 'hq');\n            var pinColor    = isHq ? '#1d4ed8' : '#dc2626';\n            var pinStroke   = isHq ? '#1e3a8a' : '#991b1b';\n            var pinLabel    = isHq ? 'Headquarters' : '';  \/\/ No label for regular stores\n            var pinLabelClr = isHq ? '#1d4ed8' : '#dc2626';\n            var pinScale    = isHq ? 1.3 : 1.2;\n            var pinZIndex   = isHq ? 20 : 10;\n\n            var marker = new google.maps.Marker({\n                position: position,\n                map: map,\n                title: hit.store_name,\n                zIndex: pinZIndex,\n                icon: {\n                    path: PIN_PATH,\n                    fillColor: pinColor,\n                    fillOpacity: 1,\n                    strokeColor: pinStroke,\n                    strokeWeight: 1,\n                    scale: pinScale,\n                    anchor: new google.maps.Point(12, 24)\n                }\n            });\n\n            var distanceHtml = hit._distance !== undefined ? formatDistance(hit._distance) + ' away' : '';\n            var infoWindow = new google.maps.InfoWindow({\n                content: makeLocCard(\n                    pinLabel, pinLabelClr,\n                    'Integral Hockey ' + hit.store_name,\n                    hit.owner_name || '',\n                    hit.store_phone || '',\n                    hit.store_email || '',\n                    hit.store_address || hit.address || '',\n                    distanceHtml,\n                    buildStoreUrl(hit.store_url || '\/locations\/'),\n                    hit.contact2_name || '',\n                    hit.contact2_phone || '',\n                    hit.vendor_id,\n                    hit.store_name || '',\n                    position.lat,\n                    position.lng\n                )\n            });\n\n            marker.addListener('click', function() {\n                infoWindows.forEach(function(iw) { iw.close(); });\n                infoWindow.open(map, marker);\n                activeMarker = marker;\n                highlightLocationCard(hit.vendor_id);\n            });\n\n            markers.push(marker);\n            infoWindows.push(infoWindow);\n            marker._vendorId = hit.vendor_id;\n            marker._hit = hit;\n\n            \/\/ Drop-off pins \u2014 green teardrop, slightly smaller\n            var dropOffs = Array.isArray(hit.drop_off_locations) ? hit.drop_off_locations : [];\n            dropOffs.forEach(function(d) {\n                if (!d.lat || !d.lng) return;\n\n                bounds.extend({ lat: d.lat, lng: d.lng });\n\n                var dropMarker = new google.maps.Marker({\n                    position: { lat: d.lat, lng: d.lng },\n                    map: map,\n                    title: d.name,\n                    zIndex: 9,\n                    icon: {\n                        path: PIN_PATH,\n                        fillColor: '#16a34a',\n                        fillOpacity: 1,\n                        strokeColor: '#166534',\n                        strokeWeight: 1,\n                        scale: 1.1,\n                        anchor: new google.maps.Point(12, 24)\n                    }\n                });\n\n                var dropWindow = new google.maps.InfoWindow({\n                    content: makeLocCard(\n                        'Drop-off Location', '#16a34a',\n                        d.name,\n                        '',\n                        d.phone || '',\n                        '',\n                        d.address || '',\n                        '',\n                        buildStoreUrl(hit.store_url || '\/locations\/')\n                    )\n                });\n\n                dropMarker.addListener('click', function() {\n                    infoWindows.forEach(function(iw) { iw.close(); });\n                    dropWindow.open(map, dropMarker);\n                    activeMarker = dropMarker;\n                    highlightLocationCard(hit.vendor_id);\n                });\n\n                markers.push(dropMarker);\n                infoWindows.push(dropWindow);\n            });\n        });\n\n        \/\/ \u2500\u2500 HQ marker \u2014 hardcoded from admin-configured HQ info, NOT a real vendor.\n        \/\/ Read-only: no \"Set as My Store\" \/ \"View Store\" actions, since HQ isn't a\n        \/\/ selectable or viewable location. Rendered from window.ihsHqConfig\n        \/\/ (IHS_Public_Forms::get_hq_info) rather than any Algolia record.\n        if (typeof window.ihsHqConfig !== 'undefined' && window.ihsHqConfig &&\n            typeof window.ihsHqConfig.lat === 'number' && typeof window.ihsHqConfig.lng === 'number') {\n            var hq = window.ihsHqConfig;\n            var hqPosition = { lat: hq.lat, lng: hq.lng };\n            bounds.extend(hqPosition);\n            hasMarkers = true;\n\n            var hqMarker = new google.maps.Marker({\n                position: hqPosition,\n                map: map,\n                title: hq.name || 'Headquarters',\n                zIndex: 20,\n                icon: {\n                    path: PIN_PATH,\n                    fillColor: '#1d4ed8',\n                    fillOpacity: 1,\n                    strokeColor: '#1e3a8a',\n                    strokeWeight: 1,\n                    scale: 1.3,\n                    anchor: new google.maps.Point(12, 24)\n                }\n            });\n\n            var hqContactsHtml = window.ihsRenderContacts({\n                phones: hq.phones || [],\n                emails: hq.emails || []\n            });\n            var hqAddrHtml = hq.address ? '<div style=\"font-size:12px;color:#6b7280;line-height:1.4;\">' + escapeHtml(hq.address) + '<\/div>' : '';\n            var hqInfoWindow = new google.maps.InfoWindow({\n                content: '<div style=\"padding:10px 14px 12px;min-width:220px;max-width:280px;font-family:-apple-system,BlinkMacSystemFont,\\'Segoe UI\\',sans-serif;\">' +\n                    '<div style=\"font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.08em;color:#1d4ed8;margin-bottom:5px;\">Headquarters<\/div>' +\n                    '<div style=\"font-size:15px;font-weight:700;color:#111827;line-height:1.3;margin-bottom:6px;\">' + escapeHtml(hq.name || 'Headquarters') + '<\/div>' +\n                    hqContactsHtml +\n                    hqAddrHtml +\n                    '<\/div>'\n            });\n\n            hqMarker.addListener('click', function() {\n                infoWindows.forEach(function(iw) { iw.close(); });\n                hqInfoWindow.open(map, hqMarker);\n                activeMarker = hqMarker;\n            });\n\n            markers.push(hqMarker);\n            infoWindows.push(hqInfoWindow);\n        }\n\n        \/\/ Fit bounds if we have markers\n        if (hasMarkers && markers.length > 0) {\n            map.fitBounds(bounds);\n\n            \/\/ Don't zoom in too much for single markers\n            var listener = google.maps.event.addListener(map, 'idle', function() {\n                if (map.getZoom() > 14) {\n                    map.setZoom(14);\n                }\n                google.maps.event.removeListener(listener);\n            });\n        }\n    }\n\n    function highlightLocationCard(vendorId) {\n        \/\/ Remove previous highlight\n        var cards = document.querySelectorAll('.ihs-location-card');\n        cards.forEach(function(card) {\n            card.classList.remove('highlighted');\n        });\n\n        \/\/ Add highlight to matching card\n        var targetCard = document.querySelector('.ihs-location-card[data-vendor-id=\"' + vendorId + '\"]');\n        if (targetCard) {\n            targetCard.classList.add('highlighted');\n            targetCard.scrollIntoView({ behavior: 'smooth', block: 'start' });\n        }\n    }\n\n    \/\/ ===========================================\n    \/\/ SET STORE FROM CARD BUTTON\n    \/\/ ===========================================\n    window.ihsSetStoreFromCard = function(vendorId, storeName, address, lat, lng) {\n        var storeData = {\n            id: vendorId,\n            name: storeName,\n            address: address,\n            lat: lat || null,\n            lng: lng || null,\n            vendor_id: vendorId,\n            location_name: storeName,\n            timestamp: Date.now()\n        };\n        setCookie('ihs_selected_store', storeData, 365);\n        window.dispatchEvent(new CustomEvent('ihsStoreChanged', { detail: { store: storeData } }));\n\n        \/\/ Visual feedback \u2014 swap button text briefly\n        var btns = document.querySelectorAll('.ihs-location-set-store-btn');\n        btns.forEach(function(btn) {\n            if (btn.getAttribute('onclick') && btn.getAttribute('onclick').indexOf('ihsSetStoreFromCard(' + vendorId + ',') === 0) {\n                var orig = btn.textContent;\n                btn.textContent = '\u2713 Store Set!';\n                btn.style.background = 'var(--ihs-primary)';\n                btn.style.color = '#fff';\n                setTimeout(function() {\n                    btn.textContent = orig;\n                    btn.style.background = '';\n                    btn.style.color = '';\n                }, 1800);\n            }\n        });\n    };\n\n    \/\/ ===========================================\n    \/\/ LOCATION DETAIL PANEL\n    \/\/ ===========================================\n    window.ihsShowLocationDetail = function(vendorId) {\n        var hit = currentHits.find(function(h) { return h.vendor_id == vendorId; });\n        if (!hit) return;\n\n        var panel = document.getElementById('ihs-location-detail');\n        var overlay = document.getElementById('ihs-location-detail-overlay');\n        var content = document.getElementById('ihs-location-detail-content');\n\n        var distanceHtml = '';\n        if (hit._distance !== undefined) {\n            distanceHtml = '<p class=\"ihs-detail-distance\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"><\/circle><polyline points=\"12 6 12 12 16 14\"><\/polyline><\/svg> ' + formatDistance(hit._distance) + ' from you<\/p>';\n        }\n\n        var contactsHtml = window.ihsRenderContacts({\n            ownerName:    hit.owner_name    || '',\n            phone:        hit.store_phone   || hit.phone || '',\n            email:        hit.store_email   || '',\n            contact2Name: hit.contact2_name  || '',\n            contact2Phone:hit.contact2_phone || '',\n        });\n\n        var regionBadge = hit.region ? '<span class=\"ihs-detail-region-badge\">' + escapeHtml(hit.region) + '<\/span>' : '';\n\n        var hitAddr = hit.store_address || hit.address || '';\n        var directionsUrl = 'https:\/\/www.google.com\/maps\/dir\/?api=1&destination=' + encodeURIComponent(hitAddr);\n\n        content.innerHTML = '<div class=\"ihs-detail-header\">' +\n            '<h2>' + escapeHtml(hit.store_name) + '<\/h2>' +\n            regionBadge +\n        '<\/div>' +\n        '<div class=\"ihs-detail-body\">' +\n            (hitAddr ? '<p class=\"ihs-detail-address\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z\"><\/path><circle cx=\"12\" cy=\"10\" r=\"3\"><\/circle><\/svg> ' + escapeHtml(hitAddr) + '<\/p>' : '') +\n            distanceHtml +\n            (contactsHtml ? '<div class=\"ihs-detail-contacts\">' + contactsHtml + '<\/div>' : '') +\n        '<\/div>' +\n        '<div class=\"ihs-detail-actions\">' +\n            '<button type=\"button\" class=\"ihs-detail-btn ihs-detail-btn-primary\" onclick=\"ihsSetAsMyStore(' + hit.vendor_id + ')\">' +\n                '<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z\"><\/path><\/svg> ' +\n                ihsLocationConfig.strings.setAsMyStore +\n            '<\/button>' +\n            '<a href=\"' + buildStoreUrl(hit.store_url || '\/locations\/') + '\" class=\"ihs-detail-btn ihs-detail-btn-tertiary\">' +\n                '<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 6h.01M12 12h.01M12 18h.01M6 9a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3v-6a3 3 0 0 0-3-3H6z\"><\/path><\/svg> View Store' +\n            '<\/a>' +\n            '<a href=\"' + directionsUrl + '\" target=\"_blank\" rel=\"noopener\" class=\"ihs-detail-btn ihs-detail-btn-secondary\">' +\n                '<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polygon points=\"3 11 22 2 13 21 11 13 3 11\"><\/polygon><\/svg> ' +\n                ihsLocationConfig.strings.getDirections +\n            '<\/a>' +\n        '<\/div>';\n\n        \/\/ Show overlay and panel\n        if (overlay) {\n            overlay.classList.add('visible');\n        }\n        panel.classList.add('open');\n\n        \/\/ Center map on this location\n        if (map && hit._geoloc) {\n            map.panTo({ lat: hit._geoloc.lat, lng: hit._geoloc.lng });\n            map.setZoom(14);\n        }\n    };\n\n    \/\/ View sticks at this store - set as selected store then redirect to product search\n    window.ihsViewSticksAtStore = function(vendorId) {\n        var hit = currentHits.find(function(h) { return h.vendor_id == vendorId; });\n        if (!hit) {\n            \/\/ Still set a minimal cookie for vendor id\n            var storeData = { id: vendorId, name: '', lat: null, lng: null, timestamp: Date.now() };\n            setCookie('ihs_selected_store', storeData, 365);\n        } else {\n            var storeData = {\n                id: hit.vendor_id,\n                name: hit.store_name,\n                address: hit.address,\n                lat: hit._geoloc ? hit._geoloc.lat : null,\n                lng: hit._geoloc ? hit._geoloc.lng : null,\n                timestamp: Date.now()\n            };\n            setCookie('ihs_selected_store', storeData, 365);\n        }\n\n        \/\/ Notify other components\n        window.dispatchEvent(new CustomEvent('ihsStoreChanged', { detail: { store: storeData } }));\n\n        \/\/ Redirect to product search page; fallback to \/products\/\n        var url = (typeof ihsLocationConfig !== 'undefined' && ihsLocationConfig.productSearchUrl) ? ihsLocationConfig.productSearchUrl : '\/products\/';\n        \/\/ Append vendor param\n        url += (url.indexOf('?') === -1 ? '?' : '&') + 'vendor_id=' + encodeURIComponent(vendorId);\n        window.location.href = url;\n    };\n\n    window.ihsCloseLocationDetail = function() {\n        var panel = document.getElementById('ihs-location-detail');\n        var overlay = document.getElementById('ihs-location-detail-overlay');\n\n        panel.classList.remove('open');\n        if (overlay) {\n            overlay.classList.remove('visible');\n        }\n    };\n\n    \/\/ Close button\n    var closeBtn = document.getElementById('ihs-location-detail-close');\n    if (closeBtn) {\n        closeBtn.addEventListener('click', function(e) {\n            e.preventDefault();\n            e.stopPropagation();\n            ihsCloseLocationDetail();\n        });\n    }\n\n    \/\/ Close on overlay click\n    var overlay = document.getElementById('ihs-location-detail-overlay');\n    if (overlay) {\n        overlay.addEventListener('click', ihsCloseLocationDetail);\n    }\n\n    \/\/ Close on Escape key\n    document.addEventListener('keydown', function(e) {\n        if (e.key === 'Escape') {\n            var panel = document.getElementById('ihs-location-detail');\n            if (panel && panel.classList.contains('open')) {\n                ihsCloseLocationDetail();\n            }\n        }\n    });\n\n    \/\/ ===========================================\n    \/\/ SET AS MY STORE\n    \/\/ ===========================================\n    window.ihsSetAsMyStore = function(vendorId) {\n        var hit = currentHits.find(function(h) { return h.vendor_id == vendorId; });\n        if (!hit) return;\n\n        var storeData = {\n            id: hit.vendor_id,\n            name: hit.store_name,\n            address: hit.address,\n            lat: hit._geoloc ? hit._geoloc.lat : null,\n            lng: hit._geoloc ? hit._geoloc.lng : null,\n            timestamp: Date.now()\n        };\n\n        setCookie('ihs_selected_store', storeData, 365);\n\n        \/\/ Dispatch event for other components\n        window.dispatchEvent(new CustomEvent('ihsStoreChanged', {\n            detail: { store: storeData }\n        }));\n\n        \/\/ Update button state\n        var btn = document.querySelector('.ihs-detail-btn-primary');\n        if (btn) {\n            btn.innerHTML = '<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"><\/polyline><\/svg> Store Saved!';\n            btn.classList.add('saved');\n        }\n\n        \/\/ Update header store selector if present\n        var headerStoreName = document.getElementById('ihs-selected-store-name');\n        if (headerStoreName) {\n            headerStoreName.textContent = hit.store_name;\n        }\n    };\n\n    \/\/ ===========================================\n    \/\/ REGION FILTER + SUB-REGION MODAL\n    \/\/ ===========================================\n\n    \/**\n     * Query Algolia for the actual facet values stored for a region.\n     * Returns a promise resolving to [{value, count}] sorted alphabetically.\n     *\/\n    function fetchSubRegionOptions(region) {\n        var isEurope = (region === 'Europe');\n        var facetField = isEurope ? 'country' : 'state';\n        var regionFilter = 'region:\"' + region + '\"';\n\n        return searchClient.search([{\n            indexName: ihsLocationConfig.algolia.indexName,\n            params: {\n                hitsPerPage: 0,\n                facets: [facetField],\n                filters: regionFilter\n            }\n        }]).then(function(results) {\n            var facets = results.results[0].facets || {};\n            var values = facets[facetField] || {};\n            var list = Object.keys(values).map(function(k) {\n                return { value: k, count: values[k] };\n            });\n            list.sort(function(a, b) { return a.value.localeCompare(b.value); });\n            return { list: list, field: facetField };\n        });\n    }\n\n    \/\/ Full names for abbreviated region codes stored in Algolia\n    var REGION_FULL_NAMES = {\n        \/\/ Canadian provinces & territories\n        'AB': 'Alberta',              'BC': 'British Columbia',\n        'MB': 'Manitoba',             'NB': 'New Brunswick',\n        'NL': 'Newfoundland & Labrador', 'NS': 'Nova Scotia',\n        'NT': 'Northwest Territories','NU': 'Nunavut',\n        'ON': 'Ontario',              'PE': 'Prince Edward Island',\n        'QC': 'Quebec',               'SK': 'Saskatchewan',\n        'YT': 'Yukon',\n        \/\/ US states\n        'AL': 'Alabama',   'AK': 'Alaska',      'AZ': 'Arizona',\n        'AR': 'Arkansas',  'CA': 'California',  'CO': 'Colorado',\n        'CT': 'Connecticut','DE': 'Delaware',   'FL': 'Florida',\n        'GA': 'Georgia',   'HI': 'Hawaii',      'ID': 'Idaho',\n        'IL': 'Illinois',  'IN': 'Indiana',     'IA': 'Iowa',\n        'KS': 'Kansas',    'KY': 'Kentucky',    'LA': 'Louisiana',\n        'ME': 'Maine',     'MD': 'Maryland',    'MA': 'Massachusetts',\n        'MI': 'Michigan',  'MN': 'Minnesota',   'MS': 'Mississippi',\n        'MO': 'Missouri',  'MT': 'Montana',     'NE': 'Nebraska',\n        'NV': 'Nevada',    'NH': 'New Hampshire','NJ': 'New Jersey',\n        'NM': 'New Mexico','NY': 'New York',    'NC': 'North Carolina',\n        'ND': 'North Dakota','OH': 'Ohio',      'OK': 'Oklahoma',\n        'OR': 'Oregon',    'PA': 'Pennsylvania','RI': 'Rhode Island',\n        'SC': 'South Carolina','SD': 'South Dakota','TN': 'Tennessee',\n        'TX': 'Texas',     'UT': 'Utah',        'VT': 'Vermont',\n        'VA': 'Virginia',  'WA': 'Washington',  'WV': 'West Virginia',\n        'WI': 'Wisconsin', 'WY': 'Wyoming',     'DC': 'Washington D.C.',\n        \/\/ European countries\n        'AT': 'Austria',   'BE': 'Belgium',     'HR': 'Croatia',\n        'CZ': 'Czech Republic','DK': 'Denmark', 'EE': 'Estonia',\n        'FI': 'Finland',   'FR': 'France',      'DE': 'Germany',\n        'GB': 'United Kingdom','GR': 'Greece',  'IE': 'Ireland',\n        'IT': 'Italy',     'LV': 'Latvia',      'LT': 'Lithuania',\n        'LU': 'Luxembourg','NL': 'Netherlands', 'NO': 'Norway',\n        'PL': 'Poland',    'PT': 'Portugal',    'RO': 'Romania',\n        'RU': 'Russia',    'SI': 'Slovenia',    'ES': 'Spain',\n        'SE': 'Sweden',    'CH': 'Switzerland', 'UA': 'Ukraine',\n    };\n\n    function openSubRegionModal(anchorBtn, region) {\n        closeSubRegionModal();\n\n        var isEurope = (region === 'Europe');\n        var labelText = isEurope ? 'Filter by country' : 'Filter by province \/ state';\n\n        var modal = document.createElement('div');\n        modal.className = 'ihs-subregion-modal';\n        modal.setAttribute('role', 'dialog');\n        modal.innerHTML =\n            '<div class=\"ihs-subregion-modal-header\">' +\n                '<span class=\"ihs-subregion-modal-label\">' + labelText + '<\/span>' +\n                '<button class=\"ihs-subregion-modal-close\" type=\"button\" aria-label=\"Close\">&times;<\/button>' +\n            '<\/div>' +\n            '<div class=\"ihs-subregion-modal-loading\">Loading options\u2026<\/div>' +\n            '<div class=\"ihs-subregion-modal-list\" style=\"display:none;\"><\/div>';\n\n        \/\/ Position below the anchor button\n        var rect = anchorBtn.getBoundingClientRect();\n        var wrapper = document.querySelector('.ihs-location-header');\n        var wRect = wrapper ? wrapper.getBoundingClientRect() : rect;\n\n        modal.style.top  = (rect.bottom - wRect.top + 8) + 'px';\n        modal.style.left = (rect.left   - wRect.left) + 'px';\n\n        (wrapper || document.body).appendChild(modal);\n        subRegionModal = modal;\n\n        \/\/ Close button\n        modal.querySelector('.ihs-subregion-modal-close').addEventListener('click', function() {\n            closeSubRegionModal();\n        });\n\n        \/\/ Fetch real options from Algolia\n        fetchSubRegionOptions(region).then(function(result) {\n            subRegionField = result.field;\n            var listEl = modal.querySelector('.ihs-subregion-modal-list');\n            var loadEl = modal.querySelector('.ihs-subregion-modal-loading');\n\n            if (!result.list.length) {\n                loadEl.textContent = 'No sub-regions found.';\n                return;\n            }\n\n            loadEl.style.display = 'none';\n            listEl.style.display = 'block';\n            listEl.innerHTML = result.list.map(function(item) {\n                var isActive = (selectedSubRegion === item.value);\n                var displayName = REGION_FULL_NAMES[item.value] || item.value;\n                return '<button type=\"button\" class=\"ihs-subregion-option' + (isActive ? ' active' : '') + '\" data-value=\"' + escapeHtml(item.value) + '\">' +\n                    escapeHtml(displayName) +\n                    '<span class=\"ihs-subregion-count\">' + item.count + '<\/span>' +\n                '<\/button>';\n            }).join('');\n\n            listEl.querySelectorAll('.ihs-subregion-option').forEach(function(btn) {\n                btn.addEventListener('click', function() {\n                    var val = this.getAttribute('data-value');\n                    if (selectedSubRegion === val) {\n                        selectedSubRegion = '';\n                        listEl.querySelectorAll('.ihs-subregion-option').forEach(function(b) { b.classList.remove('active'); });\n                    } else {\n                        selectedSubRegion = val;\n                        listEl.querySelectorAll('.ihs-subregion-option').forEach(function(b) { b.classList.remove('active'); });\n                        this.classList.add('active');\n                    }\n                    search.removeWidgets([configureWidget]);\n                    configureWidget = instantsearch.widgets.configure(getConfigureOptions());\n                    search.addWidgets([configureWidget]);\n                    closeSubRegionModal();\n                });\n            });\n        }).catch(function() {\n            modal.querySelector('.ihs-subregion-modal-loading').textContent = 'Could not load options.';\n        });\n    }\n\n    function closeSubRegionModal() {\n        if (subRegionModal && subRegionModal.parentNode) {\n            subRegionModal.parentNode.removeChild(subRegionModal);\n        }\n        subRegionModal = null;\n    }\n\n    var regionButtons = document.querySelectorAll('.ihs-region-btn');\n    regionButtons.forEach(function(btn) {\n        btn.addEventListener('click', function() {\n            var clickedRegion = this.getAttribute('data-region');\n\n            \/\/ If same region already active and no sub-region, toggle modal\n            if (selectedRegion === clickedRegion && subRegionModal) {\n                closeSubRegionModal();\n                return;\n            }\n\n            regionButtons.forEach(function(b) { b.classList.remove('active'); });\n            this.classList.add('active');\n\n            var prevRegion = selectedRegion;\n            selectedRegion = clickedRegion;\n\n            \/\/ Clear sub-region when switching regions\n            if (prevRegion !== selectedRegion) {\n                selectedSubRegion = '';\n                subRegionField = 'state';\n                closeSubRegionModal();\n            }\n\n            search.removeWidgets([configureWidget]);\n            configureWidget = instantsearch.widgets.configure(getConfigureOptions());\n            search.addWidgets([configureWidget]);\n\n            \/\/ Open sub-region modal if a specific region selected\n            if (selectedRegion) {\n                openSubRegionModal(this, selectedRegion);\n            }\n        });\n    });\n\n    \/\/ Close modal on outside click\n    document.addEventListener('click', function(e) {\n        if (subRegionModal && !subRegionModal.contains(e.target) && !e.target.closest('.ihs-region-btn')) {\n            closeSubRegionModal();\n        }\n    });\n\n    \/\/ ===========================================\n    \/\/ DETECT LOCATION BUTTON\n    \/\/ ===========================================\n    var detectBtn = document.getElementById('ihs-detect-btn');\n    if (detectBtn) {\n        detectBtn.addEventListener('click', function() {\n            detectUserLocation(function(location) {\n                if (location) {\n                    \/\/ Update search configuration with new location\n                    search.removeWidgets([configureWidget]);\n                    configureWidget = instantsearch.widgets.configure(getConfigureOptions());\n                    search.addWidgets([configureWidget]);\n\n                    \/\/ Re-center map\n                    if (map) {\n                        map.panTo({ lat: location.lat, lng: location.lng });\n                        map.setZoom(8);\n                    }\n                }\n            });\n        });\n    }\n\n    \/\/ ===========================================\n    \/\/ LOCATION CARD CLICK HANDLER\n    \/\/ ===========================================\n    document.addEventListener('click', function(e) {\n        var card = e.target.closest('.ihs-location-card');\n        if (card && !e.target.closest('.ihs-location-view-btn')) {\n            var vendorId = card.getAttribute('data-vendor-id');\n            var lat = parseFloat(card.getAttribute('data-lat'));\n            var lng = parseFloat(card.getAttribute('data-lng'));\n\n            \/\/ Center map and open info window\n            if (map && lat && lng) {\n                map.panTo({ lat: lat, lng: lng });\n                map.setZoom(14);\n\n                \/\/ Find and click the corresponding marker\n                var marker = markers.find(function(m) { return m._vendorId == vendorId; });\n                if (marker) {\n                    google.maps.event.trigger(marker, 'click');\n                }\n            }\n        }\n    });\n\n    \/\/ ===========================================\n    \/\/ UTILITY FUNCTIONS\n    \/\/ ===========================================\n    function escapeHtml(text) {\n        if (!text) return '';\n        var div = document.createElement('div');\n        div.textContent = text;\n        return div.innerHTML;\n    }\n\n    \/\/ ===========================================\n    \/\/ INITIALIZATION\n    \/\/ ===========================================\n\n    \/\/ Initialize map\n    setTimeout(initializeMap, 100);\n\n    \/\/ Try to auto-detect location on load (silently)\n    if (!userLocation) {\n        \/\/ Check for saved store first\n        var savedStore = getCookie('ihs_selected_store');\n        if (savedStore && savedStore.lat && savedStore.lng) {\n            userLocation = { lat: savedStore.lat, lng: savedStore.lng };\n\n            \/\/ Update search with saved store location\n            search.removeWidgets([configureWidget]);\n            configureWidget = instantsearch.widgets.configure(getConfigureOptions());\n            search.addWidgets([configureWidget]);\n        }\n    }\n\n    \/\/ Trigger initial search to populate results on page load\n    setTimeout(function() {\n        search.removeWidgets([configureWidget]);\n        configureWidget = instantsearch.widgets.configure(getConfigureOptions());\n        search.addWidgets([configureWidget]);\n    }, 50);\n});\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-1439","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/integralhockey.com\/fr\/wp-json\/wp\/v2\/pages\/1439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/integralhockey.com\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/integralhockey.com\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/integralhockey.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/integralhockey.com\/fr\/wp-json\/wp\/v2\/comments?post=1439"}],"version-history":[{"count":4,"href":"https:\/\/integralhockey.com\/fr\/wp-json\/wp\/v2\/pages\/1439\/revisions"}],"predecessor-version":[{"id":1553,"href":"https:\/\/integralhockey.com\/fr\/wp-json\/wp\/v2\/pages\/1439\/revisions\/1553"}],"wp:attachment":[{"href":"https:\/\/integralhockey.com\/fr\/wp-json\/wp\/v2\/media?parent=1439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}