.ks-gallery-stage {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: pan-y pinch-zoom;
}
.ks-gallery-frame { position: relative; min-width: 0; }
.ks-gallery-swipe-slide {
  position: absolute;
  inset: 0;
  background: #fff center / contain no-repeat;
  pointer-events: none;
  border-radius: inherit;
}
.ks-gallery-swipe-slide[hidden] { display: none; }
.is-swiping > [data-ks-gallery-current],
.is-swiping > img,
.is-swiping > .ks-gallery-swipe-slide { will-change: transform; }
.ks-lightbox-figure { position: relative; overflow: hidden; }
.ks-lightbox-figure.is-swiping { cursor: grabbing; }
.ks-gallery-nav {
  display: none;
  position: absolute;
  z-index: 1;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.7);
  color: var(--ks-heading-strong,#1f2937);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.ks-gallery-prev { left: 8px; }
.ks-gallery-next { right: 8px; }
@media (hover: hover) and (pointer: fine) {
  .ks-gallery-nav { display: grid; place-items: center; opacity: 0; pointer-events: none; }
  .ks-gallery-frame:hover .ks-gallery-nav,
  .ks-gallery-frame:focus-within .ks-gallery-nav { opacity: .7; pointer-events: auto; }
  .ks-gallery-nav:hover, .ks-gallery-nav:focus-visible { opacity: 1; background: rgba(255,255,255,.9); }
  .ks-gallery-nav:focus-visible { outline: 2px solid var(--ks-primary,#2563eb); outline-offset: 2px; }
}
.ks-gallery-stage .ks-gallery-zoom-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  visibility: hidden;
  transform: scale(3);
}
@media (any-hover: hover) and (any-pointer: fine) {
  .ks-gallery-stage.is-zoomed .ks-gallery-zoom-image { visibility: visible; }
}
.ks-gallery-stage img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #fff;
}
.ks-thumbs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  position: relative;
  min-width: 0;
  flex: 1;
  gap: 8px;
  margin-top: 10px;
}
.ks-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  scroll-snap-align: start;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.ks-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.ks-thumb.is-active,
.ks-thumb:hover,
.ks-thumb:focus-visible {
  border-color: var(--ks-primary,#2563eb);
  outline: none;
}

.ks-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
}
.ks-lightbox.is-open { display: flex; }
.ks-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: var(--ks-lightbox-backdrop,rgba(0,0,0,.88));
}
.ks-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1100px, 100%);
  height: 100%;
  padding: 56px 64px 72px;
  box-sizing: border-box;
}
.ks-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
}
.ks-lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  user-select: none;
  -webkit-user-drag: none;
}
.ks-lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: var(--ks-lightbox-caption,#f3f4f6);
  font-weight: 700;
  letter-spacing: .04em;
}
.ks-lightbox-close,
.ks-lightbox-nav {
  position: absolute;
  z-index: 2;
  border: 2px solid var(--ks-accent-soft,#dbeafe);
  background: var(--ks-primary,#2563eb);
  color: #fff;
  cursor: pointer;
}
.ks-lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
}
.ks-lightbox-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  line-height: 1;
}
.ks-lightbox-prev { left: 12px; }
.ks-lightbox-next { right: 12px; }
.ks-lightbox-close:hover,
.ks-lightbox-close:focus-visible,
.ks-lightbox-nav:hover,
.ks-lightbox-nav:focus-visible {
  background: var(--ks-accent-soft,#dbeafe);
  color: var(--ks-heading-strong,#111827);
  outline: none;
}
@media (max-width: 720px) {
  .ks-lightbox-dialog { padding: 64px 12px 64px; }
  .ks-lightbox-nav { width: 42px; height: 42px; }
}

/* Spravovatelné odkazy pod produktovou galerií. Barvy dodává téma. */
.ks-product-content-links{display:grid;gap:10px;margin-top:14px}.ks-product-content-link{display:flex;align-items:center;justify-content:center;gap:10px;min-height:62px;box-sizing:border-box;padding:9px 12px;border:1px solid var(--ks-product-link-border,#d0d0d0);border-radius:10px;background:var(--ks-product-link-background,#fff);color:var(--ks-product-link-color,inherit);font-size:.88rem;font-weight:800;text-align:center;text-decoration:none;overflow-wrap:anywhere}.ks-product-content-link:hover,.ks-product-content-link:focus-visible{background:var(--ks-product-link-hover,#f0f0f0);color:var(--ks-product-link-hover-color,inherit)}.ks-product-content-link:focus-visible{outline:2px solid currentColor;outline-offset:3px}.ks-product-content-link img{width:42px;height:42px;object-fit:contain;border-radius:0;flex-shrink:0}

/* Rozbalovací obsah konkrétního produktu */
.ks-product-advice{min-width:0}.ks-product-advice>summary{cursor:pointer;list-style:none}.ks-product-advice>summary::-webkit-details-marker{display:none}.ks-product-advice>summary::after{content:'+';font-size:1.3em}.ks-product-advice[open]>summary::after{content:'−'}.ks-product-advice-items{padding:8px 0;overflow-wrap:anywhere}.ks-product-advice-item{border-bottom:1px solid var(--ks-product-link-border,#ddd)}.ks-product-advice-item>summary{cursor:pointer;min-height:44px;box-sizing:border-box;padding:12px 8px;font-weight:700}.ks-product-advice-answer{padding:4px 12px 16px;white-space:pre-wrap;overflow-wrap:anywhere}.ks-product-advice-item>summary:focus-visible{outline:2px solid currentColor;outline-offset:2px}

.ks-thumbnail-strip{display:flex;align-items:center;gap:4px;min-width:0}
.ks-thumb-scroll{flex:0 0 32px;width:32px;height:44px;border:1px solid var(--ks-control-border,#bbb);border-radius:8px;background:#fff;color:var(--ks-primary,#2563eb);cursor:pointer;font-size:24px}
.ks-thumb-scroll[hidden]{display:none}.ks-thumb-scroll:disabled{opacity:.35;cursor:default}
.ks-thumb-scroll:focus-visible{outline:2px solid var(--ks-primary,#2563eb);outline-offset:1px}
.ks-lightbox-figure{touch-action:pan-y pinch-zoom;cursor:grab}
.ks-lightbox-figure img{max-height:calc(100dvh - 140px)}
@media(max-width:720px){.ks-thumb{width:56px;height:56px;flex-basis:56px}.ks-thumb-scroll{flex-basis:32px}.ks-lightbox-dialog{width:100%;padding:56px 8px}.ks-lightbox-figure img{max-height:calc(100dvh - 112px)}}
@media(prefers-reduced-motion:reduce){.ks-thumbs{scroll-behavior:auto}}
