/* =============================================================
   ELITE DESIGN HOME — gallery.css
   Category gallery pages (Kitchens / Bathrooms / Flooring / Others)
   Loaded in addition to style.css — relies on its custom properties.
   ============================================================= */

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.55);
  margin-bottom: 26px;
}
.breadcrumb a { color: rgba(244, 241, 236, 0.75); transition: color var(--ease); }
.breadcrumb a:hover { color: var(--sage); }
.breadcrumb span[aria-current] { color: var(--warm-white); }

/* ============================================================
   GALLERY HERO
   ============================================================ */
.gallery-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--header-h);
  overflow: hidden;
}
.gallery-hero-bg {
  position: absolute;
  inset: 0;
  background-color: #1d2023;
  background-size: cover;
  background-position: center;
}
.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 28, 30, 0.75) 0%,
    rgba(26, 28, 30, 0.55) 40%,
    rgba(26, 28, 30, 0.94) 100%
  );
}
.gallery-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: 64px;
  padding-bottom: 56px;
}
.gallery-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 18px;
}
.gallery-hero-eyebrow::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background-color: var(--sage);
  flex-shrink: 0;
}
.gallery-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 600;
  color: var(--warm-white);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.gallery-hero-desc {
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
  font-weight: 300;
  color: rgba(244, 241, 236, 0.8);
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: 18px;
}
.gallery-hero-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-white);
  border: 1px solid rgba(244, 241, 236, 0.3);
  border-radius: 40px;
  padding: 8px 18px;
}
.gallery-hero-count strong { color: var(--sage); font-size: 0.85rem; }

/* ============================================================
   GALLERY GRID
   ============================================================ */
.gallery-section {
  padding: 80px 0 104px;
  background-color: var(--warm-white);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.gallery-item {
  display: block;
  width: 100%;
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: zoom-in;
  background-color: #2b2e31;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.gallery-item:hover,
.gallery-item:focus-visible {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.045); }

.gallery-item-zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(26, 28, 30, 0.55);
  color: var(--warm-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--ease), transform var(--ease);
}
.gallery-item-zoom svg { width: 15px; height: 15px; }
.gallery-item:hover .gallery-item-zoom,
.gallery-item:focus-visible .gallery-item-zoom {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   GALLERY CTA BAND
   ============================================================ */
.gallery-cta {
  padding: 88px 0;
  background-color: var(--charcoal);
}
.gallery-cta-inner {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}
.gallery-cta-inner h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 600;
  color: var(--warm-white);
  margin-bottom: 16px;
}
.gallery-cta-inner p {
  font-size: 0.95rem;
  color: var(--stone-gray);
  line-height: 1.8;
  margin-bottom: 34px;
}
.gallery-cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(20, 21, 23, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  padding: 24px;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-figure {
  position: relative;
  max-width: 90vw;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-figure img {
  max-width: 90vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.lightbox.open .lightbox-figure img {
  opacity: 1;
  transform: scale(1);
}
.lightbox-caption {
  margin-top: 16px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--warm-white);
  text-align: center;
}
.lightbox-counter {
  margin-top: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-gray);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: rgba(244, 241, 236, 0.08);
  border: 1px solid rgba(244, 241, 236, 0.18);
  color: var(--warm-white);
  transition: background-color var(--ease), border-color var(--ease);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: var(--sage);
  border-color: var(--sage);
}
.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg { width: 18px; height: 18px; }

.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

@media (max-width: 768px) {
  .gallery-hero { min-height: 44vh; }
  .gallery-section { padding: 56px 0 72px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .lightbox-prev { left: 10px; width: 38px; height: 38px; }
  .lightbox-next { right: 10px; width: 38px; height: 38px; }
  .lightbox-close { top: 14px; right: 14px; width: 38px; height: 38px; }
  .lightbox-caption { font-size: 0.88rem; padding: 0 40px; }
}
