/* Product page picture gallery: thumbnails, hover zoom and enlarged view */
.pd .gallery img { width: 100%; height: 100%; border-radius: 0; background: transparent; }
.gallery { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; align-items: start; }
.gallery:not(:has(.gallery-thumbs)) { grid-template-columns: minmax(0, 1fr); }
.gallery-thumbs { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; scrollbar-width: thin; }
.thumb-btn { width: 78px; aspect-ratio: 1; padding: 0; border: 2px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; cursor: pointer; flex-shrink: 0; transition: border-color .15s; }
.thumb-btn img { object-fit: cover; }
.thumb-btn:hover { border-color: #b2ccff; }
.thumb-btn.active { border-color: var(--brand); }

.gallery-main { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #f2f4f7; cursor: zoom-in; border: 1px solid var(--line); }
.zoom-img { object-fit: contain; transition: transform .12s ease-out; will-change: transform; }
.gallery-main.zooming .zoom-img { transform: scale(2.3); }
.zoom-hint { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; background: rgba(16, 24, 40, .72); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; pointer-events: none; transition: opacity .2s; }
.gallery-main.zooming .zoom-hint { opacity: 0; }

@media (max-width: 700px) {
    .gallery { grid-template-columns: 1fr; }
    .gallery-thumbs { flex-direction: row; order: 2; max-height: none; overflow-x: auto; overflow-y: hidden; }
    .thumb-btn { width: 64px; }
    .zoom-hint { display: none; }
}

/* Enlarged view */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 12, 24, .92); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-img { max-width: 88vw; max-height: 86vh; object-fit: contain; cursor: zoom-in; transition: transform .15s ease-out; user-select: none; }
.lb-img.zoomed { transform: scale(2.2); cursor: zoom-out; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.lb-btn:hover { background: #fff; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; font-weight: 600; background: rgba(0, 0, 0, .45); padding: 5px 14px; border-radius: 999px; }