/*
Theme Name: ProsteKolorowanki
Theme URI: https://prostekolorowanki.pl
Author: ProsteKolorowanki Team
Description: Ultralekki, autorski motyw v2.2 PRO dla serwisu z darmowymi kolorowankami dla dzieci do druku A4 oraz interaktywnej Pracowni kolorowania online. Zoptymalizowany pod Core Web Vitals, mobile UX oraz techniczne SEO.
Version: 2.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: prostekolorowanki
*/

@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/Fredoka-Bold.ttf") format("truetype");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Fredoka", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg-page: #FFFDF9;
  --color-text: #1E293B;
  --color-text-muted: #64748B;
  --color-primary: #8B5CF6;
  --color-primary-hover: #7C3AED;
  --color-primary-light: #EDE9FE;
  
  /* Pastel Card Colors */
  --pastel-lavender: #EDE9FE;
  --pastel-peach: #FFEDD5;
  --pastel-mint: #D1FAE5;
  --pastel-pink: #FCE7F3;
  --pastel-sky: #E0F2FE;
  --pastel-green: #DCFCE7;
  --pastel-yellow: #FEF3C7;
  
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-sheet: 0 6px 18px rgba(15, 23, 42, 0.07);
  --radius-card: 24px;
  --radius-sheet: 18px;
  --radius-pill: 9999px;
  --max-width: 1240px;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .site-logo {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ==========================================================================
   HEADER & MEGA DROPDOWN MENU
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 253, 249, 0.96);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 14px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 23px;
  font-weight: 800;
  color: #0F172A;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 24px;
}

.main-nav > ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav > ul > li > a {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  position: relative;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s;
  white-space: nowrap;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  color: var(--color-primary);
}

.main-nav > ul > li > a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--color-primary);
  border-radius: 2px;
}

.nav-highlight-pill {
  background: var(--pastel-yellow) !important;
  color: #B45309 !important;
  padding: 6px 14px !important;
  border-radius: var(--radius-pill);
  font-weight: 700 !important;
}

.nav-highlight-pill:hover {
  background: #FDE68A !important;
}

/* Dropdown Mega Menu for Hubs & Categories */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -20px;
  width: 520px;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 20px;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  z-index: 200;
}

.has-dropdown:hover .nav-dropdown,
.has-dropdown:focus-within .nav-dropdown {
  display: grid;
}

.dropdown-hub-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  transition: background 0.15s;
}

.dropdown-hub-item:hover {
  background: #F8FAFC;
}

.dropdown-hub-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dropdown-hub-text strong {
  display: block;
  font-size: 14px;
  color: #0F172A;
  margin-bottom: 2px;
}

.dropdown-hub-text span {
  display: block;
  font-size: 12px;
  color: #64748B;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  width: 230px;
  transition: all 0.2s;
}

.search-pill:focus-within {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

.search-pill input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  width: 100%;
  color: #0F172A;
}

.btn-icon-heart {
  background: #F1F5F9;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  color: #475569;
  flex-shrink: 0;
}

.btn-icon-heart:hover {
  background: #FCE7F3;
  color: #EC4899;
}

.fav-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #EC4899;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 40px 0 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 36px;
}

.hero-badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.hero-title {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.12;
  color: #0F172A;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 17.5px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  line-height: 1.55;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 16px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pastel-yellow);
  color: #B45309;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  transition: background 0.15s, transform 0.1s;
}

.btn-secondary-pill:hover {
  background: #FDE68A;
  transform: translateY(-1px);
}

.hero-mockup-wrapper {
  display: flex;
  justify-content: center;
}

.hero-sheet-img {
  max-height: 360px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: #FFFFFF;
  padding: 12px;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   HUBS & CATEGORIES BAR
   ========================================================================== */
.hubs-bar {
  padding: 16px 0 18px;
}

.hubs-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.hubs-scroll::-webkit-scrollbar {
  display: none;
}

.hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  transition: all 0.15s;
  cursor: pointer;
  flex-shrink: 0;
}

