.gallery-page {
  background:
    radial-gradient(circle at 8% 8%, rgba(215, 176, 107, 0.16), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(143, 23, 25, 0.07), transparent 24rem),
    linear-gradient(180deg, #f7f3ec 0%, #efe8dd 100%);
}

.gallery-shell {
  padding-bottom: 68px;
}

body.force-header-visible .gallery-shell {
  padding-top: 108px;
}

.gallery-page .page-shell {
  background: transparent;
}

.gallery-hero {
  padding-top: 34px;
  padding-bottom: 18px;
}

.gallery-hero::before {
  display: none;
}

.gallery-hero .page-hero-card {
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gallery-hero .page-hero-crack {
  opacity: 0.08;
}

.gallery-hero-content {
  display: block;
}

.gallery-hero-copy {
  max-width: 620px;
}

.gallery-hero-back-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.gallery-hero-backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 17, 0.1);
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.gallery-hero-backlink:hover {
  color: var(--accent);
  border-color: rgba(143, 23, 25, 0.18);
}

.gallery-hero-backlink i {
  font-size: 0.95rem;
}

.gallery-hero h1 {
  margin-top: 0;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.92;
  max-width: 5.5ch;
}

.gallery-hero p {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 0.98rem;
  line-height: 1.65;
}

.gallery-folder-grid {
  display: grid;
  gap: 24px;
}

.gallery-folder-card {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 238, 228, 0.86));
  border: 1px solid rgba(17, 17, 17, 0.1);
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.06);
}

.gallery-folder-cover {
  position: relative;
  display: block;
  min-height: 240px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(17, 17, 17, 0.12);
}

.gallery-folder-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.04) 0%, rgba(17, 17, 17, 0.08) 42%, rgba(17, 17, 17, 0.74) 100%);
}

.gallery-folder-cover img,
.gallery-folder-preview img,
.gallery-shot-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-folder-title-overlay {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  right: 16px;
  color: #ffffff;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(1.5rem, 2vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 0.96;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

.gallery-folder-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gallery-detail-header h2,
.gallery-empty-state h2 {
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  text-transform: uppercase;
  line-height: 0.95;
}

.gallery-folder-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.gallery-folder-preview {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 22px rgba(17, 17, 17, 0.08);
}

.gallery-folder-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start;
}

.gallery-folder-cta {
  min-width: 180px;
}

.gallery-detail-section {
  padding-top: 12px;
}

.gallery-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gallery-shot-card {
  position: relative;
}

.gallery-shot-button {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #d8d0c3;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(17, 17, 17, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-shot-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 38px rgba(17, 17, 17, 0.14);
}

.gallery-load-wrap {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.gallery-load-more {
  min-width: 210px;
}

.gallery-empty-state {
  padding: 40px 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 17, 17, 0.1);
}

.gallery-empty-state p {
  max-width: 62ch;
  margin-top: 12px;
  color: var(--catalog-muted);
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 28px;
  background: rgba(11, 11, 11, 0.92);
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.gallery-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.gallery-lightbox-stage {
  max-width: min(1040px, calc(100vw - 160px));
  margin: 0 auto;
}

.gallery-lightbox-stage img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 74vh;
  border-radius: 28px;
  background: #161616;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox-meta {
  margin-top: 16px;
  display: grid;
  gap: 6px;
  color: #ffffff;
}

.gallery-lightbox-meta strong {
  font-size: 1.08rem;
}

.gallery-lightbox-meta span,
.gallery-lightbox-note {
  color: rgba(255, 255, 255, 0.76);
}

.gallery-lightbox-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-lightbox-download {
  min-width: 180px;
}

.gallery-lightbox-download.is-soon {
  cursor: pointer;
}

@media (min-width: 1181px) {
  .gallery-page .catalog-section,
  .gallery-page .catalog-section:nth-of-type(even),
  .gallery-page .catalog-section:nth-of-type(odd),
  .gallery-page .request-section {
    background: transparent;
  }

  .gallery-folder-grid {
    gap: 28px;
  }

  .gallery-folder-card {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 26px;
    padding: 26px;
  }

  .gallery-folder-cover {
    min-height: 280px;
  }

  .gallery-folder-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery-detail-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .gallery-shell.is-category-view .gallery-hero {
    padding-top: 24px;
    padding-bottom: 8px;
  }

  .gallery-shell.is-category-view .gallery-hero-copy {
    max-width: 100%;
    text-align: center;
  }

  .gallery-shell.is-category-view .gallery-hero-back-row {
    justify-content: center;
  }

  .gallery-shell.is-category-view .gallery-hero h1 {
    max-width: none;
    font-size: clamp(3.2rem, 5.2vw, 4.8rem);
  }

  .gallery-shell.is-category-view .gallery-hero p {
    max-width: none;
  }
}

@media (max-width: 1180px) {
  .gallery-folder-card {
    grid-template-columns: 1fr;
  }

  .gallery-folder-cover {
    min-height: 280px;
  }

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

@media (max-width: 860px) {
  body.force-header-visible .gallery-shell {
    padding-top: 96px;
  }

  .gallery-hero-copy {
    margin-inline: auto;
    text-align: center;
  }

  .gallery-hero-back-row {
    justify-content: center;
  }

  .gallery-hero h1,
  .gallery-hero p {
    max-width: none;
  }

  .gallery-folder-preview-grid,
  .gallery-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-lightbox {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .gallery-lightbox-stage {
    max-width: 100%;
  }

  .gallery-lightbox-stage img {
    max-height: 68vh;
  }

  .gallery-lightbox-nav {
    position: absolute;
    bottom: 20px;
  }

  .gallery-lightbox-nav.is-prev {
    left: 20px;
  }

  .gallery-lightbox-nav.is-next {
    right: 20px;
  }
}

@media (max-width: 540px) {
  body.force-header-visible .gallery-shell {
    padding-top: 92px;
  }

  .gallery-folder-card {
    padding: 16px;
    border-radius: 24px;
  }

  .gallery-folder-actions {
    justify-content: center;
  }

  .gallery-folder-cta {
    min-width: 0;
    width: 100%;
  }

  .gallery-folder-cover {
    min-height: 220px;
    border-radius: 20px;
  }

  .gallery-folder-preview-grid,
  .gallery-detail-grid {
    gap: 10px;
  }

  .gallery-folder-preview,
  .gallery-shot-button {
    border-radius: 16px;
  }

  .gallery-lightbox-close,
  .gallery-lightbox-nav {
    width: 44px;
    height: 44px;
  }
}
