/* Základ */
body{ font-family:Arial, sans-serif; background:#ffffff; margin:20px; }
h1{ color:#1fa463; text-align:center; }

/* ============================= */
/* GALERIE – čtvercové náhledy s bílými okraji (GRID) */
.gallery{
  display:grid;
  gap:10px;
  justify-items:center;
  /* sloupce nastavuje index.php responsivně inline */
}
.gallery-item{
  width:var(--thumb-size, 200px);
  height:var(--thumb-size, 200px);
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  border-radius:6px;
  box-shadow:0 2px 6px rgba(0,0,0,0.2);
  overflow:hidden;
}
.gallery-item img{
  width:100%;
  height:100%;
  object-fit:contain;   /* zachová proporce, doplní bílé pruhy */
  background:#fff;
  cursor:pointer;
  transition:transform .3s ease;
}
.gallery-item img:hover{ transform:scale(1.05); }

/* ============================= */
/* HERO – velký náhled + miniatury pod tím */
.hero{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.hero-view{
  width:100%;
  aspect-ratio:16/9;                 /* příjemný poměr, na výšku se dopočítá doplněním bílých pruhů */
  background:#fff;
  border-radius:10px;
  box-shadow:0 4px 20px rgba(0,0,0,0.15);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.hero-view img{
  width:100%;
  height:100%;
  object-fit:contain;                /* velký náhled vždy celý, s bílým pozadím */
  background:#fff;
  cursor:pointer;
}
.hero-thumbs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:6px 2px;
  scroll-snap-type:x proximity;
}
.hero-thumb{
  flex:0 0 auto;
  width:var(--thumb-size, 100px);
  height:var(--thumb-size, 100px);
  border:none;
  background:#fff;
  border-radius:8px;
  box-shadow:0 1px 4px rgba(0,0,0,0.2);
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  scroll-snap-align:center;
  outline:none;
}
.hero-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
}
.hero-thumb.active{
  outline:3px solid #1fa463;         /* aktivní miniatura */
  outline-offset:0;
}
.hero-thumb:focus-visible{
  outline:3px dashed #1fa463;
  outline-offset:2px;
}

/* ============================= */
/* LIGHTBOX */
.lightbox{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(255,255,255,0.95);
  justify-content:center;
  align-items:center;
  backdrop-filter:blur(4px);
}
.lightbox-content{
  max-width:90%;
  max-height:90%;
  border-radius:10px;
  box-shadow:0 4px 20px rgba(0,0,0,0.25);
}
.close{
  position:absolute;
  top:20px;
  right:40px;
  color:#333;
  font-size:40px;
  cursor:pointer;
  font-weight:bold;
}
.close:hover{ color:#1fa463; }

/* ŠIPKY LIGHTBOXU */
.lightbox-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  color:#1fa463;
  font-size:48px;
  font-weight:bold;
  cursor:pointer;
  user-select:none;
  padding:10px;
  background:rgba(255,255,255,0.85);
  border-radius:50%;
  box-shadow:0 2px 6px rgba(0,0,0,0.3);
  transition:background .3s;
  z-index:10000;
}
.lightbox-arrow:hover{ background:#fff; }
.lightbox-arrow.left{ left:20px; }
.lightbox-arrow.right{ right:20px; }

/* ============================= */
/* 3D KARUSEL – bez CSS animace, výšku řídíme responsivně (rotaci řeší JS) */
.carousel-container{
  width:100%;
  height:min(70vh, 480px);
  margin:40px auto;
  perspective:1200px;
  display:flex;
  justify-content:center;
  align-items:center;
  overflow:hidden;
  position:relative;
}
.carousel-3d{
  width:100%;
  height:100%;
  position:absolute;
  transform-style:preserve-3d;
  /* žádná animation zde – otáčí JS, aby nevznikala elipsa */
}
.carousel-3d img{
  position:absolute;
  left:50%;
  top:50%;
  transform-origin:center center;
  object-fit:cover;
  border-radius:10px;
  background:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,0.25);
  transition:transform .2s ease, box-shadow .2s ease;
}

/* ============================= */
/* RESPONSIVITA */
@media (max-width:900px){
  .carousel-container{ height:min(60vh, 360px); }
}
@media (max-width:600px){
  .carousel-container{ height:min(55vh, 320px); }
  .hero{ gap:10px; }
  .hero-view{ aspect-ratio: 4/3; }  /* na mobilech o něco vyšší náhled */
}
