/* b-final18 – ovládací prvky: varianta A „Guma“ (React Bits: Staggered Menu, Rubber Segment, Glide Select, Magnet), zvolená z b-final17
   Zdroj každého prvku (název, URL, převzaté hodnoty) je v hlavičce x/a.js (čitelně tools/x-src/a.tsx) a u bloků níže.
   Mění se jen barvy (tokeny webu) a písmo (Urbanist); rozměry a časy jsou z kódu komponent. */


/* ================= SPOLEČNÉ PRO A–D ================= */
/* dosavadní mechaniky (React Bits Pill Nav, Codrops hyperion) se ve variantách vypínají */
html.xv .pn-glide,html.xv .pn-ink{display:none}
html.xv .hy::before{content:none}
html.xv .hy:hover .hy-t>span{animation:none}
html.xv .shop:hover .ar,html.xv .btn:hover .ar{transform:none}
html.xv .xl{display:block}
/* vlastní nabídka Řadit (B, C, D) – kostra; vzhled a pohyb dodává varianta */
html.xv .fsort.xs-src{display:none}
.xs-box{position:relative}
.fsort.xs svg{position:static;margin-top:0;right:auto;top:auto;pointer-events:auto}
.xs-btn{appearance:none;display:inline-flex;align-items:center;gap:8px;margin:0;font:inherit;color:var(--ink);cursor:pointer;white-space:nowrap}
.xs-chev{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.xs-list{position:absolute;right:0;top:calc(100% + 6px);z-index:30;margin:0;padding:0;list-style:none;min-width:100%;outline:none}
.xs-list[hidden]{display:none!important}
.xs-opt{cursor:pointer;white-space:nowrap;outline:none}
@media (max-width:760px){.xs-list{right:auto;left:0}}
@media (min-width:981px){
  html.xv .bar{overflow:visible}
  html.xv .bar[data-open]{box-shadow:none}
}

/* =====================================================================
   A „GUMA“ – React Bits: Rubber Segment, Glide Select, Magnet, Staggered Menu
   (styly Rubber Segment a Glide Select jsou originální soubory v x/a.css; tady jen usazení do webu)
   ===================================================================== */
html.x-a #chips>.fgrp,html.x-a #chips>.fsort{display:none}
html.x-a .xa-filters{display:contents}
html.x-a .xa-grp{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
html.x-a .xa-sort{margin-left:auto}
html.x-a .xa-l{display:inline-flex;align-items:center;gap:7px}
html.x-a .xa-l.is-off{opacity:.35}
html.x-a .xa-n{font-size:.93em;opacity:.62;font-variant-numeric:tabular-nums}
html.x-a .xa-dot{width:10px;height:10px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}
html.x-a .rubber-segment,html.x-a .glide-select{font-family:var(--sans)}
html.x-a .rubber-segment__item:focus-visible{outline-color:var(--green)}
html.x-a .glide-select__menu{z-index:30}
/* Magnet: obal originální komponenty kolem existujících odkazů a tlačítek */
html.x-a .xa-mag{display:inline-flex}
html.x-a .xa-mag--shop{flex:none}
html.x-a .xa-mag--link .pn-item{height:40px;padding:0 14px}
html.x-a .pn-item{transition:color .25s ease}
html.x-a .pn-item:hover{color:var(--ink)}
html.x-a .pn-item[aria-current]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:7px}
html.x-a .shop,html.x-a .btn{border-radius:10px}
html.x-a .shop.hy,html.x-a .btn.hy,html.x-a .btn.hy:hover{background:var(--green);color:#f2f5ef;transition:background-color .25s ease,border-color .25s ease}
html.x-a .shop.hy:hover,html.x-a .btn.hy:hover{background:var(--green-d);border-color:var(--green-d);color:#f2f5ef}
html.x-a .hy:focus-visible{color:#f2f5ef}
@media (max-width:980px){html.x-a .bar-row>.xa-mag--shop{margin-left:auto}}
/* Staggered Menu – přepínač (hodnoty z StaggeredMenu.css: gap .3rem, ikona 14 px, čára 2 px; řádek 1.3em místo 1em kvůli háčkům) */
html.x-a .sw{gap:.3rem;border:0;background:none;padding:0 6px;font-weight:500;line-height:1.3}
html.x-a .sw:has(.sw-chip){padding-left:0;gap:10px}
html.x-a .sw-words{display:inline-block;height:1.3em;overflow:hidden;white-space:nowrap}
html.x-a .sm-toggle-textInner{display:flex;flex-direction:column;line-height:1.3}
html.x-a .sm-toggle-line{display:block;height:1.3em;line-height:1.3}
html.x-a .sm-icon{position:relative;width:14px;height:14px;flex:0 0 14px;display:inline-flex;align-items:center;justify-content:center;will-change:transform}
html.x-a .sm-icon-line{position:absolute;left:50%;top:50%;width:100%;height:2px;background:currentColor;border-radius:2px;transform:translate(-50%,-50%)}
html.x-a .sm-icon-line-v{transform:translate(-50%,-50%) rotate(90deg)}
html.x-a .sm-prelayers{display:none}
@media (min-width:981px){
  /* boční panel: šířka clamp(260px,38vw,420px) z originálu; začíná pod lištou */
  html.x-a .sm-prelayers{display:block;position:fixed;top:64px;left:0;bottom:0;width:clamp(260px,38vw,420px);pointer-events:none;z-index:5;visibility:hidden}
  html.x-a .bar[data-shown] .sm-prelayers{visibility:visible}
  html.x-a .sm-prelayer{position:absolute;inset:0}
  html.x-a .sm-prelayer:nth-child(1){background:var(--wood)}
  html.x-a .sm-prelayer:nth-child(2){background:var(--green)}
  html.x-a .sw-panel{position:fixed;top:64px;left:0;right:auto;bottom:0;width:clamp(260px,38vw,420px);max-height:none;padding:1.4em 1.6em 2em;background:var(--paper-2);z-index:10;overflow-y:auto}
  html.x-a .sw-grid{grid-template-columns:minmax(0,1fr);gap:.2rem}
  html.x-a .sw-grid li{transform:none!important;opacity:1!important}
  html.x-a .sw-item{flex-direction:row;align-items:center;gap:14px;height:auto;padding:4px 6px;font-size:22px;font-weight:500;text-transform:uppercase;letter-spacing:-.01em;line-height:1.25}
  html.x-a .sw-tile{width:34px;height:34px;flex:none}
  html.x-a .sw-name{display:block;overflow:hidden;min-width:0}
  html.x-a .sm-panel-itemLabel{display:inline-block;transform-origin:50% 100%;will-change:transform}
}
@media (prefers-reduced-motion:reduce){
  html.xv .ihb-dot,html.xv .ihb-b,html.xv .ihb-a>*,html.xv .fs-fill,html.xv .fs-t,html.xv .fs-in,html.xv .xc-over{transition-duration:.01s!important}
}

/* b-final18: logo v liště má k „Dřeviny +“ stejnou mezeru jako ke kraji okna (inkoust „d“ od kraje = konec „á“ → začátek „Dřeviny“).
   Bez toho 30 px vpravo proti 44–56 px vlevo. Odsouvá se „Dřeviny“, logo zůstává zarovnané s obsahem. */
@media (min-width:981px){html.x-a .bar-row>.mark{margin-right:calc(var(--gut) - 30px)}}

/* b-final21: aktuální sekce v liště – čára pod odkazem při posunu stránky přejede k dalšímu odkazu (místo skoku).
   Jedna čára na .pn-track, poloha a délka jen transformem (translateX + scaleX), dojezd var(--out). */
html.x-a .pn-item[aria-current]{text-decoration:none}
.xa-uline{position:absolute;left:0;top:0;width:100px;height:1px;background:var(--ink);transform-origin:0 0;pointer-events:none;opacity:0;transition:transform .6s var(--out),opacity .3s ease}
.xa-uline.is-on{opacity:1}
.xa-uline.no-anim{transition:none}
@media (prefers-reduced-motion:reduce){.xa-uline{transition:opacity .2s ease}}
/* b-final22: čára skryté sady odkazů (na podstránce v hero je vidět jen „Všechny dřeviny / Pro firmy / Kontakt“) se neukazuje */
.pn-set[inert] .xa-uline{opacity:0!important}
