/* -------------------- HERO SPLIT -------------------- */
.homepage-split-hero {
  display: flex;
  width: 100vw;
  height: 440px;
  max-height: 50vw;
  min-height: 240px;
  overflow: hidden;
  position: relative;
}

.split-hero-half {
  flex: 1 1 50%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.split-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 100%;
  min-width: 100%;
  display: block;
  transition: transform .4s cubic-bezier(.77,0,.18,1);
}

.split-hero-half:hover .split-hero-img {
  transform: scale(1.04);
}

.split-hero-caption {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.split-hero-title {
  background: rgba(16,22,36,0.40);
  color: #fff;
  font-size: 2.5vw;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 38px;
  border-radius: 12px;
  text-shadow: 0 2px 18px #000c;
  pointer-events: auto;
  transition: background .2s, color .2s;
  font-family: 'Montserrat', 'Arial', sans-serif;
}
.split-hero-caption a {
  text-decoration: none;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .homepage-split-hero {
    flex-direction: column;
    height: auto;
    max-height: none;
    min-height: 0;
  }
  .split-hero-half {
    min-height: 180px;
    height: 45vw;
    max-height: 260px;
  }
  .split-hero-title {
    font-size: 6vw;
    padding: 12px 18px;
    border-radius: 8px;
  }
}
@media (max-width: 520px) {
  .split-hero-title {
    font-size: 7vw;
    padding: 8px 6vw;
  }
  .split-hero-half {
    height: 36vw;
    max-height: 180px;
    min-height: 120px;
  }
}

/* -------------------- INTRO/WSTĘP -------------------- */
.intro-section {
  background: #fff;
  width: 100vw;
  padding: 0;
}
.intro-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 24px 12px 24px;
}
.intro-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
}
.intro-text {
  font-size: 1.15rem;
  text-align: left;
  max-width: none;
  margin: 0 0 30px 0;
  line-height: 1.6;
  color: #212121;
}

/* -------------------- DREWNIANE/WSTĘP -------------------- */
.wood-section {
  background: #eaf5ff;
  width: 100vw;
  padding: 10px 0 5px 0;
}
.wood-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0px 24px 36px 24px;
}
.wood-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: left;
}
.wood-title .blue {
  color: #233292;
  font-weight: 700;
  text-decoration: underline;
}
.wood-title .blue:hover {
  text-decoration: underline;
}
.wood-lead {
  font-size: 1.07rem;
  margin-bottom: 18px;
}
.wood-subtitle {
  font-size: 1.14rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.wood-text {
  font-size: 1.07rem;
  margin-bottom: 0;
}

/* -------------------- DWIE KOLUMNY -------------------- */
.section-bg-gray {
  background: #fdfdfd;   /* poprawiony kolor - wcześniej raz był #fdfdfd */
  width: 100vw;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.section-bg-white {
  background: #fff;
  width: 100vw;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.section-two-col {
  display: flex;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 0 48px 0;
  gap: 48px;
}
.col-50 {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.image-col {
  align-items: center;
}
.text-col {
  align-items: flex-start;
  text-align: left;
}
.section-img {
  max-width: 550px;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  margin: 0;
  display: block;
  object-fit: cover;
}
.image-col .section-img + .section-img {
  margin-top: 32px;
}
.section-title {
  color: #233292;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.text-col h3 {
  color: #233292;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 22px;
  margin-bottom: 4px;
}

/* ----------- MEDIA QUERIES - RWD ----------- */
@media (max-width: 1200px) {
  .section-two-col {
    padding-left: 2vw;
    padding-right: 2vw;
    gap: 32px;
  }
}
@media (max-width: 900px) {
  .intro-container,
  .wood-container {
    padding: 24px 6vw 14px 6vw;
    max-width: 98vw;
  }
  .col-50.text-col {
    padding: 0 20px;
  }
  .intro-title {
    font-size: 1.35rem;
  }
  .wood-title {
    font-size: 1.18rem;
  }
  .section-two-col {
    flex-direction: column;
    gap: 28px;
    padding: 38px 0 20px 0;
  }
  .section-img {
    max-width: 90vw;
    min-width: 180px;
  }
  .text-col {
    align-items: flex-start;
    text-align: left;
  }
}
@media (max-width: 600px) {
  .section-two-col {
    gap: 18px;
    padding: 18px 0 12px 0;
  }
  .section-title {
    font-size: 1.2rem;
    margin-bottom: 14px;
  }
}

/* ============================================================
   NOWA STRONA GLOWNA - Homepage v2 (Conversion + SEO)
   ============================================================ */

/* --- COMMON: Section & Container --- */
.hp-section {
  padding: 48px 0;
}
.hp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.hp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.hp-section-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #233292;
  margin: 0;
}
.hp-section-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tb-theme-color);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.hp-section-link:hover {
  color: var(--tb-theme-color-hover);
  text-decoration: underline;
}

/* --- USP BAR --- */
.hp-usp-bar {
  background: #f5f7fb;
  border-bottom: 1px solid #e8ebf3;
  padding: 16px 0;
}
.hp-usp-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.hp-usp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #333;
}
.hp-usp-item svg {
  color: var(--tb-theme-color);
  flex-shrink: 0;
}

/* --- DAILY DEAL --- */
.hp-daily-deal {
  background: linear-gradient(135deg, #f8f4ff 0%, #eef3ff 100%);
  border-top: 3px solid var(--tb-theme-color);
}
.hp-deal-badge {
  background: #e53e3e;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 4px 16px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.hp-deal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hp-deal-image img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.hp-deal-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #1a1a2e;
}
.hp-deal-name a {
  color: inherit;
  text-decoration: none;
}
.hp-deal-name a:hover {
  color: var(--tb-theme-color);
}
.hp-deal-desc {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 16px 0;
}
.hp-deal-prices {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.hp-deal-old {
  font-size: 1.1rem;
  color: #999;
  text-decoration: line-through;
}
.hp-deal-new {
  font-size: 1.7rem;
  font-weight: 800;
  color: #e53e3e;
}
.hp-deal-new .woocommerce-Price-amount { font-size: inherit; }

/* --- COUNTDOWN TIMER --- */
.hp-deal-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.hp-timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}
.hp-timer-num {
  background: var(--tb-theme-color);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 8px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: center;
}
.hp-timer-label {
  font-size: 0.75rem;
  color: #666;
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
}
.hp-timer-sep {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--tb-theme-color);
  padding-bottom: 18px;
}

/* --- CTA BUTTON --- */
.hp-deal-cta {
  display: inline-block;
  background: var(--tb-theme-color);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 8px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.15s;
}
.hp-deal-cta:hover {
  background: var(--tb-theme-color-hover);
  transform: translateY(-1px);
  color: #fff;
}

/* --- WC PRODUCT GRID: 4 columns on homepage --- */
.hp-container ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px;
}
.hp-container ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
}
@media (max-width: 900px) {
  .hp-container ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
    align-items: start;
  }
}
@media (max-width: 480px) {
  .hp-container ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
    align-items: start;
  }
}

