* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #081b29;
  color: #ededed;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 17, 41, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-title {
  margin: 0;
  font-size: 1.6rem;
  color: #0ef;
}

.home-link {
  text-decoration: none;
  color: #081b29;
  background: #0ef;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
}

.gallery-wrap {
  max-width: 1280px;
  margin: 28px auto 48px;
  padding: 0 12px;
}

.category {
  margin-bottom: 36px;
}

.category h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
  color: #ffffff;
}

.thumbnail-category .design-grid {
  display: grid;
  row-gap: 24px;
  column-gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.non-thumbnail-category .design-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  grid-auto-flow: row;
  align-items: start;
}

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

.pair-row.single {
  grid-template-columns: 1fr;
  max-width: calc((100% - 14px) / 2);
}

.design-card {
  width: 100%;
  overflow: visible;
}

.design-media {
  width: 100%;
  max-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.thumbnail-category .design-media {
  aspect-ratio: 16 / 10;
}

.non-thumbnail-category .design-media {
  height: clamp(460px, 40vw, 560px);
  max-height: none;
  border-radius: 12px;
  padding: 0;
  overflow: visible;
}

.design-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.35s ease;
  cursor: pointer;
  transform-origin: center center;
  border-radius: 12px;
}

.non-thumbnail-category .design-media img {
  object-fit: contain;
}

.design-media img:hover {
  transform: scale(1.01);
  z-index: 2;
  position: relative;
}

body.lightbox-open .page-header,
body.lightbox-open .gallery-wrap {
  filter: blur(8px);
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  z-index: 999;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  width: min(92vw, 1200px);
  height: min(88vh, 820px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxPop 0.3s ease;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@keyframes lightboxPop {
  from {
    transform: translateY(18px) scale(0.97);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .page-title {
    font-size: 1.2rem;
  }
  .pair-row {
    grid-template-columns: 1fr;
  }
  .pair-row.single {
    max-width: 100%;
  }
}
