#tyh-shophead{--tsh-teal:#02aea0;--tsh-red:#c62f3b;--tsh-red-dk:#a82431;--tsh-tile:#f4f1ec;position:relative;overflow:hidden;color:#fff;font-family:Poppins,"Helvetica Neue",Arial,sans-serif;background:radial-gradient(ellipse 55% 75% at 0% 0%,rgba(2,174,160,.22) 0%,rgba(2,174,160,0) 60%),radial-gradient(ellipse 50% 70% at 100% 100%,rgba(72,110,255,.28) 0%,rgba(72,110,255,0) 60%),linear-gradient(155deg,#0c1b36 0%,#11294f 50%,#0a1530 100%)}
#tyh-shophead *{box-sizing:border-box}
#tyh-shophead .tsh-wrap{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:clamp(32px,5vw,72px);max-width:1280px;min-height:clamp(480px,62vh,620px);margin:0 auto;padding:0 clamp(20px,5vw,64px)}
#tyh-shophead .tsh-copy{padding:clamp(56px,7vw,96px) 0}
#tyh-shophead .tsh-h1{margin:0 0 .45em;padding:0;font-family:"Roboto Slab",Rockwell,Georgia,serif !important;font-weight:700;font-size:clamp(2.3rem,4.6vw,4rem);line-height:1.06;letter-spacing:-.02em;color:#fff;animation:tsh-up .8s cubic-bezier(.2,.7,.3,1) both}
#tyh-shophead p.tsh-sub{margin:0 0 1.8em;padding:0;max-width:32em;font-size:clamp(1.1rem,1.5vw,1.3rem);line-height:1.6;color:rgba(225,233,248,.88);animation:tsh-up .8s .1s cubic-bezier(.2,.7,.3,1) both}
@keyframes tsh-up{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
#tyh-shophead .tsh-search{position:relative;display:flex;align-items:center;max-width:540px;margin:0 0 22px;padding:6px;border-radius:999px;background:#fff;box-shadow:0 18px 40px -20px rgba(0,0,0,.6);animation:tsh-up .8s .2s cubic-bezier(.2,.7,.3,1) both}
#tyh-shophead .tsh-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#tyh-shophead .tsh-search-icon{flex:none;margin:0 6px 0 16px;color:#5b6470}
#tyh-shophead .tsh-search input[type=search]{flex:1;min-width:0;height:52px;margin:0;padding:0 10px;border:0;background:transparent;font-family:inherit;font-size:1.1rem;color:#1f2428;outline:none;-webkit-appearance:none;appearance:none}
#tyh-shophead .tsh-search input::placeholder{color:#7a828b}
#tyh-shophead .tsh-search button{flex:none;height:52px;margin:0;padding:0 26px;border:0;border-radius:999px;background:var(--tsh-red);color:#fff;font-family:inherit;font-size:1.05rem;font-weight:600;cursor:pointer;transition:background-color .2s ease}
#tyh-shophead .tsh-search button:hover{background:var(--tsh-red-dk)}
#tyh-shophead .tsh-search:focus-within{box-shadow:0 0 0 4px rgba(2,174,160,.45),0 18px 40px -20px rgba(0,0,0,.6)}
#tyh-shophead .tsh-cats{display:flex;flex-wrap:wrap;gap:10px;animation:tsh-up .8s .3s cubic-bezier(.2,.7,.3,1) both}
#tyh-shophead .tsh-cat{display:inline-flex;align-items:center;gap:10px;padding:11px 18px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(255,255,255,.07);backdrop-filter:blur(6px);color:#fff;font-size:1rem;font-weight:600;text-decoration:none;transition:background-color .2s ease,border-color .2s ease,transform .2s ease}
#tyh-shophead .tsh-cat:hover{background:var(--tsh-teal);border-color:var(--tsh-teal);color:#fff;transform:translateY(-2px)}
#tyh-shophead .tsh-count:not(:empty){display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:24px;padding:0 8px;border-radius:999px;background:rgba(255,255,255,.16);font-size:.8rem;font-weight:600}
#tyh-shophead a:focus-visible,#tyh-shophead button:focus-visible{outline:3px solid #9ff2e9;outline-offset:3px}
#tyh-shophead .tsh-wall{position:relative;align-self:stretch;min-height:clamp(480px,62vh,620px);overflow:hidden;-webkit-mask-image:linear-gradient(180deg,transparent 0%,#000 14%,#000 86%,transparent 100%);mask-image:linear-gradient(180deg,transparent 0%,#000 14%,#000 86%,transparent 100%)}
#tyh-shophead .tsh-col{position:absolute;top:0;bottom:0;left:0;width:calc(50% - 9px);overflow:hidden}
#tyh-shophead .tsh-col--2{left:auto;right:0;top:-90px}
#tyh-shophead .tsh-stack{display:flex;flex-direction:column;gap:18px}
#tyh-shophead .tsh-stack.is-moving{animation:tsh-scroll var(--tsh-dur,60s) linear infinite}
#tyh-shophead .tsh-col--2 .tsh-stack.is-moving{animation-direction:reverse}
#tyh-shophead .tsh-wall:hover .tsh-stack{animation-play-state:paused}
@keyframes tsh-scroll{from{transform:translateY(0)}to{transform:translateY(calc(-50% - 9px))}}
#tyh-shophead .tsh-tile{position:relative;flex:none;aspect-ratio:1/1;border-radius:12px;background:var(--tsh-tile);overflow:hidden;box-shadow:0 20px 40px -24px rgba(0,0,0,.7)}
#tyh-shophead .tsh-tile img{position:absolute;inset:0;width:100%;height:100%;max-width:none;padding:10%;object-fit:contain;mix-blend-mode:multiply;opacity:0;transition:opacity .6s ease}
#tyh-shophead .tsh-tile img.is-loaded{opacity:1}
#tyh-shophead .tsh-tile--skel{background:linear-gradient(100deg,rgba(255,255,255,.06) 30%,rgba(255,255,255,.12) 50%,rgba(255,255,255,.06) 70%);background-size:300% 100%;animation:tsh-shimmer 1.4s linear infinite;box-shadow:none}
@keyframes tsh-shimmer{from{background-position:100% 0}to{background-position:0 0}}
@media (max-width:980px){
#tyh-shophead .tsh-wrap{grid-template-columns:minmax(0,1fr);min-height:0;gap:0}
#tyh-shophead .tsh-copy{padding-bottom:36px}
#tyh-shophead .tsh-wall{display:block;min-height:0;margin:0 calc(-1 * clamp(20px,5vw,64px)) 48px;-webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 8%,#000 92%,transparent 100%);mask-image:linear-gradient(90deg,transparent 0%,#000 8%,#000 92%,transparent 100%)}
#tyh-shophead .tsh-col{position:static;width:auto}
#tyh-shophead .tsh-col--2{display:none}
#tyh-shophead .tsh-stack{flex-direction:row;width:max-content;gap:14px}
#tyh-shophead .tsh-tile{width:150px}
#tyh-shophead .tsh-stack.is-moving{animation-name:tsh-scroll-x}
@keyframes tsh-scroll-x{from{transform:translateX(0)}to{transform:translateX(calc(-50% - 7px))}}
}
@media (max-width:560px){
#tyh-shophead .tsh-search button{padding:0 18px}
#tyh-shophead .tsh-search-icon{display:none}
#tyh-shophead .tsh-search input[type=search]{padding-left:16px}
}
@media (prefers-reduced-motion:reduce){
#tyh-shophead .tsh-stack.is-moving,#tyh-shophead .tsh-tile--skel,#tyh-shophead .tsh-h1,#tyh-shophead p.tsh-sub,#tyh-shophead .tsh-search,#tyh-shophead .tsh-cats{animation:none}
}
(function(){
var root=document.getElementById('tyh-shophead');if(!root)return;
var API='/wp-json/wc/store/v1';
var stacks=root.querySelectorAll('.tsh-stack');
var reduce=window.matchMedia&&window.matchMedia('(prefers-reduced-motion: reduce)').matches;
stacks.forEach(function(s){var h='';for(var k=0;k<4;k++)h+='
';s.innerHTML=h;});
function esc(s){return String(s).replace(/[&"']/g,function(c){return{'&':'&','':'>','"':'"',"'":'''}[c];});}
function tile(p){var im=p.images[0];var src=im.thumbnail||im.src;return '
+')
';}
fetch(API+'/products?per_page=40&orderby=date&order=desc',{credentials:'same-origin'})
.then(function(r){if(!r.ok)throw r;return r.json();})
.then(function(list){
list=list.filter(function(p){return p.images&&p.images.length;});
if(list.length<6){root.querySelector('.tsh-wall').style.visibility='hidden';return;}
for(var k=list.length-1;k>0;k--){var j=Math.floor(Math.random()*(k+1)),t=list[k];list[k]=list[j];list[j]=t;}
var half=Math.ceil(list.length/2),cols=[list.slice(0,half),list.slice(half)];
stacks.forEach(function(s,idx){
var items=cols[idx].map(tile).join('');
s.innerHTML=reduce?items:items+items;
s.style.setProperty('--tsh-dur',(cols[idx].length*5)+'s');
if(!reduce)s.classList.add('is-moving');
});
})
.catch(function(){root.querySelector('.tsh-wall').style.visibility='hidden';});
fetch(API+'/products/categories?per_page=100',{credentials:'same-origin'})
.then(function(r){if(!r.ok)throw r;return r.json();})
.then(function(cats){
var map={};cats.forEach(function(c){map[c.slug]=c;});
root.querySelectorAll('.tsh-cat').forEach(function(a){
var c=map[a.getAttribute('data-slug')];if(!c)return;
if(c.permalink)a.href=c.permalink;
if(c.count){var n=a.querySelector('.tsh-count');n.textContent=c.count;a.setAttribute('aria-label',a.firstChild.textContent+', '+c.count+' products');}
});
})
.catch(function(){});
})();