/* Wspolne dla wszystkich stron: kroje, kolory, menu, przyciski, sklep (wybor tomow i cena), stopka.
   Strona glowna dokleja glowna.css (hero i sekcje), podstrony podstrona.css. */
@font-face { font-family: "Quicksand"; font-weight: 600; font-display: swap; src: url(fonts/quicksand-600.woff2) format("woff2"); }
@font-face { font-family: "Quicksand"; font-weight: 700; font-display: swap; src: url(fonts/quicksand-700.woff2) format("woff2"); }

:root {
  --cream: #fff9f4;
  --paper: #fffaf2;
  --ink: #1f4656;
  --ink-soft: #4d6f7c;
  --teal: #1d7a90;
  --sky: #74b9d9;
  --olive: #5d5a1f;
  --nav-h: 64px;
  --padx: clamp(16px, 5vw, 72px);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
}
@media (max-aspect-ratio: 1/1) { :root { --nav-h: 56px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: "Quicksand", system-ui, sans-serif; font-weight: 600;
  overflow-x: clip;
}
img { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.svg-defs { position: absolute; }
.sek-in { position: relative; width: 100%; max-width: 1240px; margin: 0 auto; }

/* --- menu: na stronie glownej przezroczyste nad scena, na podstronach z tlem --- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--nav-h);
  display: flex; align-items: center; gap: 28px; padding: 0 clamp(16px, 3vw, 40px);
}
.nav-logo { flex: none; align-self: flex-start; margin-top: 6px; border-radius: 50%; } /* odznaka: wystaje pod pasek menu */
.nav-logo img { width: 76px; height: 76px; filter: drop-shadow(0 6px 14px rgba(31, 70, 86, .3)); transition: transform .45s var(--spring); }
.nav-logo:hover img { transform: rotate(-6deg) scale(1.05); }
@media (max-width: 860px) { .nav-logo { margin-top: 5px; } .nav-logo img { width: 60px; height: 60px; } }
.nav-menu { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { color: var(--teal); }
.nav-menu a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-cart { padding: 9px 16px; border-radius: 999px; background: rgba(255, 250, 242, .9); color: var(--ink) !important; text-shadow: none !important; box-shadow: 0 0 0 1px rgba(31, 70, 86, .12); white-space: nowrap; }
.nav-cart:hover { background: #fff; }
.nav a:focus-visible, .nav button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }
.nav-stala { background: rgba(255, 249, 244, .95); box-shadow: 0 1px 0 rgba(31, 70, 86, .08); }
/* telefon: menu chowa sie pod przyciskiem (bez JS te same odnosniki sa w stopce) */
.nav-tog {
  display: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 250, 242, .9); color: var(--ink); cursor: pointer; box-shadow: 0 0 0 1px rgba(31, 70, 86, .12);
}
.nav-tog i, .nav-tog i::before, .nav-tog i::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s; }
.nav-tog i { position: relative; }
.nav-tog i::before, .nav-tog i::after { content: ""; position: absolute; left: 0; }
.nav-tog i::before { top: -6px; }
.nav-tog i::after { top: 6px; }
.nav-otwarte .nav-tog i { background: transparent; }
html:not(.js):not(.rm) .nav-tog { display: none !important; } /* bez JS: odnosniki menu sa w stopce */
.nav-otwarte .nav-tog i::before { transform: translateY(6px) rotate(45deg); }
.nav-otwarte .nav-tog i::after { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 860px) {
  .nav { gap: 10px; }
  .nav-cart { margin-left: auto; font-size: 15px; }
  .nav-tog { display: grid; }
  .nav-menu {
    position: absolute; top: calc(100% + 6px); left: 12px; right: 12px; display: grid; gap: 0; margin: 0; padding: 8px;
    border-radius: 22px; background: #fffaf2; box-shadow: 0 24px 50px -24px rgba(31, 70, 86, .55), 0 0 0 1px rgba(31, 70, 86, .08);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .25s ease, visibility 0s .25s;
  }
  .nav-menu a { padding: 13px 16px; border-radius: 14px; font-size: 18px; color: var(--ink) !important; text-shadow: none !important; }
  .nav-menu a:hover, .nav-menu a[aria-current="page"] { background: rgba(29, 122, 144, .08); text-decoration: none; }
  .nav-otwarte .nav-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .25s ease; }
}

