:root {
  --a-orange: #ff5a00;
  --a-orange-hover: #ff7b33;
  --a-orange-press: #e64f00;
  --a-orange-soft: #fff1ea;
  --a-orange-text: #c24100;
  --a-green: #00a790;
  --a-green-dark: #006456;
  --a-green-soft: #e6f6f3;
  --a-text: #222;
  --a-muted: #636363;
  --a-border: #ddd;
  --a-border-strong: #c3c3c3;
  --a-bg: #f2f2f2;
  --a-white: #fff;
  --a-head: "Roboto", Arial, sans-serif;
  --a-body: "Open Sans", Arial, sans-serif;
  --a-s1: 8px;
  --a-s2: 16px;
  --a-s3: 24px;
  --a-s6: 48px;
  --a-radius: 4px;
}

body { background: var(--a-bg); color: var(--a-text); font-family: var(--a-body); font-size: .9375rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--a-text); font-family: var(--a-head); font-weight: 500; line-height: 1.3; }
a { color: var(--a-text); text-underline-offset: .2em; }
a:hover { color: var(--a-orange); }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--a-text);
  outline-offset: 2px;
}

/* Nagłówek */
#header { background: var(--a-white); border-bottom: 1px solid var(--a-border); }
.ebook-header__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--a-s3);
  padding-block: var(--a-s2);
}
.ebook-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--a-text); text-decoration: none; white-space: nowrap; }
.ebook-brand:hover { color: var(--a-text); }
.ebook-brand__mark { display: block; flex: 0 0 auto; width: 3rem; height: 3rem; object-fit: contain; }
.ebook-brand__word { font-family: var(--a-head); font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.ebook-brand__word em { color: var(--a-orange); font-style: normal; }
.ebook-search { display: flex; width: 100%; max-width: 680px; justify-self: center; }
.ebook-search__input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 var(--a-s2);
  border: 1px solid var(--a-border-strong);
  border-right: 0;
  border-radius: var(--a-radius) 0 0 var(--a-radius);
  background: var(--a-white);
  color: var(--a-text);
  font-size: .9375rem;
}
.ebook-search__input:focus { outline: 0; border-color: var(--a-text); box-shadow: inset 0 0 0 1px var(--a-text); }
.ebook-search__button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 44px;
  padding: 0 var(--a-s3);
  border: 1px solid var(--a-orange);
  border-radius: 0 var(--a-radius) var(--a-radius) 0;
  background: var(--a-orange);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.ebook-search__button:hover { background: var(--a-orange-hover); border-color: var(--a-orange-hover); }
