/* Keep photo behavior independent of the site's card and entrance animations. */
.ks-photo-trigger,
.ks-photo-trigger img { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.ks-catalog .ks-card a.ks-image-link.ks-photo-trigger { cursor: zoom-in; }
.ks-photo-trigger:focus-visible { outline: 2px solid #b7232d; outline-offset: 4px; }

#ks-product-photo-viewer {
  width: min(940px, calc(100vw - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #25332e;
  overflow: visible;
  font-family: Arial, sans-serif;
}
#ks-product-photo-viewer:not([open]) { display: none; }
#ks-product-photo-viewer::backdrop {
  background: rgba(14, 20, 18, .78);
  animation: ks-photo-backdrop-in 200ms ease-out both;
}
#ks-product-photo-viewer .ks-photo-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(780px, calc(100vh - 32px));
  height: min(780px, calc(100svh - 32px));
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .26);
  animation: ks-photo-panel-in 200ms ease-out both;
}
#ks-product-photo-viewer .ks-photo-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px 12px 22px;
  border-bottom: 1px solid #000;
  background: rgba(20, 28, 24, .055);
}
#ks-product-photo-viewer .ks-photo-caption { flex: 1; min-width: 0; padding-top: 4px; }
#ks-product-photo-viewer [data-photo-title] {
  margin: 0;
  font: 600 19px/1.35 Arial, sans-serif;
  color: #25332e;
  text-transform: none;
  overflow-wrap: anywhere;
}
#ks-product-photo-viewer [data-photo-code] { margin: 6px 0 0; font: 400 13px/1.4 Arial, sans-serif; color: #6d7771; }
#ks-product-photo-viewer [hidden] { display: none !important; }
#ks-product-photo-viewer .ks-photo-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f3f2;
  color: #25332e;
  font: 400 30px/1 Arial, sans-serif;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 150ms ease, color 150ms ease;
}
#ks-product-photo-viewer .ks-photo-close:hover { background: #e6ebe8; color: #ad242d; }
#ks-product-photo-viewer .ks-photo-close:focus-visible { outline: 2px solid #b7232d; outline-offset: 3px; }
#ks-product-photo-viewer .ks-photo-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 8px;
  background: rgba(20, 28, 24, .055);
}
#ks-product-photo-viewer [data-photo-image],
#ks-product-photo-viewer [data-photo-visual] {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  max-width: 100%;
  margin: 0;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  opacity: 1;
  filter: none;
  transform: none;
  mix-blend-mode: multiply;
}
#ks-product-photo-viewer .ks-photo-status { position: absolute; inset: auto 24px; margin: 0; text-align: center; font: 400 15px/1.55 Arial, sans-serif; color: #69766f; }
#ks-product-photo-viewer.is-closing .ks-photo-panel { animation: ks-photo-panel-out 180ms ease-in both; }
#ks-product-photo-viewer.is-closing::backdrop { animation: ks-photo-backdrop-out 180ms ease-in both; }
@keyframes ks-photo-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ks-photo-panel-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px); } }
@keyframes ks-photo-backdrop-in { from { background-color: rgba(14, 20, 18, 0); } to { background-color: rgba(14, 20, 18, .78); } }
@keyframes ks-photo-backdrop-out { from { background-color: rgba(14, 20, 18, .78); } to { background-color: rgba(14, 20, 18, 0); } }
@media (max-width: 600px) {
  #ks-product-photo-viewer { width: calc(100vw - 20px); }
  #ks-product-photo-viewer .ks-photo-panel { height: calc(100vh - 24px); height: calc(100svh - 24px); }
  #ks-product-photo-viewer .ks-photo-header { gap: 8px; padding: 12px 10px 10px 16px; }
  #ks-product-photo-viewer [data-photo-title] { font-size: 16px; }
  #ks-product-photo-viewer .ks-photo-stage { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #ks-product-photo-viewer .ks-photo-panel,
  #ks-product-photo-viewer::backdrop { animation: none !important; }
  #ks-product-photo-viewer .ks-photo-close { transition: none; }
}