/* --- tytul tomu w stylu okladki: "Sysiu" duzy, blekitny z biala obwodka, reszta tytulu pod nim --- */
.tome-title { margin: 0; line-height: .95; }
.t-sysiu {
  display: block; font-size: clamp(64px, 8.4vw, 132px); font-weight: 700; color: var(--sky); letter-spacing: -.01em;
  -webkit-text-stroke: .09em #fff; paint-order: stroke fill;
  text-shadow: 0 .05em .2em rgba(10, 40, 60, .45);
}
.t-rest {
  display: block; margin-top: .34em; font-size: clamp(30px, 3.4vw, 54px); font-weight: 700; color: #fff; /* odstep: ogonek y z Sysiu nie wchodzi na litery */
  text-shadow: 0 .05em .25em rgba(10, 40, 60, .6);
}

/* --- przyciski i odnosniki --- */
.btn {
  display: inline-block; padding: 14px 26px; border-radius: 999px; min-height: 48px;
  background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; text-align: center;
  box-shadow: 0 8px 22px -8px rgba(10, 40, 60, .6);
}
.btn:hover { background: #fff; color: var(--teal); }
.btn:focus-visible { outline: 3px solid #fdf3c4; outline-offset: 3px; }
.btn-ciemny { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -12px rgba(29, 122, 144, .85); }
.btn-ciemny:hover { background: #17687b; color: #fff; }
.btn-ciemny:focus-visible { outline-color: var(--teal); }
.kafel-link { color: var(--teal); font-weight: 700; font-size: 17px; text-decoration: none; }
.kafel-link span { display: inline-block; transition: transform .25s ease; }
.kafel-link:hover span { transform: translateX(4px); }

/* brak w materialach: widoczny znacznik, zeby nic nie poszlo na produkcje niezauwazone (build je liczy) */
.brak { display: inline-block; padding: 1px 9px; border-radius: 6px; background: #fff2a8; color: #6b5600; font-size: .85em; font-weight: 700; box-shadow: 0 0 0 1px #e6d36a; }

/* --- sklep: progi ceny, okladki z "Dodaj" i licznikiem sztuk, suma liczona na biezaco (koszyk.js) ---
   Ten sam komponent w #kup na stronie glownej i na stronie zamowienia. */
.kup h2 { text-align: center; }
.progi {
  display: flex; justify-content: center; gap: 4px; width: max-content; max-width: 100%;
  margin: 14px auto clamp(18px, 3.6svh, 36px); padding: 4px; list-style: none; border-radius: 999px; background: rgba(31, 70, 86, .07);
}
.progi li { padding: 8px 18px; border-radius: 999px; font-size: 15px; color: var(--ink-soft); white-space: nowrap; transition: background .35s, color .35s, transform .5s var(--spring); }
.progi b { color: var(--ink); }
.progi li.on { background: var(--teal); color: #e4f3f6; transform: scale(1.05); }
.progi li.on b { color: #fff; }
.kar-wrap { position: relative; }
.kar { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.4vw, 36px); margin: 0; padding: 0; list-style: none; }
.tom { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tom-okl { display: block; width: 100%; border-radius: 4px 7px 7px 4px; }
.tom img {
  width: 100%; height: auto; aspect-ratio: 1; border-radius: 4px 7px 7px 4px; background: #e9e2d6;
  box-shadow: 0 22px 40px -22px rgba(31, 70, 86, .65), 0 2px 6px rgba(31, 70, 86, .12); transition: transform .45s var(--spring);
}
.tom:hover img { transform: translateY(-6px) rotate(-1deg); }
.tom-okl:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.tom h3 { display: flex; align-items: center; justify-content: center; min-height: 2.5em; margin: 16px 0 2px; font-size: clamp(17px, 1.25vw, 20px); line-height: 1.25; text-wrap: balance; }
.tom h3 a { color: inherit; text-decoration: none; }
.tom h3 a:hover { color: var(--teal); }
.tom-cena { margin: 0 0 12px; font-size: 18px; color: var(--ink-soft); }
.tom .btn { padding: 12px 20px; font-size: 16px; }
.dodaj[aria-disabled="true"] { opacity: .45; cursor: default; box-shadow: none; }
.limit-info { margin: 10px 0 0; font-size: 15px; }
.limit-info a { color: inherit; font-weight: 700; }
.ile { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 4px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 2px var(--teal); }
.ile button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--teal); font: inherit; font-size: 24px; font-weight: 700; line-height: 1; cursor: pointer; }
.ile button:hover { background: rgba(29, 122, 144, .1); }
.ile button:disabled { opacity: .3; cursor: default; background: none; }
.ile button:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
.ile-n { width: 3.2em; min-width: 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 18px; font-weight: 700; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.ile-n::-webkit-outer-spin-button, .ile-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ile-n:focus-visible { outline: 3px solid var(--teal); outline-offset: -3px; }
.kar-strz { display: none; }
.suma { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; margin: clamp(20px, 4svh, 40px) auto 0; }
.suma-txt { margin: 0; font-size: 19px; }
.suma-zl { display: inline-block; margin-left: .3em; font-size: 24px; }
.suma-osz { margin-left: .4em; color: #3b7a3a; }
.suma-limit { flex-basis: 100%; margin: 0; font-size: 15px; text-align: center; }
.suma-limit a { color: var(--teal); }
/* komplet czterech tomow jednym kliknieciem (pod karuzela, nad suma): tylko przy pustym koszyku (wspolne.js), z obwodka
   jak licznik sztuk, zeby nie konkurowal z "Dalej"; oszczednosc pokazuje suma po kliknieciu */
.komplet { margin: 22px auto 0; text-align: center; }
.btn-obwodka { padding: 12px 22px; font-size: 16px; background: #fff; color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.btn-obwodka:hover { background: rgba(29, 122, 144, .1); color: var(--teal); }
.btn-obwodka:focus-visible { outline-color: var(--teal); }
.progi-info { margin: 12px auto 28px; max-width: 720px; font-size: 15px; color: var(--ink-soft); text-align: center; text-wrap: pretty; }
.progi-info a { color: var(--teal); font-weight: 700; }
.suma-dalej[aria-disabled="true"] { opacity: .4; pointer-events: none; box-shadow: none; }
.kup.pelny .suma-dalej { background: var(--teal); color: #fff; }
.pop { animation: pop .5s var(--spring); }
@keyframes pop { from { transform: scale(1.18); } to { transform: none; } }
@media (max-aspect-ratio: 1/1) {
  .progi { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-radius: 18px; margin-bottom: 14px; }
  .progi li { display: flex; flex-direction: column; padding: 6px 4px; border-radius: 14px; font-size: 13px; text-align: center; }
  .kar { display: flex; gap: 16px; margin: 0 calc(-1 * var(--padx)); padding: 4px 18vw 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .kar::-webkit-scrollbar { display: none; }
  .tom { flex: 0 0 64vw; scroll-snap-align: center; }
  .tom h3 { font-size: 17px; margin-top: 12px; }
  .tom-cena { margin-bottom: 8px; }
  .kar-strz {
    position: absolute; top: calc(32vw - 18px); z-index: 2; display: grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 8px 20px -10px rgba(31, 70, 86, .6);
    transition: opacity .25s;
  }
  .kar-l { left: -6px; }
  .kar-p { right: -6px; }
  .kar-strz:disabled { opacity: 0; pointer-events: none; }
  .suma { margin-top: 8px; gap: 8px 16px; }
  .suma-txt { font-size: 16px; text-align: center; }
  .suma-zl { font-size: 20px; }
}

/* --- stopka --- */
.stopka {
  position: relative; background: var(--ink); color: #dfeaec;
  padding: clamp(40px, 7svh, 72px) var(--padx) calc(clamp(28px, 5svh, 48px) + env(safe-area-inset-bottom));
}
.stopka-in { width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 40px; }
.stopka .stopka-in h2 { margin: 0 0 12px; font-size: 14px; letter-spacing: .09em; text-transform: uppercase; color: #9cc5cf; }
.stopka p { margin: 0 0 8px; font-size: 18px; }
.stopka a { color: #fff; text-decoration: none; }
.stopka a:hover { text-decoration: underline; text-underline-offset: 3px; }
.stopka .stopka-in a:focus-visible { outline: 3px solid #fdf3c4; outline-offset: 3px; }
.st-media { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.st-linki { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 17px; }
.stopka .st-firma { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 14px; line-height: 1.6; color: #9db8bf; }
@media (max-width: 1000px) { .stopka-in { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stopka-in { grid-template-columns: 1fr; gap: 22px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
}
