/* ═══════════════════════════════════════════════════════════════
   VividWalls — Lightbox Gallery
   ═══════════════════════════════════════════════════════════════ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: 90%;
  /* Width derived from viewport height × image ratio, capped at 90vw */
  max-width: min(90vw, calc(80vh * 1200 / 1411));
  max-height: 92vh;
  background: white;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
  transform: translate(-50%, -50%) scale(1);
}

.lightbox-image-wrap {
  width: 100%;
  aspect-ratio: 1200 / 1411;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.lightbox-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-info {
  padding: 24px;
  background: white;
}

.lightbox-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #001f3f;
}

.lightbox-details {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #001f3f;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: white;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

/* Make texture cards clickable */
.texture-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.texture-card:hover {
  transform: translateY(-4px);
}

/* Texture images — match actual image ratio 1200×1411 */
.texture-img {
  aspect-ratio: 1200 / 1411 !important;
  width: 100% !important;
  height: auto !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Wallpaper showcase images — match actual image ratio 1200×1411 */
.gallery-item {
  aspect-ratio: 1200 / 1411 !important;
}

@media (max-width: 768px) {
  .lightbox-content {
    width: 95%;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  /* Gallery items — cap height on tablet */
  .gallery-item {
    aspect-ratio: 4 / 3 !important;
  }
}

@media (max-width: 500px) {
  /* Gallery items — fixed height on mobile */
  .gallery-item {
    aspect-ratio: unset !important;
    height: 200px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Texture Carousel — Premium Nonwoven section
   ═══════════════════════════════════════════════════════════════ */

.texture-carousel {
  width: 100%;
  aspect-ratio: 1200 / 1411;
  position: relative;
  overflow: hidden;
}

.tc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.tc-slide.active {
  opacity: 1;
}

.tc-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.tc-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.88);
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease;
  color: #001f3f;
}

.tc-btn:hover {
  background: white;
}

.tc-prev { left: 12px; }
.tc-next { right: 12px; }

.tc-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.tc-dots {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.tc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.tc-dot.active {
  background: white;
}

