/* bn-home-allegro 2026-09-24c
   Rollback: skasować ten plik i przywrócić index.tpl.bak-20260924
   Banner na desktopie: pudełko 1200×252 px. Plik pod nie: 2400×504 px.
   Tymczasowo tło to slide-21.jpg, dopóki nie wejdzie home-hero.jpg. */

/* pasek telefon + mail nad menu, tylko strona główna */
body#index #header .header-nav {
  display: none !important;
}

body#index #content.page-home {
  display: flex;
  flex-direction: column;
  background: #f2f3f5;
}

body#index #content.page-home > .slide-group { order: 1; }
body#index #content.page-home > .bn-home-rails { order: 2; }
body#index #content.page-home > .wrapper:has(.product-carousel) { order: 3; }
body#index #content.page-home > .wrapper:has(.img-group) { order: 4; }
body#index #content.page-home > .wrapper { order: 10; }

body#index #content.page-home > .slide-group,
body#index #content.page-home > .bn-home-rails,
body#index #content.page-home > .wrapper {
  width: 100%;
  flex: 0 0 auto;
  min-width: 0;
}

/* --- banner: jedno statyczne zdjęcie, bez napisów i bez slajdów --- */
body#index .slide-group {
  background: #f2f3f5;
  padding: 12px 16px 0;
  /* motyw dokłada margin: -45px i banner ląduje przy lewej krawędzi */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body#index .slide-group .bannercontainer {
  height: 150px !important;
  min-height: 0 !important;
  max-height: 150px !important;
  aspect-ratio: auto !important;
  overflow: hidden;
  border-radius: 16px;
  background: #c5d5dc url("/themes/leo_natur/assets/img/modules/leoslideshow/home-hero.jpg") center 62% / cover no-repeat;
}

body#index .slide-group .iview,
body#index .slide-group .tp-caption {
  display: none !important;
}

@media (min-width: 992px) {
  body#index .slide-group .bannercontainer {
    height: 252px !important;
    max-height: 252px !important;
    width: min(1200px, calc(100% - 32px)) !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

body#index .product-carousel {
  min-height: 0 !important;
}

/* --- rzędy produktów --- */
.bn-home-rails {
  background: #f2f3f5;
  padding: 18px 16px 8px;
}

.bn-rail-block + .bn-rail-block {
  margin-top: 22px;
}

.bn-rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto 10px;
}

.bn-rail-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #1c1c1c;
  letter-spacing: -0.02em;
}

.bn-rail-more {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 600;
  color: #1f6b4a;
  text-decoration: none;
}

.bn-rail-more:hover,
.bn-rail-more:focus-visible {
  text-decoration: underline;
}

.bn-rail {
  display: flex;
  gap: 12px;
  max-width: 1440px;
  margin: 0 auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 12px;
  scrollbar-width: none;
}

.bn-rail::-webkit-scrollbar {
  display: none;
  height: 0;
}

@media (min-width: 992px) {
  .bn-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
  }

  .bn-card {
    width: auto;
    flex: none;
    min-width: 0;
  }
}

@media (min-width: 1200px) {
  .bn-rail {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.bn-card {
  flex: 0 0 196px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border: 1px solid #e6e7ea;
  border-radius: 12px;
  padding: 10px 10px 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(20, 24, 28, 0.04);
}

.bn-card:hover,
.bn-card:focus-visible {
  border-color: #cfd3d8;
  box-shadow: 0 6px 16px rgba(20, 24, 28, 0.08);
  text-decoration: none;
  color: inherit;
}

.bn-card-img {
  display: block;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.bn-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bn-card-price {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #141414;
}

.bn-card-name {
  font-size: 13px;
  line-height: 1.35;
  color: #3d3d3d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

@media (max-width: 767px) {
  body#index .slide-group {
    padding: 8px 10px 0;
  }

  body#index .slide-group .bannercontainer,
  body#index .slide-group .bannercontainer .iview {
    height: 132px !important;
    max-height: 132px !important;
    border-radius: 12px;
  }

  body#index .slide-group .tp-caption.big_white {
    top: 16px !important;
    left: 16px !important;
    font-size: 20px !important;
  }

  body#index .slide-group .tp-caption.slide-btn,
  body#index .slide-group .tp-caption.btn {
    top: 78px !important;
    left: 16px !important;
    font-size: 13px !important;
  }

  .bn-home-rails {
    padding: 14px 10px 4px;
  }

  .bn-rail-title {
    font-size: 18px;
  }

  .bn-card {
    flex-basis: 160px;
  }

  .bn-card-price {
    font-size: 16px;
  }
}

