/* =============================================
   BRANCH'S — GALLERY PAGE
   ============================================= */

/* ---- HERO ---- */
.gallery-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.gallery-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44,26,0,0.95) 0%, rgba(44,26,0,0.45) 55%, rgba(44,26,0,0.15) 100%);
  z-index: 1;
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 6vw 56px;
}

.gallery-eyebrow {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #C8860A;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.gallery-hero-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(44px, 7vw, 72px);
  color: #fff;
  line-height: 1.1;
  margin: 0 0 12px;
}

.gallery-hero-sub {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: rgba(44,26,0,0.6);
  text-transform: uppercase;
  margin: 0;
}

/* ---- MARQUEE ---- */
.gallery-marquee-wrap {
  background: #C8860A;
  overflow: hidden;
  padding: 10px 0;
}

.gallery-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marqueeScroll 32s linear infinite;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #2C1A00;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- GALLERY SECTION ---- */
.gallery-section {
  background: #2C1A00;
  padding: 72px 6vw 90px;
}

.gallery-inner {
  max-width: 1300px;
  margin: 0 auto;
}

/* ---- FILTER BAR ---- */
.gallery-filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.gallery-filter-btn {
  padding: 9px 22px;
  background: transparent;
  border: 1px solid rgba(200,134,10,0.15);
  border-radius: 30px;
  color: rgba(44,26,0,0.6);
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gallery-filter-btn:hover {
  border-color: rgba(200,134,10,0.5);
  color: #C8860A;
}

.gallery-filter-btn.active {
  background: #C8860A;
  border-color: #C8860A;
  color: #2C1A00;
}

/* ---- GALLERY GRID ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 12px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.97);
}

.gallery-item.revealed {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

.gallery-item-tall {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.3s ease;
  filter: brightness(0.82);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.65);
}

/* ---- OVERLAY ---- */
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44,26,0,0.85) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.gallery-item-cat {
  display: inline-block;
  background: #C8860A;
  color: #2C1A00;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
  align-self: flex-start;
}

.gallery-item-overlay p {
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  color: rgba(44,26,0,0.85);
  line-height: 1.5;
  margin: 0;
}

/* ---- GALLERY COUNT ---- */
.gallery-load-more {
  text-align: center;
  margin-top: 36px;
}

.gallery-count {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: rgba(44,26,0,0.35);
  letter-spacing: 0.06em;
}

/* ---- SHARE SECTION ---- */
.gallery-share {
  background: #3D2400;
  padding: 90px 6vw;
  text-align: center;
}

.gallery-share-inner {
  max-width: 700px;
  margin: 0 auto;
}

.section-eyebrow {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #C8860A;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  text-transform: uppercase;
  margin: 0 0 16px;
  line-height: 1.15;
}

.gallery-share-text {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.62);
  line-height: 1.7;
  margin: 0 0 28px;
}

.gallery-share-tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.share-tag {
  display: inline-block;
  padding: 7px 16px;
  background: rgba(200,134,10,0.1);
  border: 1px solid rgba(200,134,10,0.25);
  border-radius: 20px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #C8860A;
}

.gallery-share-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- CTA STRIP ---- */
.gallery-cta-strip {
  background: linear-gradient(135deg, #2C1A00 0%, #0e1620 100%);
  border-top: 1px solid rgba(200,134,10,0.2);
  padding: 72px 6vw;
  text-align: center;
}

.gallery-cta-inner {
  max-width: 720px;
  margin: 0 auto;
}

.gallery-cta-strip h2 {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(32px, 5vw, 52px);
  color: #fff;
  margin: 0 0 12px;
}

.gallery-cta-strip p {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: rgba(44,26,0,0.6);
  margin: 0 0 32px;
}

.gallery-cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- BUTTONS ---- */
.btn-gold {
  display: inline-block;
  padding: 13px 28px;
  background: #C8860A;
  color: #2C1A00;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-gold:hover {
  background: #f5d76e;
  transform: translateY(-2px);
}

.btn-outline-gold {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  border: 1px solid #C8860A;
  color: #C8860A;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline-gold:hover {
  background: #C8860A;
  color: #2C1A00;
}

/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(44,26,0,0.96);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 3px;
  display: block;
  margin: 0 auto;
}

.lightbox-caption {
  margin-top: 16px;
}

.lightbox-cat {
  display: inline-block;
  background: #C8860A;
  color: #2C1A00;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.lightbox-caption p {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: rgba(44,26,0,0.7);
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(44,26,0,0.7);
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: #C8860A;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(200,134,10,0.10);
  border: 1px solid rgba(200,134,10,0.15);
  color: #fff;
  font-size: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(200,134,10,0.2);
  border-color: rgba(200,134,10,0.5);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }

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

  .gallery-item-tall {
    grid-row: span 1;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 150px;
  }

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

  .gallery-cta-btns,
  .gallery-share-btns {
    flex-direction: column;
    align-items: center;
  }
}

