/* ==========================================================================
   BROWNWHITE.CO — Visual Archive & Editorial Gallery Stylesheet
   Regenerated to match the elevated aesthetic of the Collection and Homepage.
   ========================================================================== */

/* Page Scope */
.gallery-page {
  background-color: var(--color-warm-white);
  color: var(--color-chocolate);
  min-height: 100vh;
  padding-top: var(--header-height);
  overflow-x: hidden;
}

/* ==========================================================================
   01. Gallery Hero Header (Clean Luxury Aesthetic)
   ========================================================================== */
.gallery-hero {
  position: relative;
  width: 100%;
  padding: clamp(3.5rem, 6vw, 5.5rem) 0 clamp(2.5rem, 4vw, 3.5rem) 0;
  border-bottom: 1px solid rgba(41, 21, 15, 0.1);
  background-color: var(--color-warm-white);
}

.gallery-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4.5rem);
}

.gallery-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-light-brown);
  font-weight: 600;
}

.gallery-stats-pill {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-warm-brown);
  font-weight: 500;
  border-left: 1px solid rgba(41, 21, 15, 0.18);
  padding-left: 1rem;
}

.gallery-hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--color-chocolate);
  margin-bottom: 1.75rem;
}

.gallery-hero-desc {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.65;
  color: var(--color-deep-brown);
  font-weight: 300;
  max-width: 65ch;
}

/* ==========================================================================
   02. Sticky Filter & Sorting Toolbar
   ========================================================================== */
.gallery-toolbar {
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  background-color: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(41, 21, 15, 0.12);
  padding: 1.1rem 0;
  transition: all var(--transition-fast);
}

.gallery-toolbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.gallery-filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.gallery-tab-btn {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-warm-brown);
  background: transparent;
  border: 1px solid rgba(41, 21, 15, 0.18);
  padding: 0.55rem 1.15rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 0;
}

.gallery-tab-btn:hover {
  border-color: var(--color-chocolate);
  color: var(--color-chocolate);
}

.gallery-tab-btn.active {
  background-color: var(--color-chocolate);
  border-color: var(--color-chocolate);
  color: var(--color-cream);
}

.gallery-toolbar-hint {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-light-brown);
}

/* ==========================================================================
   03. Gallery Grid Section (Balanced 3-Column Luxury Layout)
   ========================================================================== */
.gallery-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 3.5vw, 3.5rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.gallery-item {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-item.hidden {
  display: none !important;
}

.gallery-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #ede5da;
  margin-bottom: 0;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

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

/* Subtle Editorial VIEW Micro-Interaction */
.gallery-view-hint {
  position: absolute;
  bottom: 1.15rem;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding: 0.35rem 0.85rem;
  background: rgba(26, 13, 9, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(243, 236, 227, 0.16);
  border-radius: 2px;
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
}

.gallery-item:hover .gallery-view-hint,
.gallery-item:focus-visible .gallery-view-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.gallery-item:focus-visible {
  outline: 2px solid var(--color-chocolate);
  outline-offset: 3px;
}

/* Floating Badges & Controls on Tile - Hidden to keep pure pictures */
.gallery-badge-overlay,
.gallery-expand-btn,
.gallery-item-info {
  display: none !important;
}

.gallery-item-badge {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  background-color: var(--color-chocolate);
  color: var(--color-cream);
  display: inline-block;
}

.gallery-expand-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: rgba(41, 21, 15, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cream);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
}

.gallery-item:hover .gallery-expand-btn {
  opacity: 1;
  transform: scale(1);
  background-color: var(--color-chocolate);
}

/* Card Information Below Image */
.gallery-item-info {
  display: flex;
  flex-direction: column;
}

.gallery-item-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-light-brown);
  margin-bottom: 0.35rem;
}

.gallery-item-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-chocolate);
  margin-bottom: 0.3rem;
  line-height: 1.25;
}

.gallery-item-meta {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--color-warm-brown);
}

/* ==========================================================================
   04. Atelier Consultation & Direct Order Banner
   ========================================================================== */
