/* =====================================================================
   PUFY ONYX – nowa strona główna + strona „Dla szkół i instytucji”
   Wklej NA KOŃCU pliku: /themes/<twój-motyw>/assets/css/custom.css
   Wszystko jest zamknięte w klasie .po – nie rusza reszty sklepu.
   WERSJA POPRAWIONA pod motyw pufyy: selektory poprzedzone #content,
   bo motyw ma reguły #custom-text h2/p/img i .page-content.page-cms p/ul,
   które wygrywały z klasami .po (niewidoczny tekst w bloku B2B, małe nagłówki).
   Plik wgraj jako NOWY custom.css (na serwerze go nie ma) – @import musi zostać na samej górze.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=DM+Sans:opsz,wght@9..40,400..700&display=swap');

#content .po {
  --po-accent: #FF0D95;      /* róż z logo – zmień tu, zmienia się wszędzie */
  --po-accent-ink: #C4005F;  /* ciemniejszy róż do tekstu (kontrast WCAG) */
  --po-ink: #141414;
  --po-muted: #5A5A5A;
  --po-line: #E6E6E6;
  --po-sand: #F5F3F1;
  --po-pink: #FFE6F3;
  --po-mint: #EAF4F1;
  --po-warm: #F3EEE6;
  --po-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --po-body: 'DM Sans', system-ui, sans-serif;
  font-family: var(--po-body);
  color: var(--po-ink);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  width: 100%;
}
#content .po *, #content .po *::before, #content .po *::after { box-sizing: border-box; }
#content .po p { margin: 0; }
#content .po img { max-width: 100%; height: auto; display: block; }
#content .po a { color: var(--po-ink); }
#content .po a:hover { color: var(--po-accent-ink); }
#content .po h1, #content .po h2, #content .po h3 { text-transform: none; color: var(--po-ink); }

/* Neutralizacja wrappera modułu „Niestandardowy blok tekstowy” (ps_customtext) */
#custom-text:has(> .po), #custom-text:has(.po-home) {
  padding: 0 !important; margin: 0 !important; background: none !important;
  text-align: left !important; box-shadow: none !important; border: 0 !important;
}
/* to samo dla przeglądarek bez :has() – klasę .po-ct dodaje custom.js
   (osobna reguła, bo nieobsługiwany :has() unieważnia całą listę selektorów) */
#custom-text.po-ct {
  padding: 0 !important; margin: 0 !important; background: none !important;
  text-align: left !important; box-shadow: none !important; border: 0 !important;
}
/* Strona CMS – zdejmuje ramkę/tło z kontenera treści */
#cms #content.page-cms:has(.po-inst) {
  padding: 0 !important; text-align: left !important; background: none !important; box-shadow: none !important; border: 0 !important;
}
body.po-inst-on #content.page-cms {
  padding: 0 !important; text-align: left !important; background: none !important; box-shadow: none !important; border: 0 !important;
}

/* ---------- layout ---------- */
#content .po-wrap { max-width: 1320px; margin: 0 auto; }
#content .po-sec { padding: 56px 0 8px; }
#content .po-sec--hero { padding-top: 12px; }
#content .po-sec--tight { padding-top: 24px; }
#content .po-sec--last { padding-bottom: 72px; }
#content .po-mb { margin-bottom: 24px !important; }
#content .po-row-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 24px; margin-bottom: 22px;
}
#content .po-row-titles { min-width: 0; }

/* ---------- typografia ---------- */
#content .po-eyebrow {
  display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--po-accent-ink);
}
#content .po-eyebrow--light { color: #FF7AC1; }
#content .po-eyebrow--green { color: #0F6B57; }
#content .po-eyebrow--dark { color: var(--po-ink); }
#content .po .po-h2 {
  margin: 6px 0 0; font-family: var(--po-head); font-weight: 800;
  font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -.02em; line-height: 1.05;
}
#content .po .po-h2--upper { text-transform: uppercase; font-size: clamp(24px, 2.8vw, 36px); margin-top: 0; }
#content .po .po-h2--light { color: #fff; }
#content .po .po-h3 { margin: 0 0 16px; font-family: var(--po-head); font-weight: 800; font-size: 26px; letter-spacing: -.01em; line-height: 1.1; }
#content .po-sub { margin-top: 6px !important; font-size: 15px; color: var(--po-muted); }
#content .po-lead { margin-top: 14px !important; font-size: 17px; line-height: 1.6; color: #3D3D3D; }
#content .po-link { font-weight: 700; font-size: 15px; text-underline-offset: 4px; text-decoration: underline; }

