.product-gallery .main-photo{aspect-ratio:auto;height:clamp(340px,54dvh,580px)}
.product-gallery .main-photo[data-model=veloster] img{transform:none}
.main-photo-stage,.lightbox-stage{position:relative}
.main-photo-stage .main-photo img,.lightbox-stage>img{transition:opacity .18s}
.is-photo-loading .main-photo img,.lightbox-stage.is-photo-loading>img,.is-photo-error .main-photo img,.lightbox-stage.is-photo-error>img{opacity:0}
.gallery-loader{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;background:linear-gradient(135deg,#f5f7f2,#fff);border-radius:6px;z-index:1}
.gallery-loader>span:first-child{width:30px;height:30px;border:2px solid #d9e4d5;border-top-color:#3c6844;border-radius:50%;animation:gallery-turn .8s linear infinite}
.gallery-loader[hidden],.gallery-error[hidden]{display:none}
.gallery-error{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;background:#f5f7f2;border-radius:6px;padding:24px;text-align:center;z-index:2}
.gallery-error p{font-size:13px;line-height:1.5;color:#465442;margin:0;max-width:230px}
.gallery-error .button{min-height:44px;font-size:12px;background:#fff}
.is-photo-error .gallery-step{z-index:3}
.thumbnails{overscroll-behavior-x:contain;scroll-padding-inline:2px}
.thumbnail:focus-visible{outline:2px solid #39764b;outline-offset:2px}
.thumbnail[aria-pressed=true]{border-color:#376144;background:#f2f7ed}
@keyframes gallery-turn{to{transform:rotate(360deg)}}
@media(max-width:800px){.product-gallery .main-photo{height:clamp(280px,45dvh,440px)}}
@media(max-width:520px){.product-gallery .main-photo{height:clamp(270px,42dvh,390px)}.thumbnails{gap:7px}.gallery-caption{min-height:42px;align-items:center;line-height:1.4}.gallery-caption>span:last-child{white-space:nowrap;flex-shrink:0}.gallery-loader>span:first-child{width:25px;height:25px}}
@media(prefers-reduced-motion:reduce){.gallery-loader>span:first-child{animation:none;border-color:#39764b}.main-photo-stage .main-photo img,.lightbox-stage>img{transition:none}}
