.nail-gallery {
  padding: clamp(54px, 7vw, 100px) var(--gutter) 0;
  background: #080808;
  color: #f5f1eb;
}

.nail-gallery-inner {
  max-width: 1440px;
  margin-inline: auto;
}

.nail-gallery-heading {
  margin-bottom: 34px;
  text-align: center;
}

.nail-gallery-heading .eyebrow {
  color: #b7aa99;
}

.nail-gallery-heading h2 {
  margin: 12px 0 18px;
  font-family: var(--serif);
  font-size: clamp(64px, 7.5vw, 106px);
  font-weight: 400;
  line-height: 1;
}

.nail-gallery-title-partner {
  display: block;
  margin-bottom: 12px;
  color: #b7aa99;
  font-size: clamp(18px, 2.3vw, 30px);
  line-height: 1.3;
}

.nail-gallery-title-brand {
  display: block;
  font-size: clamp(27px, 4.6vw, 62px);
  line-height: 1.2;
  letter-spacing: 0.025em;
}

.nail-gallery-title-art {
  display: block;
  margin-top: 12px;
  color: #b7aa99;
  font-size: clamp(32px, 3.7vw, 48px);
}

.nail-gallery-heading h2 em {
  font-weight: 400;
}

.nail-gallery-heading > p {
  color: #c9c4bd;
  font-size: 13px;
}

.nail-gallery-heading .nail-gallery-brand {
  max-width: 540px;
  margin: 12px auto 0;
  color: #93908a;
  font-size: 14px;
  line-height: 1.7;
}

.nail-filters {
  display: flex;
  overflow-x: auto;
  justify-content: center;
  gap: clamp(18px, 2.8vw, 40px);
  border-bottom: 1px solid #333;
  scrollbar-width: thin;
  scrollbar-color: #555 #080808;
  -webkit-overflow-scrolling: touch;
}

.nail-filter {
  position: relative;
  min-height: 48px;
  flex: 0 0 auto;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: #99958f;
  cursor: pointer;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  touch-action: manipulation;
}

.nail-filter.is-active {
  color: #fff;
}

.nail-filter::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  pointer-events: none;
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.nail-filter.is-active::after {
  transform: scaleX(1);
}

.nail-gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px 14px;
  color: #a9a39a;
}

.nail-gallery-meta h3,
.nail-gallery-meta p,
.nail-gallery-meta > span {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.nail-collection + .nail-collection {
  margin-top: 32px;
}

.nail-photo-origin {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 7px;
  background: rgb(0 0 0 / 72%);
  color: #fff;
  font-size: 8px;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.nail-lightbox-info a {
  display: inline-block;
  padding-block: 8px;
  color: #b7aa99;
  font-size: 10px;
}

.nail-gallery-meta h3 {
  text-transform: uppercase;
}

.nail-gallery-note {
  max-width: 880px;
  margin-bottom: 16px;
  color: #cbc4b9;
  font-size: 14px;
  line-height: 1.7;
}

.nail-collection[data-collection="inspiration"] .nail-gallery-meta h3 {
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
}

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

.nail-photo {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #211e1b;
  color: #fff;
  touch-action: manipulation;
}

.nail-photo[hidden],
.nail-gallery-note[hidden],
.nail-lightbox[hidden] {
  display: none;
}

.nail-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--nail-position, center);
  transition: transform 400ms ease;
}

.nail-photo-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 36px 14px 14px;
  background: linear-gradient(transparent, rgb(0 0 0 / 65%));
  font-size: 10px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.nail-photo:focus-visible .nail-photo-caption {
  opacity: 1;
}

.nail-gallery-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 28px 40px;
  border-bottom: 1px solid #333;
}

.nail-gallery-footer > span {
  color: #b7aa99;
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
}

.nail-gallery-footer a {
  padding-block: 12px;
  color: #eee;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.nail-lightbox {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  background: rgb(5 5 5 / 98%);
  color: #fff;
}

.nail-lightbox-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nail-lightbox-brand {
  color: #b7aa99;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.nail-lightbox button {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid #48433e;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  touch-action: manipulation;
}

.nail-lightbox-stage {
  display: flex;
  min-height: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding-block: 12px;
}

.nail-lightbox-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  touch-action: pinch-zoom;
}

.nail-lightbox-bottom {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nail-lightbox-info {
  min-width: 0;
  text-align: center;
}

.nail-lightbox-info p {
  font-size: 12px;
  line-height: 1.5;
}

.nail-lightbox-info span {
  display: block;
  margin-top: 4px;
  color: #aaa;
  font-size: 10px;
}

@media (hover: hover) and (pointer: fine) {
  .nail-photo:hover img {
    transform: scale(1.025);
  }

  .nail-photo:hover .nail-photo-caption {
    opacity: 1;
  }
}

@media (max-width: 1000px) {
  .nail-filters {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .nail-gallery {
    padding-inline: 16px;
  }

  .nail-gallery-heading > p {
    font-size: 12px;
  }

  .nail-filters {
    gap: 24px;
  }

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

  .nail-gallery-footer {
    padding-right: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nail-photo img,
  .nail-photo-caption,
  .nail-filter::after {
    transition: none;
  }
}
