.malmsten-photo-media { position: relative; }
.malmsten-photo-open { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; padding: 0; background: transparent; cursor: zoom-in; color: #24333d; }
.malmsten-photo-open span { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 22px; box-shadow: 0 1px 6px #0002; }
.malmsten-photo-open:focus-visible { outline: 3px solid #24333d; outline-offset: -4px; }
.malmsten-photo-dialog { padding: 0; border: 0; border-radius: 16px; width: min(1100px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); background: #fbf9f3; color: #24333d; box-shadow: 0 24px 80px #0005; }
.malmsten-photo-dialog::backdrop { background: rgba(15,22,27,.78); }
.malmsten-photo-panel { padding: 16px; }
.malmsten-photo-panel header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.malmsten-photo-panel h2 { margin: 0; font-size: clamp(18px, 2.4vw, 25px); line-height: 1.3; }
.malmsten-photo-close { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #24333d30; border-radius: 50%; background: #fff; color: #24333d; font-size: 30px; line-height: 1; cursor: pointer; }
.malmsten-photo-close:focus-visible { outline: 3px solid #24333d; outline-offset: 3px; }
.malmsten-photo-large { display: block; width: 100%; height: min(70dvh, 760px); object-fit: contain; }
@media (max-width: 520px) { .malmsten-photo-panel { padding: 12px; } .malmsten-photo-large { height: 60dvh; } }

.malmsten-photo-details { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin: 0 0 12px; }
.malmsten-photo-details p { margin: 0; font-size: 16px; line-height: 1.45; }
.malmsten-photo-details .malmsten-photo-price { font-size: 20px; font-weight: 600; }
.malmsten-photo-details [hidden] { display: none; }

.malmsten-photo-thumbnail { display: block; position: relative; width: 72px; height: 54px; border-radius: 6px; overflow: hidden; background: #fff; border: 1px solid #24333d30; }
.katalogi-card__gallery .malmsten-photo-thumbnail img { width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 0; }
.malmsten-photo-thumbnail .malmsten-photo-open span { width: 20px; height: 20px; font-size: 16px; right: 2px; bottom: 2px; }