.hub-pill:hover,
.hub-pill.active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.hub-pill[data-hub="all"] { background: var(--pastel-lavender); color: #6D28D9; }
.hub-pill[data-hub="zwierzeta"] { background: var(--pastel-peach); color: #C2410C; }
.hub-pill[data-hub="dinozaury"] { background: var(--pastel-mint); color: #047857; }
.hub-pill[data-hub="bajki"] { background: var(--pastel-pink); color: #BE185D; }
.hub-pill[data-hub="pojazdy"] { background: var(--pastel-sky); color: #0369A1; }
.hub-pill[data-hub="dla-maluchow"] { background: var(--pastel-yellow); color: #B45309; }
.hub-pill[data-hub="przygoda"] { background: var(--pastel-green); color: #15803D; }

/* Popular Categories Chips */
.popular-cats-section {
  margin-bottom: 24px;
}

.popular-cats-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.popular-cats-label {
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  margin-right: 4px;
}

.cat-chip {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-block;
}

.cat-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.chip-purple { color: #6D28D9; background: #F5F3FF; }
.chip-orange { color: #C2410C; background: #FFF7ED; }
.chip-mint   { color: #047857; background: #ECFDF5; }
.chip-sky    { color: #0369A1; background: #F0F9FF; }
.chip-red    { color: #B91C1C; background: #FEF2F2; }
.chip-blue   { color: #1D4ED8; background: #EFF6FF; }
.chip-amber  { color: #B45309; background: #FFFBEB; }
.chip-green  { color: #15803D; background: #F0FDF4; }
.chip-pink   { color: #BE185D; background: #FDF2F8; }
.chip-indigo { color: #4338CA; background: #EEF2FF; }

/* ==========================================================================
   COLORING CARDS GRID + CWV CONTENT-VISIBILITY
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 22px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
}

.section-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.colorings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 44px;
}

.coloring-card {
  border-radius: var(--radius-card);
  padding: 16px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* CWV Optimization: Defer off-screen rendering for cards below the fold */
.coloring-card.is-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 380px;
}

.coloring-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.coloring-card.bg-lavender { background: var(--pastel-lavender); }
.coloring-card.bg-peach    { background: var(--pastel-peach); }
.coloring-card.bg-mint     { background: var(--pastel-mint); }
.coloring-card.bg-pink     { background: var(--pastel-pink); }
.coloring-card.bg-sky      { background: var(--pastel-sky); }
.coloring-card.bg-green    { background: var(--pastel-green); }
.coloring-card.bg-yellow   { background: var(--pastel-yellow); }

.card-sheet {
  background: #FFFFFF;
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-sheet);
  aspect-ratio: 1200 / 1696;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  position: relative;
  cursor: zoom-in;
}

.card-sheet img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s;
}

.coloring-card:hover .card-sheet img {
  transform: scale(1.02);
}

.card-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.15s;
  z-index: 5;
}

.card-fav-btn:hover {
  transform: scale(1.12);
}

.card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 8px;
}

.card-text {
  min-width: 0;
  flex: 1;
}

.card-text h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-text span {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

.card-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-card-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--color-primary);
  border: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-card-action:hover {
  background: var(--color-primary);
  color: #FFFFFF;
}

/* ==========================================================================
   HOMEPAGE SHORT SEO TEXT SECTION
   ========================================================================== */
.home-seo-section {
  margin-top: 12px;
  margin-bottom: 20px;
}

.home-seo-card {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 32px 34px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.home-seo-card h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 14px;
}

.home-seo-card p {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 12px;
}

.home-seo-card p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   CATEGORY PAGE, HUBS & STATIC PAGES
   ========================================================================== */
.category-hero {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 32px 30px;
  margin: 16px 0 34px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.category-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.category-hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.2;
}

.category-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-badge-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--pastel-lavender);
  color: #6D28D9;
}

.category-hero p {
  font-size: 15.5px;
  color: #475569;
  line-height: 1.65;
  max-width: 860px;
}

.entry-content h2,
.entry-content h3 {
  font-family: var(--font-heading);
  color: #0F172A;
  margin: 22px 0 10px;
}

.entry-content p,
.entry-content ul {
  margin-bottom: 14px;
}

.entry-content ul {
  padding-left: 20px;
}

.related-categories-box {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 28px 30px;
  margin: 40px 0 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   LIGHTBOX MODAL (A4 PREVIEW ON CATEGORY PAGE)
   ========================================================================== */
.pk-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pk-lightbox.is-open {
  display: flex;
}

.pk-lightbox-dialog {
  background: #FFFFFF;
  border-radius: 24px;
  max-width: 880px;
  width: 100%;
  max-height: 92vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  position: relative;
}

.pk-lightbox-preview {
  background: #F8FAFC;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  max-height: 88vh;
}

.pk-lightbox-preview img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pk-lightbox-details {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pk-lightbox-cat-badge {
  display: inline-block;
  background: #EDE9FE;
  color: #6D28D9;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 10px;
}

.pk-lightbox-title {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 10px;
  line-height: 1.25;
}

.pk-lightbox-desc {
  font-size: 14px;
  color: #64748B;
  line-height: 1.6;
  margin-bottom: 22px;
}

.pk-lightbox-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pk-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F1F5F9;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.pk-lightbox-nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.pk-lightbox-nav button {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  color: #334155;
}

.pk-lightbox-nav button:hover {
  background: #F8FAFC;
}

/* ==========================================================================
   SINGLE TEMPLATE
   ========================================================================== */
.single-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  padding: 30px 0 60px;
  align-items: start;
}

.single-sheet-preview {
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.07);
  padding: 24px;
  border: 1px solid rgba(0,0,0,0.04);
}

.single-sheet-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.single-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0;
}

.btn-print-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-primary);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-print-large:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #FFFFFF;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 50px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-about-text {
  font-size: 14px;
  color: #64748B;
  line-height: 1.6;
  max-width: 340px;
}

.footer-heading {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #475569;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid #F1F5F9;
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #94A3B8;
}

/* ==========================================================================
   PRINT STYLESHEET (@media print - 100% Guaranteed 1-Page A4 Sheet)
   ========================================================================== */
#pkPrintOnlySheet {
  display: none;
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html, body {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.single-kolorowanka > *:not(#pkPrintOnlySheet),
  body.pk-printing-single > *:not(#pkPrintOnlySheet),
  body > *:not(#pkPrintOnlySheet) {
    display: none !important;
  }

  #pkPrintOnlySheet {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    max-width: 195mm !important;
    height: auto !important;
    max-height: 255mm !important;
    margin: 4mm auto 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: #FFFFFF !important;
    text-align: center !important;
    page-break-after: avoid !important;
    page-break-before: avoid !important;
    page-break-inside: avoid !important;
    break-after: avoid !important;
    break-before: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
  }

  #pkPrintOnlySheet img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 185mm !important;
    max-height: 248mm !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-after: avoid !important;
    break-inside: avoid !important;
  }
}


/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE - ZERO CLIPPING)
   ========================================================================== */
@media (max-width: 1024px) {
  .colorings-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .hero-grid,
  .single-container,
  .pk-lightbox-dialog {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  .main-nav {
    display: none;
  }
  .pk-lightbox-dialog {
    max-height: 92vh;
    overflow-y: auto;
  }
  .pk-lightbox-preview {
    max-height: 44vh;
    padding: 16px;
  }
  .pk-lightbox-preview img {
    max-height: 40vh;
  }
  .pk-lightbox-details {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }
  .site-header {
    padding: 10px 0;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }
  .site-logo {
    font-size: 21px;
  }
  .logo-icon {
    font-size: 21px;
  }
  .header-actions {
    width: 100%;
    order: 3;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .search-pill {
    flex: 1;
    max-width: none;
    padding: 8px 14px;
  }
  .search-pill input {
    font-size: 13.5px;
  }
  .btn-icon-heart {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .hero-section {
    padding: 20px 0 16px;
  }
  .hero-title {
    font-size: 25px;
    line-height: 1.25;
    word-break: normal;
    overflow-wrap: break-word;
  }
  .hero-subtitle {
    font-size: 14.5px;
    margin-bottom: 16px;
    line-height: 1.5;
  }
  .hero-cta-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }
  .hero-cta-group .btn-primary,
  .hero-cta-group .btn-secondary-pill {
    width: 100%;
    justify-content: center;
    font-size: 14.5px;
    padding: 12px 18px;
    text-align: center;
  }
  .hero-sheet-img {
    max-height: 240px;
  }
  .section-title {
    font-size: 20px;
  }
  .colorings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .coloring-card {
    padding: 8px;
    border-radius: 16px;
  }
  .card-sheet {
    border-radius: 10px;
    padding: 2px;
  }
  .card-info {
    margin-top: 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .card-text {
    width: 100%;
  }
  .card-text h3 {
    font-size: 13px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
  }
  .card-actions-group {
    width: 100%;
    justify-content: flex-end;
  }
  .btn-card-action {
    width: 32px;
    height: 32px;
  }
  .category-hero,
  .home-seo-card,
  .related-categories-box {
    padding: 18px 14px;
    border-radius: 16px;
  }
  .category-hero h1 {
    font-size: 22px;
  }
  .home-seo-card h2 {
    font-size: 19px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ==========================================================================
   PRACOWNIA ONLINE COLORING STUDIO (v2.0 PRO)
   ========================================================================== */
.pk-studio-main {
  background: #F8FAFC;
  min-height: 85vh;
  padding: 16px 0 40px;
}
.pk-studio-container {
  max-width: 1280px;
  margin: 0 auto;
}

/* TOP BAR */
.pk-studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 12px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.pk-studio-top-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.btn-studio-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #F1F5F9;
  color: #334155;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-studio-back:hover {
  background: #E2E8F0;
  color: #0F172A;
}
.pk-studio-sheet-info {
  min-width: 0;
}
.pk-studio-badge {
  display: inline-block;
  background: #EDE9FE;
  color: #7C3AED;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 2px;
}
.pk-studio-title {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-studio-change-sheet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #7C3AED;
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-studio-change-sheet:hover {
  background: #6D28D9;
  transform: translateY(-1px);
}

/* WORKSPACE LAYOUT */
.pk-studio-workspace {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* SIDEBAR CONTROLS */
.pk-studio-sidebar {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pk-tool-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pk-tool-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pk-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pk-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pk-tool-btn:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}
.pk-tool-btn.active {
  background: #EDE9FE;
  border-color: #7C3AED;
  color: #6D28D9;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}
.pk-tool-btn .tool-emoji {
  font-size: 24px;
}
.pk-tool-btn .tool-name {
  font-size: 12px;
  font-weight: 700;
}

/* SIZES */
.pk-sizes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pk-size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pk-size-btn:hover {
  background: #F1F5F9;
}
.pk-size-btn.active {
  background: #EDE9FE;
  border-color: #7C3AED;
}
.dot-preview {
  display: block;
  background: #334155;
  border-radius: 50%;
}
.dot-s { width: 6px; height: 6px; }
.dot-m { width: 12px; height: 12px; }
.dot-l { width: 20px; height: 20px; }
.pk-size-btn.active .dot-preview {
  background: #7C3AED;
}
.size-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

/* ACTIONS IN SIDEBAR */
.pk-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-studio-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #334155;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-studio-action:hover:not(:disabled) {
  background: #E2E8F0;
  color: #0F172A;
}
.btn-studio-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-studio-action.btn-danger {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: #E11D48;
}
.btn-studio-action.btn-danger:hover {
  background: #FFE4E6;
}

/* CANVAS WRAPPER & PAPER CARD */
.pk-studio-canvas-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.pk-canvas-card {
  position: relative;
  width: 100%;
  max-width: 620px;
  aspect-ratio: 1 / 1.414;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
#pkPaintCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
  z-index: 1;
}
#pkOutlineImg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 2;
  display: block;
}
.pk-canvas-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  font-size: 14px;
  font-weight: 700;
  color: #7C3AED;
}

/* PALETTE */
.pk-studio-palette-wrap {
  width: 100%;
  max-width: 620px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.pk-palette-scroll {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
}
.pk-palette-scroll::-webkit-scrollbar {
  height: 4px;
}
.pk-palette-scroll::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.pk-color-pill {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.pk-color-pill:hover {
  transform: scale(1.15);
}
.pk-color-pill.active {
  transform: scale(1.18);
  border-color: #0F172A;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.pk-color-custom-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 2px dashed #94A3B8;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-size: 18px;
}
.pk-color-custom-label input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* FOOTER ACTIONS (DOWNLOAD / PRINT) */
.pk-studio-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 620px;
}
.btn-studio-download,
.btn-studio-print {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 16px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
}
.btn-studio-download {
  background: #10B981;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-studio-download:hover {
  background: #059669;
  transform: translateY(-1px);
}
.btn-studio-print {
  background: #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.btn-studio-print:hover {
  background: #2563EB;
  transform: translateY(-1px);
}

/* MODAL / DRAWER: SHEET PICKER */
.pk-sheet-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.pk-sheet-modal.is-open {
  visibility: visible;
  opacity: 1;
}
.pk-sheet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}
.pk-sheet-modal-content {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 88vh;
  background: #FFFFFF;
  border-radius: 28px 28px 0 0;
  padding: 24px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
.pk-sheet-modal.is-open .pk-sheet-modal-content {
  transform: translateY(0);
}
.pk-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.btn-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}
.btn-modal-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* MODAL CATEGORY PILLS */
.pk-modal-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.pk-cat-pill {
  padding: 8px 16px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.pk-cat-pill:hover {
  background: #E2E8F0;
}
.pk-cat-pill.active {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #FFFFFF;
}

/* MODAL SEARCH */
.pk-modal-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 14px;
  padding: 8px 14px;
}
.pk-modal-search input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  outline: none;
  color: #0F172A;
}

/* SHEETS GRID */
.pk-sheets-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  overflow-y: auto;
  padding-right: 4px;
  max-height: 55vh;
}
.pk-picker-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pk-picker-card:hover {
  border-color: #7C3AED;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.12);
}
.pk-picker-thumb {
  aspect-ratio: 1 / 1.414;
  background: #F8FAFC;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pk-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pk-picker-meta {
  padding: 8px 4px 4px;
}
.pk-picker-cat {
  font-size: 11px;
  font-weight: 700;
  color: #7C3AED;
  display: block;
  margin-bottom: 2px;
}
.pk-picker-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* MOBILE RESPONSIVE ADJUSTMENTS */
@media (max-width: 900px) {
  .pk-studio-workspace {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .pk-studio-sidebar {
    order: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .pk-studio-sidebar .pk-action-group {
    grid-column: span 2;
  }
  .pk-studio-canvas-wrap {
    order: 1;
  }
  .pk-canvas-card {
    max-width: 100%;
    border-radius: 16px;
  }
  .pk-studio-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
  .btn-studio-change-sheet {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .pk-studio-main {
    padding: 10px 0 24px;
  }
  .pk-studio-topbar {
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
  }
  .pk-studio-top-left {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  .pk-studio-sheet-info {
    flex: 1;
    min-width: 0;
  }
  .pk-studio-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pk-studio-sidebar {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 14px;
  }
  .pk-studio-sidebar .pk-action-group {
    grid-column: span 1;
  }
  .pk-color-pill {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  .pk-studio-footer-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-studio-download,
  .btn-studio-print {
    width: 100%;
  }
  .pk-sheet-modal-content {
    max-height: 94vh;
    padding: 18px 14px 20px;
    border-radius: 20px 20px 0 0;
  }
  .pk-sheets-picker-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ==========================================================================
   HOMEPAGE STUDIO PROMO BANNER (v2.2 PRO)
   ========================================================================== */
.studio-promo-section {
  margin: 28px 0 20px;
}
.studio-promo-card {
  position: relative;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 50%, #FDE68A 100%);
  border: 2px solid #FCD34D;
  border-radius: 24px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.15), 0 8px 10px -6px rgba(245, 158, 11, 0.1);
  overflow: hidden;
}
.studio-promo-content {
  flex: 1;
  max-width: 680px;
}
.studio-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F59E0B;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 9999px;
  margin-bottom: 12px;
}
.studio-promo-title {
  font-size: 28px;
  font-weight: 800;
  color: #78350F;
  margin: 0 0 10px;
  line-height: 1.25;
}
.studio-promo-desc {
  font-size: 15.5px;
  color: #92400E;
  margin: 0 0 18px;
  line-height: 1.55;
}
.studio-promo-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 22px;
}
.studio-promo-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  color: #78350F;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.studio-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #D97706;
  color: #FFFFFF !important;
  font-size: 15.5px;
  font-weight: 800;
  padding: 13px 26px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
.studio-promo-btn:hover {
  background: #B45309;
  transform: translateY(-2px);
}
.studio-promo-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.studio-promo-preview-box {
  width: 140px;
  height: 198px;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  border: 3px solid #FFFFFF;
  overflow: hidden;
  transform: rotate(-3deg);
  transition: transform 0.2s ease;
}
.studio-promo-preview-box:hover {
  transform: rotate(0deg) scale(1.05);
}
.studio-promo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 860px) {
  .studio-promo-card {
    flex-direction: column;
    padding: 22px 18px;
    gap: 16px;
    align-items: flex-start;
  }
  .studio-promo-visual {
    display: none;
  }
  .studio-promo-title {
    font-size: 19px;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: break-word;
  }
  .studio-promo-desc {
    font-size: 14px;
    line-height: 1.5;
  }
  .studio-promo-features {
    gap: 6px;
    margin-bottom: 16px;
  }
  .studio-promo-feature-tag {
    font-size: 12px;
    padding: 5px 10px;
  }
  .studio-promo-btn {
    width: 100%;
    justify-content: center;
    font-size: 15px;
    padding: 13px 20px;
  }
}


