/* Galerie BABE clean v2: albums, grid 4x6, sidebar and lightbox */
.babe-gallery-hero,
.gallery-albums-page,
.gallery-album-page {
  background: #faf6f2;
}

.babe-gallery-hero {
  display: grid;
  grid-template-columns: minmax(260px, 38%) 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  min-height: 420px;
  padding: clamp(28px, 5vw, 72px) max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(216, 143, 162, 0.18);
  overflow: hidden;
}

.babe-gallery-hero__image {
  min-width: 0;
}

.babe-gallery-hero__image > img {
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin-inline: auto;
}

.babe-hero-slider {
  position: relative;
  width: min(100%, 520px);
  margin-inline: auto;
}

.babe-hero-slider__stage {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #fffdfb;
  box-shadow: 0 22px 50px rgba(62, 52, 45, 0.08);
}

.babe-hero-slider__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

.babe-hero-slider__slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.babe-hero-slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.babe-hero-slider__slide figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
  color: #d15d86;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 10px 16px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(62, 52, 45, 0.12);
}

.babe-hero-slider__nav {
  position: absolute;
  left: 50%;
  bottom: -18px;
  z-index: 3;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.babe-hero-slider__nav button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #e8c0cb;
  cursor: pointer;
  padding: 0;
}

.babe-hero-slider__nav button.is-active {
  width: 28px;
  background: #d15d86;
}

.babe-gallery-hero__content {
  min-width: 0;
  max-width: 760px;
  text-align: center;
}

.babe-gallery-hero .eyebrow,
.gallery-albums-page .eyebrow,
.gallery-album-page .eyebrow {
  color: #d15d86;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.babe-gallery-hero h1 {
  color: #cf7190;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.95;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.babe-gallery-hero h2 {
  color: #6f816f;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.65rem, 3.8vw, 3rem);
  line-height: 1.08;
  margin: 0;
  overflow-wrap: anywhere;
}

.babe-gallery-hero__sep {
  color: #d15d86;
  font-size: 2rem;
  margin: 22px 0 18px;
}

.babe-gallery-hero p:not(.eyebrow) {
  color: #3f3b39;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.8;
  margin: 0 auto;
  max-width: 680px;
}

.bgs-container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.bgs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding: clamp(44px, 6vw, 84px) 0;
}

.bgs-main,
.bgs-panel,
.bgs-empty {
  min-width: 0;
}

.bgs-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.bgs-toolbar h2 {
  color: #3f3b39;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 1;
  margin: 0 0 12px;
}

.bgs-toolbar p:not(.eyebrow) {
  color: #5f5854;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.bgs-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 min(410px, 100%);
}

.bgs-search input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #f0d7df;
  border-radius: 999px;
  background: #fffdfb;
  color: #4b4643;
  font: inherit;
  padding: 0 20px;
  outline: none;
}

.bgs-search input:focus {
  border-color: #d15d86;
  box-shadow: 0 0 0 4px rgba(209, 93, 134, 0.12);
}

.bgs-search button,
.bgs-soft-link,
.bgs-pagination a {
  border: 1px solid #d15d86;
  border-radius: 999px;
  background: #d15d86;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.bgs-soft-link,
.bgs-pagination a {
  background: transparent;
  color: #d15d86;
}

.bgs-album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.bgs-album-card {
  overflow: hidden;
  border: 1px solid rgba(216, 143, 162, 0.2);
  border-radius: 28px;
  background: #fffdfb;
  box-shadow: 0 22px 52px rgba(62, 52, 45, 0.08);
}

.bgs-album-card a {
  display: grid;
  grid-template-columns: 42% 1fr;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.bgs-album-cover {
  display: block;
  min-height: 230px;
  background: #f7edea;
  overflow: hidden;
}

.bgs-album-cover img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.bgs-album-card:hover img {
  transform: scale(1.045);
}

.bgs-album-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
}

.bgs-album-body small {
  color: #d15d86;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bgs-album-body strong {
  color: #3f3b39;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
  line-height: 1.05;
}

.bgs-album-body em {
  color: #665f5b;
  font-style: normal;
  line-height: 1.65;
}

.bgs-album-body b {
  color: #d15d86;
  margin-top: auto;
}

.bgs-panel {
  position: sticky;
  top: 120px;
  border: 1px solid rgba(216, 143, 162, 0.2);
  border-radius: 28px;
  background: #fffdfb;
  box-shadow: 0 22px 52px rgba(62, 52, 45, 0.08);
  padding: 26px;
}

.bgs-panel h3 {
  color: #3f3b39;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  margin: 0 0 20px;
}

.bgs-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px solid #f2d8df;
  border-radius: 14px;
  background: #fff7f9;
  color: #d15d86;
  font-weight: 800;
  text-decoration: none;
}

