/* =====================================================================
   IQ knihy – STRÁNKA KNIHY (jedna šablóna produktu v Elementore)
   Načítava sa automaticky na stránkach produktov a v editore Elementora.
   Farby sa berú z produktu (záložka „Stránka knihy“ → Farby) cez --kniha-…
   Zoznam class a kam patria: NAVOD-STRANKA-KNIHY.md → „Classy šablóny“.
   Len CSS – žiadne skripty.
   ===================================================================== */

:root{
  --kp-ink:#231A24; --kp-ink-2:#4A3F4B; --kp-muted:#7A707B; --kp-line:rgba(35,26,36,.1);
  --kp-paper:#FBF8F4; --kp-paper-2:#F4EEE7;
  --kp-gold:#B8964A; --kp-gold-l:#E4CF96;
  --kp-ease:cubic-bezier(.22,1,.36,1);
  --kp-head:"Open Sans",sans-serif; --kp-caps:"Cinzel",serif; --kp-body:"Inter",sans-serif;
}
/* náhradné farby knihy (ak v produkte nie sú vyplnené) + pozadie stránky */
body{
  --kniha-prechod-1:#6F4E5C; --kniha-prechod-2:#B76E79; --kniha-prechod-3:#D9A38F;
}
body.single-product{background-color:var(--kp-paper)}

/* ATRAMENT – textúra z farieb knihy (škvrny, odlesky, prechod), ktorá sa pomaly preleje.
   Používa ju veľký nadpis, hrubé časti nadpisov, slová v páse, citát aj krúžky štítkov. */
body.single-product,body.single-product .elementor,.elementor-editor-preview,body{
  --kp-atrament:
    radial-gradient(9% 22% at 18% 32%,rgba(255,245,240,.55),rgba(255,245,240,0) 70%),
    radial-gradient(7% 18% at 63% 70%,rgba(255,245,240,.45),rgba(255,245,240,0) 70%),
    radial-gradient(6% 16% at 86% 24%,rgba(255,245,240,.4),rgba(255,245,240,0) 70%),
    radial-gradient(34% 4% at 42% 48%,rgba(255,245,240,.35),rgba(255,245,240,0) 80%),
    radial-gradient(26% 46% at 8% 76%,var(--kniha-prechod-3),transparent 72%),
    radial-gradient(22% 40% at 34% 12%,var(--kniha-prechod-5,var(--kniha-prechod-2)),transparent 72%),
    radial-gradient(24% 44% at 56% 40%,var(--kniha-prechod-1),transparent 72%),
    radial-gradient(28% 48% at 78% 82%,var(--kniha-prechod-2),transparent 72%),
    radial-gradient(22% 40% at 96% 30%,var(--kniha-prechod-4,var(--kniha-prechod-3)),transparent 72%),
    var(--kniha-prechod);
}
@keyframes kpInk{0%{background-position:0% 30%}100%{background-position:100% 70%}}
.kniha-ink-text{
  background:var(--kp-atrament)!important;background-size:170% 220%!important;background-position:0% 30%;
  -webkit-background-clip:text!important;background-clip:text!important;
  color:transparent!important;-webkit-text-fill-color:transparent!important;
}

@keyframes kpUp{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
@keyframes kpLine{from{transform:translateY(110%)}to{transform:none}}
@keyframes kpSpin{to{rotate:360deg}}
@keyframes kpFloat{50%{translate:0 -14px}}
@keyframes kpBob{50%{translate:0 -12px}}
@keyframes kpSheen{0%,70%{background-position:150% 0}100%{background-position:-50% 0}}
@keyframes kpDrift{50%{transform:translate(-40px,30px) scale(1.08)}100%{transform:translate(30px,-20px) scale(.95)}}
@keyframes kpMarq{to{transform:translateX(-100%)}}
@keyframes kpGrad{to{background-position:100% 0}}
@keyframes kpPulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,.35)}100%{box-shadow:0 0 0 26px rgba(255,255,255,0)}}


/* =====================================================================
   SPOLOČNÉ – štítok sekcie, nadpisy, odhalenie pri scrolle
   ===================================================================== */

/* malý zlatý štítok nad nadpisom („O KNIHE“) – na widget Heading/Text */
.kniha-label .elementor-heading-title,.kniha-label > p{
  display:inline-flex;align-items:center;gap:12px;
  font-family:var(--kp-caps)!important;font-size:.78rem!important;font-weight:600!important;
  letter-spacing:.2em!important;text-transform:uppercase;color:var(--kp-gold)!important;
}
.kniha-label .elementor-heading-title::before,.kniha-label > p::before{content:"";width:28px;height:1px;background:currentColor}
.kniha-label.kniha-label-stred .elementor-heading-title::after{content:"";width:28px;height:1px;background:currentColor}
.kniha-label-stred{text-align:center}

/* nadpis sekcie – tenká časť / hrubá farebná časť */
.kniha-h2 .elementor-heading-title{font-family:var(--kp-head)!important;font-weight:300!important;font-size:clamp(1.9rem,3.2vw,3rem)!important;line-height:1.08!important;letter-spacing:-.01em;color:var(--kp-ink)}
.kniha-h2-b .elementor-heading-title{
  font-family:var(--kp-head)!important;font-weight:800!important;font-size:clamp(1.9rem,3.2vw,3rem)!important;line-height:1.08!important;letter-spacing:-.015em;
  padding-right:.12em;
  background:var(--kp-atrament);background-size:170% 220%;background-position:0% 30%;-webkit-background-clip:text;background-clip:text;
  color:transparent!important;-webkit-text-fill-color:transparent;animation:kpInk 18s ease-in-out infinite alternate;
}

