var e=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;function t(){let e=document.querySelector(`[data-menu-toggle]`),t=document.querySelector(`[data-mobile-menu]`),n=document.querySelector(`[data-menu-overlay]`),r=document.querySelector(`[data-menu-close]`);if(!e||!t)return;let i=r=>{t.classList.toggle(`-translate-x-full`,!r),n?.classList.toggle(`opacity-0`,!r),n?.classList.toggle(`pointer-events-none`,!r),e.setAttribute(`aria-expanded`,String(r)),document.body.classList.toggle(`overflow-hidden`,r)};e.addEventListener(`click`,()=>i(t.classList.contains(`-translate-x-full`))),r?.addEventListener(`click`,()=>i(!1)),n?.addEventListener(`click`,()=>i(!1)),document.addEventListener(`keydown`,e=>{e.key===`Escape`&&i(!1)})}function n(){let t=document.querySelector(`[data-hero-slider]`);if(!t)return;let n=[...t.querySelectorAll(`[data-slide]`)],r=[...t.querySelectorAll(`[data-slide-dot]`)];if(n.length<2)return;let i=0,a=null,o=e=>{i=(e+n.length)%n.length,n.forEach((e,t)=>{t===i?(e.style.opacity=`1`,e.style.pointerEvents=`auto`,e.style.zIndex=`10`):(e.style.opacity=`0`,e.style.pointerEvents=`none`,e.style.zIndex=`0`)}),r.forEach((e,t)=>{t===i?(e.style.backgroundColor=`#186297`,e.style.width=`28px`,e.style.opacity=`1`):(e.style.backgroundColor=`rgba(24, 98, 151, 0.3)`,e.style.width=`10px`,e.style.opacity=`0.6`)})},s=()=>{e||(c(),a=setInterval(()=>o(i+1),4500))},c=()=>{a&&clearInterval(a)};r.forEach((e,t)=>e.addEventListener(`click`,e=>{e.preventDefault(),o(t),s()})),t.addEventListener(`mouseenter`,c),t.addEventListener(`mouseleave`,s),o(0),s()}function r(){let e=document.querySelector(`[data-gallery]`);if(!e)return;let t=e.querySelector(`[data-gallery-main]`),n=[...e.querySelectorAll(`[data-gallery-thumb]`)];n.forEach(e=>e.addEventListener(`click`,()=>{let r=e.querySelector(`img`);r&&t&&(t.src=r.src,t.alt=r.alt),n.forEach(t=>t.classList.toggle(`border-ink-900`,t===e)),n.forEach(t=>t.classList.toggle(`border-transparent`,t!==e))}))}function i(){document.querySelectorAll(`[data-qty]`).forEach(e=>{let t=e.querySelector(`input`);e.querySelector(`[data-qty-minus]`)?.addEventListener(`click`,()=>{t.value=Math.max(1,parseInt(t.value||`1`,10)-1)}),e.querySelector(`[data-qty-plus]`)?.addEventListener(`click`,()=>{t.value=Math.min(99,parseInt(t.value||`1`,10)+1)})})}function a(){document.querySelectorAll(`[data-carousel]`).forEach(t=>{let n=t.querySelector(`[data-carousel-track]`);if(!n)return;let r=()=>n.clientWidth*.8;t.querySelector(`[data-carousel-prev]`)?.addEventListener(`click`,()=>n.scrollBy({left:-r(),behavior:e?`auto`:`smooth`})),t.querySelector(`[data-carousel-next]`)?.addEventListener(`click`,()=>n.scrollBy({left:r(),behavior:e?`auto`:`smooth`}))})}function o(){let e=document.querySelector(`[data-site-header]`);if(!e)return;let t=()=>e.classList.toggle(`shadow-soft`,window.scrollY>8);window.addEventListener(`scroll`,t,{passive:!0}),t()}document.addEventListener(`DOMContentLoaded`,()=>{t(),n(),r(),i(),a(),o()});