/* INFOBUDO — polecane produkty Premium */

#produkty {
  --ib-blue: #1767d1;
  --ib-ink: #17283f;
  --ib-muted: #708095;
  padding-block: 48px 58px;
}

#produkty .section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

#produkty .section-heading h2 {
  margin: 0;
  color: var(--ib-ink);
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.035em;
}

#produkty .section-heading > a {
  color: var(--ib-blue);
  font-weight: 700;
  text-decoration: none;
}

#produkty .tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

#produkty .tabs a {
  padding: 11px 18px;
  border: 1px solid #e2e9f2;
  border-radius: 999px;
  color: #55677d;
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

#produkty .tabs a.active {
  background: #eaf2ff;
  border-color: #b9d4ff;
  color: #155cbd;
}

#produkty .product-slider {
  position: relative;
  min-width: 0;
}

#produkty #products-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 6px 3px 20px;
}

#produkty #products-grid::-webkit-scrollbar {
  display: none;
}

/* Obsługa kilku typowych struktur kart */
#produkty #products-grid > * {
  flex: 0 0 calc((100% - 54px) / 4);
  min-width: 0;
  box-sizing: border-box;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #e6ecf3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(20, 43, 74, .045);
  transition: transform .2s ease, box-shadow .2s ease;
}

#produkty #products-grid > *:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(20, 43, 74, .11);
}

#produkty #products-grid img {
  display: block;
  width: 100%;
  height: 215px;
  object-fit: contain;
  padding: 18px;
  box-sizing: border-box;
  background: #fff;
}

#produkty #products-grid a {
  text-decoration: none;
}

#produkty #products-grid h3,
#produkty #products-grid h4 {
  color: var(--ib-ink);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}

#produkty .slider-arrow {
  position: absolute;
  z-index: 3;
  top: 42%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e9f2;
  border-radius: 50%;
  background: #fff;
  color: #17283f;
  box-shadow: 0 5px 18px rgba(0,0,0,.12);
  cursor: pointer;
  font-size: 28px;
}

#produkty .slider-arrow-prev {
  left: -18px;
}

#produkty .slider-arrow-next {
  right: -18px;
}

#produkty .slider-arrow:hover {
  background: #1767d1;
  color: #fff;
}

@media (max-width: 1100px) {
  #produkty #products-grid > * {
    flex-basis: calc((100% - 36px) / 3);
  }
}

@media (max-width: 760px) {
  #produkty {
    padding-block: 30px 38px;
  }

  #produkty .section-heading {
    align-items: flex-start;
  }

  #produkty .section-heading h2 {
    font-size: 25px;
  }

  #produkty .section-heading > a {
    font-size: 12px;
  }

  #produkty #products-grid {
    gap: 12px;
  }

  #produkty #products-grid > * {
    flex-basis: 68%;
  }

  #produkty #products-grid img {
    height: 190px;
  }

  #produkty .slider-arrow {
    display: none;
  }
}

.home-user-paths {
  overflow-x: hidden;
}

.home-user-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-user-path {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dbe7ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  color: #16364e;
  box-shadow: 0 8px 22px rgba(20, 54, 78, .06);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.home-user-path:hover {
  border-color: #8cc9ed;
  box-shadow: 0 14px 28px rgba(20, 54, 78, .11);
  transform: translateY(-2px);
}

.home-user-path-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: #eaf5fc;
  color: #0d77bd;
  font-size: 21px;
  font-weight: 800;
}

.home-user-path > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-user-path strong {
  color: #102c49;
  font-size: 15px;
}

.home-user-path small {
  overflow: hidden;
  color: #71869a;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-user-path > b {
  color: #0d77bd;
  font-size: 20px;
}

@media (max-width: 760px) {
  .home-user-path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-user-path {
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .home-user-path-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  #produkty #products-grid > * {
    flex-basis: 82%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #produkty #products-grid {
    scroll-behavior: auto;
  }

  #produkty #products-grid > * {
    transition: none;
  }
}

/* ===== INFOBUDO — POPRAWKA KART PRODUKTÓW V2 ===== */

#produkty .product-slider {
    position: relative;
    padding: 0 12px;
}

#produkty #products-grid {
    display: flex;
    align-items: stretch;
    gap: 20px;
    padding: 10px 4px 24px;
}

#produkty #products-grid > * {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5eaf1;
    border-radius: 20px;
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 6px 24px rgba(22, 43, 74, .06);
}

