/* Verkstedhyllene — inc/verkstedhylle.php 1.0 (30.10.2026)
   Den godkjente prototypen («Walseng verkstedhylle», style.css + shelf.css = siste finjustering) portet til nettstedet:
   slanke hyller med toppflate, forkant og dempet kontaktskygge, hele fotografier med smal varm fotokant og svak variasjon
   i høyde og vinkel, fire per hylle på PC og to per hylle på mobil (egen sammenhengende hyllekant per rad). Alt ligger i
   navnerommet .wvh (hyllene) og .wvh-viewer (bildevisningen, utenfor .wd-side/.wd-fp — derfor egne tokener med husets verdier).
   Fargene er husets tokener (style.css §24, forsidens kopi på .wd-fp) med prototypens oklch-verdier omregnet til hex som
   reserve. Fonter: husets (Cormorant Garamond 600 på overskrifter, Source Sans 3 ellers). Rekkefølge: tokener · nullstilling ·
   verktøylinje · materiale · hylle · arbeid · etikett · mørk variant · én rad (forsiden) · sidens intro · bildevisning ·
   nettbrett · mobil · redusert bevegelse. */

.wvh,.wvh-viewer{
  --wvh-bg:var(--wd-bg,#F5F3EF); --wvh-surface:var(--wd-surface,#FFFDF9); --wvh-ink:var(--wd-ink,#261F18); --wvh-muted:var(--wd-muted,#675D51);
  --wvh-accent:var(--wd-accent,#785321); --wvh-line:var(--wd-line,#DED8CE); --wvh-sand:var(--wd-sand,#C9B9A3);
  --wvh-night:var(--wd-night,#261F18); --wvh-night-text:var(--wd-night-text,#E9E1D3); --wvh-night-muted:var(--wd-night-muted,#A99C8A); --wvh-night-line:var(--wd-night-line,rgba(201,185,163,.22));
  --wvh-paper:var(--wd-paper,#F4EDE2);
  --wvh-ledge-top:#C9B8A2; --wvh-ledge-front:#B09E88; --wvh-ledge-edge:#A18B72; --wvh-photo-paper:#FBF8F2;
  --wvh-shadow:rgba(58,42,27,.16); --wvh-shadow-soft:rgba(58,42,27,.08);
  --wvh-text:var(--wvh-ink); --wvh-text-muted:var(--wvh-muted); --wvh-focus:var(--wvh-accent);
  --wvh-shelf-h:318px; --wvh-lip:8px; --wvh-gap:40px; --wvh-pad-x:32px;
  --wvh-head:var(--f-head,var(--wd-font-head,"Cormorant Garamond"),Georgia,serif);
  --wvh-ui:var(--f-ui,var(--wd-font-ui,"Source Sans 3"),system-ui,sans-serif);
  --wvh-ease:cubic-bezier(.16,1,.3,1);
}
.wvh{display:block;font-family:var(--wvh-ui);color:var(--wvh-text);font-size:16px;line-height:1.5;text-align:start}
.wvh *,.wvh *::before,.wvh *::after,.wvh-viewer *,.wvh-viewer *::before,.wvh-viewer *::after{box-sizing:border-box}
.wvh h2,.wvh p{margin:0;padding:0}
.wvh img{display:block;max-width:100%;border-radius:0}
.wvh a,.wvh a:hover,.wvh a:focus,.wvh a:visited{color:inherit;text-decoration:none}
.wvh button,.wvh-viewer button{font:inherit;color:inherit;background:none;border:0;border-radius:0;padding:0;margin:0;box-shadow:none;text-shadow:none;cursor:pointer;-webkit-appearance:none;appearance:none;letter-spacing:normal;text-transform:none;word-spacing:normal;line-height:1.2;min-height:0;min-width:0}
.wvh button:hover,.wvh button:focus,.wvh button:active,.wvh-viewer button:hover,.wvh-viewer button:focus,.wvh-viewer button:active{color:inherit;background:none;border:0;box-shadow:none;outline-offset:3px}
.wvh :focus-visible,.wvh-viewer :focus-visible{outline:2px solid var(--wvh-focus);outline-offset:4px}
.wvh [hidden]{display:none!important}
.wvh-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- verktøylinje: materialfiltre + hint ---------- */
.wvh-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--wvh-line);border-bottom:1px solid var(--wvh-line);min-height:66px;scroll-margin-top:16px}
.wvh-filters{display:flex;gap:32px;flex-wrap:wrap}
.wvh .wvh-filter{min-height:64px;padding:12px 0;font:600 15px/1.2 var(--wvh-ui);letter-spacing:.01em;color:var(--wvh-text-muted);border-bottom:2px solid transparent;transition:color .2s,border-color .2s}
.wvh .wvh-filter:hover{color:var(--wvh-text)}
.wvh .wvh-filter.is-on{color:var(--wvh-text);border-bottom-color:var(--wvh-accent)}
.wvh-hint{font-size:15px;color:var(--wvh-text-muted);white-space:nowrap}
.wvh-hint span{padding-left:12px}

/* ---------- materiale ---------- */
.wvh-material{padding-top:32px}
.wvh-heading{display:flex;align-items:baseline;gap:20px;margin-bottom:8px;flex-wrap:wrap}
.wvh-heading h2{font:600 clamp(28px,2.6vw,38px)/1.1 var(--wvh-head);letter-spacing:-.005em;color:var(--wvh-text)}
.wvh-heading span{font-size:14px;letter-spacing:.025em;color:var(--wvh-text-muted)}

/* ---------- hylle ---------- */
.wvh-shelf{position:relative;isolation:isolate;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:var(--wvh-gap);row-gap:0;padding:0 var(--wvh-pad-x);margin-bottom:40px}
.wvh-shelf::before{content:"";position:absolute;top:24px;left:4px;right:4px;height:calc(var(--wvh-shelf-h) - 24px);z-index:-1;pointer-events:none;
  background:linear-gradient(180deg,transparent 0%,rgba(232,224,211,.15) 65%,rgba(216,204,186,.2) 100%)}
.wvh-ledge{position:absolute;top:calc(var(--wvh-shelf-h) - 2px);left:0;right:0;height:var(--wvh-lip);z-index:2;pointer-events:none;
  background:linear-gradient(180deg,var(--wvh-ledge-top),var(--wvh-ledge-front) 38%,var(--wvh-ledge-edge));
  border-top:1px solid #E7DDCC;border-bottom:1px solid rgba(125,107,89,.55);
  box-shadow:0 2px 2px var(--wvh-shadow-soft),0 9px 12px -4px var(--wvh-shadow),0 25px 26px -18px var(--wvh-shadow)}
.wvh-ledge::before{content:"";position:absolute;top:-9px;left:0;right:0;height:9px;background:linear-gradient(180deg,#D8CCBA,var(--wvh-ledge-top));
  clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 100%,0 100%);border-top:1px solid rgba(179,165,147,.55)}
.wvh-ledge--mobile{display:none}

/* ---------- arbeid ---------- */
.wvh .wvh-work{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;min-width:0;padding:0;text-align:left;background:none;border:0}
.wvh .wvh-work:focus-visible{outline-offset:8px}
.wvh-art{position:relative;z-index:1;display:flex;align-items:flex-end;justify-content:center;width:100%;height:var(--wvh-shelf-h);padding-bottom:4px}
.wvh-art::after{content:"↗";position:absolute;right:8px;bottom:24px;display:grid;place-items:center;width:28px;height:32px;color:var(--wvh-accent);font-size:20px;opacity:0;transition:opacity .18s}
.wvh .wvh-work:hover .wvh-art::after,.wvh .wvh-work:focus-visible .wvh-art::after{opacity:1}
.wvh .wvh-art img{height:var(--wvh-h,260px);width:auto;max-width:calc(100% - 16px);max-height:calc(var(--wvh-shelf-h) - 16px);object-fit:contain;
  background:var(--wvh-surface);border:5px solid var(--wvh-photo-paper);outline:1px solid rgba(67,56,44,.1);
  box-shadow:1px 1px 1px rgba(40,32,24,.12),4px 6px 10px var(--wvh-shadow),10px 12px 20px -12px rgba(58,42,27,.2);
  transform:rotate(var(--wvh-tilt,0deg));transform-origin:bottom center;transition:transform .3s var(--wvh-ease),box-shadow .3s var(--wvh-ease)}
.wvh .wvh-work:hover img,.wvh .wvh-work:focus-visible img{transform:translateY(-6px) rotate(0);box-shadow:2px 2px 2px rgba(40,32,24,.1),7px 12px 18px rgba(58,42,27,.18)}

/* ---------- etikett (ingen inventarnumre; navn og motivbeskrivelse skilt) ---------- */
.wvh-label{display:block;width:100%;padding:24px 8px 0;min-height:92px;line-height:1.35}
.wvh-name{display:block;font:600 16px/1.35 var(--wvh-ui);color:var(--wvh-text);max-width:26ch}
.wvh-desc{display:block;font-size:14px;color:var(--wvh-text-muted);margin-top:4px;max-width:28ch}

/* ---------- mørk variant (forsidens bånd): lyse bildetekster, dempede varme skygger ---------- */
.wvh--dark{--wvh-text:var(--wvh-night-text);--wvh-text-muted:var(--wvh-night-muted);--wvh-focus:var(--wvh-sand);--wvh-line:var(--wvh-night-line);
  --wvh-shadow:rgba(0,0,0,.42);--wvh-shadow-soft:rgba(0,0,0,.25)}
.wvh--dark .wvh-shelf::before{background:linear-gradient(180deg,transparent 0%,rgba(233,225,211,.03) 65%,rgba(233,225,211,.06) 100%)}
.wvh--dark .wvh-ledge{border-top-color:#D8CCBA;border-bottom-color:rgba(0,0,0,.55)}
.wvh--dark .wvh-art::after{color:var(--wvh-sand)}
.wvh--dark .wvh-art img{outline-color:rgba(0,0,0,.35);box-shadow:1px 1px 1px rgba(0,0,0,.3),4px 8px 14px rgba(0,0,0,.42),10px 14px 24px -12px rgba(0,0,0,.5)}
.wvh--dark .wvh-work:hover img,.wvh--dark .wvh-work:focus-visible img{box-shadow:2px 2px 2px rgba(0,0,0,.25),8px 14px 22px rgba(0,0,0,.45)}

/* ---------- én rad (forsiden): fire på PC, sveipbar rad med ~to synlige på mobil ---------- */
.wvh--row{--wvh-shelf-h:300px}
.wvh-rowwrap{position:relative}
.wvh-scroller{position:relative}
.wvh--row .wvh-shelf{margin-bottom:0}
.wvh-rowwrap::after{content:"";position:absolute;top:0;bottom:0;right:0;width:0;pointer-events:none;opacity:0}

/* ---------- sidens intro (/fra-verkstedet/) ---------- */
.wvh-page{padding-top:calc(76px + clamp(36px,4vw,56px));background:var(--wd-bg,#F5F3EF)}
.wvh-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:32px;padding-bottom:clamp(28px,3vw,40px)}
.wvh-intro h1{font:600 clamp(40px,5vw,60px)/1.05 var(--f-head,"Cormorant Garamond",Georgia,serif);letter-spacing:-.01em;color:var(--wd-ink,#261F18);margin:0}
.wvh-intro .wd-kicker{margin-bottom:14px}
.wvh-intro__lead{font:400 17px/1.65 var(--f-ui,"Source Sans 3",system-ui,sans-serif);color:var(--wd-muted,#675D51);max-width:30em;padding-bottom:8px;margin:0}
.wvh-page .wvh-collection{padding-bottom:clamp(56px,7vw,96px)}
.wvh-empty{padding:clamp(40px,6vw,80px) 0;font:400 17px/1.6 var(--f-ui,"Source Sans 3",system-ui,sans-serif);color:var(--wd-muted,#675D51)}
.wvh-empty a{text-decoration:underline;text-underline-offset:4px;color:inherit}

/* ---------- bildevisning (dialog, delt av instansene) ---------- */
.wvh-viewer{border:0;padding:0;margin:auto;width:min(1380px,calc(100vw - 64px));max-width:none;max-height:calc(100dvh - 48px);
  color:var(--wvh-night-text);background:var(--wvh-night);box-shadow:0 25px 100px rgba(0,0,0,.4);font-family:var(--wvh-ui);font-size:16px;line-height:1.5;text-align:start;overflow:auto}
.wvh-viewer::backdrop{background:rgba(28,24,21,.8);backdrop-filter:blur(7px)}
.wvh-viewer[open]{transition:opacity .2s ease,transform .2s var(--wvh-ease)}
@starting-style{.wvh-viewer[open]{opacity:0;transform:translateY(6px)}}
.wvh-viewer h2,.wvh-viewer p{margin:0;padding:0}
.wvh-viewer img{display:block;max-width:100%;border-radius:0}
.wvh-viewer a,.wvh-viewer a:hover,.wvh-viewer a:focus,.wvh-viewer a:visited{text-decoration:none}
.wvh-viewer__shell{padding:24px 32px 32px}
.wvh-viewer__top{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--wvh-night-line);padding-bottom:16px}
.wvh-viewer__brand{font:600 clamp(22px,2vw,30px)/1.1 var(--wvh-head);color:var(--wvh-night-text)}
.wvh-viewer .wvh-viewer__close{display:inline-flex;align-items:center;gap:14px;min-height:48px;min-width:48px;font:600 14px/1 var(--wvh-ui);letter-spacing:.06em;color:var(--wvh-night-text)}
.wvh-viewer .wvh-viewer__close span{font:400 28px/1 var(--wvh-ui)}
.wvh-viewer__content{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:40px;padding-top:24px}
.wvh-viewer__stage{position:relative;height:min(66dvh,680px);min-height:260px;background:#1B1612}
.wvh-viewer__wrap{width:100%;height:100%;overflow:auto;display:flex;align-items:center;justify-content:center;padding:24px;scrollbar-width:thin}
.wvh-viewer .wvh-viewer__img{max-height:100%;max-width:100%;width:auto;height:auto;object-fit:contain;background:#1B1612}
.wvh-viewer__wrap.is-zoomed{display:block;padding:16px}
.wvh-viewer__wrap.is-zoomed .wvh-viewer__img{max-height:none;max-width:none;width:150%;height:auto;cursor:zoom-out}
.wvh-viewer .wvh-viewer__zoom{position:absolute;bottom:16px;right:16px;min-height:44px;padding:12px 16px;background:var(--wvh-paper);color:var(--wvh-ink);font:600 14px/1 var(--wvh-ui);letter-spacing:.04em;border-radius:2px}
.wvh-viewer .wvh-viewer__zoom:hover,.wvh-viewer .wvh-viewer__zoom:focus{background:var(--wvh-surface);color:var(--wvh-ink)}
.wvh-viewer__error{color:var(--wvh-night-text);padding:24px;text-align:center}
.wvh-viewer__info{display:flex;flex-direction:column;justify-content:space-between;gap:32px;padding:32px 8px 0}
.wvh-viewer__eyebrow{font:600 12px/1.2 var(--wvh-ui);letter-spacing:.24em;text-transform:uppercase;color:var(--wvh-sand)}
.wvh-viewer__title{font:600 clamp(28px,2.8vw,44px)/1.08 var(--wvh-head);letter-spacing:-.005em;color:var(--wvh-night-text);margin:16px 0 20px}
.wvh-viewer__caption{font-size:16px;line-height:1.6;color:var(--wvh-night-muted);max-width:30ch}
.wvh-viewer .wvh-viewer__cta{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 20px;background:var(--wvh-paper);color:var(--wvh-ink);font:600 15px/1.2 var(--wvh-ui);border-radius:2px;transition:background .25s}
.wvh-viewer .wvh-viewer__cta:hover,.wvh-viewer .wvh-viewer__cta:focus{background:var(--wvh-surface);color:var(--wvh-ink)}
.wvh-viewer__note{font-size:14px;line-height:1.5;color:var(--wvh-night-muted);margin-top:12px}
.wvh-viewer__nav{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid var(--wvh-night-line);padding-top:16px}
.wvh-viewer .wvh-viewer__arrow{display:inline-flex;align-items:center;gap:8px;min-height:48px;min-width:48px;padding:0 4px;font:600 14px/1 var(--wvh-ui);letter-spacing:.04em;color:var(--wvh-night-text)}
.wvh-viewer .wvh-viewer__arrow span{font-size:18px}
.wvh-viewer__pos{font-size:14px;font-variant-numeric:tabular-nums;color:var(--wvh-night-muted)}
html.wvh-modal-open,html.wvh-modal-open body{overflow:hidden}

/* ---------- nettbrett og smale PC-vinduer ---------- */
@media (max-width:1100px) and (min-width:601px){
  .wvh{--wvh-shelf-h:286px;--wvh-gap:24px;--wvh-pad-x:16px}
  .wvh--row{--wvh-shelf-h:272px}
  .wvh .wvh-art img{height:auto;max-height:min(var(--wvh-h,260px),260px);max-width:100%;border-width:4px}
  .wvh-label{padding-inline:0}
  .wvh-name{font-size:15px}
  .wvh-desc{font-size:13px}
  .wvh-viewer__content{gap:24px;grid-template-columns:minmax(0,1.3fr) minmax(230px,1fr)}
}
@media (max-width:900px){.wvh-hint{display:none}}

/* ---------- mobil: to per hylle; forsidens rad sveipes ---------- */
@media (max-width:760px){
  .wvh--row{--wvh-shelf-h:224px;--wvh-lip:7px}
  .wvh-rowwrap{margin-inline:calc(var(--pad,20px)*-1)}
  .wvh-scroller{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scroll-padding-inline:var(--pad,20px);-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:0 var(--pad,20px) 6px;overscroll-behavior-x:contain}
  .wvh-scroller::-webkit-scrollbar{display:none}
  .wvh-track{flex:none;display:block;min-width:100%;width:max-content}
  .wvh--row .wvh-shelf{display:flex;column-gap:20px;padding:0;width:max-content;min-width:100%}
  .wvh--row .wvh-shelf::before{left:0;right:0}
  .wvh--row .wvh-shelf .wvh-work{flex:none;width:min(44vw,220px);scroll-snap-align:start}
  .wvh--row .wvh-art img{height:auto;max-height:calc(var(--wvh-shelf-h) - 20px);max-width:100%;border-width:4px}
  .wvh--row .wvh-label{min-height:0;padding:20px 0 0}
  .wvh--row .wvh-name{font-size:15px}
  .wvh--row .wvh-desc{font-size:13px}
  .wvh-rowwrap::after{width:56px;opacity:1;background:linear-gradient(90deg,rgba(38,31,24,0),rgba(38,31,24,.92));transition:opacity .3s}
  .wvh-rowwrap.is-end::after{opacity:0}
  .wvh-page{padding-top:calc(64px + 28px)}
}
@media (max-width:600px){
  .wvh{--wvh-shelf-h:234px;--wvh-row:344px;--wvh-lip:7px;--wvh-gap:24px;--wvh-pad-x:8px}
  .wvh-toolbar{min-height:60px}
  .wvh-filters{gap:24px}
  .wvh .wvh-filter{min-height:60px}
  .wvh-material{padding-top:28px}
  .wvh-heading{gap:12px;margin-bottom:0}
  .wvh-heading span{font-size:13px;letter-spacing:0}
  .wvh--collection .wvh-shelf{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:0}
  .wvh--collection .wvh-shelf::before{height:calc(var(--wvh-shelf-h) - 24px);top:24px}
  .wvh--collection .wvh-ledge--mobile{display:block;top:calc(var(--wvh-shelf-h) + var(--wvh-row) - 2px)}
  .wvh--collection .wvh-work{height:var(--wvh-row)}
  .wvh--collection .wvh-art img{height:auto;max-height:calc(var(--wvh-shelf-h) - 20px);max-width:100%;border-width:4px}
  .wvh--collection .wvh-label{min-height:104px;padding:20px 0 0}
  .wvh--collection .wvh-name{font-size:15px}
  .wvh--collection .wvh-desc{font-size:13px}
  .wvh .wvh-work:hover img{transform:rotate(var(--wvh-tilt,0deg))}
  .wvh-art::after{display:none}
  .wvh-intro{display:block}
  .wvh-intro__lead{margin-top:16px;padding-bottom:0}
  .wvh-viewer{width:100vw;max-height:100dvh;height:100dvh;margin:0}
  .wvh-viewer__shell{padding:16px;height:100%;overflow:auto}
  .wvh-viewer__top{padding-bottom:8px}
  .wvh-viewer__content{display:flex;flex-direction:column;padding-top:16px;gap:20px}
  .wvh-viewer__stage{height:48dvh;min-height:220px;flex-shrink:0}
  .wvh-viewer__wrap{padding:12px}
  .wvh-viewer__info{padding:0;gap:20px}
  .wvh-viewer__title{font-size:clamp(26px,7vw,34px);margin:8px 0 12px}
  .wvh-viewer__caption{max-width:none;font-size:15px}
  .wvh-viewer__nav{padding-top:8px}
}
@media (max-height:600px) and (min-width:601px){
  .wvh-viewer{max-height:96dvh}
  .wvh-viewer__content{grid-template-columns:1.6fr 1fr}
  .wvh-viewer__stage{height:65dvh}
  .wvh-viewer__info{padding-top:0;gap:16px}
  .wvh-viewer__title{font-size:clamp(24px,3vw,32px);margin:8px 0}
  .wvh-viewer__caption{display:none}
}

/* ---------- redusert bevegelse ---------- */
@media (prefers-reduced-motion:reduce){
  .wvh *,.wvh *::before,.wvh *::after,.wvh-viewer,.wvh-viewer *{transition:none!important;animation:none!important;scroll-behavior:auto!important}
  .wvh .wvh-work:hover img,.wvh .wvh-work:focus-visible img{transform:rotate(var(--wvh-tilt,0deg))}
}