.gallery-cta-banner {
  background-color: var(--color-cream);
  border-top: 1px solid rgba(41, 21, 15, 0.1);
  border-bottom: 1px solid rgba(41, 21, 15, 0.1);
  padding: clamp(3.5rem, 6vw, 5.5rem) clamp(1.5rem, 5vw, 4.5rem);
  margin-top: 2rem;
}

.gallery-cta-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.gallery-cta-copy {
  max-width: 58ch;
}

.gallery-cta-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-light-brown);
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: block;
}

.gallery-cta-title {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  color: var(--color-chocolate);
  line-height: 1.15;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.gallery-cta-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-deep-brown);
}

.gallery-cta-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-gallery-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background-color: #25D366;
  color: #ffffff;
  padding: 0.95rem 1.6rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-gallery-wa:hover {
  background-color: #20bd5a;
  transform: translateY(-2px);
}

.btn-gallery-collection {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background-color: var(--color-chocolate);
  color: var(--color-cream);
  padding: 0.95rem 1.6rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-gallery-collection:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ==========================================================================
   05. Minimalist Fullscreen Editorial Lightbox
   ========================================================================== */
.archive-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms cubic-bezier(0.16, 1, 0.3, 1), visibility 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.archive-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.archive-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(18, 9, 6, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  cursor: pointer;
  z-index: 1;
}

.archive-lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(3.5rem, 8vh, 5.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  z-index: 10;
  pointer-events: auto;
}

.archive-lightbox-counter {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(243, 236, 227, 0.65);
  user-select: none;
}

.archive-lightbox-close {
  background: transparent;
  border: none;
  color: rgba(243, 236, 227, 0.85);
  padding: 0.6rem;
  margin-right: -0.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease, background-color 0.2s ease;
  border-radius: 50%;
  line-height: 1;
}

.archive-lightbox-close:hover {
  color: #ffffff;
  transform: scale(1.12);
  background-color: rgba(243, 236, 227, 0.08);
}

.archive-lightbox-close:focus-visible,
.archive-lightbox-nav:focus-visible {
  outline: 2px solid var(--color-cream);
  outline-offset: 3px;
}

.archive-lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1.5rem, 6vw, 7rem);
  box-sizing: border-box;
  z-index: 5;
  pointer-events: none;
}

.archive-lightbox-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  pointer-events: auto;
}

.archive-lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - clamp(7.5rem, 15vh, 11rem));
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 240ms ease;
  border: none;
  border-radius: 2px;
  box-shadow: none;
}

.archive-lightbox.active .archive-lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.archive-lightbox-img.switching {
  opacity: 0.25;
  transform: scale(0.98);
  transition: opacity 140ms ease, transform 140ms ease;
}

.archive-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(30, 15, 10, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(243, 236, 227, 0.14);
  color: rgba(243, 236, 227, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  pointer-events: auto;
  user-select: none;
}

.archive-lightbox-nav:hover {
  background-color: var(--color-chocolate);
  border-color: rgba(243, 236, 227, 0.4);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.archive-lightbox-prev {
  left: clamp(1rem, 3vw, 3rem);
}

.archive-lightbox-next {
  right: clamp(1rem, 3vw, 3rem);
}

@media (max-width: 768px) {
  .archive-lightbox-stage {
    padding: 4.5rem 0.75rem 3.5rem;
  }
  .archive-lightbox-img {
    max-height: calc(100vh - 9rem);
  }
  .archive-lightbox-nav {
    width: 40px;
    height: 40px;
    background: rgba(25, 12, 8, 0.7);
  }
  .archive-lightbox-prev {
    left: 0.5rem;
  }
  .archive-lightbox-next {
    right: 0.5rem;
  }
  .archive-lightbox-header {
    padding: 0 1.25rem;
    height: 3.5rem;
  }
}

/* ==========================================================================
   06. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    padding: 2rem 0 1.5rem 0;
  }

  .gallery-hero-title {
    font-size: 2.2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .gallery-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .gallery-section {
    padding: 1.25rem 0.75rem;
  }

  .gallery-hero-title {
    font-size: 1.85rem;
  }

  .gallery-hero-desc {
    font-size: 0.92rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
}

@media (max-width: 360px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 320px;
    margin: 0 auto;
  }
}