.ebook-search__button .material-icons { font-size: 1.3rem; }
.ebook-header__actions { display: flex; align-items: center; justify-content: end; gap: var(--a-s1); }
.ebook-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border-radius: var(--a-radius);
  color: var(--a-text);
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.ebook-action:hover { background: var(--a-bg); color: var(--a-text); }
.ebook-action .material-icons { font-size: 1.5rem; }
.ebook-cart__count {
  display: grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .3rem;
  border-radius: 1rem;
  background: var(--a-orange);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
}
.ebook-subnav { border-top: 1px solid var(--a-border); background: var(--a-white); }
.ebook-subnav__inner { display: flex; align-items: center; gap: var(--a-s3); min-height: 44px; overflow-x: auto; scrollbar-width: none; }
.ebook-subnav__inner::-webkit-scrollbar { display: none; }
.ebook-subnav a { padding-block: .6rem; color: var(--a-text); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.ebook-subnav a:hover { border-color: var(--a-orange); color: var(--a-text); }

/* Strona główna */
.ebook-home { padding-top: 40px; padding-bottom: 80px; }
/* Hero w stylu sliderów Allegro: nasycone tło w kolorze slajdu, biały nagłówek, biały przycisk, okrągłe strzałki po bokach. */
.ebook-hero {
  --hero-a: #d34200; --hero-b: #f15a0a; --hero-c: #ff7d2e; --hero-glow: #ffb36b;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-radius: .5rem;
  background: linear-gradient(105deg, var(--hero-a) 0%, var(--hero-b) 52%, var(--hero-c) 100%);
  color: #fff;
}
.ebook-hero__slide { position: relative; isolation: isolate; display: grid; grid-area: 1 / 1; align-self: stretch; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; background: linear-gradient(105deg, var(--hero-a) 0%, var(--hero-b) 52%, var(--hero-c) 100%); }
.ebook-hero__slide:nth-of-type(5n+1) { --hero-a: #d34200; --hero-b: #f15a0a; --hero-c: #ff7d2e; --hero-glow: #ffb36b; }
.ebook-hero__slide:nth-of-type(5n+2) { --hero-a: #00705f; --hero-b: #009280; --hero-c: #1bbfa4; --hero-glow: #7ff0d9; }
.ebook-hero__slide:nth-of-type(5n+3) { --hero-a: #1d2f6f; --hero-b: #2e4bb0; --hero-c: #5a83ff; --hero-glow: #a9c0ff; }
.ebook-hero__slide:nth-of-type(5n+4) { --hero-a: #4a1f7a; --hero-b: #7233b3; --hero-c: #a15be0; --hero-glow: #e0baff; }
.ebook-hero__slide:nth-of-type(5n+5) { --hero-a: #1c1c1c; --hero-b: #2e2e2e; --hero-c: #4a4a4a; --hero-glow: #ff5a00; }
/* Tło-grafika: płynne linie w tle (za treścią) i koncentryczne okręgi wokół okładki. Kolor biały, więc pasuje do każdego slajdu. */
.ebook-hero__slide::before {
  content: ""; position: absolute; z-index: -1; inset: -3% -4%; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%201200%20500%22%20preserveAspectRatio=%22xMidYMid%20slice%22%3E%3Cpath%20d=%22M700%200%20H1200%20V500%20H520%20C640%20380%20800%20300%20700%200Z%22%20fill=%22%23fff%22%20fill-opacity=%22.07%22/%3E%3Cpath%20d=%22M-80%20250%20C%20220%20120%2C%20460%20520%2C%20760%20300%20S%201120%2040%2C%201300%20170%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.10%22%20stroke-width=%221.2%22/%3E%3Cpath%20d=%22M-80%20257%20C%20220%20132%2C%20460%20526%2C%20760%20310%20S%201120%2054%2C%201300%20186%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.13%22%20stroke-width=%221.4%22/%3E%3Cpath%20d=%22M-80%20264%20C%20220%20143%2C%20460%20533%2C%20760%20321%20S%201120%2069%2C%201300%20201%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.15%22%20stroke-width=%221.6%22/%3E%3Cpath%20d=%22M-80%20271%20C%20220%20155%2C%20460%20540%2C%20760%20331%20S%201120%2083%2C%201300%20217%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.17%22%20stroke-width=%221.8%22/%3E%3Cpath%20d=%22M-80%20279%20C%20220%20167%2C%20460%20546%2C%20760%20342%20S%201120%2097%2C%201300%20232%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.19%22%20stroke-width=%221.9%22/%3E%3Cpath%20d=%22M-80%20286%20C%20220%20178%2C%20460%20552%2C%20760%20352%20S%201120%20112%2C%201300%20248%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.21%22%20stroke-width=%222.1%22/%3E%3Cpath%20d=%22M-80%20293%20C%20220%20190%2C%20460%20559%2C%20760%20362%20S%201120%20126%2C%201300%20264%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.23%22%20stroke-width=%222.2%22/%3E%3Cpath%20d=%22M-80%20300%20C%20220%20202%2C%20460%20566%2C%20760%20373%20S%201120%20140%2C%201300%20279%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.23%22%20stroke-width=%222.3%22/%3E%3Cpath%20d=%22M-80%20307%20C%20220%20214%2C%20460%20572%2C%20760%20383%20S%201120%20154%2C%201300%20295%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.24%22%20stroke-width=%222.3%22/%3E%3Cpath%20d=%22M-80%20314%20C%20220%20225%2C%20460%20578%2C%20760%20394%20S%201120%20169%2C%201300%20310%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.24%22%20stroke-width=%222.3%22/%3E%3Cpath%20d=%22M-80%20322%20C%20220%20237%2C%20460%20585%2C%20760%20404%20S%201120%20183%2C%201300%20326%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.23%22%20stroke-width=%222.3%22/%3E%3Cpath%20d=%22M-80%20329%20C%20220%20249%2C%20460%20592%2C%20760%20414%20S%201120%20197%2C%201300%20342%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.23%22%20stroke-width=%222.2%22/%3E%3Cpath%20d=%22M-80%20336%20C%20220%20260%2C%20460%20598%2C%20760%20425%20S%201120%20212%2C%201300%20357%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.21%22%20stroke-width=%222.1%22/%3E%3Cpath%20d=%22M-80%20343%20C%20220%20272%2C%20460%20604%2C%20760%20435%20S%201120%20226%2C%201300%20373%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.19%22%20stroke-width=%221.9%22/%3E%3Cpath%20d=%22M-80%20350%20C%20220%20284%2C%20460%20611%2C%20760%20446%20S%201120%20240%2C%201300%20388%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.17%22%20stroke-width=%221.8%22/%3E%3Cpath%20d=%22M-80%20357%20C%20220%20296%2C%20460%20618%2C%20760%20456%20S%201120%20255%2C%201300%20404%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.15%22%20stroke-width=%221.6%22/%3E%3Cpath%20d=%22M-80%20364%20C%20220%20307%2C%20460%20624%2C%20760%20466%20S%201120%20269%2C%201300%20420%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.13%22%20stroke-width=%221.4%22/%3E%3Cpath%20d=%22M-80%20372%20C%20220%20319%2C%20460%20630%2C%20760%20477%20S%201120%20283%2C%201300%20435%22%20fill=%22none%22%20stroke=%22%23fff%22%20stroke-opacity=%220.10%22%20stroke-width=%221.2%22/%3E%3C/svg%3E") center / cover no-repeat;
}
.ebook-hero__slide:nth-of-type(5n+2)::before { transform: scaleY(-1); }
.ebook-hero__slide:nth-of-type(5n+3)::before { transform: scaleX(-1) scaleY(-1) scaleX(-1); }
.ebook-hero__slide:nth-of-type(5n+4)::before { transform: scaleY(-1) scale(1.12); }
.ebook-hero--slider .is-active::before { animation: hero-drift 16s ease-in-out infinite alternate; }
@keyframes hero-drift { from { translate: -1.5% 0; } to { translate: 1.5% 0; } }
/* Slider: slajdy leżą jeden na drugim (wysokość = najwyższy). Wychodzący zostaje pod spodem, aż nowy się wyświetli, więc tło nie błyska. */
.ebook-hero--slider .ebook-hero__slide { z-index: 1; visibility: hidden; opacity: 0; transition: opacity 0s linear .6s, visibility 0s linear .6s; }
.ebook-hero--slider .ebook-hero__slide.is-active { z-index: 2; visibility: visible; opacity: 1; transition: opacity .6s ease; }
.ebook-hero__body { padding: clamp(1.75rem, 4.5vw, 4.25rem); }
.ebook-hero--slider .ebook-hero__body { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(4.25rem, 6vw, 5.25rem); padding-left: clamp(4.25rem, 6.5vw, 5.75rem); }
.ebook-hero__kicker {
  display: inline-block; margin: 0 0 1rem; padding: .3rem .75rem; border-radius: 999px;
  background: #ffffff2e; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.ebook-hero .ebook-hero__title { max-width: 16ch; margin: 0 0 .9rem; color: #fff; font: 800 clamp(2.25rem, 3.9vw, 3.8rem)/1.05 var(--a-head); letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 14px #0000002e; }
.ebook-hero__lead { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; max-width: 42ch; margin: 0 0 1.5rem; color: #fff; font-size: clamp(1rem, 1.45vw, 1.15rem); font-weight: 600; line-height: 1.55; }
.ebook-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; }
.ebook-hero__price { color: #fff; font: 800 clamp(1.6rem, 2.2vw, 2rem)/1.1 var(--a-head); white-space: nowrap; }
.ebook-price { font-variant-numeric: tabular-nums; }
/* Cena przy przycisku (telefon): biały tekst z przebiegającym połyskiem. Na komputerze zastępuje ją naklejka. */
.ebook-hero .is-active .ebook-hero__price {
  background: linear-gradient(100deg, #fff 38%, #ffe7a0 50%, #fff 62%) 100% 0 / 260% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: price-shine 4.5s ease-in-out 1.6s infinite;
}
@media (min-width: 768px) { .ebook-hero__actions .ebook-hero__price { display: none; } }
/* Cały slajd jest linkiem do produktu (niewidoczna nakładka). Okładka, znaczek z ceną i tytuł też klikają; strzałki, kropki i pauza zostają osobnymi elementami nad nią. */
.ebook-hero__slide { cursor: pointer; }
.ebook-hero__overlay { position: absolute; inset: 0; z-index: 2; }
.ebook-hero__book { transition: scale .35s ease; }
.ebook-hero__slide:hover .ebook-hero__book { scale: 1.035; }
.ebook-hero__slide:hover .ebook-button { background: var(--a-text); color: #fff; }
/* Naklejka z ceną w stylu Allegro. */
.ebook-hero__badge {
  position: absolute; z-index: 1; left: -1.25rem; bottom: 9%; display: grid; place-content: center; justify-items: center; gap: .05rem;
  width: 7.9rem; aspect-ratio: 1; padding: .4rem; overflow: hidden; border-radius: 50%; text-align: center;
  background: radial-gradient(circle at 30% 22%, #fff4ad 0%, #ffd600 46%, #ffb300 100%); color: #222;
  box-shadow: 0 12px 24px #0000004d, 0 2px 5px #0000003a, inset 0 3px 6px #ffffffcc, inset 0 -5px 9px #c27a0059;
  transform: rotate(-9deg);
}
.ebook-hero__badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, #ffffffb3 50%, transparent 62%) 170% 0 / 280% 100% no-repeat; pointer-events: none; }
.ebook-hero__badge-label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ebook-hero__badge strong { font: 900 1.55rem/1 var(--a-head); letter-spacing: -.02em; white-space: nowrap; }
.ebook-hero__badge small { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.ebook-hero__badge-old { font-size: .8rem; font-weight: 700; opacity: .75; }
.ebook-hero .is-active .ebook-hero__badge { animation: badge-pop .75s cubic-bezier(.3, 1.7, .5, 1) .6s both, badge-pulse 3.2s ease-in-out 1.5s infinite; }
.ebook-hero .is-active .ebook-hero__badge::after { animation: badge-shine 5s ease-in-out 1.8s infinite; }
@keyframes badge-pop { from { scale: 0; opacity: 0; rotate: -25deg; } to { scale: 1; opacity: 1; rotate: 0deg; } }
@keyframes badge-pulse { 0%, 100% { scale: 1; } 50% { scale: 1.07; } }
@keyframes badge-shine { 0%, 55% { background-position: 170% 0; } 100% { background-position: -70% 0; } }
@keyframes price-shine { 0%, 50% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.ebook-hero .ebook-button { background: #fff; color: var(--a-text); border-radius: var(--a-radius); box-shadow: 0 4px 14px #0000002e; }
.ebook-hero .ebook-button:hover { background: var(--a-text); color: #fff; }
.ebook-hero__visual { position: relative; display: grid; place-items: center; padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem) 0; }
.ebook-hero--slider .ebook-hero__visual { padding-right: clamp(4.25rem, 6.5vw, 5.75rem); }
/* Poświata za okładką w jasnym odcieniu koloru slajdu. */
.ebook-hero__visual::before { content: ""; position: absolute; width: min(32rem, 120%); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--hero-glow) 0%, transparent 68%); opacity: .55; }
/* Okładka jako obiekt 3D: wlot, unoszenie, tilt za myszą, grubość kartek, połysk i cień na „podłodze”. */
.ebook-hero__book { position: relative; z-index: 1; width: min(100%, 24rem); }
.ebook-hero__tilt {
  position: relative;
  transform: perspective(1400px) rotateY(calc(-13deg + var(--px, 0) * 10deg)) rotateX(calc(4deg - var(--py, 0) * 8deg)) rotate(-2deg);
  transform-style: preserve-3d;
}
.ebook-hero__cover {
  display: block; width: 100%; height: auto;
  /* Okładki to przezroczyste PNG z marginesem: cień ma iść za kształtem książki, nie za całym kwadratem.
     Cztery cienie bez rozmycia dają grubość kartek, dwa ostatnie to cień rzucany. */
  filter: drop-shadow(1px 1px 0 #f7f2e6) drop-shadow(1px 1px 0 #e2dac6) drop-shadow(1px 1px 0 #c9c0aa) drop-shadow(1px 1px 0 #a9a08a)
          drop-shadow(0 24px 22px #00000052) drop-shadow(0 6px 8px #0000003a);
}
/* Połysk i cieniowanie krawędzi: te same piksele co okładka (maska = obraz), więc idzie dokładnie po jej kształcie. */
.ebook-hero__tilt::before, .ebook-hero__tilt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: var(--cover) center / 100% 100% no-repeat; mask: var(--cover) center / 100% 100% no-repeat;
}
.ebook-hero__tilt::before { background: linear-gradient(112deg, #ffffff4d 0%, #ffffff14 24%, transparent 40%, transparent 64%, #0000002e 100%); }
.ebook-hero__tilt::after { background: linear-gradient(105deg, transparent 42%, #ffffff8c 50%, transparent 58%) 160% 0 / 260% 100% no-repeat; }
/* Cień na „podłodze” pod unoszącą się książką. */
.ebook-hero__book::before {
  content: ""; position: absolute; z-index: -1; left: 12%; right: 8%; bottom: -3%; height: 9%;
  background: radial-gradient(ellipse at center, #00000073 0%, transparent 70%); filter: blur(5px);
}
.ebook-hero .is-active .ebook-hero__book { animation: book-in .95s cubic-bezier(.2, .85, .25, 1) both, book-float 6s ease-in-out .95s infinite alternate; }
.ebook-hero .is-active .ebook-hero__book::before { animation: book-shadow 6s ease-in-out .95s infinite alternate; }
.ebook-hero .is-active .ebook-hero__tilt::after { animation: book-shine 7s ease-in-out 1.2s infinite; }
.ebook-hero .is-active .ebook-hero__kicker, .ebook-hero .is-active .ebook-hero__title, .ebook-hero .is-active .ebook-hero__lead, .ebook-hero .is-active .ebook-hero__actions { animation: hero-up .7s cubic-bezier(.2, .8, .25, 1) both; }
.ebook-hero .is-active .ebook-hero__title { animation-delay: .08s; }
.ebook-hero .is-active .ebook-hero__lead { animation-delay: .16s; }
.ebook-hero .is-active .ebook-hero__actions { animation-delay: .24s; }
@keyframes book-in { from { opacity: 0; transform: translateX(4rem) translateY(1.5rem) rotate(7deg) scale(.82); } to { opacity: 1; transform: none; } }
@keyframes book-float { from { translate: 0 .5rem; rotate: -1.2deg; } to { translate: 0 -.75rem; rotate: 1.2deg; } }
@keyframes book-shadow { from { translate: 0 -.5rem; scale: 1.06; opacity: .95; } to { translate: 0 .75rem; scale: .86; opacity: .55; } }
@keyframes book-shine { 0%, 58% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
@keyframes hero-up { from { opacity: 0; transform: translateY(1.1rem); } to { opacity: 1; transform: none; } }
.ebook-hero__visual::after {
  content: ""; position: absolute; width: min(36rem, 135%); aspect-ratio: 1; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 2.1rem, #ffffff29 2.1rem calc(2.1rem + 1.5px));
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 68%); mask-image: radial-gradient(circle, #000 18%, transparent 68%);
}
/* Sterowanie: strzałki na bokach, kropki i pauza na dole. */
.ebook-hero__arrow, .ebook-hero__toggle {
  display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
}
.ebook-hero__arrow { position: absolute; z-index: 3; top: 50%; width: 2.75rem; height: 2.75rem; margin-top: -1.375rem; background: #fff; color: var(--a-text); box-shadow: 0 3px 12px #00000040; transition: transform .2s ease, background-color .2s ease; }
.ebook-hero__arrow--prev { left: .85rem; }
.ebook-hero__arrow--next { right: .85rem; }
.ebook-hero__arrow:hover { background: var(--a-text); color: #fff; transform: scale(1.08); }
.ebook-hero__arrow .material-icons { font-size: 1.6rem; }
.ebook-hero__controls { position: absolute; z-index: 3; left: 50%; bottom: 1rem; display: flex; align-items: center; gap: .5rem; transform: translateX(-50%); }
.ebook-hero__toggle { width: 1.9rem; height: 1.9rem; background: #ffffff33; color: #fff; }
.ebook-hero__toggle:hover { background: #fff; color: var(--a-text); }
.ebook-hero__toggle .material-icons { font-size: 1.15rem; }
.ebook-hero__dots { display: flex; align-items: center; }
.ebook-hero__dot { display: grid; place-items: center; width: auto; height: 2.25rem; padding: 0 .22rem; border: 0; background: none; cursor: pointer; }
.ebook-hero__dot::after { content: ""; width: .6rem; height: .6rem; border-radius: 999px; background: #ffffff80; transition: width .3s ease, background-color .3s ease; }
.ebook-hero__dot:hover::after { background: #ffffffcc; }
.ebook-hero__dot.is-active::after { width: 1.7rem; background: #fff; }
.ebook-hero__arrow:focus-visible, .ebook-hero__toggle:focus-visible, .ebook-hero__dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px var(--a-text); }
.ebook-button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: .5rem;
  background: #a83b00;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.ebook-button:hover { background: #842e00; color: #fff; }
.ebook-button .material-icons { font-size: 1.2rem; }

.ebook-shelf { padding-top: var(--a-s3); scroll-margin-top: 8rem; }
.ebook-shelf > section { padding: var(--a-s3); border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-white); }
.ebook-shelf__heading { display: flex; justify-content: space-between; align-items: baseline; gap: var(--a-s2); margin-bottom: var(--a-s2); }
.ebook-shelf__heading h2 { margin: 0; font: 500 1.5625rem/1.3 var(--a-head); }
.ebook-shelf__link { display: inline-flex; align-items: center; color: var(--a-orange-text); font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ebook-shelf__link:hover { text-decoration: underline; }
.ebook-shelf__link .material-icons { font-size: 1.2rem; }
.ebook-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--a-s2); }
.ebook-card { min-width: 0; }
.ebook-card__link { display: flex; height: 100%; flex-direction: column; border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-white); color: var(--a-text); text-decoration: none; transition: box-shadow .15s; }
.ebook-card__link:hover { color: var(--a-text); box-shadow: 0 2px 12px #00000026; }
.ebook-card__art { overflow: hidden; aspect-ratio: 1; border-radius: var(--a-radius) var(--a-radius) 0 0; background: var(--a-bg); }
.ebook-card__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ebook-card__details { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: var(--a-s2); }
.ebook-card h3 { margin: 0; font: 500 1rem/1.3 var(--a-head); }
.ebook-card__link:hover h3 { color: var(--a-orange); }
.ebook-card__meta { margin: 0; color: var(--a-muted); font-size: .8125rem; }
.ebook-card__price { margin: var(--a-s1) 0 0; font: 700 1.5rem/1.2 var(--a-head); }

/* Stopka */
#footer { background: var(--a-white); border-top: 1px solid var(--a-border); }
.ebook-footer { padding: var(--a-s3) 0 var(--a-s2); background: var(--a-white); color: var(--a-text); }
.ebook-footer__main { display: grid; grid-template-columns: 1.4fr .8fr .9fr 1fr; gap: var(--a-s3); }
.ebook-footer p { margin: var(--a-s2) 0 0; color: var(--a-muted); font-size: .875rem; }
.ebook-footer nav { display: grid; align-content: start; gap: .5rem; }
.ebook-footer nav strong { margin-bottom: .25rem; font: 700 .875rem/1.3 var(--a-head); }
.ebook-footer nav a { width: fit-content; color: var(--a-muted); font-size: .875rem; text-decoration: none; }
.ebook-footer nav a:hover { color: var(--a-orange); text-decoration: underline; }
.ebook-footer__base { margin-top: var(--a-s2); color: var(--a-muted); font-size: .8125rem; }

@media (max-width: 991.98px) {
  .ebook-header__row { grid-template-columns: auto 1fr; }
  .ebook-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .ebook-header__actions { grid-column: 2; grid-row: 1; }
  .ebook-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ebook-footer__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
  .ebook-header__row { gap: var(--a-s1) var(--a-s2); padding-block: var(--a-s1) var(--a-s2); }
  .ebook-brand__word { font-size: 1.4rem; }
  .ebook-brand__mark { width: 2.5rem; height: 2.5rem; }
  .ebook-action span:not(.ebook-cart__count) { display: none; }
  /* Telefon: mała okładka obok tytułu, opis i przycisk pod spodem. Slider zajmuje ok. pół ekranu, nie cały. */
  .ebook-hero__slide {
    grid-template-columns: 6.75rem minmax(0, 1fr);
    grid-template-areas: "art kicker" "art title" "lead lead" "actions actions";
    align-content: start;
    column-gap: 1.1rem;
    padding: 1.25rem 1.25rem 1.1rem;
  }
  .ebook-hero--slider .ebook-hero__slide { padding-bottom: 3.75rem; }
  .ebook-hero__slide .ebook-hero__body, .ebook-hero--slider .ebook-hero__body { display: contents; padding: 0; }
  .ebook-hero__slide .ebook-hero__visual, .ebook-hero--slider .ebook-hero__visual { grid-area: art; align-self: center; padding: 0; }
  .ebook-hero__visual::before { width: 150%; }
  .ebook-hero__visual::after { width: 190%; }
  .ebook-hero__badge { display: none; }
  .ebook-hero__slide .ebook-hero__book { width: 100%; }
  .ebook-hero__slide .ebook-hero__cover { filter: drop-shadow(1px 1px 0 #efe8d6) drop-shadow(1px 1px 0 #b9b09a) drop-shadow(0 10px 9px #00000052) drop-shadow(0 2px 3px #00000030); }
  .ebook-hero__slide .ebook-hero__kicker { grid-area: kicker; justify-self: start; align-self: end; margin: 0 0 .4rem; padding: .2rem .55rem; font-size: .64rem; }
  .ebook-hero__slide .ebook-hero__title { grid-area: title; align-self: start; max-width: none; margin: 0; font-size: 1.65rem; }
  .ebook-hero__slide .ebook-hero__lead { grid-area: lead; -webkit-line-clamp: 3; line-clamp: 3; max-width: none; margin: 1rem 0 1rem; font-size: .95rem; line-height: 1.5; }
  .ebook-hero__slide .ebook-hero__actions { grid-area: actions; flex-wrap: nowrap; gap: 1rem; }
  .ebook-hero__slide .ebook-button { flex: 1; justify-content: center; padding: .8rem 1rem; }
  .ebook-hero__controls { bottom: .65rem; }
  .ebook-hero__arrow { display: none; }
  .ebook-shelf { scroll-margin-top: 11rem; }
  .ebook-shelf > section { padding: var(--a-s2); }
  .ebook-footer__main > div { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .ebook-card__link { transition: none; }
  .ebook-hero--slider .ebook-hero__slide, .ebook-hero__dot::after { transition: none; }
  .ebook-hero--slider .is-active::before, .ebook-hero .is-active .ebook-hero__book, .ebook-hero .is-active .ebook-hero__book::before, .ebook-hero .is-active .ebook-hero__tilt::after,
  .ebook-hero .is-active .ebook-hero__kicker, .ebook-hero .is-active .ebook-hero__title, .ebook-hero .is-active .ebook-hero__lead, .ebook-hero .is-active .ebook-hero__actions,
  .ebook-hero .is-active .ebook-hero__badge, .ebook-hero .is-active .ebook-hero__badge::after { animation: none; }
  .ebook-hero .is-active .ebook-hero__price { animation: none; background: none; -webkit-text-fill-color: #fff; color: #fff; }
}

#header { position: sticky; top: 0; z-index: 1020; box-shadow: 0 1px 0 var(--a-border); }
.ebook-shelf > section { padding-top: var(--a-s2); }
.ebook-shelf__heading { margin-bottom: var(--a-s2); }
.ebook-shelf__heading h2 { margin: 0; }
.ebook-card__link { overflow: hidden; }
.ebook-card__price small { font-size: .875rem; font-weight: 500; }
@media (max-width: 767.98px) {
  .ebook-grid { gap: var(--a-s1); }
  .ebook-card__details { padding: var(--a-s1) var(--a-s1) var(--a-s2); }
  .ebook-card h3 { font-size: .9375rem; }
  .ebook-card__price { font-size: 1.25rem; }
  .ebook-search__button span { display: none; }
  .ebook-search__button { padding: 0 var(--a-s2); }
}

.ebook-search__button { font-size: 1.1875rem; }

.ebook-card__link:hover h3 { color: var(--a-orange-text); }
a:hover { color: var(--a-orange-text); }
.ebook-footer nav a:hover { color: var(--a-orange-text); }

.ebook-subnav__inner { position: relative; overflow: visible; }
.ebook-subnav__links { display: flex; align-items: center; gap: var(--a-s3); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.ebook-subnav__links::-webkit-scrollbar { display: none; }
.ebook-cats { position: relative; flex: 0 0 auto; }
.ebook-cats > summary { display: inline-flex; align-items: center; gap: .4rem; height: 44px; padding: 0 var(--a-s2); background: var(--a-text); color: #fff; font-size: .875rem; font-weight: 700; list-style: none; cursor: pointer; }
.ebook-cats > summary::-webkit-details-marker { display: none; }
.ebook-cats > summary .material-icons { font-size: 1.3rem; }
.ebook-cats[open] > summary, .ebook-cats > summary:hover { background: var(--a-orange-text); }
.ebook-cats__menu { position: absolute; z-index: 30; top: 100%; left: 0; display: grid; min-width: 240px; padding: var(--a-s1) 0; border: 1px solid var(--a-border); border-top: 0; background: var(--a-white); box-shadow: 0 8px 24px #00000026; }
.ebook-cats__menu a { padding: .6rem var(--a-s2); color: var(--a-text); font-size: .9375rem; text-decoration: none; border-bottom: 0; }
.ebook-cats__menu a:hover { background: var(--a-bg); color: var(--a-orange-text); }

#footer { margin-top: var(--a-s3); }

/* JS Shop */
.ebook-brand__mark {
  display: grid;
  place-items: center;
  border-radius: .55rem;
  background: var(--a-orange-text);
  color: #fff;
  font: 800 1.25rem/1 var(--a-head);
}

.ebook-hero__slide.shop-hero-intro {
  min-height: 21rem;
  --hero-a: #aa3100;
  --hero-b: #ce4100;
  --hero-c: #f46613;
}

.shop-hero-intro .ebook-hero__title { font-size: clamp(2.4rem, 5vw, 4.65rem); }
.shop-hero-intro .ebook-button { background: #fff; color: var(--a-orange-text); }
.shop-hero-intro .ebook-button:hover { background: var(--a-orange-soft); }
.shop-catalog-empty { margin: 0; color: var(--a-muted); }
.ebook-footer__main { grid-template-columns: 1.4fr 1fr 1fr; }
.ebook-card__art img { object-fit: contain; }
.ebook-hero__cover { max-height: 18rem; object-fit: contain; }

.shop-parcel {
  position: relative;
  z-index: 1;
  width: clamp(8rem, 24vw, 17rem);
  aspect-ratio: 1.45;
  border: 1px solid #fff4;
  border-radius: .8rem;
  background: linear-gradient(135deg, #ffdbab, #eaa96f);
  box-shadow: .6rem .65rem 0 #b46036, 1rem 2rem 2.8rem #6c160065;
  color: #4a2a19;
  transform: rotate(-12deg);
}

.shop-parcel__tape {
  position: absolute;
  inset: 0 42%;
  background: #fff6;
}

.shop-parcel__label {
  position: absolute;
  inset: auto auto .9rem .9rem;
  padding: .5rem .85rem;
  border-radius: .2rem;
  background: #fff7ec;
  font: 800 clamp(.9rem, 2vw, 1.65rem)/1 var(--a-head);
}

.shop-parcel__label em { margin-left: .3em; color: var(--a-orange-text); font-style: normal; }
.shop-parcel i { position: absolute; top: .65rem; right: .65rem; }

@media (max-width: 767.98px) {
  .ebook-hero__slide.shop-hero-intro {
    grid-template-columns: minmax(0, 1fr) 7rem;
    grid-template-areas: "title art" "lead art" "actions actions";
    min-height: 0;
    padding: 1.5rem 1rem;
    align-items: start;
  }

  .shop-hero-intro .ebook-hero__title { font-size: clamp(1.8rem, 8vw, 2.45rem); }
  .shop-hero-intro .ebook-hero__lead { margin: .55rem 0 1.15rem; }
  .shop-hero-intro .shop-parcel { width: 6rem; border-radius: .4rem; }
  .shop-parcel__label { inset: auto auto .4rem .4rem; padding: .25rem .4rem; }
  .shop-parcel i { top: .25rem; right: .25rem; font-size: .9rem; }
  .ebook-subnav__links a:nth-last-child(-n+2) { display: inline-block; }
  .ebook-subnav__links { gap: var(--a-s2); }
  .ebook-footer__main { grid-template-columns: 1fr 1fr; }
}


/* Layout and WooCommerce controls. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font-family: inherit; }
img { max-width: 100%; }
.container { width: 100%; margin-inline: auto; padding-inline: 12px; }
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }
@media (min-width: 1400px) { .container { max-width: 1320px; } }
.visually-hidden:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; top: .5rem; left: .5rem; z-index: 1050; background: #fff; padding: .5rem 1rem; }
.admin-bar #header { top: 32px; }
@media (max-width: 782px) { .admin-bar #header { top: 46px; } }
@media (max-width: 600px) { .admin-bar #header { top: 0; } }
.shop-content { padding-block: var(--a-s3) var(--a-s6); }
.shop-panel { display: flow-root; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--a-border); border-radius: var(--a-radius); background: var(--a-white); }
.shop-panel h1 { margin-top: 0; }
.woocommerce .woocommerce-breadcrumb { margin-bottom: var(--a-s2); }
.woocommerce ul.products li.product a img { max-height: 16rem; aspect-ratio: 1; object-fit: contain; background: var(--a-bg); }
.woocommerce ul.products li.product { border: 1px solid var(--a-border); border-radius: var(--a-radius); padding: var(--a-s2); }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--a-text); font: 700 1.25rem/1.25 var(--a-head); }
.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.shop-panel .wc-block-components-button:not(.is-link) {
  border: 1px solid var(--a-orange-text);
  border-radius: var(--a-radius);
  background: var(--a-orange-text);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.shop-panel .wc-block-components-button:not(.is-link):hover { background: #a83b00; color: #fff; }
.woocommerce .woocommerce-error, .woocommerce .woocommerce-info, .woocommerce .woocommerce-message { border-top-color: var(--a-orange-text); background: var(--a-orange-soft); color: var(--a-text); }
.woocommerce .woocommerce-error::before, .woocommerce .woocommerce-info::before, .woocommerce .woocommerce-message::before { color: var(--a-orange-text); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce .quantity .qty,
.woocommerce select, .woocommerce .select2-container--default .select2-selection--single {
  padding: .5rem;
  border: 1px solid var(--a-border-strong);
  border-radius: var(--a-radius);
  background: #fff;
  font: inherit;
}
.woocommerce .select2-container--default .select2-selection--single { height: auto; }
.woocommerce div.product form.cart .button { min-height: 44px; }
.woocommerce span.onsale { background: var(--a-orange-text); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1rem; }
.woocommerce table.shop_table td.product-name a { font-weight: 600; }
.woocommerce .woocommerce-MyAccount-navigation ul { display: grid; gap: .5rem; padding-left: 1.2rem; }
.woocommerce .woocommerce-MyAccount-navigation .is-active a { color: var(--a-orange-text); font-weight: 700; }
@media (max-width: 767.98px) {
  .ebook-home { padding-top: 32px; }
  .woocommerce ul.products[class*=columns-] li.product { padding: .65rem; }
}
.js-shop-contact { max-width: 42rem; }
.js-shop-contact textarea.input-text { height: auto; }

@media (max-width: 767.98px) {
  .shop-has-purchase-bar {
    scroll-padding-bottom: var(--shop-purchase-bar-height, 76px);
  }

  .shop-has-purchase-bar body {
    padding-bottom: var(--shop-purchase-bar-height, 76px);
  }

  .shop-purchase-bar {
    position: fixed;
    z-index: 1021;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem max(.75rem, env(safe-area-inset-right)) calc(.65rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
    border-top: 1px solid var(--a-border);
    background: var(--a-white);
    box-shadow: 0 -4px 18px #2222;
  }

  .shop-purchase-bar__summary { flex: 1 1 0; min-width: 0; }
  .shop-purchase-bar__label { display: block; margin-bottom: .15rem; color: var(--a-muted); font-size: .75rem; }
  .shop-purchase-bar__price { display: block; color: var(--a-text); font: 700 clamp(1rem, 4.7vw, 1.25rem)/1.2 var(--a-head); }

  .woocommerce div.product form.cart .shop-purchase-bar .button,
  .woocommerce-cart .wc-proceed-to-checkout .shop-purchase-bar .checkout-button {
    display: flex;
    flex: 0 1 58%;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin: 0;
    padding: .65rem .75rem;
    border: 1px solid var(--a-orange-text);
    border-radius: var(--a-radius);
    background: var(--a-orange-text);
    color: #fff;
    font: 700 .9375rem/1.25 var(--a-body);
    text-align: center;
    text-decoration: none;
  }

  .woocommerce div.product form.cart .shop-purchase-bar .button:hover,
  .woocommerce-cart .wc-proceed-to-checkout .shop-purchase-bar .checkout-button:hover {
    background: #a83b00;
    color: #fff;
  }

  .shop-purchase-bar__summary[hidden],
  .woocommerce div.product form.cart .shop-purchase-bar .button[hidden],
  .woocommerce div.product form.cart .shop-purchase-bar--options .single_add_to_cart_button {
    display: none;
  }

  .woocommerce .shop-purchase-bar__summary[hidden] ~ .button { flex: 1; }
}