/* Option 1 overrides */
.gallery-page { background: #FFF8EE !important; }
.gallery-hero { background: linear-gradient(135deg, rgba(44,26,0,0.85), rgba(61,36,0,0.75)), url('../images/brownie-sundae.jpg') center/cover !important; }
.gallery-filter { background: #FFF0D6 !important; border-bottom: 2px solid #F0D9A8 !important; }
.filter-btn { color: #6B4200 !important; }
.filter-btn.active { background: #C8860A !important; color: #fff !important; }
.gallery-grid { background: #FFF8EE !important; }
.gallery-item-overlay { background: linear-gradient(to top, rgba(44,26,0,0.85), transparent) !important; }
.lightbox { background: rgba(44,26,0,0.95) !important; }
.social-section { background: #FFF0D6 !important; }
.hashtag-pill { background: #FFF8EE !important; color: #C8860A !important; border-color: #F0D9A8 !important; }

/* Gallery page contrast fixes */
.gallery-hero-title, .gallery-hero-subtitle { color: #ffffff!important; }
.gallery-filter-btn { color: #2C1A00!important; background: #FFF0D6!important; border-color: #C8860A!important; }
.gallery-filter-btn.active { color: #ffffff!important; background: #C8860A!important; }
.gallery-item-overlay h3 { color: #ffffff!important; }
.gallery-item-overlay p { color: #e8d5b0!important; }
.gallery-cta h2, .gallery-cta p { color: #ffffff!important; }
.social-section h2 { color: #2C1A00!important; }
.social-section p { color: #2C1A00!important; }
.hashtag-pill { color: #C8860A!important; background: #FFF0D6!important; }

.gallery-filter-btn { color: #2C1A00!important; background: #FFF0D6!important; border-color: #C8860A!important; }
.gallery-filter-btn.active { color: #ffffff!important; background: #C8860A!important; }
.social-section h2, .social-section p { color: #2C1A00!important; }
.hashtag-pill { color: #C8860A!important; background: #FFF0D6!important; }


/* ============================================================
   GALLERY PAGE — DEFINITIVE CONTRAST FIX
   ============================================================ */

/* Gallery filter — light bg */
.gallery-filter { background: #FFF0D6 !important; }
.filter-btn { background: #ffffff !important; color: #5A3800 !important; border-color: #F0D9A8 !important; }
.filter-btn.active, .filter-btn:hover { background: #C8860A !important; color: #ffffff !important; border-color: #C8860A !important; }

/* Gallery grid — light bg */
.gallery-grid-section { background: #FFF8EE !important; }
.gallery-grid-section .section-eyebrow { color: #C8860A !important; }
.gallery-grid-section h2 { color: #2C1A00 !important; }
.gallery-item-overlay { background: rgba(44,26,0,0.88) !important; }
.gallery-item-overlay h3 { color: #ffffff !important; }
.gallery-item-overlay p { color: rgba(255,255,255,0.85) !important; }
.gallery-badge { background: #C8860A !important; color: #ffffff !important; }

/* Gallery social — light bg */
.gallery-social { background: #FFF0D6 !important; }
.gallery-social .section-eyebrow { color: #C8860A !important; }
.gallery-social h2, .gallery-social h3 { color: #2C1A00 !important; }
.gallery-social p { color: #5A3800 !important; }
.hashtag-pill { background: #FFF8EE !important; color: #C8860A !important; border-color: #F0D9A8 !important; }

/* Gallery CTA — dark bg */
.gallery-cta { background: #2C1A00 !important; }
.gallery-cta .section-eyebrow { color: #C8860A !important; }
.gallery-cta h2 { color: #ffffff !important; }
.gallery-cta p { color: rgba(255,255,255,0.82) !important; }

/* Lightbox */
.lightbox-overlay { background: rgba(0,0,0,0.92) !important; }
.lightbox-caption { color: #ffffff !important; }
.lightbox-close, .lightbox-prev, .lightbox-next { color: #ffffff !important; }

/* ===== WHITE TEXT OVERRIDES FOR DARK SECTIONS ===== */
.gallery-hero-sub { color: rgba(255,255,255,0.7) !important; }
.gallery-stats .gstat-label { color: rgba(255,255,255,0.6) !important; }
.gallery-stats .gstat-num { color: #C8860A !important; }
.gallery-social .section-eyebrow { color: #C8860A !important; }
.gallery-social .section-title { color: #fff !important; }
.gallery-social .section-desc { color: rgba(255,255,255,0.7) !important; }
.gallery-social .hashtag { color: rgba(255,255,255,0.8) !important; }

