/* =========================================
   GALLERY.CSS — Gallery page styles
   Waggy Bums Dog Groomers
   ========================================= */

.gallery-section {
  background: var(--white);
}

/* ===== FILTER BUTTONS ===== */
.gallery__filters {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-xl);
}

.filter-btn {
  padding: 9px 22px;
  border: 2px solid var(--border);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: var(--t);
  background: var(--white);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--purple);
  background: var(--purple);
  color: var(--white);
}

/* ===== GALLERY GRID ===== */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}

.gallery-item {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--t);
  aspect-ratio: 4/3;
  background: var(--purple-light);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
  z-index: 1;
}

/* Span some items across 2 columns for variety */
.gallery-item--wide {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item--tall {
  grid-row: span 2;
  aspect-ratio: 3/4;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* Placeholder (when no image) */
.gallery-item--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  background: linear-gradient(135deg, var(--purple-light), var(--pink-light));
}

.gallery-item--placeholder .gallery-item__emoji {
  font-size: 3.5rem;
  animation: float 3s ease-in-out infinite;
}

.gallery-item--placeholder .gallery-item__label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--purple-dark);
  text-align: center;
  padding: 0 var(--sp-sm);
}

/* Overlay */
.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(149, 117, 205, 0.85), rgba(94, 53, 177, 0.85));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--white);
  text-align: center;
  padding: var(--sp-md);
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__overlay-icon {
  font-size: 2rem;
  margin-bottom: var(--sp-xs);
}

.gallery-item__overlay-text {
  font-family: var(--font-heading);
  font-size: 1rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 40, 0.92);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: var(--sp-md);
}

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

.lightbox__inner {
  position: relative;
  max-width: 900px;
  max-height: 85vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  object-fit: contain;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: block;
}

/* lightbox placeholder (when no image) */
.lightbox__placeholder {
  width: 600px;
  max-width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--purple-light), var(--pink-light));
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  box-shadow: var(--shadow-hover);
}

.lightbox__placeholder-emoji {
  font-size: 6rem;
  animation: float 3s ease-in-out infinite;
}

.lightbox__placeholder-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--purple-dark);
  text-align: center;
}

.lightbox__close {
  position: fixed;
  top: var(--sp-md);
  right: var(--sp-md);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-round);
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
  z-index: 10000;
}

.lightbox__close:hover {
  background: var(--red);
  border-color: var(--red);
}

.lightbox__prev,
.lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-round);
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
  z-index: 10000;
}

.lightbox__prev { left: var(--sp-md); }
.lightbox__next { right: var(--sp-md); }

.lightbox__prev:hover,
.lightbox__next:hover {
  background: var(--purple);
  border-color: var(--purple);
}

.lightbox__caption {
  position: fixed;
  bottom: var(--sp-lg);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-pill);
  padding: 8px 20px;
  color: var(--white);
  font-size: 0.9rem;
  white-space: nowrap;
  z-index: 10000;
}

/* ===== SUBMIT PHOTOS CTA ===== */
.gallery-cta {
  background: var(--purple-xlight);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  text-align: center;
  margin-top: var(--sp-xxl);
  border: 2px dashed var(--purple-light);
}

.gallery-cta h3 {
  font-family: var(--font-heading);
  color: var(--purple-dark);
  margin-bottom: var(--sp-sm);
}

.gallery-cta p {
  color: var(--text-body);
  margin-bottom: var(--sp-md);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item--wide {
    grid-column: span 2;
  }

  .gallery-item--tall {
    grid-row: span 1;
    aspect-ratio: 4/3;
  }

  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
}

@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .gallery-item--wide {
    grid-column: span 1;
    aspect-ratio: 4/3;
  }
}
