/* WooCommerce single-product full-screen photo gallery */
.single-product .cc-product-photo-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 12px 0 4px;
  padding: 0.7rem 1rem;
  min-height: 44px;
  border: 1px solid #8b0815;
  border-radius: 8px;
  background: #8b0815;
  color: #fff;
  font: 600 14px/1.25 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}
.single-product .cc-product-photo-open:hover { background: #640612; }
.single-product .cc-product-photo-open:focus-visible {
  outline: 3px solid #0180af;
  outline-offset: 3px;
}
.single-product .woocommerce-product-gallery__image img,
.single-product .woocommerce-product-gallery__image a,
.single-product .wc-block-product-gallery-large-image img {
  cursor: zoom-in;
}
.cc-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: rgba(8, 10, 14, 0.98);
  color: white;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  isolation: isolate;
}
.cc-gallery-lightbox[hidden],
.cc-gallery-lightbox [hidden] { display: none !important; }
.cc-gallery-lightbox * { box-sizing: border-box; }
.cc-gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px max(12px, env(safe-area-inset-right));
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.cc-gallery-counter { min-width: 85px; letter-spacing: 0.02em; }
.cc-gallery-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cc-gallery-control,
.cc-gallery-arrow,
.cc-gallery-thumb {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.cc-gallery-control {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  background: #24252b;
  color: #fff;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-size: 23px;
  line-height: 1;
}
.cc-gallery-control:hover,
.cc-gallery-arrow:hover { background: #40434b; }
.cc-gallery-control:focus-visible,
.cc-gallery-arrow:focus-visible,
.cc-gallery-thumb:focus-visible {
  outline: 3px solid #47b8ff;
  outline-offset: 3px;
}
.cc-gallery-reset { font-size: 13px; font-weight: 600; }
.cc-gallery-zoom-label {
  min-width: 46px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cc-gallery-close { font-size: 30px; }
.cc-gallery-viewport {
  min-width: 0;
  min-height: 0;
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.cc-gallery-viewport.cc-gallery-is-zoomed { cursor: grab; }
.cc-gallery-viewport.cc-gallery-is-zoomed:active { cursor: grabbing; }
.cc-gallery-full-image {
  display: block;
  flex: 0 1 auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  width: auto;
  height: auto;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform;
}
.cc-gallery-error { padding: 24px; color: #fff; text-align: center; }
.cc-gallery-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  min-width: 45px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(20, 20, 23, 0.8);
  color: #fff;
  font-size: 43px;
  font-weight: 300;
  line-height: 1;
}
.cc-gallery-previous { left: 12px; }
.cc-gallery-next { right: 12px; }
.cc-gallery-thumbnails {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  justify-content: safe center;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 10px max(12px, env(safe-area-inset-right))
           max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  scrollbar-width: thin;
}
.cc-gallery-thumb {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #292a30;
  padding: 2px;
  overflow: hidden;
}
.cc-gallery-thumb-active { border-color: #fff; }
.cc-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}
@media (max-width: 600px) {
  .cc-gallery-toolbar { padding: 8px; gap: 6px; }
  .cc-gallery-controls { gap: 4px; }
  .cc-gallery-control { min-width: 38px; height: 42px; padding: 0 9px; }
  .cc-gallery-zoom-label { min-width: 40px; font-size: 12px; }
  .cc-gallery-reset { font-size: 12px; }
  .cc-gallery-previous { left: 4px; }
  .cc-gallery-next { right: 4px; }
  .cc-gallery-arrow { min-width: 40px; height: 56px; }
  .cc-gallery-thumb { flex-basis: 56px; width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-gallery-lightbox *,
  .cc-gallery-lightbox *::before,
  .cc-gallery-lightbox *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