/* --- BLOG GRID (homepage) --- */
.hp-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.hp-blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hp-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.hp-blog-thumb-link {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #f5f5f7;
}
.hp-blog-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.hp-blog-card:hover .hp-blog-thumb {
  transform: scale(1.04);
}
.hp-blog-body {
  padding: 18px 20px 22px;
}
.hp-blog-date {
  font-size: 0.8rem;
  color: #999;
  display: block;
  margin-bottom: 6px;
}
.hp-blog-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.35;
}
.hp-blog-title a {
  color: #1a1a2e;
  text-decoration: none;
}
.hp-blog-title a:hover {
  color: var(--tb-theme-color);
}
.hp-blog-excerpt {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 10px 0;
}
.hp-blog-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tb-theme-color);
  text-decoration: none;
}
.hp-blog-more:hover {
  text-decoration: underline;
}

/* --- SEO TEXT GRID --- */
.hp-seo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.hp-seo-card {
  background: #f9fafb;
  padding: 24px;
  border-radius: 10px;
  border: 1px solid #eee;
}
.hp-seo-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #233292;
  margin: 0 0 10px 0;
}
.hp-seo-card h2 a {
  color: inherit;
  text-decoration: none;
}
.hp-seo-card h2 a:hover {
  text-decoration: underline;
}
.hp-seo-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #444;
  margin: 0;
}
.hp-seo-card p a {
  color: var(--tb-theme-color);
  text-decoration: none;
}
.hp-seo-card p a:hover {
  text-decoration: underline;
}

