/* Strona główna MaxiAgro: sekcje, slider, kafelki kategorii, sekcja "o nas", trust badges. */

body.home .hero-section{ display: none; }
body.home #main{ padding-top: 0; }
body.home .ct-container-full[data-vertical-spacing]{ padding-top: 0; }
body.home .entry-content{
  margin-top: 0;
  padding-top: 0;
}

.mx-home{ margin-top: 0; }

.mx-section{
  max-width: 1290px;
  margin: 0 auto;
  padding: 40px 20px;
}

.mx-h2{
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 22px;
  text-align: center;
}

/* Placeholdery (kropkowane ramki) — dla banerów/sekcji bez zawartości */
.mx-ph{
  background: #f1f3f5;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  padding: 24px;
}
.mx-ph-hero{
  min-height: 300px;
  max-width: 1290px;
  margin: 0 auto;
  font-size: 16px;
}

/* Grid banerów (3-kolumnowy) */
.mx-banner-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.mx-banner-grid .mx-ph{ min-height: 150px; }

/* Kafelki kategorii (4-kolumnowe, zielone) */
.mx-cats{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.mx-cat{
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  background: #007236;
  color: #fff;
  border-radius: 14px;
  text-decoration: none;
  transition: background .15s, transform .15s;
  padding: 16px 10px;
}
.mx-cat:hover{
  background: #005c2b;
  transform: translateY(-3px);
}
.mx-cat-ico{ font-size: 40px; line-height: 1; }
.mx-cat-name{ font-weight: 600; font-size: 16px; }

/* Sekcja "Best price" — kremowe tło */
.mx-bestprice{
  background: #faf3e8;
  border-radius: 16px;
  max-width: 1250px;
}

/* Sekcja "O nas" — 2 kolumny */
.mx-about{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
}
.mx-about-text .mx-h2{ text-align: left; }
.mx-about-text p{
  color: #374151;
  line-height: 1.7;
}
.mx-ph-photo{ min-height: 240px; }

/* Sekcja newsów */
.mx-news{ text-align: center; }
.mx-news-sub{
  color: #6b7280;
  margin: -10px 0 18px;
}
.mx-news-cta .button{
  background: #007236;
  color: #fff;
  border-radius: 8px;
  padding: 11px 26px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.mx-news-cta .button:hover{ background: #005c2b; }

/* Trust badges (4 kolumny) */
.mx-trust{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1290px;
  margin: 10px auto 0;
  padding: 34px 20px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 14px;
}
.mx-trust-item strong{
  display: block;
  color: #1f2937;
  font-size: 15px;
  margin-bottom: 3px;
}
.mx-trust-item span{
  color: #6b7280;
  font-size: 13px;
}

/* Full-width breakout — TYLKO w treści strony (main), nie w headerze!
   (selektor body.home .alignfull był za szeroki i zerował padding headera) */
body.home main .alignfull,
body.home .entry-content .alignfull,
body.home .mx-home .alignfull{
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
}

/* Custom slider — full-width, dots, arrows */
.mx-slider{
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.mx-slides{
  display: flex;
  transition: transform .5s ease;
  will-change: transform;
}
.mx-slide{
  min-width: 100%;
  display: block;
  line-height: 0;
}
.mx-slide img{
  width: 100%;
  height: auto;
  display: block;
}

/* Strzałki (poprzedni / następny) */
.mx-snav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  border: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transition: opacity .2s, background .15s;
}
.mx-slider:hover .mx-snav{ opacity: 1; }
.mx-prev{ left: 18px; }
.mx-next{ right: 18px; }
.mx-snav:hover{ background: rgba(0, 0, 0, .55); }

/* Kropki nawigacyjne */
.mx-dots{
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 9px;
  z-index: 2;
}
.mx-dots span{
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  cursor: pointer;
  transition: background .15s;
}
.mx-dots span.active{ background: #fff; }

@media (max-width: 900px){
  .mx-cats, .mx-banner-grid{ grid-template-columns: repeat(2, 1fr); }
  .mx-about{ grid-template-columns: 1fr; }
  .mx-trust{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .mx-cats{ grid-template-columns: repeat(2, 1fr); }
  .mx-banner-grid{ grid-template-columns: 1fr; }
  .mx-snav{
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
}

/* Hero heading pod sliderem — widoczny H1, wyśrodkowany, bez podkreślenia.
   Flexbox align-items:center centruje WSZYSTKO niezależnie od globalnych margin:0 0 (kuloodporne). */
.mx-intro{
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px 6px;
}
.mx-intro .mx-h1{
  font-size: 30px;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 auto 10px;   /* + auto bije globalne h1{margin:0 0 24px} które kasowało centrowanie */
  max-width: 900px;
  text-align: center;
  text-decoration: none;
  border: 0;
}
/* Przerwa nad sliderem: motyw daje margin-block-start:1.6rem każdemu dziecku wp-site-blocks → zerujemy na home */
body.home .wp-site-blocks > main,
body.home main.site-content,
body.home main.wp-block-group{
  margin-block-start: 0;
  margin-top: 0;
  padding-top: 0;   /* main ma inline padding-top:50px — to była ta przerwa nad sliderem */
}
.mx-intro .mx-h1::after,
.mx-intro .mx-h1::before{ display: none; content: none; }
.mx-intro-sub{
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
@media (max-width: 768px){
  .mx-intro{ padding: 22px 16px 4px; }
  .mx-intro .mx-h1{ font-size: 21px; }
  .mx-intro-sub{ font-size: 13px; }
}
