/* ------------------------------
   ZÁKLADNÍ NASTAVENÍ
------------------------------ */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #ffffff;
  color: #222;
}

/* ------------------------------
   TOP BAR / MENU
------------------------------ */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
  width: 100%;
  box-sizing: border-box;
}

.topbar nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar nav a {
  color: #222;
  text-decoration: none;
  font-weight: 500;
}

/* ------------------------------
   HERO
------------------------------ */

.hero {
  padding: 32px 16px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* ------------------------------
   SECCIÓN NUEVOS PRODUCTOS
------------------------------ */

.nuevos {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0;
  box-sizing: border-box;
}

.nuevos #nove-produkty {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  justify-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ------------------------------
   GRID PRO STRÁNKY PRODUKTŮ
------------------------------ */

.produkty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  justify-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin: 0 auto;
}

/* ------------------------------
   KATEGORÍAS
------------------------------ */

.categorias {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.categorias .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  column-gap: 50px;   /* necháváme větší horizontální mezeru */
  row-gap: 6px;       /* pouze zmenšená mezera mezi řádky */
  justify-items: center;
  width: 100%;
  box-sizing: border-box;
}

.card {
  background: #6ccf55;
  border-radius: 8px;
  text-decoration: none;
  color: #ffffff;
  border: none;

  width: 100%;
  max-width: 150px;

  padding: 10px;
  font-size: 15px;
  font-weight: bold;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.2s ease;
}

.card:hover {
  background: #58b844;
  transform: translateY(-2px);
}

/* ------------------------------
   PRODUKTOVÁ KARTA
------------------------------ */

.produkt-card {
  width: 260px;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 15px;
  background: #fff;
  transition: 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.produkt-card img {
  width: 100%;
  max-width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
}

.produkt-btn,
.produkt-info-btn {
  width: 100%;
  max-width: 200px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  font-size: 15px;
  font-weight: bold;
}

/* ------------------------------
   FOOTER
------------------------------ */

footer {
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #e0e0e0;
}

/* ------------------------------
   MOBILNÍ OPTIMALIZACE
------------------------------ */

@media (max-width: 600px) {

  .topbar nav {
    display: none;
  }

  .topbar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .hero {
    width: 80%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 0;
  }

  .nuevos #nove-produkty,
  .produkty-grid {
    grid-template-columns: 1fr;
  }

  .categorias .grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 50px;
    row-gap: 6px;
  }

  .produkt-card {
    width: 100%;
  }

  .produkt-card img {
    width: 100%;
    height: auto;
  }

}

/* ------------------------------
   PRODUCT PAGE
------------------------------ */

.product-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

.product-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.product-image img {
  width: 420px;
  border-radius: 10px;
  box-shadow: 0 0 10px #0002;
}

.product-info {
  flex: 1;
  min-width: 300px;
}

.product-info h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.product-price {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #2a7a2a;
}

.product-description {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 30px;
}

.product-order-btn {
  background: #2a7a2a;
  color: white;
  padding: 14px 26px;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
}

.product-order-btn:hover {
  background: #1f5d1f;
}

.product-gallery {
  margin-top: 40px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.product-gallery img {
  width: 140px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 6px #0002;
}

/* --- LIGHTBOX ANIMACE --- */

#lightbox {
  opacity: 0;
  transition: opacity 0.25s ease;
}

#lightbox.show {
  opacity: 1;
}

#lightbox-img {
  transform: scale(0.85);
  transition: transform 0.25s ease;
}

#lightbox.show #lightbox-img {
  transform: scale(1);
}


/* ===============================
   MOBILE PRODUCT FIX (STABLE)
=============================== */

@media (max-width: 768px) {

  html, body {
    overflow-x: hidden;
  }

  .product-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .product-image {
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto;
  }

  .product-image img {
    width: 100% !important;
    height: auto;
  }

  .product-gallery {
    width: 100% !important;
    max-width: 360px !important;
    margin: 15px auto 0 auto;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .product-gallery img {
    width: 100%;
    height: auto;
  }

}


/* ===============================
   PRODUCT DETAIL FIX (STRICT)
=============================== */

/* ONLY product detail page price */
.product-page .product-price {
  color: #d62828 !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  letter-spacing: 0.6px;
}

/* Green ORDER button on product page only */
.product-page .product-order-btn {
  background: #6ccf55 !important;
  color: #ffffff !important;
  font-weight: bold !important;
}

.product-page .product-order-btn:hover {
  background: #58b844 !important;
}

/* Product description visible but smaller */
.product-page .product-description {
  font-size: 15px !important;
  line-height: 1.5 !important;
  max-height: none !important;
  overflow: visible !important;
}