.bgs-panel a.is-active,
.bgs-panel a:hover {
  background: #d15d86;
  color: #fff;
}

.bgs-panel small {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 4px 9px;
}

.bgs-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.bgs-image-cell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  background: #f5ece8;
  box-shadow: 0 18px 36px rgba(62, 52, 45, 0.09);
  color: #fff;
  text-decoration: none;
}

.bgs-image-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.bgs-image-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(35, 28, 24, 0.72));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bgs-image-cell span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  display: grid;
  gap: 4px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.bgs-image-cell strong {
  font-size: 1rem;
  line-height: 1.2;
}

.bgs-image-cell em {
  font-size: 0.85rem;
  font-style: normal;
}

.bgs-image-cell:hover img {
  transform: scale(1.06);
}

.bgs-image-cell:hover::after,
.bgs-image-cell:hover span {
  opacity: 1;
  transform: translateY(0);
}

.bgs-empty {
  border: 1px dashed #e8bdca;
  border-radius: 26px;
  background: #fffdfb;
  padding: 42px;
  text-align: center;
}

.bgs-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.bgs-pagination a {
  width: 48px;
  padding: 0;
}

.bgs-pagination a.is-active {
  background: #d15d86;
  color: #fff;
}

.babe-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  grid-template-rows: auto 1fr auto;
  background: rgba(24, 20, 22, 0.92);
  color: #fff;
}

.babe-lightbox.is-open {
  display: grid;
}

.babe-lightbox__bar,
.babe-lightbox__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
}

.babe-lightbox__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.3rem, 2.5vw, 2.2rem);
  line-height: 1.1;
}

.babe-lightbox__tools {
  display: flex;
  gap: 10px;
}

.babe-lightbox button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.babe-lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 70px;
}

.babe-lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease;
}

.babe-lightbox.is-zoomed .babe-lightbox__stage {
  overflow: auto;
  place-items: start center;
}

.babe-lightbox.is-zoomed .babe-lightbox__stage img {
  max-width: none;
  max-height: none;
  width: auto;
  transform: scale(1.35);
  transform-origin: top center;
  margin: 40px auto;
}

.babe-lightbox__prev,
.babe-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.babe-lightbox__prev {
  left: 18px;
}

.babe-lightbox__next {
  right: 18px;
}

.babe-lightbox__caption {
  justify-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 1100px) {
  .babe-gallery-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .bgs-layout {
    grid-template-columns: 1fr;
  }

  .bgs-panel {
    position: static;
  }

  .bgs-image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .bgs-container {
    width: min(100% - 24px, 1180px);
  }

  .bgs-toolbar,
  .bgs-search {
    display: grid;
    width: 100%;
  }

  .bgs-album-grid {
    grid-template-columns: 1fr;
  }

  .bgs-album-card a {
    grid-template-columns: 1fr;
  }

  .bgs-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .babe-lightbox__stage {
    padding: 0 12px;
  }

  .babe-lightbox__prev,
  .babe-lightbox__next {
    top: auto;
    bottom: 78px;
  }
}