/* --- RESPONSIVE: NOWA STRONA GLOWNA --- */
@media (max-width: 900px) {
  .hp-usp-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
  }
  .hp-usp-item {
    font-size: 0.82rem;
    gap: 6px;
  }
  .hp-usp-item svg {
    width: 22px;
    height: 22px;
  }
  .hp-deal-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
  .hp-deal-image img {
    max-width: 100%;
  }
  .hp-deal-prices,
  .hp-deal-timer {
    justify-content: center;
  }
  .hp-blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hp-seo-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hp-section {
    padding: 32px 0;
  }
  .hp-section-title {
    font-size: 1.3rem;
  }
}
@media (max-width: 600px) {
  .hp-usp-inner {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .hp-timer-num {
    font-size: 1.4rem;
    padding: 6px 10px;
    min-width: 44px;
  }
  .hp-deal-name {
    font-size: 1.2rem;
  }
  .hp-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ZAKLADKA KONTATK */


.form-kontakt input, .form-kontakt textarea {
  width: 100%;
  max-width: 600px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-kontakt button {
  background-color: var(--tb-theme-color);
  color: white;
  padding: 12px 26px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 20px;
}

.form-kontakt button:hover {
  background-color: var(--tb-theme-color-hover);
}
.form-message {
  padding: 16px 24px;
  border-radius: 8px;
  margin-top: 20px;
  font-size: 18px;
  font-weight: 600;
  display: block;
}

.form-message.success {
  background-color: #e6fbe6;
  color: #146c2d;
  border: 1px solid #88d9a0;
}

.form-message.error {
  background-color: #fde8e8;
  color: #a00;
  border: 1px solid #e0a0a0;
}

/* ================================================================================
   SEMTAK BUILDER - CATEGORY GRID & COMPONENTS
   Przeniesione z wtyczki do szablonu dla prawidłowego podziału odpowiedzialności
   ================================================================================ */

/* -------------------- TWO IMAGES SIDE-BY-SIDE -------------------- */
.stb-two-images {
    width: 100%;
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.stb-two-images img {
    flex: 1 1 calc(50% - 10px);
    width: calc(50% - 10px);
    max-width: calc(50% - 10px);
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* -------------------- CATEGORY GRID -------------------- */
.stb-cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin: 20px 0 40px;
}

.stb-cat-grid.stb-cat-grid-6 {
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.stb-cat-grid.stb-cat-grid-8 {
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

/* -------------------- CATEGORY CARD -------------------- */
.stb-cat-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding-top: 10px; /* +10px od góry zdjęcia */
}

.stb-cat-card-body {
    padding: 8px 8px 0 !important; /* zmniejszony padding (-20px od dołu) */
    text-align: center;
}

.stb-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.stb-cat-card a {
    text-decoration: none;
    display: block;
}

.stb-cat-card img {
    width: 100%;
    aspect-ratio: 4/3;  /* Match source image ratio 300x225 for quality */
    object-fit: cover;
    display: block;
}

/* .stb-cat-card-body styling moved to line 370 */

.stb-cat-card h3 {
    margin: 0 0 3px;
    font-size: 13px;
    color: #333;
    font-weight: 600;
    line-height: 1.2;
}

.stb-cat-card .count {
    font-size: 11px;
    color: #888;
}

/* -------------------- INTRO TEXT -------------------- */
.stb-intro {
    font-size: 18px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
}

/* -------------------- CATEGORY LINKS -------------------- */
.stb-cat-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px 20px;
    margin: 20px 0 30px;
    text-align: center;
}

.stb-cat-links h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.stb-cat-links h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.stb-cat-links h2 a:hover {
    color: #2271b1;
    text-decoration: underline;
}

/* -------------------- RESPONSIVE - DESKTOP/TABLET -------------------- */
@media (max-width: 1200px) {
    .stb-cat-grid {
        grid-template-columns: repeat(6, 1fr); /* Keep 6 columns on smaller desktops */
    }
    .stb-cat-grid.stb-cat-grid-6 {
        grid-template-columns: repeat(6, 1fr) !important;
    }
    .stb-cat-grid.stb-cat-grid-8 {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 992px) {
    .stb-cat-grid,
    .stb-cat-grid.stb-cat-grid-6,
    .stb-cat-grid.stb-cat-grid-8 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .stb-cat-links {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* -------------------- RESPONSIVE - MOBILE -------------------- */
@media (max-width: 768px) {
    .stb-cat-grid,
    .stb-cat-grid.stb-cat-grid-6,
    .stb-cat-grid.stb-cat-grid-8 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .stb-cat-card-body {
        padding: 8px 8px 0 !important; /* consistent with desktop */
    }
    
    .stb-cat-card {
        border: 2px solid #d0d0d0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    
    .stb-cat-links {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .stb-two-images {
    width: 100%;
        flex-direction: column;
    }
    
    .stb-two-images img {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stb-cat-card-body {
        padding: 8px 8px 0 !important; /* consistent with desktop */
    }
    
    .stb-cat-grid,
    .stb-cat-grid.stb-cat-grid-6,
    .stb-cat-grid.stb-cat-grid-8 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .stb-cat-links {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* -------------------- ACCESSIBILITY -------------------- */
@media (prefers-reduced-motion: reduce) {
    .stb-cat-card:hover {
        transform: none;
    }
}
