/* Gallery tabs + style albums */

.gallery-tabs {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 2rem;
  padding: 0.35rem;
  background: #f3f3f3;
  border: 1px solid #e8e8e8;
}

.gallery-tabs__btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: #6f7273;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.gallery-tabs__btn:hover,
.gallery-tabs__btn:focus-visible {
  color: #24262B;
  outline: none;
}

.gallery-tabs__btn.is-active {
  color: #fff;
}

.gallery-tabs__indicator {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  height: calc(100% - 0.7rem);
  background: #24262B;
  border-radius: 2px;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1), width 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.gallery-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.gallery-panel {
  grid-area: 1 / 1;
  min-width: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1), transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-panel[hidden] {
  display: none !important;
}

.gallery-panel.is-active {
  opacity: 1;
  transform: translateY(0);
}

.gallery-panel.is-entering {
  opacity: 0;
  transform: translateY(14px);
}

.gallery-panel__intro {
  margin-bottom: 1.75rem;
}

.gallery-panel__intro h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  color: #24262B;
}

.gallery-panel__intro p {
  margin: 0;
  max-width: 52ch;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6f7273;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-tabs__indicator,
  .gallery-panel {
    transition: none;
  }

  .gallery-panel {
    transform: none;
  }
}

.store-page--gallery {
  overflow: hidden;
}

.gallery-panel__inner,
.gallery-panel__inner--styles {
  container-type: inline-size;
  container-name: gallery-panel;
}

.gallery-panel__inner,
.style-albums,
.style-album,
.style-album__track {
  min-width: 0;
  max-width: 100%;
}

.style-albums {
  display: grid;
  gap: 2.75rem;
  margin-bottom: 2.5rem;
}

.style-album {
  border-top: 1px solid #ececec;
  padding-top: 2rem;
  overflow: hidden;
}

.style-album:first-child {
  border-top: none;
  padding-top: 0;
}

.style-album__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.style-album__tag {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: #24262B;
}

.style-album__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  color: #24262B;
}

.style-album__caption {
  margin: 0;
  max-width: 52ch;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #6f7273;
}

.style-album__count {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6f7273;
}

.style-album__track {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: #c8c8c8 transparent;
  padding-bottom: 0.65rem;
}

.style-album__track::-webkit-scrollbar {
  height: 6px;
}

.style-album__track::-webkit-scrollbar-thumb {
  background: #c8c8c8;
  border-radius: 999px;
}

.style-album__grid {
  display: inline-flex;
  align-items: stretch;
  gap: 0.75rem;
  min-width: min(100%, max-content);
  padding: 0.15rem 0;
  vertical-align: top;
}

.style-album__photo {
  position: relative;
  display: block;
  flex: 0 0 clamp(9.5rem, 38cqi, 15rem);
  width: clamp(9.5rem, 38cqi, 15rem);
  margin: 0;
  padding: 0;
  border: none;
  background: #f4f4f4;
  overflow: hidden;
  cursor: zoom-in;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
}

.style-album__photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@supports not (width: 1cqi) {
  .style-album__photo {
    flex: 0 0 min(15rem, 42%);
    width: min(15rem, 42%);
  }
}

.style-album__sentinel {
  flex: 0 0 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 120px;
  color: #6f7273;
}

.style-album__sentinel[hidden] {
  display: none !important;
}

.style-album__sentinel-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.style-album__sentinel.is-loading .style-album__sentinel-label::after {
  content: '…';
  animation: style-album-pulse 1s ease-in-out infinite;
}

@keyframes style-album-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.style-album__photo:focus-visible {
  outline: 2px solid #24262B;
  outline-offset: 2px;
}

/* Lightbox */
.style-lightbox[hidden] {
  display: none !important;
}

.style-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.style-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, 0.92);
}

.style-lightbox__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 4.5rem 1rem 3.5rem;
}

.style-lightbox__figure {
  margin: 0;
  width: min(1100px, 100%);
  text-align: center;
}

.style-lightbox__figure img {
  max-width: 100%;
  max-height: min(72vh, 820px);
  width: auto;
  height: auto;
  margin: 0 auto;
  display: block;
  object-fit: contain;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.style-lightbox__caption {
  margin-top: 1rem;
  color: #f3f4f6;
}

.style-lightbox__occasion {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
}

.style-lightbox__caption strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.style-lightbox__caption p {
  margin: 0 auto;
  max-width: 48ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.style-lightbox__caption p:empty {
  display: none;
}

.style-lightbox__close,
.style-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.style-lightbox__close:hover,
.style-lightbox__nav:hover,
.style-lightbox__close:focus-visible,
.style-lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
}

.style-lightbox__close {
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1rem;
}

.style-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
}

.style-lightbox__nav--prev {
  left: 1rem;
}

.style-lightbox__nav--next {
  right: 1rem;
}

.style-lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 767px) {
  .style-album__head {
    flex-direction: column;
    gap: 0.5rem;
  }

  .style-lightbox__nav {
    top: auto;
    bottom: 3.75rem;
    transform: none;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .style-lightbox__nav--prev {
    left: 1rem;
  }

  .style-lightbox__nav--next {
    right: 1rem;
  }
}