/* ---------- przyciski ---------- */
#content .po-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
#content .po .po-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; background: var(--po-ink); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 16px; border: 1.5px solid var(--po-ink); transition: transform .15s;
}
#content .po .po-btn:hover { color: #fff; transform: translateY(-1px); }
#content .po .po-btn--ghost { background: transparent; color: var(--po-ink); }
#content .po .po-btn--ghost:hover { color: var(--po-ink); }
#content .po .po-btn--accent { background: var(--po-accent); border-color: var(--po-accent); color: var(--po-ink); }
#content .po .po-btn--accent:hover { color: var(--po-ink); }
#content .po .po-btn--ghost-light { background: transparent; border-color: #fff; color: #fff; }
#content .po .po-btn--ghost-light:hover { color: #fff; }

/* ---------- slider ---------- */
#content .po-hero {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  border-radius: 24px; scrollbar-width: none;
}
#content .po-hero::-webkit-scrollbar { display: none; }
#content .po-slide, #content .po-inst-hero {
  scroll-snap-align: start; display: flex; flex-wrap: wrap; align-items: center; min-height: 520px;
}
#content .po-inst-hero { border-radius: 28px; overflow: hidden; background: var(--po-mint); }
#content .po-slide-text {
  flex: 1 1 420px; padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
}
#content .po .po-hero-title {
  margin: 0; font-family: var(--po-head); font-weight: 800; font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.02; letter-spacing: -.02em; max-width: 580px;
}
#content .po-hero-lead { font-size: 18px; line-height: 1.55; color: #3D3D3D; max-width: 520px; }
#content .po-slide-img { flex: 1 1 460px; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; }
#content .po-slide-img img { width: 100%; max-width: 600px; aspect-ratio: 1 / 1; object-fit: contain; mix-blend-mode: multiply; }
#content .po-bg-sand { background: var(--po-sand); }
#content .po-bg-pink { background: var(--po-pink); }
#content .po-bg-mint { background: var(--po-mint); }
#content .po-bg-warm { background: var(--po-warm); }
#content .po-ticks { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; font-weight: 600; color: #0F6B57; }

/* sterowanie (dodawane przez custom.js) */
#content .po-hero-ctrl { display: flex; align-items: center; gap: 14px; margin: 16px 0 0 4px; }
#content .po-dots { display: flex; gap: 8px; }
#content .po-dot { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: #BDBDBD; cursor: pointer; transition: width .25s; }
#content .po-dot[aria-current="true"] { width: 28px; background: var(--po-ink); }
#content .po-arrow {
  width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--po-ink); background: #fff;
  color: var(--po-ink); display: inline-grid; place-items: center; cursor: pointer; font-size: 18px; line-height: 1;
}
#content .po-arrow--solid { background: var(--po-ink); color: #fff; }
#content .po-arrow:disabled { opacity: .3; cursor: default; }
#content .po-arrows { display: flex; gap: 10px; }

/* ---------- USP ---------- */
#content .po-usp { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; }
#content .po .po-usp-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--po-line);
  border-radius: 16px; text-decoration: none; color: var(--po-ink);
}
#content .po-usp-item--pink { background: var(--po-pink); border-color: var(--po-pink) !important; }
#content .po-usp-ico {
  flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--po-pink);
  color: var(--po-accent-ink); display: grid; place-items: center; font-size: 18px; font-weight: 700;
}
#content .po-usp-item--pink .po-usp-ico { background: #fff; }
#content .po-usp-item strong { display: block; font-size: 15px; }
#content .po-usp-item small { display: block; font-size: 13px; color: var(--po-muted); }

/* ---------- karty produktów ---------- */
#content .po .po-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--po-ink); min-width: 0; }
#content .po-card-img { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--po-sand); }
#content .po-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
#content .po-card:hover .po-card-img img { transform: scale(1.04); }
#content .po-badge {
  position: absolute; top: 10px; left: 10px; background: #fff; color: var(--po-ink);
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
#content .po-badge--accent { background: var(--po-accent); }
#content .po-card-meta { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--po-muted); text-transform: uppercase; letter-spacing: .06em; }
#content .po-card-name { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; min-height: 40px; }
#content .po-card-price { display: block; font-size: 17px; font-weight: 700; }
#content .po-grid-best { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 16px; }

/* ---------- karuzele ---------- */
#content .po-track {
  --per: 5; display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per) - 1) * 16px) / var(--per));
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; padding-bottom: 4px;
}
#content .po-track::-webkit-scrollbar { display: none; }
#content .po-track > * { scroll-snap-align: start; }
#content .po .po-card-more {
  justify-content: space-between; aspect-ratio: 1 / 1; padding: 22px; border-radius: 16px;
  background: var(--po-ink); color: #fff;
}
#content .po .po-card-more:hover { color: #fff; }
#content .po-more-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #FF7AC1; }
#content .po-more-title { font-family: var(--po-head); font-weight: 800; font-size: 26px; line-height: 1.05; }