/* bežný odsek v štýle stránky (krátky popis produktu, odseky) */
.kniha-text,.kniha-text p,.kniha-text .woocommerce-product-details__short-description{
  font-family:var(--kp-body)!important;color:var(--kp-ink-2)!important;font-size:1.05rem!important;line-height:1.7!important;
}
.kniha-text{max-width:56ch}
.kniha-text p{margin:0 0 .8em}.kniha-text p:last-child{margin-bottom:0}

/* odhalenie pri scrolle – na čokoľvek (prehliadače bez podpory zobrazia prvok hneď) */
@supports (animation-timeline:view()){
  .kniha-reveal{animation:kpUp linear both;animation-timeline:view();animation-range:entry 0% entry 55%}
}


/* =====================================================================
   1. ÚVOD (HERO)
   kniha-hero  >  kniha-hero-text (ľavý stĺpec)  +  kniha-scena (obálka)
   ===================================================================== */
.e-con.kniha-hero{position:relative;overflow:hidden;isolation:isolate;background-color:var(--kniha-pozadie-uvod)!important}
.e-con.kniha-hero::before,.e-con.kniha-hero::after{
  content:"";position:absolute;inset:-12%;z-index:-1;pointer-events:none;
  filter:blur(55px);mix-blend-mode:multiply;animation:kpDrift 22s ease-in-out infinite alternate;
}
.e-con.kniha-hero::before{
  opacity:.42;
  background:
    radial-gradient(closest-side,var(--kniha-prechod-1),transparent) 92% 4% / 560px 560px no-repeat,
    radial-gradient(closest-side,var(--kniha-prechod-3),transparent) 104% 64% / 400px 400px no-repeat;
}
.e-con.kniha-hero::after{
  opacity:.32;animation-duration:27s;animation-direction:alternate-reverse;
  background:
    radial-gradient(closest-side,var(--kniha-prechod-2),transparent) 66% 100% / 480px 480px no-repeat,
    radial-gradient(closest-side,#F3D9A4,transparent) -4% 96% / 440px 440px no-repeat;
}

/* ľavý stĺpec – prvky nabehnú postupne po načítaní */
.kniha-hero-text > .elementor-element{animation:kpUp 1s var(--kp-ease) both}
.kniha-hero-text > .elementor-element:nth-child(1){animation-delay:.1s}
.kniha-hero-text > .elementor-element:nth-child(2){animation-delay:.2s}
.kniha-hero-text > .elementor-element:nth-child(3){animation-delay:.35s}
.kniha-hero-text > .elementor-element:nth-child(4){animation-delay:.6s}
.kniha-hero-text > .elementor-element:nth-child(5){animation-delay:.8s}
.kniha-hero-text > .elementor-element:nth-child(6){animation-delay:.95s}
.kniha-hero-text > .elementor-element:nth-child(n+7){animation-delay:1.1s}
/* nadpisy nemajú fade – vysunú sa zospodu */
.kniha-hero-text > .kniha-nadpis-tenky,.kniha-hero-text > .kniha-nadpis-hruby{animation:none}

/* autor nad nadpisom */
.kniha-autor-riadok .elementor-heading-title{
  display:inline-flex;align-items:center;gap:14px;
  font-family:var(--kp-caps)!important;font-weight:600!important;font-size:.86rem!important;letter-spacing:.22em!important;
  text-transform:uppercase;color:var(--kp-gold)!important;
}
.kniha-autor-riadok .elementor-heading-title::before{content:"";width:40px;height:1px;background:currentColor}

/* veľký nadpis knihy */
.kniha-nadpis-tenky,.kniha-nadpis-hruby{overflow:hidden;padding:.16em 0 .18em;margin:-.1em 0 -.14em!important}
.kniha-nadpis-tenky .elementor-heading-title,.kniha-nadpis-hruby .elementor-heading-title{
  text-transform:uppercase;animation:kpLine 1.3s var(--kp-ease) both;
}
.kniha-nadpis-tenky .elementor-heading-title{
  font-family:var(--kp-head)!important;font-weight:300!important;font-size:clamp(1.9rem,3.8vw,3.4rem)!important;
  line-height:1.08!important;letter-spacing:.01em;color:var(--kp-ink);animation-delay:.2s;
}
.kniha-nadpis-hruby .elementor-heading-title{
  font-family:var(--kp-head)!important;font-weight:800!important;font-size:clamp(2.6rem,6.8vw,5.8rem)!important;
  line-height:1!important;letter-spacing:-.015em;animation-delay:.4s;
  background:var(--kp-atrament);background-size:130% 220%;background-position:0% 30%;-webkit-background-clip:text;background-clip:text;
  color:transparent!important;-webkit-text-fill-color:transparent;
  animation:kpLine 1.3s var(--kp-ease) .4s both,kpInk 18s ease-in-out 1.7s infinite alternate;
  padding-right:.12em;
}

/* cena + košík (WooCommerce widgety Product Price a Add To Cart) */
.kniha-cena .price,.kniha-cena .amount{white-space:nowrap;font-family:var(--kp-head)!important;font-weight:800!important;font-size:clamp(2.2rem,3.4vw,2.9rem)!important;line-height:1;letter-spacing:-.02em;color:var(--kp-ink)!important}
/* „s DPH“ (WooCommerce → Nastavenia → Daň → Prípona zobrazenia ceny) – malé a sivé vedľa veľkej ceny */
.kniha-cena .woocommerce-price-suffix{display:inline-block;margin-left:12px;vertical-align:baseline;font-family:var(--kp-body)!important;font-weight:500!important;font-size:.95rem!important;letter-spacing:0!important;color:var(--kp-muted)!important}
/* suma bez DPH je vo vnútri prípony – nesmie zdediť veľké písmo hlavnej ceny (pravidlo .kniha-cena .amount vyššie) */
.kniha-cena .woocommerce-price-suffix .amount{font-family:inherit!important;font-weight:600!important;font-size:inherit!important;line-height:inherit;letter-spacing:0!important;color:inherit!important}
.kniha-kosik form.cart{display:flex!important;align-items:center;gap:14px;flex-wrap:wrap;margin:0!important}
/* clearfix WooCommerce (::before/::after) by vo flexe bol prázdny prvok + medzera → počet kusov by bol odsadený od ceny */
.kniha-kosik form.cart::before,.kniha-kosik form.cart::after{content:none!important;display:none!important}
.kniha-kosik .quantity{margin:0!important;float:none!important}
.kniha-kosik .quantity input.qty{
  width:96px!important;height:54px!important;border:1px solid var(--kp-line)!important;border-radius:999px!important;
  background:#fff;text-align:center;font-weight:600;font-size:1rem;color:var(--kp-ink);
}
.kniha-kosik .single_add_to_cart_button,
.kniha-tlacidlo .elementor-button{
  display:inline-flex!important;align-items:center;justify-content:center;gap:12px;
  height:54px;padding:0 30px!important;border:0!important;border-radius:999px!important;
  background:var(--kniha-prechod)!important;background-size:200% 100%!important;color:var(--kniha-na-akcente,#fff)!important;
  font-family:var(--kp-body)!important;font-weight:600!important;font-size:.95rem!important;line-height:1!important;
  box-shadow:0 14px 34px -14px var(--kniha-akcent);
  transition:transform .45s var(--kp-ease),box-shadow .45s var(--kp-ease),background-position .8s var(--kp-ease)!important;
}
.kniha-kosik .single_add_to_cart_button:hover,
.kniha-tlacidlo .elementor-button:hover{transform:translateY(-2px);background-position:100% 0!important;box-shadow:0 20px 40px -14px var(--kniha-akcent)}
.kniha-kosik .single_add_to_cart_button::after{content:"→";font-size:1.1em;transition:transform .45s var(--kp-ease)}
.kniha-kosik .single_add_to_cart_button:hover::after{transform:translateX(4px)}


/* =====================================================================
   SCÉNA S KNIHOU – točiace sa kruhy + 3D kniha + plávajúce štítky
   kniha-scena > Image widget (obálka – dynamicky „Featured Image“)
               + kniha-stitok kniha-stitok-1 / -2 / -3 (kontajner: názov + popis)
   ===================================================================== */
.e-con.kniha-scena{position:relative;isolation:isolate;perspective:1700px;min-height:clamp(420px,42vw,560px);justify-content:center;align-items:center}
.e-con.kniha-scena::before,.e-con.kniha-scena::after{
  content:"";position:absolute;top:50%;left:50%;z-index:-1;pointer-events:none;aspect-ratio:1;border-radius:50%;translate:-50% -52%;
}
.e-con.kniha-scena::before{
  width:min(520px,96%);
  background:
    radial-gradient(circle at 50% 5px,var(--kp-gold) 4.5px,transparent 5px),
    radial-gradient(circle closest-side,transparent calc(100% - 5.5px),rgba(184,150,74,.45) calc(100% - 5px),rgba(184,150,74,.45) calc(100% - 4px),transparent calc(100% - 3.5px));
  animation:kpSpin 70s linear infinite;
}
.e-con.kniha-scena::after{
  width:min(430px,80%);border:1px dashed color-mix(in srgb,var(--kniha-akcent,#B76E79) 35%,transparent);
  animation:kpSpin 50s linear infinite reverse;
}

/* 3D kniha */
.kniha-scena > .elementor-widget-image{
  position:relative;width:fit-content!important;margin-inline:auto;
  transform-style:preserve-3d;transform:rotateY(-24deg) rotateX(4deg);
  transition:transform .9s var(--kp-ease);animation:kpFloat 7s ease-in-out infinite;
}
.kniha-scena > .elementor-widget-image img{
  display:block;width:clamp(220px,22vw,300px)!important;height:auto;border-radius:2px 6px 6px 2px;
  box-shadow:30px 40px 60px -24px rgba(35,26,36,.55),inset 3px 0 6px rgba(0,0,0,.2);
}
/* strany knihy z boku */
.kniha-scena > .elementor-widget-image::before{
  content:"";position:absolute;top:4px;bottom:4px;right:0;width:28px;
  transform-origin:right center;transform:rotateY(-90deg);
  background:repeating-linear-gradient(90deg,#fffdf7 0 2px,#e7dfcf 2px 3px);
}
/* lesk po obálke */
.kniha-scena > .elementor-widget-image::after{
  content:"";position:absolute;inset:0;border-radius:2px 6px 6px 2px;pointer-events:none;
  background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.32) 50%,transparent 60%) no-repeat;
  background-size:250% 100%;background-position:150% 0;animation:kpSheen 8s ease-in-out 2s infinite;
}
.kniha-scena:hover > .elementor-widget-image{transform:rotateY(-6deg) rotateX(2deg) scale(1.03)}
.kniha-scena:hover > .elementor-widget-image::after{animation-duration:1.6s;animation-delay:0s}

/* plávajúce štítky okolo knihy */
.e-con.kniha-stitok{
  position:absolute!important;z-index:3;width:auto!important;max-width:240px;
  display:grid!important;grid-template-columns:28px auto;column-gap:12px;row-gap:1px;align-items:center;
  padding:11px 22px 11px 12px!important;border-radius:999px;
  background:rgba(255,255,255,.75)!important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  box-shadow:0 14px 30px -16px rgba(43,26,47,.35),inset 0 0 0 1px rgba(255,255,255,.8);
  animation:kpBob 8s ease-in-out infinite;
}
.e-con.kniha-stitok::before{
  content:"";grid-row:1 / span 2;width:28px;height:28px;border-radius:50%;
  background:var(--kp-atrament);background-size:300% 300%;animation:kpInk 14s ease-in-out infinite alternate;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);
}
.kniha-stitok > .elementor-element{grid-column:2;margin:0!important;width:auto!important}
.kniha-stitok .elementor-heading-title,.kniha-stitok > :first-child p{font-family:var(--kp-body)!important;font-size:.84rem!important;font-weight:600!important;line-height:1.2!important;color:var(--kp-ink)!important;margin:0}
.kniha-stitok > :nth-child(2) .elementor-heading-title,.kniha-stitok > :nth-child(2) p{font-size:.72rem!important;font-weight:400!important;color:var(--kp-muted)!important;margin:0}
.kniha-stitok-1{top:12%;left:2%}
.kniha-stitok-2{top:46%;right:0;animation-duration:9s!important;animation-delay:-3s!important}
.kniha-stitok-3{bottom:14%;left:6%;animation-duration:10s!important;animation-delay:-5s!important}
.kniha-stitok-2::before{animation-delay:-5s}
.kniha-stitok-3::before{animation-delay:-10s}
/* prázdny štítok (nevyplnený v produkte) sa nezobrazí */
.e-con.kniha-stitok:not(:has(.elementor-heading-title:not(:empty),p:not(:empty))){display:none!important}


/* =====================================================================
   2. PÁS S HESLAMI – šikmá tmavá stuha
   kniha-pas > 2× kontajner kniha-pas-track (druhý = Duplikovať prvý)
   V každom tracku: Heading slovo, Heading ✦, Heading slovo, Heading ✦ …
   ===================================================================== */
.e-con.kniha-pas{
  position:relative;z-index:3;overflow:hidden;
  flex-direction:row!important;flex-wrap:nowrap!important;--gap:0px;gap:0!important;
  padding:24px 0!important;background:var(--kp-ink)!important;
  transform:rotate(-1.6deg) scale(1.04)!important;
  margin-block:calc(-1.5vw - 4px)!important;
  box-shadow:0 34px 50px -36px rgba(35,26,36,.7);
}
.e-con.kniha-pas::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--kniha-prechod);opacity:.16;pointer-events:none}
.e-con.kniha-pas::after{content:"";position:absolute;left:0;right:0;top:7px;bottom:7px;border-block:1px solid rgba(228,207,150,.28);pointer-events:none}
.e-con.e-parent:has(+ .kniha-pas){border-bottom:calc(1.5vw + 4px) solid transparent!important}
.kniha-pas + .e-con{border-top:calc(1.5vw + 4px) solid transparent!important}

