/*
 * EKOMUZEUM – karty produktów, etap 3.
 * Arkusz dodatkowy: nie zastępuje modern.css.
 */

/* Jednolite karty o wysokości dopasowanej do najwyższej karty w rzędzie. */
#products ul.list > li:not(.pages) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  height: 100%;
  text-align: left;
}

/* Tytuł nad zdjęciem, z wyraźniejszą przerwą. */
#products ul.list > li:not(.pages) > h2 {
  margin: 0 0 22px;
  text-align: center;
}

/* Każda okładka otrzymuje ten sam obszar ekspozycji. */
#products ul.list > li:not(.pages) .photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 225px;
  margin: 0 0 24px;
  padding: 6px;
  text-align: center;
}

/* Docelowa szerokość okładki: 150 px zamiast ok. 100 px.
   Jeśli źródłowy miniaturowy obraz jest mały, możliwa jest utrata ostrości. */
#products ul.list > li:not(.pages) .photo img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: contain;
}

/* Zachowujemy dotychczasowe skrócenie opisu do 12 linii. */
#products ul.list > li:not(.pages) div.description {
  margin: 0 0 14px;
  text-align: left;
}

/* Cena jest prezentowana PRZED przyciskiem, niezależnie od kolejności HTML. */
#products ul.list > li:not(.pages) > .price,
#products ul.list > li:not(.pages) > .noPrice {
  order: 90;
  width: 100%;
  margin: auto 0 12px;
  padding-top: 16px;
  text-align: center;
}

/* Wszystkie przyciski opierają się o dół karty. */
#products ul.list > li:not(.pages) > .basket {
  order: 100;
  width: 100%;
  margin: 0;
  padding: 0;
}

#products ul.list > li:not(.pages) > .basket a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 46px;
}

/* Karty bez ceny nadal mają przycisk na dole. */
#products ul.list > li:not(.pages) > .basket:first-child {
  margin-top: auto;
}

@media (max-width: 700px) {
  #products ul.list > li:not(.pages) .photo {
    min-height: 190px;
    margin-bottom: 20px;
  }
  #products ul.list > li:not(.pages) .photo img {
    width: 150px;
    max-height: 180px;
  }
}

@media (max-width: 420px) {
  #products ul.list > li:not(.pages) .photo {
    min-height: 230px;
  }
  #products ul.list > li:not(.pages) .photo img {
    max-height: 215px;
  }
}

/* EKOMUZEUM - wieksza czcionka opisow produktow */

/* EKOMUZEUM - jednolita typografia opisow */

#products ul.list > li div.description,
#products ul.list > li div.description * {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 17px !important;
    line-height: 1.6 !important;
}

/* Dokladniejsze selektory dla opisow HTML */

#products ul.list > li div.description p,
#products ul.list > li div.description span,
#products ul.list > li div.description font,
#products ul.list > li div.description strong,
#products ul.list > li div.description em,
#products ul.list > li div.description a {
    font-size: 17px !important;
    line-height: 1.6 !important;
}

/* Maksymalnie 12 linii */

#products ul.list > li div.description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 12;
    line-clamp: 12;
    overflow: hidden;
    text-align: left;
}