/* Wewnętrzne elementy karty */
#produkty #products-grid > * > :not(img):not(picture) {
    min-width: 0;
}

#produkty #products-grid a {
    color: #1b3049;
    text-decoration: none;
}

#produkty #products-grid img {
    display: block;
    width: 100%;
    height: 230px;
    max-height: 230px;
    object-fit: contain;
    object-position: center;
    padding: 22px;
    margin: 0;
    background: #fff;
    box-sizing: border-box;
}

/* Kontenery tekstowe, jeśli występują */
#produkty #products-grid .product-info,
#produkty #products-grid .product-details,
#produkty #products-grid .product-content,
#produkty #products-grid .product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 9px;
    padding: 16px 18px 20px;
    box-sizing: border-box;
}

/* Nazwa produktu */
#produkty #products-grid h3,
#produkty #products-grid h4,
#produkty #products-grid .product-name,
#produkty #products-grid .product-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    min-width: 0;
    margin: 0;
    color: #20354e;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 650;
    overflow-wrap: anywhere;
}

/* Kategoria */
#produkty #products-grid .product-category,
#produkty #products-grid .category {
    color: #718198;
    font-size: 12px;
    font-weight: 600;
}

/* Cena */
#produkty #products-grid .product-price,
#produkty #products-grid .price {
    margin-top: auto;
    color: #102b4e;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.025em;
}

/* Przycisk przewijania */
#produkty .slider-arrow {
    top: 45%;
    width: 42px;
    height: 42px;
}

#produkty .slider-arrow-prev {
    left: -9px;
}

#produkty .slider-arrow-next {
    right: -9px;
}

@media (max-width: 1100px) {
    #produkty #products-grid > * {
        flex-basis: calc((100% - 40px) / 3);
    }
}

@media (max-width: 760px) {
    #produkty .product-slider {
        padding: 0;
    }

    #produkty #products-grid {
        gap: 14px;
        padding: 6px 2px 18px;
    }

    #produkty #products-grid > * {
        flex-basis: 72%;
        border-radius: 16px;
    }

    #produkty #products-grid img {
        height: 190px;
        max-height: 190px;
        padding: 16px;
    }

    #produkty #products-grid .product-info,
    #produkty #products-grid .product-details,
    #produkty #products-grid .product-content,
    #produkty #products-grid .product-body {
        padding: 14px 15px 18px;
    }

    #produkty .slider-arrow {
        display: none;
    }
}

@media (max-width: 420px) {
    #produkty #products-grid > * {
        flex-basis: 82%;
    }
}

/* ===== INFOBUDO — karta produktu V3 ===== */
#produkty #products-grid > .ib-recommended-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 60px) / 4);
  min-height: 425px;
  border: 1px solid #e1ebf2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(22, 55, 82, .07);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

#produkty #products-grid > .ib-recommended-card:hover {
  transform: translateY(-5px);
  border-color: #b8d9eb;
  box-shadow: 0 18px 38px rgba(22, 55, 82, .14);
}

#produkty .ib-recommended-photo {
  position: relative;
  display: grid;
  place-items: center;
  height: 230px;
  padding: 22px;
  background: linear-gradient(145deg, #f7fbfd 0%, #edf7fb 100%);
  border-bottom: 1px solid #edf2f5;
}

#produkty .ib-recommended-photo img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
}

#produkty .ib-recommended-image-fallback {
  color: #0d77bd;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
}

#produkty .ib-recommended-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}

#produkty .ib-recommended-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
}

#produkty .ib-recommended-category,
#produkty .ib-recommended-brand {
  overflow: hidden;
  color: #71869a;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#produkty .ib-recommended-brand {
  color: #0d77bd;
}

#produkty .ib-recommended-title {
  display: -webkit-box;
  min-height: 66px;
  overflow: hidden;
  color: #16364e;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#produkty .ib-recommended-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #edf2f5;
}

#produkty .ib-recommended-price {
  color: #102c49;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -.02em;
}

#produkty .ib-recommended-link {
  color: #0d77bd;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

#produkty .ib-recommended-link span {
  font-size: 16px;
}

@media (max-width: 1100px) {
  #produkty #products-grid > .ib-recommended-card {
    flex-basis: calc((100% - 40px) / 3);
  }
}

@media (max-width: 760px) {
  #produkty #products-grid > .ib-recommended-card {
    flex-basis: 72%;
    min-height: 390px;
  }

  #produkty .ib-recommended-photo {
    height: 195px;
  }
}
