/* =========================================================
   Eesh Creatives - Gallery page (gallery.html)
   Save as css/gallery.css (loaded after css/style.css)
   ========================================================= */

.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

/* ---------- Page title band ---------- */
.page-hero {
  background: #0a0a0a;
  color: #fff;
  padding: 96px 0 72px;
}
.page-hero h1 {
  font-size: clamp(40px, 7vw, 84px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -2px;
  margin: 0;
  color: #fff;
}

/* ---------- Category chips ---------- */
.filter-bar {
  position: sticky;
  top: var(--hdr-h, 64px);
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.filter-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}
.chip:hover {
  border-color: var(--fg);
}
.chip.on {
  background: var(--inv);
  color: var(--invfg);
  border-color: var(--inv);
}
.chip:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* ---------- Gallery (masonry columns: each design keeps its own shape) ---------- */
.g-block {
  padding: 72px 0 8px;
}
.g-block[hidden] {
  display: none;
}
.block-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.block-head h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 36px);
  letter-spacing: -0.8px;
}
.g-grid {
  column-count: 4;
  column-gap: 20px;
}
@media (max-width: 1024px) {
  .g-grid {
    column-count: 3;
  }
}
.g-item {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  break-inside: avoid;
  font-family: inherit;
  text-align: left;
}
.g-item > img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 140px;
  transition: transform 0.5s ease;
}
.g-item:hover > img {
  transform: scale(1.04);
}
.g-item:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 3px;
}

/* Hover layer: title + zoom icon */
.g-over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.g-item:hover .g-over,
.g-item:focus-visible .g-over {
  opacity: 1;
}
.g-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.g-zoom {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #0a0a0a;
  display: grid;
  place-items: center;
  transition:
    background 0.3s,
    color 0.3s;
}
.g-item:hover .g-zoom {
  background: #ee155e;
  color: #fff;
}
@media (hover: none) {
  .g-over {
    opacity: 1;
  }
}

.g-cta {
  padding: 56px 0 96px;
  text-align: center;
}

/* ---------- Popup viewer ---------- */
body.lb-open {
  overflow: hidden;
}
.lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #0a0a0a;
  color: #fff;
}
.lb[hidden] {
  display: none;
}
.lb,
.lb * {
  cursor: auto !important;
}
.lb button {
  cursor: pointer !important;
}
.lb-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.lb-count {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #d2d2d2;
}
.lb-tools {
  display: flex;
  gap: 10px;
}
.lb-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #444;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  transition:
    background 0.25s,
    border-color 0.25s,
    opacity 0.25s;
}
.lb-btn:hover {
  background: #ee155e;
  border-color: #ee155e;
}
.lb-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.lb-btn:disabled {
  opacity: 0.35;
}
.lb-btn:disabled:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: #444;
}
.lb-btn[hidden] {
  display: none;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 54px;
  height: 54px;
}
.lb-nav.prev {
  left: 16px;
}
.lb-nav.next {
  right: 16px;
}

.lb-stage {
  position: absolute;
  inset: 70px 84px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.lb-stage img {
  flex: none;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center;
  transition: opacity 0.25s ease;
  cursor: zoom-in !important;
}
.lb-stage.zoomed img {
  cursor: grab !important;
}
.lb-stage img.loading {
  opacity: 0.2;
}

.lb-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  margin: 0;
  padding: 0 90px;
  text-align: center;
  font-size: 15px;
  color: #d2d2d2;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .page-hero {
    padding: 64px 0 48px;
  }
  .g-block {
    padding: 48px 0 0;
  }
  .g-grid {
    column-count: 2;
    column-gap: 12px;
  }
  .g-item {
    margin-bottom: 12px;
    border-radius: 12px;
  }
  .g-over {
    padding: 10px;
  }
  .g-title {
    display: none;
  }
  .g-zoom {
    width: 34px;
    height: 34px;
    margin-left: auto;
  }
  .filter-bar .wrap {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .chip {
    flex: none;
  }
  .lb-stage {
    inset: 64px 0 84px;
  }
  .lb-nav {
    width: 44px;
    height: 44px;
    top: auto;
    bottom: 18px;
    transform: none;
  }
  .lb-nav.prev {
    left: 14px;
  }
  .lb-nav.next {
    right: 14px;
  }
  .lb-cap {
    bottom: 28px;
    padding: 0 70px;
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-item > img,
  .g-over,
  .lb-stage img {
    transition: none;
  }
}
