/* Responsive masonry gallery with each image's original aspect ratio. */
.gallery.masonry-ready {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  grid-auto-rows: 1px;
  column-gap: 12px !important;
  row-gap: 0 !important;
  align-items: start;
}

.gallery .photo-card {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 0 12px !important;
  align-self: start;
}

.gallery .photo-card > a {
  display: block;
}

.gallery .photo-card img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
}

@media (max-width: 900px) {
  .gallery.masonry-ready {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 9px !important;
  }

  .gallery .photo-card {
    margin-bottom: 9px !important;
  }
}

@media (max-width: 650px) {
  .gallery.masonry-ready {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 7px !important;
  }

  .gallery .photo-card {
    margin-bottom: 7px !important;
  }
}

/* Full browser width; natural image heights, with columns as no-JS fallback. */
.gallery-wrap{width:100%;max-width:none;margin:0;padding:0 clamp(10px,1.2vw,24px)}
.gallery-wrap .section-head{padding:20px 0 24px}
.gallery-page .hero{min-height:330px;padding:52px 22px}
.gallery-page .hero h1{font-size:clamp(36px,5vw,60px)}
.category-path{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:24px 0 18px;border-bottom:1px solid var(--line);font-size:14px}
.category-path>a{color:#46564d;padding:4px 0;overflow-wrap:anywhere}
.category-path>a:hover,.category-path>a[aria-current]{color:var(--accent-dark);text-decoration:underline;text-underline-offset:5px;font-weight:750}
.category-path>span{color:#89948e}
.view-more-wrap{text-align:center;padding:35px 0 50px}
.view-more-wrap p{color:var(--muted);min-height:1.6em}
[hidden]{display:none!important}
[aria-disabled=true]{opacity:.65;cursor:wait}
.photo-card .card-download{position:absolute;right:12px;bottom:12px;z-index:2;display:grid;place-items:center;width:40px;height:40px;background:#fff;color:var(--ink);border-radius:10px;opacity:0;box-shadow:0 2px 10px #0002}
.photo-card:hover .card-download,.photo-card:focus-within .card-download,.photo-card:focus-within .photo-overlay{opacity:1}
.photo-card .photo-overlay{padding-right:62px;pointer-events:none}
.gallery .photo-card img.image-unavailable{min-height:140px!important;background:var(--soft)}
a:focus-visible,button:focus-visible{outline:3px solid #16843e;outline-offset:3px}
@media(hover:none){.photo-card .card-download,.photo-card .photo-overlay{opacity:1}}
@media(max-width:380px){.header-actions{gap:7px}.site-header{gap:10px;padding:0 10px}.brand{font-size:14px}.brand-mark{width:30px;height:30px}.header-actions .button.small{padding:8px}.gallery-page .hero{padding:35px 12px}.hero-search input{padding:10px 6px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.photo-card img{transition:none}.photo-card:hover img{transform:none}}

.gallery .photo-card,.gallery .photo-card>a.photo-link,.gallery .photo-card>a:first-child{aspect-ratio:auto!important;height:auto!important;min-height:0!important;max-height:none!important}
.gallery .photo-card img{aspect-ratio:auto!important;height:auto!important;object-fit:contain!important}
@media(max-width:650px){#pimAdminBar{flex-wrap:wrap;font-size:12px;max-width:calc(100vw - 16px)}#pimAdminBar a{font-size:12px}}

/* Keep the download control centered despite generic gallery anchor styles. */
.gallery .photo-card > a.card-download{display:flex!important;align-items:center!important;justify-content:center!important;width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;line-height:1!important;background:#fff!important;color:#0c1512!important;text-decoration:none!important;box-sizing:border-box;flex-shrink:0}
.gallery .photo-card > a.card-download .download-symbol{display:block!important;width:22px!important;height:22px!important;min-width:22px;flex:none;fill:none!important;stroke:currentColor!important;pointer-events:none}

/* Editorial refinement for PixoraStock gallery, September 2026. */
.gallery-page .hero{min-height:370px;padding:58px 22px;background:linear-gradient(100deg,rgba(5,21,16,.94),rgba(5,21,16,.57)),url('/assets/hero.jpg') center/cover}
.gallery-page .hero-inner{max-width:780px}
.gallery-page .hero h1{max-width:720px;margin:15px auto 14px;font-size:clamp(39px,5vw,64px);line-height:1.08;letter-spacing:-.045em;text-wrap:balance}
.gallery-page .hero p{font-size:clamp(15px,1.65vw,18px);line-height:1.55;color:#edf4ef;margin-bottom:26px}
.gallery-page .hero-search{max-width:650px;border:1px solid #ffffff5c;border-radius:14px;box-shadow:0 18px 45px #0003}
.gallery-wrap{background:#fff}
.gallery-wrap .section-head{padding:27px 0 24px}
.gallery-wrap .section-head h1,.gallery-wrap .section-head h2{font-size:clamp(27px,2.6vw,38px);letter-spacing:-.035em}
.gallery-wrap .section-head p{font-size:13px;margin-top:5px}
.category-path{font-size:13px;gap:7px 11px;padding:18px 0;border-color:#e9edeb}
.category-path>a{color:#4f5b54;line-height:1.5}
.category-path>a[aria-current]{font-weight:850}
.gallery .photo-card{border-radius:12px!important;background:#f3f6f4;box-shadow:0 1px 3px #0c15120d;transition:box-shadow .2s,transform .2s}
.gallery .photo-card:hover{box-shadow:0 14px 35px #0c151226;transform:translateY(-2px)}
.gallery .photo-card .photo-overlay{background:linear-gradient(transparent,rgba(5,16,12,.78));padding-top:55px}
.gallery .photo-card .photo-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3;text-shadow:0 1px 2px #0008}
.detail-panel .image-description{margin-top:24px;padding:24px;border:1px solid var(--line);border-radius:16px;background:#fff}
.detail-panel .image-description h2{font-size:20px;letter-spacing:-.025em;margin:0 0 10px}
.detail-panel .image-description .description{font-size:15px;line-height:1.78;color:#34443a;margin:0 0 14px;white-space:normal}
.detail-panel .image-description a{color:var(--accent-dark);font-weight:750}
@media(max-width:650px){.gallery-page .hero{min-height:330px;padding:48px 18px}.gallery-page .hero h1{font-size:clamp(35px,9vw,48px)}.gallery-wrap .section-head{padding:21px 0 18px}.category-path{font-size:12px;gap:5px 8px}.gallery .photo-card:hover{transform:none}.detail-panel .image-description{padding:19px}}
@media(prefers-reduced-motion:reduce){.gallery .photo-card{transition:none}}

/* Category alignment: keep slash with the following link on wrapped rows. */
.category-path{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:4px 0;line-height:1.5;padding:19px 0}
.category-path>span{display:none}
.category-path>a{display:inline-flex;align-items:center;white-space:nowrap;overflow-wrap:normal;padding:4px 8px 4px 0;margin-right:3px}
.category-path>a:not(:first-of-type)::before{content:"/";color:#9aa6a0;font-weight:400;margin-right:10px;text-decoration:none}
.category-path>a:hover,.category-path>a[aria-current]{text-decoration-thickness:1px}
@media(max-width:650px){.category-path{gap:4px 0;padding:14px 0}.category-path>a{padding:4px 6px 4px 0;margin-right:1px}.category-path>a:not(:first-of-type)::before{margin-right:7px}}
