/* Open drawers, live paper files and photographic objects. */
html:has(body.shop-page) { height:100%; overflow:hidden; overscroll-behavior:none; }
.shop-page { --shop-paper:#f1dfb7; --shop-red:#f23a2f; --shop-green:#a0cf35; --shop-yellow:#f5c523; --shop-type:Georgia,'Times New Roman',serif; height:100svh; max-height:100svh; overflow:hidden; overscroll-behavior:none; }
.shop-layout { display:grid; grid-template-columns:minmax(180px,36%) minmax(0,1fr); grid-template-rows:minmax(0,1fr); align-items:start; gap:clamp(.75rem,2.5vw,2.5rem); width:min(1440px,100%); height:100svh; margin:0 auto; padding:clamp(64px,11svh,112px) clamp(.5rem,3vw,3rem) max(12px,env(safe-area-inset-bottom)); }
.shop-brand { grid-column:1; grid-row:1; position:static; align-self:start; width:calc(100% / 1.5); max-width:280px; margin:clamp(44px,8svh,80px) 0 0 max(-24px,calc(-3vw + 6px)); padding:0; }
.shop-brand picture,.shop-brand img { display:block; width:100%; height:auto; }
/* Enlarge the GIF by exactly 50%; the grid reserves its painted footprint. */
.shop-brand picture { transform:scale(1.5); transform-origin:top left; }
.shop-cabinet { grid-column:2; grid-row:1; display:grid; grid-template-rows:repeat(3,minmax(0,1fr)); min-width:0; min-height:0; height:100%; }
.shop-drawer { --category:var(--shop-red); --sprite-y:9.124%; position:relative; isolation:isolate; container-type:size; min-width:0; min-height:0; height:100%; margin:0; }
.shop-drawer--digital { --category:var(--shop-green); --sprite-y:52.464%; }
.shop-drawer--physical { --category:var(--shop-yellow); --sprite-y:95.803%; }
.shop-drawer::before { content:""; position:absolute; inset:0; z-index:-1; background-image:url('shop-assets/drawer-trays.png'); background-size:100% 349.091%; background-position:50% var(--sprite-y); background-repeat:no-repeat; clip-path:polygon(9% 2%,91% 2%,98.6% 67%,98.6% 98%,1.4% 98%,1.4% 67%); pointer-events:none; }
.shop-drawer h2 { position:absolute; z-index:1; left:8%; top:72%; bottom:auto; display:flex; align-items:center; justify-content:center; gap:.3em; width:38%; height:22%; margin:0; padding:0 .15em; color:#15130d; text-align:center; font:900 clamp(.85rem,min(5cqw,12cqh),1.9rem)/1 var(--shop-type); letter-spacing:-.025em; text-transform:uppercase; }
.shop-drawer h2 span { margin:0; }
.shop-tray { position:absolute; z-index:2; top:7%; left:7.8%; right:7.8%; bottom:32%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(3,minmax(0,1fr)); gap:clamp(3px,2cqh,7px) clamp(4px,1.4cqw,16px); align-content:stretch; }
.shop-drawer--digital .shop-tray { grid-template-rows:repeat(3,minmax(0,1fr)); gap:clamp(3px,2cqh,7px) clamp(4px,1.4cqw,16px); }
.shop-tray--physical { left:7%; right:7%; grid-template-columns:repeat(4,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); gap:clamp(4px,1.2cqw,14px); }
.shop-item { -webkit-appearance:none; appearance:none; -webkit-tap-highlight-color:transparent; position:relative; display:flex; min-width:0; width:100%; height:100%; min-height:0; margin:0; cursor:pointer; border:0; text-align:left; color:#16130f; transform-origin:center bottom; transition:transform 180ms ease,filter 180ms ease; }
.shop-item:focus-visible { outline:2px dashed var(--gold); outline-offset:4px; }
.shop-file { align-items:center; gap:.65em; height:100%; min-height:0; padding:.18em .55em; border-radius:9px 10px 2px 2px; background-color:var(--shop-paper); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23b88b4a' opacity='.15' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); box-shadow:0 3px 0 #0a0907,0 0 0 1px #e7d6b4; }
.shop-file::before { content:""; position:absolute; z-index:-1; left:8%; top:-6px; width:24%; height:10px; border-radius:6px 6px 0 0; background:var(--category); }
.shop-file-number { flex:none; display:block; padding-right:.45em; border-right:1px solid var(--category); font:900 clamp(.8rem,min(3.2cqw,9cqh),1.5rem)/1 var(--shop-type); }
.shop-file-title { font:900 clamp(.62rem,min(2.25cqw,6.5cqh),1.1rem)/1.08 var(--shop-type); text-transform:uppercase; overflow-wrap:anywhere; }
.shop-drawer--digital .shop-file { min-height:0; padding:.14em .6em; }
.shop-drawer--digital .shop-file::before { left:auto; right:8%; }
.shop-drawer--digital .shop-file-title { font-size:clamp(.62rem,min(2.35cqw,6.5cqh),1.1rem); }
.shop-product { display:grid; grid-template-rows:minmax(0,1fr) auto; align-items:end; justify-items:center; gap:clamp(3px,1.8cqh,6px); padding:0; background:transparent; text-align:center; }
.shop-object { position:relative; display:block; min-width:0; min-height:0; width:100%; height:100%; }
.shop-object img { display:block; width:100%; height:100%; object-fit:contain; user-select:none; -webkit-user-drag:none; }
.shop-object--print { width:84%; padding:clamp(2px,.5cqw,5px); background:var(--shop-paper); box-shadow:-4px 3px 0 #c9ba9f,0 5px 8px #0008; transform:rotate(-3deg); }
.shop-object--print img { object-fit:cover; object-position:center; }
.shop-object--cassette { display:flex; align-items:center; }
.shop-object--slide { height:min(100%,48cqh); width:auto; max-width:85%; aspect-ratio:1; border-radius:5px; background:var(--shop-paper); box-shadow:0 3px 6px #000b,inset 0 0 0 1px #c4b796; }
.shop-object--slide::before,.shop-object--slide::after { content:""; position:absolute; top:8%; width:3px; height:3px; border-radius:50%; background:#524530; }
.shop-object--slide::before { left:8%; } .shop-object--slide::after { right:8%; }
.shop-object--slide img { position:absolute; top:17%; left:17%; width:66%; height:66%; object-fit:cover; opacity:.9; }
.shop-object--book { width:91%; border-left:clamp(3px,.7cqw,7px) solid #282622; box-shadow:3px 4px 0 #ab9e84,5px 6px 7px #000b; transform:perspective(500px) rotateY(-8deg); }
.shop-object--book img { object-fit:cover; object-position:42% center; }
.shop-product-label { display:block; max-width:100%; padding:.25em .45em; color:#17130c; background:var(--shop-paper); clip-path:polygon(3% 2%,97% 0,100% 12%,98% 94%,4% 100%,0 87%,1% 12%); font:900 clamp(.55rem,min(1.9cqw,5.5cqh),1rem)/1.05 var(--shop-type); text-transform:uppercase; }
@media (hover:hover) { .shop-file:hover { z-index:5; transform:translateY(clamp(-18px,-7cqh,-7px)) rotate(-.35deg); filter:drop-shadow(0 8px 3px #000a); } .shop-product:hover { z-index:5; transform:translateY(-8px) rotate(.35deg); filter:drop-shadow(0 7px 3px #000a); } }
.shop-item:focus-visible { z-index:5; transform:translateY(-8px); }
.shop-detail-open { overflow:hidden; }
.shop-dialog { color-scheme:dark; width:min(38rem,calc(100% - 2rem)); max-height:calc(100dvh - 2rem); overflow-y:auto; border:1px solid #b6a17d; padding:clamp(1.5rem,5vw,3rem); color:#fff; background:#080808; font-family:var(--shop-type); box-shadow:0 16px 80px #000b; }
.shop-dialog::backdrop { background:#000d; }
.shop-dialog [hidden] { display:none!important; }
.shop-dialog-close { position:absolute; right:.6rem; top:.6rem; min-height:44px; padding:.5em .8em; cursor:pointer; border:0; background:transparent; color:#fff; font:700 .75rem/1.3 var(--shop-type); text-transform:uppercase; letter-spacing:.08em; }
.shop-dialog p.shop-dialog-category { margin:0 3rem 1.4rem 0; font:700 .75rem/1.4 var(--shop-type); letter-spacing:.1em; text-transform:uppercase; }
.shop-dialog h2 { margin:0 0 1rem; font:900 clamp(1.55rem,4vw,2.4rem)/1.04 var(--shop-type); overflow-wrap:anywhere; }
.shop-dialog p { max-width:34em; font:400 1.05rem/1.55 var(--shop-type); }
.shop-dialog-price { font-weight:700!important; }
.shop-dialog[data-category="digital"] .shop-dialog-price,.shop-dialog[data-category="physical"] .shop-dialog-price { text-align:center; }
.shop-dialog-artwork { display:flex; justify-content:center; margin:1.5rem auto; width:min(60%,210px); height:200px; }
.shop-dialog-artwork .shop-object { width:100%; height:200px; max-width:none; }
.shop-dialog-artwork .shop-object--slide { width:200px; }
.shop-dialog-link { display:block; width:fit-content; max-width:100%; margin:1rem auto 0; padding:.8em 0; border-bottom:2px solid #fff; color:#fff; text-align:center; text-decoration:none; font:700 .9rem/1.3 var(--shop-type); text-transform:uppercase; }
.shop-dialog-link:focus-visible,.shop-dialog-close:focus-visible { outline:2px solid #fff; outline-offset:4px; }
.shop-fallback { grid-column:1; padding:2rem; color:var(--shop-paper); }

@media (max-width:650px) and (orientation:portrait) {
 .shop-layout { grid-template-columns:minmax(0,1fr); grid-template-rows:clamp(114px,18svh,165px) minmax(0,1fr); gap:4px; padding:calc(60px + env(safe-area-inset-top)) .25rem max(10px,env(safe-area-inset-bottom)); }
 .shop-brand { grid-column:1; grid-row:1; width:min(30vw,125px); height:calc((100% - 30px) / 1.5); margin:30px 0 0 -8px; padding-left:.6rem; }
 .shop-brand picture,.shop-brand img { height:100%; object-fit:contain; object-position:left center; }
 .shop-cabinet { grid-column:1; grid-row:2; }
 .shop-file { gap:.3em; padding:.14em .4em; border-radius:6px 7px 2px 2px; }
 .shop-file-number { font-size:clamp(.72rem,min(4.3cqw,8cqh),1.1rem); padding-right:.25em; }
 .shop-file-title,.shop-drawer--digital .shop-file-title { font-size:clamp(.59rem,min(3.05cqw,6.5cqh),.87rem); }
 .shop-drawer h2 { font-size:clamp(.82rem,min(5cqw,11cqh),1.3rem); }
 .shop-product-label { font-size:clamp(.52rem,min(2.6cqw,5.5cqh),.72rem); }
}
/* Compact landscape lays the three trays across so all files remain reachable. */
@media (orientation:landscape) and (max-height:600px) {
 .shop-brand { margin-left:0; }
 .shop-layout { grid-template-columns:minmax(135px,22.5%) minmax(0,1fr); gap:.5rem; padding:calc(48px + env(safe-area-inset-top)) max(.3rem,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(.3rem,env(safe-area-inset-left)); }
 .shop-cabinet { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:minmax(0,1fr); gap:5px; }
 .shop-tray { left:9%; right:9%; top:7%; bottom:32%; grid-template-columns:1fr; grid-template-rows:repeat(6,minmax(0,1fr)); gap:3px; }
 .shop-drawer--digital .shop-tray { grid-template-columns:1fr; grid-template-rows:repeat(6,minmax(0,1fr)); gap:3px; }
 .shop-file { gap:.35em; padding:.12em .4em; border-radius:5px 6px 2px 2px; }
 .shop-file-title,.shop-drawer--digital .shop-file-title { font-size:clamp(.58rem,4.6cqw,.9rem); }
 .shop-file-number { font-size:clamp(.7rem,5.7cqw,1rem); padding-right:.2em; }
 .shop-drawer h2 { flex-direction:column; gap:.15em; font-size:clamp(.65rem,5.3cqw,1.1rem); }
 .shop-drawer h2 span { font-size:.8em; }
 .shop-tray--physical { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(0,1fr)); gap:8px; }
 .shop-product-label { font-size:clamp(.5rem,3.6cqw,.66rem); }
 .shop-object--slide { height:min(100%,23cqh); }
}
@media (prefers-reduced-motion:reduce) {
 .shop-item { transition:none; }
 .shop-item:hover,.shop-item:focus-visible { transform:none; }
}