.e-con.kniha-pas-track{
  flex:none!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;
  width:max-content!important;max-width:none!important;--gap:0px;gap:0!important;padding:0!important;
  animation:kpMarq 40s linear infinite;will-change:transform;
}
.kniha-pas-track > .elementor-element{flex:none!important;width:auto!important;margin:0 20px!important}
.kniha-pas-track .elementor-heading-title{
  font-family:var(--kp-head)!important;font-weight:800!important;font-size:clamp(1.8rem,3.4vw,2.8rem)!important;
  text-transform:uppercase;letter-spacing:-.01em;white-space:nowrap;line-height:1!important;
}
/* slová striedavo plné a obrysové, medzi nimi zlatá hviezdička */
.kniha-pas-track > :nth-child(4n+1) .elementor-heading-title{color:#E7B7BE!important}
.kniha-pas-track > :nth-child(4n+3) .elementor-heading-title{color:transparent!important;-webkit-text-stroke:1.2px rgba(228,207,150,.85)}
.kniha-pas-track > :nth-child(even) .elementor-heading-title{color:var(--kp-gold-l)!important;font-size:1.2rem!important;font-weight:400!important}
/* to isté cez classy (spoľahlivé aj keď Elementor prázdne slovo vôbec nevypíše) */
.kniha-pas-track > .kniha-pas-plne .elementor-heading-title,
.kniha-pas-track > :nth-child(4n+1):not(.kniha-pas-obrys):not(.kniha-pas-hviezda) .elementor-heading-title{
  -webkit-text-stroke:0;
  background:var(--kp-atrament);background-size:170% 220%;background-position:0% 30%;
  -webkit-background-clip:text;background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent;
  filter:brightness(1.45) saturate(1.1);animation:kpInk 18s ease-in-out infinite alternate;
}
.kniha-pas-track > .kniha-pas-obrys .elementor-heading-title{color:transparent!important;-webkit-text-stroke:1.2px rgba(228,207,150,.85);font-size:clamp(1.8rem,3.4vw,2.8rem)!important;font-weight:800!important}
.kniha-pas-track > .kniha-pas-hviezda .elementor-heading-title{color:var(--kp-gold-l)!important;-webkit-text-stroke:0;font-size:1.2rem!important;font-weight:400!important}
.kniha-pas-track > .kniha-pas-plne .elementor-heading-title{font-size:clamp(1.8rem,3.4vw,2.8rem)!important;font-weight:800!important}
/* prázdne slovo (nevyplnené v produkte) aj hviezdička za ním zmiznú */
.kniha-pas-track > .elementor-element:has(> .elementor-heading-title:empty),
.kniha-pas-track > .elementor-element:has(> .elementor-heading-title:empty) + .elementor-element{display:none!important}


/* =====================================================================
   3. O KNIHE – dva stĺpce: nadpis | odseky
   ===================================================================== */
.kniha-o-knihe .elementor-widget-text-editor,.kniha-o-knihe .elementor-widget-text-editor p{
  font-family:var(--kp-body)!important;color:var(--kp-ink-2)!important;font-size:1.05rem!important;line-height:1.75!important;
}
.kniha-o-knihe .elementor-widget-text-editor p{margin:0}
.kniha-o-knihe .elementor-widget-text-editor + .elementor-widget-text-editor{margin-top:6px}


/* =====================================================================
   4. ČO SI Z KNIHY ODNESIETE – vlnka cez 4 body
   kniha-body (kontajner, 4 stĺpce) > 4× kniha-bod (Heading s textom bodu)
   Rímske číslice a vlnka sa kreslia samé.
   ===================================================================== */
.e-con.kniha-body{
  position:relative;counter-reset:kbod;
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:0!important;row-gap:30px;
  padding-top:calc(100% * 160 / 1200 + 36px)!important;
}
/* vlnka – farebný prechod knihy v tvare krivky */
.e-con.kniha-body::before,.e-con.kniha-body::after{
  content:"";position:absolute;left:0;top:0;width:100%;aspect-ratio:1200/160;pointer-events:none;
  -webkit-mask:var(--kp-vlna) center / 100% 100% no-repeat;mask:var(--kp-vlna) center / 100% 100% no-repeat;
}
.e-con.kniha-body{
  --kp-vlna:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160'%3E%3Cg fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M150 50 C250 50,350 112,450 112 C550 112,650 50,750 50 C850 50,950 112,1050 112'/%3E%3Ccircle cx='150' cy='50' r='9'/%3E%3Ccircle cx='450' cy='112' r='9'/%3E%3Ccircle cx='750' cy='50' r='9'/%3E%3Ccircle cx='1050' cy='112' r='9'/%3E%3C/g%3E%3C/svg%3E");
}
.e-con.kniha-body::before{background:var(--kniha-prechod)}
/* sivá stopa pod vlnkou */
.e-con.kniha-body::after{background:var(--kp-line);z-index:-1}
@supports (animation-timeline:view()){
  .e-con.kniha-body::before{animation:kpKresli linear both;animation-timeline:view();animation-range:entry 20% cover 45%}
  @keyframes kpKresli{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
}
.kniha-bod{counter-increment:kbod;text-align:center;padding:0 16px!important;width:auto!important}
.kniha-bod .elementor-heading-title,.kniha-bod p{
  font-family:var(--kp-head)!important;font-weight:700!important;font-size:1.08rem!important;line-height:1.3!important;
  max-width:24ch;margin-inline:auto!important;color:var(--kp-ink);
}
.kniha-bod .elementor-heading-title::before,.kniha-bod p::before{
  content:counter(kbod,upper-roman) ".";display:block;margin-bottom:8px;
  font-family:var(--kp-caps);font-weight:600;font-size:.95rem;color:var(--kp-gold);
}
.kniha-bod:not(:has(.elementor-heading-title:not(:empty),p:not(:empty))){visibility:hidden}
@supports (animation-timeline:view()){
  .kniha-bod{animation:kpUp linear both;animation-timeline:view();animation-range:entry 10% cover 35%}
}


/* =====================================================================
   5. VIDEO A FOTKY
   kniha-video (Video widget, Self Hosted, s Image Overlay)
   kniha-galeria (Gallery / Basic Gallery widget)
   ===================================================================== */
.kniha-video .elementor-wrapper,.kniha-video .e-hosted-video,.kniha-video video{
  border-radius:28px;overflow:hidden;background:#111;
  box-shadow:0 50px 90px -50px var(--kniha-akcent,#6F4E5C),0 0 0 1px var(--kp-line);
}
.kniha-video .elementor-custom-embed-image-overlay{background-size:cover;transition:transform 1.2s var(--kp-ease)}
.kniha-video .elementor-custom-embed-image-overlay::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(20,14,20,.6))}
.kniha-video:hover .elementor-custom-embed-image-overlay{transform:scale(1.02)}
.kniha-video .elementor-custom-embed-play{
  z-index:2;width:clamp(68px,9vw,96px);height:clamp(68px,9vw,96px);border-radius:50%;
  display:grid!important;place-items:center;
  background:var(--kniha-prechod);background-size:200% 100%;
  box-shadow:0 18px 40px -14px rgba(0,0,0,.6);
  transition:transform .5s var(--kp-ease)!important;
}
.kniha-video .elementor-custom-embed-play::after{content:"";position:absolute;inset:0;border-radius:50%;animation:kpPulse 2.4s ease-out infinite}
.kniha-video .elementor-custom-embed-play svg,.kniha-video .elementor-custom-embed-play i{width:38%!important;height:38%!important;font-size:0;fill:#fff!important;color:#fff!important;opacity:1!important;filter:none!important;margin-left:4%}
.kniha-video .elementor-custom-embed-play i::before{font-size:clamp(26px,3.4vw,36px)}
.kniha-video:hover .elementor-custom-embed-play{transform:translate(-50%,-50%) scale(1.08)}

.kniha-galeria .gallery{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0!important}
.kniha-galeria .gallery-item{width:auto!important;max-width:none!important;margin:0!important;padding:0!important}
.kniha-galeria .gallery-icon,.kniha-galeria .gallery-icon a{display:block;height:100%}
.kniha-galeria img{display:block;width:100%!important;height:auto!important;aspect-ratio:4/3;object-fit:cover;border:0!important}
.kniha-galeria img,.kniha-galeria .e-gallery-image{border-radius:20px;transition:transform 1s var(--kp-ease)!important}
.kniha-galeria .gallery-caption{display:none}
.kniha-galeria .gallery-item,.kniha-galeria .e-gallery-item{border-radius:20px;overflow:hidden;box-shadow:0 30px 60px -45px rgba(35,26,36,.6)}
.kniha-galeria a:hover img,.kniha-galeria .e-gallery-item:hover .e-gallery-image{transform:scale(1.05)}


/* =====================================================================
   6. CITÁT – ružový pás s blobmi a zlatými linkami
   kniha-citat-sekcia (kontajner)  >  Heading / Text s classou kniha-citat
   ===================================================================== */
.e-con.kniha-citat-sekcia{
  position:relative;overflow:hidden;isolation:isolate;text-align:center;
  background:
    linear-gradient(90deg,transparent,rgba(184,150,74,.4) 20%,rgba(184,150,74,.4) 80%,transparent) top / 100% 1px no-repeat,
    linear-gradient(90deg,transparent,rgba(184,150,74,.4) 20%,rgba(184,150,74,.4) 80%,transparent) bottom / 100% 1px no-repeat,
    linear-gradient(180deg,var(--kniha-podklad,#F7EAE7) 0%,color-mix(in srgb,var(--kniha-podklad,#F2DEDD) 85%,var(--kniha-akcent,#B76E79)) 100%)!important;
}
.e-con.kniha-citat-sekcia::before,.e-con.kniha-citat-sekcia::after{
  content:"";position:absolute;inset:-20%;z-index:-1;pointer-events:none;
  filter:blur(50px);mix-blend-mode:multiply;animation:kpDrift 22s ease-in-out infinite alternate;
}
.e-con.kniha-citat-sekcia::before{
  opacity:.28;
  background:
    radial-gradient(closest-side,var(--kniha-prechod-1),transparent) 14% 20% / 520px 520px no-repeat,
    radial-gradient(closest-side,var(--kniha-prechod-3),transparent) 90% 30% / 420px 420px no-repeat;
}
.e-con.kniha-citat-sekcia::after{
  opacity:.22;animation-duration:26s;animation-direction:alternate-reverse;
  background:radial-gradient(closest-side,var(--kniha-prechod-2),transparent) 64% 92% / 480px 480px no-repeat;
}
.kniha-citat .elementor-heading-title,.kniha-citat p{
  font-family:var(--kp-head)!important;font-weight:300!important;font-size:clamp(2rem,4.8vw,4rem)!important;
  line-height:1.15!important;letter-spacing:-.02em;max-width:20ch;margin-inline:auto!important;color:var(--kp-ink);
}
/* slová v <b> – farebný prechod (štýl je v style.css: .kniha-citat b) */
@supports (animation-timeline:view()){
  .kniha-citat{animation:kpCitat linear both;animation-timeline:view();animation-range:entry 0% cover 40%}
  @keyframes kpCitat{from{opacity:.15;filter:blur(4px);transform:translateY(20px)}to{opacity:1;filter:none;transform:none}}
}


/* =====================================================================
   7. KÚPA + PARAMETRE – biely box
   kniha-kupa (kontajner)  >  kniha-scena (menšia kniha) + text:
   kniha-parametre (kontajner) > kniha-param (kontajner: Heading popis + Heading hodnota)
   kniha-poznamka (Text)
   ===================================================================== */
.e-con.kniha-kupa{
  position:relative;overflow:hidden;isolation:isolate;
  background:#fff!important;border-radius:36px;padding:clamp(28px,5vw,70px)!important;
  box-shadow:0 50px 90px -60px var(--kniha-akcent,#6F4E5C);
}
.e-con.kniha-kupa::before{
  content:"";position:absolute;width:520px;aspect-ratio:1;left:-160px;top:-160px;z-index:-1;pointer-events:none;
  background:radial-gradient(closest-side,var(--kniha-prechod-1),transparent);opacity:.18;filter:blur(40px);
  animation:kpDrift 24s ease-in-out infinite alternate;
}
.kniha-kupa .e-con.kniha-scena{min-height:clamp(380px,36vw,500px)}
.kniha-kupa .kniha-scena > .elementor-widget-image{transform:rotateY(-18deg) rotateX(4deg)}
.kniha-kupa .kniha-scena > .elementor-widget-image img{width:clamp(200px,19vw,260px)!important}
.kniha-kupa .e-con.kniha-scena::before{width:min(420px,92%)}

.e-con.kniha-parametre{display:grid!important;grid-template-columns:1fr 1fr;gap:0!important;margin:28px 0;border-top:1px solid var(--kp-line);padding:0!important}
.e-con.kniha-param{padding:14px 16px 14px 0!important;border-bottom:1px solid var(--kp-line);gap:2px!important}
.kniha-param > :first-child .elementor-heading-title,.kniha-param > :first-child p{font-family:var(--kp-caps)!important;font-size:.7rem!important;font-weight:600!important;letter-spacing:.16em;text-transform:uppercase;color:var(--kp-gold)!important;margin:0}
.kniha-param > :last-child .elementor-heading-title,.kniha-param > :last-child p{font-family:var(--kp-body)!important;font-size:1rem!important;font-weight:600!important;color:var(--kp-ink)!important;margin:0}
.e-con.kniha-param:not(:has(> :last-child .elementor-heading-title:not(:empty))):not(:has(> :last-child p:not(:empty))){display:none!important}

.kniha-poznamka{margin-top:24px;padding-left:14px;border-left:2px solid var(--kp-gold-l);max-width:56ch}
.kniha-poznamka p,.kniha-poznamka .elementor-heading-title{font-size:.82rem!important;color:var(--kp-muted)!important;line-height:1.6}


/* =====================================================================
   8. ĎALŠIE KNIHY – WooCommerce Related / Upsells / Products widget
   kniha-dalsie (na widget)
   ===================================================================== */
/* vzhľad kariet kníh je v assets/kniha-karty.css (rovnaký ako na domovskej stránke) */

/* sekcia Ďalšie knihy sa skryje, kým nie sú ďalšie produkty */
.e-con.e-parent:has(.kniha-dalsie):not(:has(li.product)){display:none!important}
/* riadok s cenou a košíkom bez ceny (produkt nemá cenu) sa nezobrazí */
.e-con:has(> .kniha-cena):not(:has(.kniha-cena .amount)):not(:has(.kniha-kosik form)){display:none!important}


/* =====================================================================
   UKÁŽKA KNIHY – „Ako kniha vyzerá“ (fotky z galérie produktu WooCommerce)
   kniha-ukazka (sekcia) > hlavička + Basic Gallery s classou kniha-ukazka-galeria
   Fotky = Produkt → Galéria produktu. Kniha bez fotiek sekciu nezobrazí.
   ===================================================================== */
.e-con.kniha-ukazka{
  position:relative;overflow:hidden;isolation:isolate;
  background-color:var(--kniha-podklad,#F4EEE7)!important;
}
.e-con.kniha-ukazka::before{
  content:"";position:absolute;inset:-20%;z-index:-1;pointer-events:none;filter:blur(60px);opacity:.22;
  background:
    radial-gradient(closest-side,var(--kniha-prechod-1),transparent) 8% 18% / 460px 460px no-repeat,
    radial-gradient(closest-side,var(--kniha-prechod-3),transparent) 94% 86% / 520px 520px no-repeat;
  animation:kpDrift 24s ease-in-out infinite alternate;
}
/* hlavička: nadpis vľavo, text vpravo */
.kniha-ukazka__hlava{align-items:flex-end!important}
.kniha-ukazka__hlava .elementor-widget-text-editor,.kniha-ukazka__hlava .elementor-widget-text-editor p{color:var(--kp-ink-2)!important;font-family:var(--kp-body)!important;font-size:1rem!important;line-height:1.7!important;margin:0}
/* bez fotiek v produkte sa sekcia nezobrazí (v editore áno, aby sa dala upravovať) */
body:not(.elementor-editor-active) .e-con.kniha-ukazka:not(:has(.gallery-item,.swiper-slide)){display:none!important}

/* NEKONEČNÝ SLIDER (widget Image Carousel s classou kniha-ukazka-karusel) – fotky celé (contain) */
/* šípky mimo slidera: widget má po bokoch miesto na šípky, slider je medzi nimi.
   Slider orezáva len to, čo je mimo neho – tiene fotiek majú okolo seba voľné miesto (padding),
   takže sa neorežú. Šípky nie sú v orezanej časti, lebo sa merajú od widgetu (slider je static). */
.kniha-ukazka-karusel{position:relative!important;padding:0 64px!important}
.kniha-ukazka-karusel .elementor-image-carousel-wrapper{
  position:static!important;overflow:hidden!important;
  padding:34px 16px 56px!important;margin:-34px -16px -56px!important;
}
.kniha-ukazka-karusel .swiper-slide{height:auto!important}
.kniha-ukazka-karusel .swiper-slide > a,.kniha-ukazka-karusel .swiper-slide-inner{display:block;height:100%}
.kniha-ukazka-karusel .swiper-slide > a{cursor:zoom-in}
.kniha-ukazka-karusel .swiper-slide-inner{
  margin:0!important;aspect-ratio:3/4;display:flex!important;align-items:center;justify-content:center;
}
.kniha-ukazka-karusel .swiper-slide-image{
  display:block;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;
  border-radius:0!important;filter:drop-shadow(0 12px 14px rgba(35,26,36,.16));
  transition:transform .6s var(--kp-ease)!important;
}
.kniha-ukazka-karusel .swiper-slide:hover .swiper-slide-image{transform:translateY(-6px)}
.kniha-ukazka-karusel .swiper-slide-inner{background:none!important;box-shadow:none!important}
.kniha-ukazka-karusel .elementor-image-carousel-caption{display:none}
/* šípky – biele krúžky, pri prejdení myšou tmavé */
.kniha-ukazka-karusel .elementor-swiper-button{
  width:48px!important;height:48px!important;border-radius:50%;display:flex!important;align-items:center;justify-content:center;padding:0!important;
  background:#fff;color:var(--kp-ink)!important;font-size:18px!important;
  box-shadow:0 14px 30px -14px rgba(35,26,36,.45),inset 0 0 0 1px var(--kp-line);
  transition:background .3s,color .3s,scale .4s var(--kp-ease),opacity .3s;opacity:.9;
}
.kniha-ukazka-karusel .elementor-swiper-button :is(svg,i){fill:currentColor!important;width:18px!important;height:18px!important;margin:0!important;display:block}
.kniha-ukazka-karusel .elementor-swiper-button:hover{background:var(--kp-ink);color:#fff!important;opacity:1;scale:1.06}
.kniha-ukazka-karusel .elementor-swiper-button{position:absolute!important;top:50%!important;transform:translateY(-50%)!important;z-index:3}
.kniha-ukazka-karusel .elementor-swiper-button-prev{left:0!important;right:auto!important}
.kniha-ukazka-karusel .elementor-swiper-button-next{right:0!important;left:auto!important}
.kniha-ukazka-karusel .swiper-pagination-bullet{background:var(--kp-ink)!important}
.kniha-ukazka-karusel .swiper-pagination-bullet-active{background:var(--kniha-akcent,#B76E79)!important}
@media (max-width:767px){
  .kniha-ukazka-karusel .elementor-swiper-button{width:40px!important;height:40px!important}
  .kniha-ukazka-karusel{padding:0 46px!important}
}

/* fotky v rade, všetky rovnako veľké, celé (contain – nič sa neoreže) */
.kniha-ukazka-galeria .gallery{
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px!important;margin:0!important;
}
.kniha-ukazka-galeria .gallery br{display:none}
.kniha-ukazka-galeria .gallery-item{
  width:auto!important;max-width:none!important;margin:0!important;padding:0!important;
  aspect-ratio:3/4;background:transparent;border-radius:0;box-shadow:none;
}
.kniha-ukazka-galeria .gallery-icon,.kniha-ukazka-galeria .gallery-icon a{display:block;width:100%;height:100%}
.kniha-ukazka-galeria .gallery-icon a{cursor:zoom-in}
.kniha-ukazka-galeria img{
  display:block;width:100%!important;height:100%!important;object-fit:contain!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  filter:drop-shadow(0 14px 18px rgba(35,26,36,.16));
  transition:transform .6s var(--kp-ease)!important;
}
.kniha-ukazka-galeria .gallery-item:hover img{transform:translateY(-6px)}
.kniha-ukazka-galeria .gallery-caption{display:none}
@media (max-width:1024px){.kniha-ukazka-galeria .gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:767px){.kniha-ukazka-galeria .gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px!important}}
@supports (animation-timeline:view()){
  .kniha-ukazka-galeria .gallery-item{animation:kpUp linear both;animation-timeline:view();animation-range:entry 0% entry 60%}
}
@media (prefers-reduced-motion:reduce){
  .e-con.kniha-ukazka::before,.kniha-ukazka-galeria .gallery-item{animation:none!important}
}

/* =====================================================================
   TABLET / MOBIL
   ===================================================================== */
@media (max-width:1024px){
  .e-con.kniha-body{grid-template-columns:repeat(2,minmax(0,1fr));padding-top:10px!important}
  .e-con.kniha-body::before,.e-con.kniha-body::after{display:none}
  .kniha-bod{animation:none!important}
}
@media (max-width:1024px){
  /* úvod, O knihe a box s kúpou pod seba, kniha hore */
  .kniha-hero > .e-con-inner,.e-con-full.kniha-hero,
  .kniha-o-knihe > .e-con-inner,.e-con-full.kniha-o-knihe{flex-direction:column!important;align-items:stretch!important}
  .kniha-hero .e-con.kniha-scena{order:-1}
  .kniha-hero-text,.kniha-hero .kniha-scena{width:100%!important;max-width:none!important}
  .kniha-hero > .e-con-inner,.kniha-o-knihe > .e-con-inner{gap:24px!important}
}
@media (max-width:767px){
  .e-con.kniha-kupa{flex-direction:column!important;align-items:stretch!important}
  .kniha-kupa > .e-con{width:100%!important;max-width:none!important}
  .kniha-kupa .e-con.kniha-scena{min-height:340px}
  .e-con.kniha-scena{min-height:340px}
  .kniha-scena > .elementor-widget-image{transform:rotateY(-14deg) rotateX(3deg)}
  .kniha-scena > .elementor-widget-image img{width:200px!important}
  .e-con.kniha-stitok{display:none!important}
  .e-con.kniha-body{grid-template-columns:1fr}
  .e-con.kniha-parametre{grid-template-columns:1fr 1fr}
  /* počet kusov a „Pridať do košíka“ v jednom riadku, zarovnané zľava s cenou */
  .kniha-kosik,.kniha-kosik .elementor-add-to-cart{width:100%!important;max-width:100%!important}
  .kniha-kosik form.cart{flex-wrap:nowrap!important;gap:10px!important;width:100%!important}
  .kniha-kosik .quantity{flex:none!important}
  .kniha-kosik .quantity input.qty{width:76px!important}
  .kniha-kosik .single_add_to_cart_button{flex:1 1 auto!important;width:auto!important;min-width:0!important;white-space:nowrap!important;padding:0 18px!important;margin:0!important}
  .kniha-video .elementor-wrapper{border-radius:20px}
  .e-con.kniha-kupa{border-radius:26px}
}
/* malé telefóny (~320 px) – v bielom boxe s kúpou je málo miesta, text tlačidla sa radšej zalomí, než aby pretiekol */
@media (max-width:380px){
  .kniha-kosik form.cart{gap:8px!important}
  .kniha-kosik .quantity input.qty{width:64px!important;padding-left:8px!important;padding-right:8px!important}
  .kniha-kosik .single_add_to_cart_button{padding:0 12px!important;gap:6px!important;font-size:.9rem!important;white-space:normal!important;line-height:1.15!important;text-align:center}
}

@media (prefers-reduced-motion:reduce){
  .kniha-hero-text > .elementor-element,
  .kniha-nadpis-tenky .elementor-heading-title,.kniha-nadpis-hruby .elementor-heading-title,
  .e-con.kniha-hero::before,.e-con.kniha-hero::after,
  .e-con.kniha-scena::before,.e-con.kniha-scena::after,
  .kniha-scena > .elementor-widget-image,.kniha-scena > .elementor-widget-image::after,
  .e-con.kniha-stitok,.e-con.kniha-pas-track,
  .e-con.kniha-citat-sekcia::before,.e-con.kniha-citat-sekcia::after,
  .kniha-reveal,.kniha-bod,.kniha-citat,.e-con.kniha-body::before,.e-con.kniha-kupa::before,
  .kniha-video .elementor-custom-embed-play::after,.kniha-h2-b .elementor-heading-title,
  .e-con.kniha-stitok::before,.kniha-pas-track .elementor-heading-title{animation:none!important}
}
