
.gallery * {
  box-sizing: border-box;
}

.gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #222;
    touch-action: pan-y;
    user-select: none;
  
}

.track {
  display: flex;
  height: 100%;
  transition: transform 0.8s ease;
  will-change: transform;
}

.slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;overflow:hidden
}
.slide img {

  display: block;
  pointer-events: none;
  
 display: flex;
	  align-items: center;
	  justify-content: center;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: var(--red-med);
    font-size: 20px;
    cursor: pointer;
    z-index: 1;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.65);
}

.prev {
  left: 15px;
}

.next {
  right: 15px;
}

.dots {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    width: auto;
    z-index: 3;
    background: #000;
    border-radius: 10px;
    padding: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #eee;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.dot.active {
  background:var(--red-med);
  transform: scale(1.2);
}

/* thumbnails */
.thumbs-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.thumbs-viewport {
  overflow: hidden;
  flex: 1;
}

.thumbs-track {
  display: flex;
  gap: 10px;
  transition: transform 0.35s ease;
  will-change: transform;
}

.thumb {
 
  background: none;
  padding: 0;
  cursor: pointer;
 
  overflow: hidden;
  flex: 0 0 calc((100% - 30px) / 4);
  opacity: 0.75;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.thumb:hover {
  opacity: 1;
  transform: translateY(-1px);
  background:#fff
}

.thumb.active {
  border-color: #fff;
  opacity: 1;
}

.thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.thumb-nav {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
   transition: background 0.3s ease;
   display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-nav:hover {
  background: rgba(0, 0, 0, 0.65);
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 30px;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  border: none;
  background: none;
  color: white;
  font-size: 42px;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media (max-width:950px) {
	.dots {
		display:none
	}
	
	.thumb-nav,
	.nav-btn {
		
		width: 28px;
		height: 28px;
	
	}
	.thumb-nav i,
	.next i, 
  .prev i{font-size:16px}
  
	
}
@media (max-width: 640px) {
  .thumb {
    flex: 0 0 calc((100% - 10px) / 4);
  }
  
  
  
  .prev {
		left: 5px;
	}
	
	.next {
		right: 5px;
	}
}