/* ---------- kategorie ---------- */
#content .po-grid-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
#content .po .po-cat { display: flex; flex-direction: column; text-decoration: none; color: var(--po-ink); border-radius: 20px; overflow: hidden; }
#content .po-cat-img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; mix-blend-mode: multiply; }
#content .po-cat-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 20px; }
#content .po-cat-name { display: block; font-family: var(--po-head); font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
#content .po-cat-desc { display: block; font-size: 14px; color: #4A4A4A; margin-top: 2px; }
#content .po-round { flex: none; width: 44px; height: 44px; border-radius: 999px; background: var(--po-ink); color: #fff; display: grid; place-items: center; font-size: 18px; }

/* ---------- B2B ---------- */
#content .po-b2b {
  border-radius: 28px; background: var(--po-ink); color: #fff; padding: clamp(28px, 5vw, 64px);
  display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: center;
}
#content .po-b2b-main { flex: 1 1 460px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
#content .po-b2b-lead { font-size: 17px; line-height: 1.6; color: #D6D6D6; max-width: 560px; }
#content .po-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#content .po-chips span { padding: 7px 14px; border-radius: 999px; border: 1px solid #4A4A4A; font-size: 14px; }
#content .po-b2b-box { flex: 1 1 380px; background: #1F1F1F; border: 1px solid #333; border-radius: 20px; padding: 28px; }
#content .po-b2b-box-title { font-family: var(--po-head); font-weight: 700; font-size: 20px; margin-bottom: 16px !important; }

/* listy z ptaszkami */
#content .po .po-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
#content .po-check li { position: relative; padding-left: 40px; min-height: 28px; padding-top: 2px; }
#content .po-check li::before {
  content: "\2713"; position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 999px;
  background: var(--po-accent); color: var(--po-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
#content .po-check--dark li { color: #E6E6E6; }
#content .po-check--dark li::before { background: transparent; color: #FF7AC1; border: 0; }

/* ---------- galeria ---------- */
#content .po-grid-gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
#content .po-grid-gal img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px; }

/* ---------- FAQ ---------- */
#content .po-faq { display: flex; flex-wrap: wrap; gap: 32px 64px; }
#content .po-faq-side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; }
#content .po-phones { font-size: 18px; line-height: 1.9; }
#content .po-phones a { font-weight: 700; text-decoration: none; }
#content .po-phones small { font-size: 14px; color: var(--po-muted); }
#content .po-faq-list { flex: 999 1 560px; min-width: 0; border-top: 1px solid var(--po-line); }
#content .po-faq-item { border-bottom: 1px solid var(--po-line); }
#content .po-faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 0; font-size: 18px; font-weight: 700;
}
#content .po-faq-item summary::-webkit-details-marker { display: none; }
#content .po-faq-item summary::after {
  content: "\002B"; flex: none; width: 32px; height: 32px; border-radius: 999px; background: #F0F0F0;
  display: grid; place-items: center; font-size: 20px; font-weight: 600;
}
#content .po-faq-item[open] summary::after { content: "\2013"; background: var(--po-accent); }
#content .po-faq-item p { margin: 0 0 22px !important; font-size: 16px; line-height: 1.65; color: #3D3D3D; max-width: 720px; }

/* ---------- strona Instytucje ---------- */
#content .po-intro { max-width: 760px; margin-bottom: 32px; }
#content .po .po-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#content .po-steps li { border: 1px solid var(--po-line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
#content .po-step-n { font-family: var(--po-head); font-weight: 800; font-size: 40px; line-height: 1; color: var(--po-accent-ink); }
#content .po-step-t { font-family: var(--po-head); font-weight: 700; font-size: 22px; }
#content .po-step-d { font-size: 16px; line-height: 1.6; color: #3D3D3D; }
#content .po-two { display: flex; flex-wrap: wrap; gap: 16px; }
#content .po-panel { flex: 1 1 420px; border-radius: 24px; padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; }
#content .po-panel p { font-size: 17px; line-height: 1.65; }
#content .po-panel--sand { background: var(--po-sand); }
#content .po-panel--dashed { border: 1.5px dashed #BDBDBD; }
#content .po-panel--dark { background: var(--po-ink); color: #fff; }
#content .po-panel--dark .po-h3 { color: #fff; }
#content .po-panel--dark p { color: #D6D6D6; }
#content .po-panel--pink { background: var(--po-pink); }
#content .po .po-note { font-size: 15px; color: #4A4A4A; }
#content .po-template { background: #FAFAFA; border: 1px solid var(--po-line); border-radius: 14px; padding: 20px 22px; font-size: 15px !important; line-height: 1.7; color: #2E2E2E; }
#content .po-grid-prodcats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
#content .po .po-prodcat { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--po-ink); }
#content .po-prodcat img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 18px; background: var(--po-sand); }
#content .po-prodcat span { font-family: var(--po-head); font-weight: 700; font-size: 19px; }
#content .po-cta {
  border-radius: 28px; background: var(--po-accent); padding: clamp(32px, 5vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px;
}
#content .po-cta-main { flex: 1 1 460px; }
#content .po-cta-main > p { margin-top: 12px !important; font-size: 18px; }
#content .po .po-cta-mail { margin: 8px 0 0; font-family: var(--po-head); font-weight: 800; font-size: clamp(30px, 4vw, 54px); letter-spacing: -.02em; line-height: 1.02; overflow-wrap: anywhere; }
#content .po .po-cta-mail a { text-decoration: none; color: var(--po-ink); }
#content .po-cta-side { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
#content .po-cta-side a { color: var(--po-ink); }

