/* MELKA v66 - poprawki końcowe: kafelki produktów + podkategorie */

/* KAFELKI PRODUKTÓW */
.catalog-products .product-grid{
  align-items:start !important;
}

.catalog-products .product-card{
  height:auto !important;
  min-height:0 !important;
  border:1px solid #c5d1df !important;
  border-radius:12px !important;
  overflow:hidden !important;
  background:#fff !important;
  box-shadow:0 6px 18px rgba(5,47,95,.07) !important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

.catalog-products .product-card:hover{
  transform:translateY(-2px) !important;
  border-color:#f2c300 !important;
  box-shadow:0 12px 28px rgba(5,47,95,.12) !important;
}

.catalog-products .product-card .img{
  height:175px !important;
  min-height:175px !important;
  background:#fff !important;
  border-bottom:1px solid #d9e1ea !important;
}

.catalog-products .product-card .img img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  padding:12px !important;
  background:#fff !important;
}

.catalog-products .product-card .body{
  height:auto !important;
  min-height:0 !important;
  flex:0 0 auto !important;
  background:#f3f6fa !important;
  padding:16px 18px 17px !important;
  border-top:0 !important;
}

.catalog-products .product-card .body h3{
  font-size:17px !important;
  line-height:1.22 !important;
  margin:0 0 8px !important;
  min-height:0 !important;
  max-height:3.66em !important;
  display:-webkit-box !important;
  -webkit-line-clamp:3 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  color:#004b8d !important;
}

.catalog-products .product-card .product-code-small{
  margin:0 !important;
  font-size:11px !important;
  line-height:1.25 !important;
  color:#5f6f84 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.catalog-products .product-card .body .muted{
  display:none !important;
}

/* PRODUKTY POWIĄZANE NA KARCIE PRODUKTU */
.product-long-section + .section .product-card,
.featured-slide.product-card{
  height:auto !important;
  min-height:0 !important;
  border:1px solid #c5d1df !important;
  border-radius:12px !important;
  overflow:hidden !important;
  box-shadow:0 6px 18px rgba(5,47,95,.07) !important;
}

.product-long-section + .section .product-card .img,
.featured-slide.product-card .img{
  height:175px !important;
  min-height:175px !important;
  background:#fff !important;
}

.product-long-section + .section .product-card .body,
.featured-slide.product-card .body{
  height:auto !important;
  min-height:0 !important;
  flex:0 0 auto !important;
  background:#f3f6fa !important;
  padding:16px 18px 17px !important;
}

.product-long-section + .section .product-card .body h3,
.featured-slide.product-card .body h3{
  font-size:17px !important;
  line-height:1.22 !important;
  margin:0 0 8px !important;
  max-height:3.66em !important;
  -webkit-line-clamp:3 !important;
}

.product-long-section + .section .product-card .body .muted,
.featured-slide.product-card .body .muted{
  display:none !important;
}

/* PODKATEGORIE / FILTRY KATEGORII */
.category-list{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:12px !important;
  align-items:flex-start !important;
}

.category-list .pill{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  min-height:44px !important;
  padding:10px 16px !important;
  line-height:1.25 !important;
  white-space:normal !important;
  border-radius:10px !important;
}

@media(max-width:900px){
  .category-list{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }

  .category-list .pill{
    width:100% !important;
  }
}

@media(max-width:560px){
  .category-list{
    grid-template-columns:1fr !important;
  }

  .catalog-products .product-card .img{
    height:165px !important;
    min-height:165px !important;
  }
}

/* PODKATEGORIE */

.category-list{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:12px !important;
}

.category-list a{
    white-space:normal !important;
    line-height:1.25 !important;
}

@media (max-width:900px){

    .category-list{
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
    }
}

@media (max-width:600px){

    .category-list{
        grid-template-columns:1fr !important;
    }
}


/* V69 - katalog produktów: menu kategorii po lewej + obramowane podkategorie */

/* Przywrócenie układu: lewy panel kategorii + produkty po prawej */
.catalog-layout{
  display:grid !important;
  grid-template-columns:280px minmax(0,1fr) !important;
  gap:28px !important;
  align-items:start !important;
}

/* Lewy panel kategorii */
.catalog-sidebar{
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  align-items:stretch !important;
  position:sticky !important;
  top:105px !important;
  padding:22px !important;
  border:1px solid #d9e2ec !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 8px 24px rgba(5,47,95,.06) !important;
}

.catalog-sidebar h3{
  margin:0 0 12px !important;
  font-size:20px !important;
  line-height:1.2 !important;
  color:#004f93 !important;
}

/* Kategorie jako czytelne przyciski/tagi */
.catalog-sidebar .side-link{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-height:42px !important;
  padding:10px 13px !important;
  margin:0 !important;
  border:1px solid #d6e0eb !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#092947 !important;
  font-size:14px !important;
  font-weight:800 !important;
  line-height:1.22 !important;
  text-align:left !important;
  text-decoration:none !important;
  white-space:normal !important;
  box-shadow:0 3px 10px rgba(5,47,95,.035) !important;
  transition:border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease !important;
}

.catalog-sidebar .side-link:hover{
  border-color:#f2c300 !important;
  background:#f8fbff !important;
  color:#004f93 !important;
  transform:translateY(-1px) !important;
}

.catalog-sidebar .side-link.active{
  background:#004f93 !important;
  border-color:#004f93 !important;
  color:#fff !important;
  box-shadow:0 8px 20px rgba(0,79,147,.18) !important;
}

/* Produkty po prawej mają zajmować pełną dostępną szerokość */
.catalog-products{
  min-width:0 !important;
}

/* Na średnich i małych ekranach menu zostaje nad produktami, żeby nie dusić listy */
@media(max-width:900px){
  .catalog-layout{
    grid-template-columns:1fr !important;
    gap:22px !important;
  }

  .catalog-sidebar{
    position:static !important;
    top:auto !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    padding:18px !important;
  }

  .catalog-sidebar h3{
    grid-column:1 / -1 !important;
    margin-bottom:4px !important;
  }

  .catalog-sidebar .side-link{
    justify-content:center !important;
    text-align:center !important;
    min-height:46px !important;
  }
}

@media(max-width:560px){
  .catalog-sidebar{
    grid-template-columns:1fr !important;
  }
}
