/* Локальная галерея — фотографии сохраняют исходные пропорции. */
.detail-media.product-gallery-media { display:block; height:auto!important; min-height:0; padding:14px; overflow:hidden; }
.product-gallery { width:100%; min-width:0; }
.product-gallery [hidden] { display:none!important; }
.gallery-mode-tabs { display:flex; padding:4px; gap:4px; border:1px solid #ded7cb; border-radius:16px; background:#f0ece5; margin-bottom:12px; }
.gallery-mode-tabs button { flex:1; min-width:0; min-height:42px; padding:9px 8px; border:0; border-radius:12px; font-size:12px; line-height:1.35; color:#635b50; background:transparent; cursor:pointer; }
.gallery-mode-tabs button[aria-pressed="true"] { background:#fffdf8; color:#5b441f; box-shadow:0 3px 12px #36290e0d,inset 0 0 0 1px #b08d4a40; }
.gallery-mainframe { position:relative; width:100%; height:380px; display:flex; align-items:center; justify-content:center; overflow:hidden; background:#fff; border-radius:22px; border:1px solid #e9e4dc; touch-action:pan-y; }
.gallery-mainframe .gallery-main-image { width:100%!important; height:100%!important; max-height:none!important; max-width:none!important; object-fit:contain; padding:12px; transform:none!important; border-radius:0; mix-blend-mode:normal; }
.gallery-arrow { position:absolute; top:50%; transform:translateY(-50%); width:42px; height:46px; padding:0; display:flex; align-items:center; justify-content:center; background:#fffdf5e8; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); border:1px solid #b08d4a55; border-radius:14px; color:#674d22; font-family:inherit; font-size:29px; cursor:pointer; box-shadow:0 4px 14px #3327180d; }
.gallery-previous { left:7px; } .gallery-next { right:7px; }
.gallery-photo-info { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:4px 12px; margin:12px 3px; font-size:12px; line-height:1.5; color:#655c4e; }
.gallery-photo-count { flex-shrink:0; font-size:11px; color:#76684f; font-variant-numeric:tabular-nums; }
.gallery-thumbnails { display:flex; gap:8px; max-width:100%; overflow-x:auto; padding:4px 2px 9px; scrollbar-width:thin; scrollbar-color:#c4b598 transparent; }
.gallery-thumbnails button { flex:0 0 64px; width:64px; height:68px; padding:4px; border:2px solid transparent; border-radius:14px; background:#fff; cursor:pointer; }
.gallery-thumbnails button[aria-pressed="true"] { border-color:#a58445; box-shadow:0 3px 10px #9d783322; background:#fffbf1; }
.gallery-thumbnails img { width:100%; height:100%; object-fit:contain; border-radius:8px; }
.gallery-scene-zone { height:380px; }
.gallery-scene-zone .mosque-scene { height:100%; width:100%; border-radius:22px; }
.gallery-mode-tabs button:focus-visible,.gallery-thumbnails button:focus-visible,.gallery-arrow:focus-visible,.gallery-mainframe:focus-visible { outline:3px solid #947039; outline-offset:3px; }
.product-card .photo-count-badge { position:absolute; right:12px; bottom:12px; padding:7px 10px; border:1px solid #fff; border-radius:12px; background:#fffdf5ed; color:#67522f; font-size:10px; font-weight:600; box-shadow:0 4px 13px #3024130b; pointer-events:none; }
@media(max-width:760px) {
  .detail-media.product-gallery-media { padding:10px; }
  .gallery-mainframe,.gallery-scene-zone { height:clamp(270px,85vw,375px); }
  .gallery-mode-tabs button { font-size:12px; min-height:44px; }
  .gallery-mainframe .gallery-main-image { padding:9px; }
  .gallery-photo-info { font-size:12px; }
  .gallery-thumbnails button { flex-basis:62px; width:62px; height:66px; }
}
@media(prefers-reduced-transparency:reduce) { .gallery-arrow { background:#fffdf5; backdrop-filter:none; -webkit-backdrop-filter:none; } }
@media(prefers-reduced-motion:reduce) { .product-gallery * { animation:none!important; transition:none!important; } }

/* Четыре постановочные подачи духов; изображение производителя остаётся отдельным. */
.editorial-gallery .gallery-mainframe { background:#f6efe5; }
.editorial-gallery .gallery-mainframe .gallery-main-image { padding:0; }
.gallery-original-zone { position:relative; display:flex; align-items:center; justify-content:center; overflow:hidden; border-radius:22px; border:1px solid #e9e4dc; background:#fffdf8; }
.gallery-original-zone #detail-image { width:100%!important; height:100%!important; max-width:none!important; max-height:none!important; object-fit:contain; padding:35px 22px 64px; }
.gallery-original-zone .detail-caption { top:15px; left:12px; right:12px; text-align:center; font-size:11px; }
.gallery-original-zone .perfume-spray { bottom:12px; z-index:1; }