/* ---------- RWD ---------- */
@media (max-width: 1100px) {
  #content .po-grid-best { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #content .po-grid-prodcats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  #content .po-track { --per: 3; }
  #content .po-grid-best, #content .po-grid-cats, #content .po-grid-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content .po .po-steps { grid-template-columns: 1fr; }
  #content .po-slide, #content .po-inst-hero { min-height: 0; }
}
@media (max-width: 640px) {
  #content .po-sec { padding-top: 40px; }
  #content .po-track { --per: 1.6; }
  #content .po-grid-prodcats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content .po-slide-text { padding: 28px 22px 8px; }
  #content .po-slide-img { flex-basis: 100%; }
  #content .po-slide-img img { max-width: 360px; }
  #content .po-hero-lead { font-size: 16px; }
  #content .po-cat-name { font-size: 18px; }
  #content .po-cat-body { padding: 14px; }
  #content .po-round { width: 36px; height: 36px; }
  #content .po-faq-item summary { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #content .po-hero, #content .po-track { scroll-behavior: auto; }
  #content .po-card-img img, #content .po .po-btn { transition: none; }
}

/* =====================================================================
   OCHRONA PRZED STYLAMI MOTYWU pufyy (dodane przy weryfikacji wdrożenia)
   ===================================================================== */
/* motyw: a { text-decoration: none !important } – linki w tekście byłyby niewidoczne */
#content .po .po-link,
#content .po .po-faq-item p a,
#content .po .po-cta-side p a:not(.po-btn) { text-decoration: underline !important; text-underline-offset: 4px; }
#content .po .po-faq-item p a { color: var(--po-accent-ink); }
/* motyw: #custom-text p { color: #232323 } – akapity bez własnego koloru na ciemnym tle B2B były niewidoczne */
#content .po .po-chips,
#content .po .po-b2b-box-title { color: inherit; }
/* motyw (CMS): .page-content.page-cms ul { list-style: disc; color: #7a7a7a } */
#content .po .po-check { color: inherit; }
/* przycisk pauzy slidera (WCAG 2.2.2) – dodawany przez custom.js */
#content .po .po-pause { font-size: 13px; letter-spacing: -1px; }

/* Strona CMS z nowym układem: ukryj nagłówek szablonu (H1 jest w treści – jeden H1 na stronie) */
#cms #main:has(.po-inst) > .page-header { display: none; }
body.po-inst-on #main > .page-header { display: none; }

/* Strona główna: ukryj STARE sekcje wbudowane w szablon motywu (plik układu w
   themes/pufyy/templates/layouts/), ale tylko gdy nowa treść jest na stronie. Docelowo lepiej
   usunąć te sekcje z szablonu (ukryte obrazki i tak się pobierają, ok. 1,3 MB).
   Dwie osobne reguły: z :has() (działa od razu) i z klasą .po-home-on z custom.js
   (dla przeglądarek bez :has()). */
body#index.po-home-on .homepage__slider,
body#index.po-home-on .homepage__products,
body#index.po-home-on .homepage__categories,
body#index.po-home-on .homepage__aboutus,
body#index.po-home-on .homepage__faq,
body#index.po-home-on .homepage__reviews,
body#index.po-home-on .homepage__instagram { display: none !important; }
body#index:has(.po-home) .homepage__slider,
body#index:has(.po-home) .homepage__products,
body#index:has(.po-home) .homepage__categories,
body#index:has(.po-home) .homepage__aboutus,
body#index:has(.po-home) .homepage__faq,
body#index:has(.po-home) .homepage__reviews,
body#index:has(.po-home) .homepage__instagram { display: none !important; }