/* --- napis na bannerze (wariant 1, 24.09.2026 wieczór). Warstwa z index.tpl nałożona na .bannercontainer --- */
body#index #content.page-home > .bn-hero-copy {
  order: 1;
  position: relative;
  height: 0;
  z-index: 4;
  width: 100%;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
}
.bn-hero-copy__box {
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  text-align: center;
  color: #fff;
  pointer-events: none;
}
.bn-hero-copy__box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 58% 78% at 50% 50%, rgba(20,32,18,.62), rgba(20,32,18,.18) 70%, rgba(20,32,18,0));
}
.bn-hero-copy__box > * { position: relative; }
.bn-hero-copy__title {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
  text-wrap: balance;
}
.bn-hero-copy__sub {
  margin: 0;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: #fff;
  opacity: .95;
  display: none;
}
.bn-hero-copy__btn {
  pointer-events: auto;
  display: inline-block;
  background: #81C341;
  color: #fff !important;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none !important;
  border-radius: 999px;
  padding: 9px 20px;
  transition: background .15s;
}
.bn-hero-copy__btn:hover { background: #5f9a2a; }
@media (min-width: 992px) {
  .bn-hero-copy__box {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(1200px, calc(100% - 32px));
    height: 252px;
  }
  .bn-hero-copy__title { font-size: 40px; }
  .bn-hero-copy__sub { display: block; font-size: 17px; }
  .bn-hero-copy__btn { font-size: 15px; padding: 10px 22px; }
}
@media (max-width: 767px) {
  .bn-hero-copy__box {
    top: 8px;
    left: 10px;
    right: 10px;
    height: 132px;
    border-radius: 12px;
    gap: 7px;
  }
  .bn-hero-copy__title { font-size: 20px; max-width: 290px; }
  .bn-hero-copy__btn { font-size: 12px; padding: 7px 14px; }
}
/* po przeniesieniu skryptem do banera: dopasowanie co do piksela na każdej szerokości */
body#index .slide-group .bannercontainer { position: relative; }
body#index .slide-group .bannercontainer > .bn-hero-copy__box {
  top: 0; left: 0; right: 0; bottom: 0;
  width: auto; height: auto;
  transform: none;
  border-radius: inherit;
}

/* --- telefon: appagebuilder serwuje urządzeniom mobilnym ApImage zamiast slidera (24.09.2026) --- */
body#index .slide-group .ApImage {
  position: relative;
  height: 132px;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #c5d5dc url("/themes/leo_natur/assets/img/modules/leoslideshow/home-hero.jpg") center 62% / cover no-repeat;
}
body#index .slide-group .ApImage > img,
body#index .slide-group .ApImage > .image_description {
  display: none !important;
}
@media (min-width: 768px) {
  body#index .slide-group .ApImage { height: 150px; border-radius: 16px; }
}
@media (min-width: 992px) {
  body#index .slide-group .ApImage {
    height: 252px;
    width: min(1200px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
  }
}
body#index .slide-group .ApImage > .bn-hero-copy__box {
  top: 0; left: 0; right: 0; bottom: 0;
  width: auto; height: auto;
  transform: none;
  border-radius: inherit;
}
/* sekcja „Sezon na zupy”: tło na całą wysokość na węższych ekranach */
@media (max-width: 991px) {
  body#index .wrapper:has(.ApTabs) { background-size: cover !important; background-position: center top !important; }
}
/* przycisk w warstwie napisu: motyw stylizuje linki w .ApImage (turkus, duży padding) */
body#index .slide-group .bn-hero-copy__box a.bn-hero-copy__btn {
  display: inline-block !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  background: #81C341 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 9px 20px !important;
  font-family: Montserrat, sans-serif !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  box-shadow: none !important;
}
body#index .slide-group .bn-hero-copy__box a.bn-hero-copy__btn:hover { background: #5f9a2a !important; }
@media (min-width: 992px) {
  body#index .slide-group .bn-hero-copy__box a.bn-hero-copy__btn { font-size: 15px !important; padding: 10px 22px !important; }
}
@media (max-width: 767px) {
  body#index .slide-group .bn-hero-copy__box a.bn-hero-copy__btn { font-size: 12px !important; padding: 7px 14px !important; }
}
/* --- „Sezon na zupy” na telefonie i tablecie: ten sam wygląd co rzędy Bestsellery/Nowości (24.09.2026) --- */
.bn-zupy { display: none; }
@media (max-width: 991px) {
  body#index .wrapper:has(.ApTabs) {
    background: #f2f3f5 !important;
    padding: 0 !important;
    min-height: 0 !important;
  }
  body#index .wrapper:has(.ApTabs) > .container { display: none !important; }
  body#index .wrapper:has(.ApTabs) > .bn-zupy { display: block; }
  .bn-zupy.bn-home-rails { padding-top: 6px; }
  .bn-zupy-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 2px 12px;
    margin: 0;
  }
  .bn-zupy-chips::-webkit-scrollbar { display: none; height: 0; }
  .bn-zupy-chip {
    flex: 0 0 auto;
    border: 1px solid #d9dce0;
    background: #fff;
    color: #3d3d3d;
    border-radius: 999px;
    padding: 7px 14px;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
  }
  .bn-zupy-chip.is-on {
    background: #81C341;
    border-color: #81C341;
    color: #fff;
  }
}
