/* Single wreath / coffin gallery only. Geometry is fixed for image transitions. */
.pogost-product-page .pogost-product-gallery,
.pogost-product-page .pogost-product-gallery.has-thumbs{min-width:0}
.pogost-product-page .pogost-product-thumbs button{box-sizing:border-box;display:block;position:relative;aspect-ratio:1;width:80px;min-width:80px;max-width:80px;height:80px;overflow:hidden;padding:0;border:2px solid var(--line,#d5dce4);border-radius:12px;background:#fff}
.pogost-product-page .pogost-product-thumbs button.is-active{border-color:var(--brand,#3473BE)}
.pogost-product-page .pogost-product-thumbs button img{display:block;width:100%;height:100%;max-width:none;max-height:none;aspect-ratio:auto;object-fit:cover;object-position:center;padding:0;margin:0;border-radius:0}
.pogost-product-page .pogost-product-main,
.pogost-product-page .pogost-product-main.is-portrait,
.pogost-product-page .pogost-product-main.is-landscape{position:relative;width:100%;height:auto;min-height:0;aspect-ratio:1/1;overflow:hidden}
.pogost-coffin-product-page .pogost-product-main,
.pogost-coffin-product-page .pogost-product-main.is-portrait,
.pogost-coffin-product-page .pogost-product-main.is-landscape{aspect-ratio:4/3}
.pogost-product-page .pcp-main-open{appearance:none;position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;cursor:zoom-in;overflow:hidden}
.pogost-product-page .pcp-main-open>img,
.pogost-product-page .pogost-product-main.is-landscape .pcp-main-open>img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;object-position:center;margin:0;padding:0}
.pogost-product-page .pcp-main-open>img.pcp-fade-in{opacity:0;transition:opacity .55s ease-in-out}
.pogost-product-page .pcp-main-open>img.pcp-fade-in.is-visible{opacity:1}
.pogost-product-page .pcp-zoom-hint{position:absolute;bottom:12px;right:12px;z-index:3;padding:7px 10px;border-radius:10px;background:rgba(15,25,38,.8);color:#fff;font:600 12px/1.2 Inter,Arial,sans-serif;pointer-events:none}
.pcp-product-lightbox{position:fixed;inset:0;box-sizing:border-box;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#101822;color:#fff;overflow:hidden;z-index:1000001}
.pcp-product-lightbox::backdrop{background:rgba(8,14,22,.92)}
.pcp-product-lightbox__shell{box-sizing:border-box;width:min(100%,1480px);height:100%;min-height:0;margin:0 auto;padding:14px 18px 16px;display:flex;flex-direction:column;gap:10px}
.pcp-product-lightbox__head{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:48px;font:600 14px/1.4 Inter,Arial,sans-serif}
.pcp-product-lightbox__head button,.pcp-product-lightbox__arrow{appearance:none;display:grid;place-items:center;flex:0 0 auto;width:48px;height:48px;padding:0;border:1px solid rgba(255,255,255,.22);border-radius:14px;color:#fff;background:rgba(255,255,255,.1);cursor:pointer;font:400 34px/1 Arial,sans-serif}
.pcp-product-lightbox__head button:hover,.pcp-product-lightbox__arrow:hover{background:rgba(255,255,255,.23)}
.pcp-product-lightbox button:focus-visible,.pogost-product-page .pcp-main-open:focus-visible{outline:3px solid #8bc3ff;outline-offset:3px}
.pcp-product-lightbox__stage{position:relative;display:grid;grid-template-columns:50px minmax(0,1fr) 50px;align-items:center;gap:12px;flex:1 1 auto;min-height:0;min-width:0}
.pcp-product-lightbox__prev{grid-column:1}.pcp-product-lightbox__next{grid-column:3}
.pcp-product-lightbox__viewer{position:relative;grid-column:2;grid-row:1;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;touch-action:pan-y pinch-zoom}
.pcp-product-lightbox__photo{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;object-position:center;margin:0;opacity:1}
.pcp-product-lightbox__photo.pcp-fade-in{opacity:0;transition:opacity .55s ease-in-out}
.pcp-product-lightbox__photo.pcp-fade-in.is-visible{opacity:1}
.pcp-product-lightbox__foot{display:flex;justify-content:center;gap:12px;align-items:center;min-height:28px;font:500 13px/1.4 Inter,Arial,sans-serif}
.pcp-product-lightbox__foot [role=status]{color:#ffd5b8}
@media(max-width:820px){
 .pogost-product-page .pogost-product-main,.pogost-product-page .pogost-product-main.is-portrait,.pogost-product-page .pogost-product-main.is-landscape{height:auto;min-height:0;aspect-ratio:1/1}
 .pogost-coffin-product-page .pogost-product-main,.pogost-coffin-product-page .pogost-product-main.is-portrait,.pogost-coffin-product-page .pogost-product-main.is-landscape{aspect-ratio:4/3}
 .pogost-product-page .pogost-product-thumbs{align-items:center;min-height:90px;max-height:90px}
 .pogost-product-page .pogost-product-thumbs button{flex:0 0 74px;width:74px;min-width:74px;max-width:74px;height:74px}
}
@media(max-width:600px){
 .pcp-product-lightbox__shell{padding:8px 10px 18px;gap:7px}
 .pcp-product-lightbox__stage{display:block}
 .pcp-product-lightbox__viewer{width:100%;height:100%}
 .pcp-product-lightbox__arrow{position:absolute;top:50%;z-index:3;transform:translateY(-50%);width:44px;height:48px;background:rgba(10,20,30,.65)}
 .pcp-product-lightbox__prev{left:0}.pcp-product-lightbox__next{right:0}
}
@media(prefers-reduced-motion:reduce){
 .pogost-product-page .pcp-main-open>img.pcp-fade-in,.pcp-product-lightbox__photo.pcp-fade-in{transition:none}
}

/* 0.46.4 · Coffin thumbnail-specific override after the shared gallery rules.
   Wreath thumbnails intentionally retain their existing crop behaviour. */
.pogost-product-page.pogost-coffin-product-page .pogost-product-thumbs button img{
  box-sizing:border-box; width:100%; height:100%; max-width:none; max-height:none;
  object-fit:contain; object-position:center; padding:4px; margin:0;
  background:#f3f4f5;
}
/* The original shared @media rules fix coffin galleries to 4:3 regardless of
   selected source. Let the portrait-specific frame override those rules. */
.pogost-product-page.pogost-coffin-product-page .pogost-product-main.is-portrait{aspect-ratio:4/5}
.pogost-product-page.pogost-coffin-product-page .pogost-product-main.is-landscape{aspect-ratio:4/3}
