:root {
  --szary: #747171;
  --szary-jasny: #9a9696;
  --szary-ciemny: #4d4b4b;
  --grafit: #272626;
  --bordo: #3d1f1f;
  --czerwony: #aa2c2c;
  --bialy: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Lato", Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: var(--bialy);
  background: var(--szary);
  line-height: 1.55;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* Nagłówek */
.top {
  background: var(--szary-ciemny);
  position: sticky; top: 0; z-index: 10;
}
.top-inner {
  max-width: 1100px; margin: 0 auto; padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.logo {
  text-decoration: none; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 400; font-size: 17px;
}
.nav { display: flex; gap: 28px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; text-transform: uppercase; font-size: 14px;
  letter-spacing: .06em; font-weight: 400; opacity: .95;
}
.nav a:hover, .nav a.aktywny { color: var(--czerwony); }
.nav a.aktywny { color: #d36b6b; }

/* Hero */
.hero {
  max-width: 1100px; margin: 0 auto; padding: 52px 24px 40px;
}
.hero .podtytul {
  color: var(--bordo); text-transform: uppercase;
  font-size: clamp(24px, 3.4vw, 36px); letter-spacing: .1em; line-height: 1.2; font-weight: 400;
}
.hero .wstep {
  margin-top: 20px; max-width: 760px; font-size: 17px; line-height: 1.45;
}
.hero .wstep p + p { margin-top: 6px; }

/* Pasy z produktami */
.pas { padding: 90px 0; }
.pas:nth-of-type(odd) { background: var(--szary-ciemny); }
.pas:nth-of-type(even) { background: var(--szary-jasny); }
.pas-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: start;
}
.okladka img {
  width: 100%; height: auto; display: block;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.produkt h2 {
  font-weight: 300; text-transform: uppercase; letter-spacing: .07em;
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; color: var(--bordo);
}
.pas:nth-of-type(odd) .produkt h2 { color: var(--bialy); }
.produkt .pod { margin-top: 10px; font-size: 16px; letter-spacing: .04em; opacity: .9; }
.produkt .opis { margin-top: 26px; max-width: 600px; }
.produkt .opis p + p { margin-top: 14px; }

.produkt .dane { margin-top: 18px; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }

.warianty { margin-top: 34px; display: grid; gap: 12px; max-width: 560px; }
.wariant {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px 14px 20px; border: 1px solid rgba(255,255,255,.35);
}
.wariant .nazwa { font-weight: 400; }
.wariant .cena { font-weight: 700; margin-left: auto; white-space: nowrap; }
.kup {
  display: inline-block; text-decoration: none; text-transform: uppercase;
  letter-spacing: .1em; font-size: 14px; font-weight: 700;
  background: var(--czerwony); color: var(--bialy); padding: 12px 22px;
  border: 0; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.kup:hover { background: #8e2222; }

/* Info */
.info { background: var(--grafit); padding: 80px 0; }
.info-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
}
.info h3 {
  font-weight: 400; text-transform: uppercase; letter-spacing: .1em; font-size: 16px;
  margin-bottom: 12px; color: #d36b6b;
}
.info p { font-size: 16px; opacity: .9; }

footer {
  background: var(--grafit); border-top: 1px solid rgba(255,255,255,.12);
  padding: 28px 24px; text-align: center; font-size: 14px; opacity: .85;
}
footer a { margin: 0 10px; text-decoration: none; }
footer a:hover { color: #d36b6b; }
a.mail { text-decoration: none; font-weight: 700; }
a.mail:hover { color: #d36b6b; }

/* Strony tekstowe */
.tekst { max-width: 780px; margin: 0 auto; padding: 90px 24px 110px; }
.tekst h1 {
  font-weight: 300; text-transform: uppercase; letter-spacing: .07em;
  font-size: clamp(36px, 6vw, 60px); line-height: 1.1; margin-bottom: 30px;
}
.tekst h2 {
  font-weight: 400; text-transform: uppercase; letter-spacing: .08em;
  font-size: 18px; margin: 38px 0 12px; color: var(--bordo);
}
.tekst p, .tekst li { font-size: 17px; }
.tekst p + p { margin-top: 12px; }
.tekst ol, .tekst ul { padding-left: 22px; margin-top: 10px; }
.tekst li + li { margin-top: 6px; }
.tekst .uwaga {
  background: rgba(0,0,0,.18); padding: 16px 20px; margin-bottom: 30px; font-size: 15px;
}
.tekst .kup { margin-top: 30px; }

@media (max-width: 800px) {
  body { font-size: 17px; }
  .nav { display: none; }
  .hero { padding: 36px 20px 28px; }
  .pas { padding: 60px 0; }
  .pas-inner { grid-template-columns: 1fr; gap: 36px; padding: 0 20px; }
  .okladka { max-width: 240px; }
  .wariant { flex-wrap: wrap; }
  .wariant .nazwa { width: 100%; }
  .wariant .cena { margin-left: 0; }
  .wariant .kup { margin-left: auto; }
  .info-inner { grid-template-columns: 1fr; gap: 32px; padding: 0 20px; }
}

/* Przycisk koszyka */
.koszyk-btn {
  font: inherit; font-size: 14px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase;
  color: var(--bialy); background: transparent; border: 1px solid rgba(255,255,255,.5);
  padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.koszyk-btn span {
  display: inline-block; min-width: 22px; margin-left: 6px; padding: 1px 6px;
  background: var(--czerwony); font-weight: 700; text-align: center;
}
.koszyk-btn:hover { border-color: var(--bialy); }
.top-inner .nav { margin-left: auto; }
.koszyk-btn { margin-left: auto; }

/* Szuflada koszyka */
.zaslona { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; }
.koszyk {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: var(--szary-ciemny); z-index: 21; overflow-y: auto;
  transform: translateX(100%); transition: transform .25s ease;
}
.koszyk.otwarty { transform: none; box-shadow: -12px 0 40px rgba(0,0,0,.35); }
.koszyk-glowa {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px; border-bottom: 1px solid rgba(255,255,255,.15);
}
.koszyk-glowa h2 { font-weight: 300; text-transform: uppercase; letter-spacing: .12em; font-size: 22px; }
.zamknij { font: inherit; font-size: 30px; line-height: 1; color: var(--bialy); background: none; border: 0; cursor: pointer; }
.koszyk-tresc { padding: 8px 24px 32px; }
.pusto { padding: 30px 0; opacity: .85; }

.pozycje { list-style: none; }
.pozycje li {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 12px;
  padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.12);
}
.poz-opis strong { display: block; font-weight: 400; }
.poz-opis span { font-size: 14px; opacity: .8; }
.poz-ile { display: flex; align-items: center; gap: 10px; grid-column: 1; }
.poz-ile button {
  width: 28px; height: 28px; font: inherit; font-size: 16px; color: var(--bialy);
  background: transparent; border: 1px solid rgba(255,255,255,.4); cursor: pointer;
}
.poz-ile .jedna { font-size: 14px; opacity: .8; }
.poz-cena { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-weight: 700; }
.usun {
  display: block; margin-left: auto; margin-top: 6px; font: inherit; font-size: 13px; font-weight: 300;
  color: var(--bialy); opacity: .7; background: none; border: 0; text-decoration: underline; cursor: pointer;
}

.blok { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.blok h3 { font-weight: 400; text-transform: uppercase; letter-spacing: .1em; font-size: 14px; margin-bottom: 12px; color: #d9a0a0; }
.opcja { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.opcja span { margin-left: auto; font-weight: 700; }
.opcja input, .zgoda input { accent-color: var(--czerwony); width: 18px; height: 18px; flex: none; }
.paczkomat { margin-top: 12px; }
.paczkomat label { display: block; font-size: 14px; margin-bottom: 6px; }
.koszyk textarea, .koszyk input[type="text"] {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px;
  color: var(--grafit); background: #f4f2f2; border: 0;
}
.wybrany { margin-bottom: 8px; font-size: 15px; }
.link-btn {
  font: inherit; font-size: 15px; color: var(--bialy); background: none; border: 1px solid rgba(255,255,255,.5);
  padding: 9px 14px; cursor: pointer;
}
.pomoc { display: block; font-size: 14px; opacity: .85; margin-top: 8px; }
.blok .pomoc:first-of-type { margin-top: 0; }
.blok h3 + .pomoc { margin-bottom: 8px; }
.maly { text-align: center; margin-top: 12px; }

.podsumowanie div { display: flex; justify-content: space-between; padding: 4px 0; }
.podsumowanie .razem { font-weight: 700; font-size: 20px; margin-top: 6px; }
.zgoda { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 6px 0; cursor: pointer; }
.zgoda input { margin-top: 2px; }
.zgoda.faktura { margin-bottom: 12px; }
.blad { margin-top: 16px; padding: 12px 14px; background: rgba(170,44,44,.35); font-size: 15px; }
.do-platnosci { display: block; width: 100%; margin-top: 20px; padding: 16px; font-size: 15px; }
.do-platnosci:disabled { opacity: .6; cursor: wait; }

/* Mapa paczkomatów */
.mapa { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.mapa[hidden] { display: none; }
.mapa-okno { background: var(--szary-ciemny); width: min(1000px, 100%); height: min(720px, 100%); display: flex; flex-direction: column; }
#mapaKontener { flex: 1; background: #fff; }
#mapaKontener inpost-geowidget { display: block; width: 100%; height: 100%; }

@media (max-width: 800px) {
  .koszyk-btn { margin-left: auto; }
}

.koszyk textarea { resize: vertical; min-height: 80px; line-height: 1.4; }
.koszyk-akcje { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.koszyk-akcje .usun { margin: 0; font-size: 14px; }
.pusto + .link-btn { margin-top: 4px; }


.blad a { color: inherit; }
.do-platnosci:disabled { opacity: .45; cursor: not-allowed; }

/* Łamanie tekstu */
p, li, .wstep, .opis { text-wrap: pretty; }
h1, h2, h3, .podtytul, .pod { text-wrap: balance; }


/* ---------- Lista książek (karty) ---------- */
.katalog { background: var(--szary-ciemny); padding: 56px 0 100px; }
.katalog-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 32px;
}
.karta { display: flex; flex-direction: column; color: var(--bialy); }
.karta-okladka { display: block; aspect-ratio: 2 / 3; background: rgba(0,0,0,.15); }
.karta-okladka img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  box-shadow: 0 18px 40px rgba(0,0,0,.35); transition: transform .3s ease, box-shadow .3s ease;
}
.karta:hover .karta-okladka img { transform: translateY(-14px) scale(1.03); box-shadow: 0 32px 50px rgba(0,0,0,.5); }
.karta-tytul {
  margin-top: 22px; font-weight: 300; text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  font-size: 20px; line-height: 1.2; text-wrap: balance;
}
.karta-tytul:hover { color: #f0d6d6; }
.karta-lead { margin-top: 10px; font-size: 15px; opacity: .85; text-wrap: pretty; flex: 1; }
.karta-kup { margin-top: 18px; display: grid; gap: 8px; }
.kup.karta-btn { width: 100%; padding: 11px 12px; font-size: 15px; text-align: center; text-transform: none; letter-spacing: .03em; }
.karta-zobacz {
  margin-top: 12px; font-size: 13px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; padding: 10px 12px; text-align: center; border: 1px solid rgba(255,255,255,.45);
}
.karta-zobacz:hover { border-color: var(--bialy); }

/* ---------- Strona książki ---------- */
.wroc-pas { background: var(--szary); }
.wroc {
  display: block; max-width: 1100px; margin: 0 auto; padding: 22px 24px 0;
  text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; font-weight: 400;
}
.wroc:hover { color: #f0d6d6; }
.ks-hero { background: var(--szary); padding: 40px 0 90px; }
.ks-hero-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: center;
}
.okladka.duza img { width: 100%; box-shadow: 0 24px 50px rgba(0,0,0,.4); }
.ks-glowa h1 {
  font-weight: 300; text-transform: uppercase; letter-spacing: .05em; line-height: 1.05;
  font-size: clamp(38px, 5.4vw, 64px);
}
.ks-glowa .pod { margin-top: 14px; color: var(--bordo); text-transform: uppercase; letter-spacing: .08em; font-size: 16px; font-weight: 400; }
.ks-glowa .lead { margin-top: 26px; font-size: 22px; line-height: 1.45; max-width: 560px; }
.ks-glowa .warianty { margin-top: 30px; }
.notka { margin-top: 16px; font-size: 15px; opacity: .9; max-width: 560px; }

.ks-opis { background: var(--szary-ciemny); padding: 90px 0; }
.ks-wezsza { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.ks-opis h2, .ks-opinie h2, .ks-inne h2 {
  font-weight: 300; text-transform: uppercase; letter-spacing: .1em; font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 28px;
}
.ks-opis p + p { margin-top: 14px; }
.ks-opis .dane { margin-top: 26px; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }

.ks-opinie { background: var(--szary-jasny); padding: 90px 0; }
.ks-opinie-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.ks-opinie h2 { color: var(--bordo); }
.opinie { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px 56px; }
.opinie:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) { .opinie:has(> :nth-child(4)) { grid-template-columns: 1fr; } }
.opinia blockquote { font-size: 20px; line-height: 1.5; font-style: italic; text-wrap: pretty; }
.opinia blockquote::before { content: "„"; }
.opinia blockquote::after { content: "”"; }
.opinia figcaption { margin-top: 14px; font-size: 15px; }
.opinia figcaption strong { font-weight: 700; display: block; }
.opinia figcaption span { opacity: .85; }

.ks-cta { background: var(--szary); padding: 80px 0; }
.ks-cta-inner {
  max-width: 900px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 160px 1fr; gap: 40px; align-items: center;
}
.okladka.mala img { width: 100%; box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.ks-cta h2 { font-weight: 300; text-transform: uppercase; letter-spacing: .06em; font-size: 28px; line-height: 1.15; }
.ks-cta .warianty { margin-top: 20px; }

.ks-inne { background: var(--szary-ciemny); padding: 80px 0 90px; }
.ks-inne-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.inne { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); gap: 40px; }
.inna { text-decoration: none; color: var(--bialy); }
.inna img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; box-shadow: 0 12px 28px rgba(0,0,0,.35); transition: transform .3s ease, box-shadow .3s ease; }
.inna:hover img { transform: translateY(-10px) scale(1.03); box-shadow: 0 24px 40px rgba(0,0,0,.5); }
.inna span { display: block; margin-top: 14px; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; text-wrap: balance; }

@media (max-width: 960px) {
  .katalog-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .katalog { padding: 40px 0 70px; }
  .katalog-inner { gap: 36px 20px; padding: 0 20px; }
  .karta-tytul { font-size: 17px; }
  .karta-zobacz { letter-spacing: .04em; font-size: 12px; padding: 10px 6px; }
  .kup.karta-btn { font-size: 14px; }
  .ks-hero { padding: 28px 0 60px; }
  .ks-hero-inner { grid-template-columns: 1fr; gap: 32px; padding: 0 20px; }
  .okladka.duza { max-width: 240px; }
  .ks-glowa .lead { font-size: 19px; }
  .ks-opis, .ks-opinie { padding: 60px 0; }
  .ks-cta-inner { grid-template-columns: 1fr; gap: 24px; }
  .okladka.mala { max-width: 120px; }
  .inne { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .inna span { font-size: 12px; }
  .wroc { padding: 18px 20px 0; }
}

/* Grafika 3D w nagłówku książki (przezroczyste tło) */
.okladka.duza.bez-cienia img { box-shadow: none; filter: drop-shadow(0 24px 30px rgba(0,0,0,.35)); }

/* Zajrzyj do środka */
.ks-galeria { background: #f4f2f2; color: var(--grafit); padding: 90px 0; }
.ks-galeria-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.ks-galeria h2 {
  font-weight: 300; text-transform: uppercase; letter-spacing: .1em; font-size: clamp(26px, 3.4vw, 36px);
  margin-bottom: 28px; color: var(--bordo);
}
.galeria { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.galeria-el { display: block; padding: 0; border: 0; background: #fff; cursor: zoom-in; overflow: hidden; }
.galeria-el img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .3s ease; }
.galeria-el:hover img { transform: scale(1.03); }

/* Spis treści */
.ks-spis { background: var(--szary); padding: 90px 0; }
.ks-wezsza.szersza { max-width: 900px; }
.ks-spis h2 { font-weight: 300; text-transform: uppercase; letter-spacing: .1em; font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 28px; }
.spis { list-style: none; columns: 2; column-gap: 56px; }
.spis > li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.spis-czesc, .spis-rozdzialy li { display: flex; justify-content: space-between; gap: 16px; }
.spis-czesc { font-weight: 400; font-size: 17px; }
.spis .nr { opacity: .75; font-variant-numeric: tabular-nums; }
.spis-rozdzialy { list-style: none; display: none; margin: 8px 0 4px 14px; font-size: 15px; }
.spis-rozdzialy li { padding: 2px 0; opacity: .9; }
.spis.rozwiniety .spis-rozdzialy { display: block; }
.spis-przelacz { margin-top: 26px; }

/* Napisali o książce */
.opinia figcaption { margin-top: 18px; }
.opinia figcaption strong { color: var(--bordo); font-size: 24px; font-weight: 700; letter-spacing: .02em; line-height: 1.2; }

/* Powiększenie zdjęcia */
.lightbox {
  position: fixed; inset: 0; z-index: 40; background: rgba(20,20,20,.92);
  display: flex; align-items: center; justify-content: center; padding: 40px 70px;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 1200px; width: 100%; text-align: center; }
.lightbox img { max-width: 100%; max-height: 80vh; background: #fff; }
.lightbox figcaption { margin-top: 12px; font-size: 15px; opacity: .85; }
.lb-zamknij, .lb-strzalka { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font: inherit; line-height: 1; }
.lb-zamknij { top: 16px; right: 22px; font-size: 40px; }
.lb-strzalka { top: 50%; transform: translateY(-50%); font-size: 56px; padding: 10px; }
.lb-wstecz { left: 10px; }
.lb-dalej { right: 10px; }

@media (max-width: 800px) {
  .ks-galeria, .ks-spis { padding: 60px 0; }
  .galeria { gap: 12px; }
  .spis { columns: 1; }
  .lightbox { padding: 20px 10px; }
  .lb-strzalka { font-size: 40px; top: auto; bottom: 14px; transform: none; }
}
