.viewer { 
  position: relative;
  margin-bottom: 10px;
  background: #eee;
}
    
.viewer img { 
  width: 100%;
  display: block;
  cursor: pointer;
}

.viewer .meta {
  position: absolute; 
  left: 24px; 
  top: 22px; 
  font-size: 14px;
  color: #fff;
  background: rgba(0,0,0,0.5); 
  padding: 4px 8px; 
  border-radius:6px;
  display: none;
}

.thumb-strip-wrap {
  display: none;
  align-items: stretch; /* aby se výšky zarovnaly */
  max-width: 100%;
  min-height: 80px;
  max-height: 100px;
  box-sizing: border-box;
}

.strip-btn {
  flex: 0 0 50px;            /* pevná šířka 50px */
  height: auto;              /* přizpůsobí se rodiči */
  background: #222;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 2em;
  transition: color 0.3s, transform 0.3s;
}

.strip-btn:hover {
  color: #aaa;
  font-size: 2.2em;
}

.strip-btn.scroll-left { border-radius: 5px 0 0 5px; }
.strip-btn.scroll-right { border-radius: 0 5px 5px 0; }

.thumb-strip {
  flex: 1 1 auto;            /* 🔥 vyplní prostor mezi tlačítky */
  min-width: 0;              /* nutné kvůli overflow */
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  box-sizing: border-box;
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  padding: 4px;
}


.thumb {
  flex: 0 0 auto;
  border-radius: 5px;
  display: flex;
  height: 100%;
  cursor: pointer;
  border: 2px solid transparent;
  transform: scale(0.95);
  transition: transform 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.thumb img {
  display: block;
  height: 100%;
  width: auto;
}

.thumb[aria-selected="true"] { 
  border-color: #222;
}

.thumb:hover {    
  transform: scale(1);
}





  /* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox[aria-hidden="false"] {
  display: flex;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.lightbox[aria-hidden="true"] {
  animation: fadeOut 0.3s forwards;
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

.lightbox-inner {
  position: relative;
  width: 90%;
  height: 90%;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-slider {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
  width: 100%;
}

.lightbox-slider img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
}

.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
  user-select: none;
}

.lightbox button:hover {
  color: #ccc;
}

.lightbox-close {
  top: 10px;
  right: 20px;
  font-size: 3rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  padding: 0 10px;
}

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }




