/* produkty.css */

/* základný layout */
main {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 40px 20px;
}

/* odkaz na produkt */
.product-link {
  text-decoration: none;
  color: inherit;
}

/* karta produktu */
.product-card {
  background: #fff;
  color: #000;
  border-radius: 10px;
  padding: 15px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 8px 10px rgba(0,0,0,0.3);
  border: 4px solid transparent;
  cursor: pointer;
  margin: 0 auto;
  transition: box-shadow 0.3s, border 0.3s;

  /* 🔧 Flexbox pre zarovnanie ceny dolu */
  display: flex;
  flex-direction: column;
}

/* efekt pri hover */
.product-card:hover {
  border: 2px solid orange;
  box-shadow: 0 8px 20px rgba(255,165,0,0.6);
}

/* obrázok produktu */
.product-image {
  padding: 8px;
  display: flex;
  justify-content: center;
}

.product-image img {
  max-width: 95%;
  height: auto;
  border-radius: 6px;
  transition: transform 0.4s ease-in-out;
}

/* zoom obrázka pri hover */
.product-card:hover .product-image img {
  transform: scale(1.08);
}

/* textová časť */
.product-info {
  text-align: center;
  margin-top: 15px;

  /* 🔧 Flex: 1 aby sa rozťahoval zvyšok karty */
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-info h3 {
  margin: 10px 0;
  font-size: 1.2em;
}

.price {
  color: orange;
  font-weight: bold;

  /* 🔧 Zarovnanie úplne na spodok */
  margin-top: auto;
}

/* ---------------------------- */
/* responzívne nastavenia */
/* ---------------------------- */

@media (max-width: 1024px) {
  main {
    justify-content: center;
    gap: 15px;
  }

  .product-card {
    max-width: 280px;
    padding: 18px;
  }
}

@media (max-width: 768px) {
  main {
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
  }

  .product-card {
    max-width: 90%;
    padding: 15px;
  }

  .product-info h3 {
    font-size: 1.1em;
  }

  .price {
    font-size: 1em;
  }
}

@media (max-width: 600px) {
  .product-card {
    max-width: 90%;
    padding: 12px;
  }

  .product-info h3 {
    font-size: 1em;
  }

  .price {
    font-size: 0.95em;
  }
}
