/*
 * Product image inspection lens for Label Abha Jindal.
 * The photograph remains colour-neutral; optical warmth is confined to the rim.
 */
.product-detail-hero .product-viewer-stage.ajll-stage {
  isolation: isolate;
}

.product-detail-hero .ajll-lens {
  --ajll-size: clamp(150px, 12vw, 170px);
  --ajll-x: 0px;
  --ajll-y: 0px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: var(--ajll-size);
  height: var(--ajll-size);
  overflow: hidden;
  pointer-events: none;
  border: 1px solid rgba(255, 249, 233, 0.76);
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(var(--ajll-x), var(--ajll-y), 0);
  scale: 0.965;
  transform-origin: center;
  transition:
    opacity 105ms ease-out,
    scale 145ms cubic-bezier(0.22, 0.72, 0.24, 1);
  box-shadow:
    0 10px 28px rgba(48, 28, 20, 0.18),
    0 2px 8px rgba(75, 45, 27, 0.12),
    0 0 0 1px rgba(125, 88, 46, 0.22),
    0 0 14px rgba(255, 236, 192, var(--ajll-glow-alpha, 0.12)),
    inset 0 0 0 1px
      rgba(255, 253, 244, var(--ajll-rim-lift-alpha, 0.54)),
    inset 0 0 12px rgba(73, 41, 27, 0.1);
  contain: layout paint style;
  will-change: transform, scale, opacity;
}

.product-detail-hero .ajll-lens.is-visible {
  opacity: 1;
  scale: 1;
}

.product-detail-hero .ajll-lens__canvas,
.product-detail-hero .ajll-lens__rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.product-detail-hero .ajll-lens__canvas {
  display: block;
}

.product-detail-hero .ajll-lens__rim {
  overflow: hidden;
  box-shadow:
    inset 5px 6px 10px rgba(255, 252, 240, 0.08),
    inset -7px -8px 12px rgba(69, 38, 26, 0.1);
}

.product-detail-hero .ajll-lens__rim::before,
.product-detail-hero .ajll-lens__rim::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  -webkit-mask: radial-gradient(
    circle,
    transparent calc(100% - 11px),
    #000 calc(100% - 9px)
  );
  mask: radial-gradient(
    circle,
    transparent calc(100% - 11px),
    #000 calc(100% - 9px)
  );
}

.product-detail-hero .ajll-lens__rim::before {
  background: conic-gradient(
    from 15deg,
    rgba(255, 247, 217, 0.9) 0deg,
    rgba(208, 173, 112, 0.38) 44deg,
    rgba(102, 208, 224, 0.22) 104deg,
    rgba(255, 255, 255, 0.05) 177deg,
    rgba(226, 116, 139, 0.18) 235deg,
    rgba(255, 249, 229, 0.7) 315deg,
    rgba(255, 247, 217, 0.9) 360deg
  );
  opacity: 0.62;
}

.product-detail-hero .ajll-lens__rim::after {
  background:
    radial-gradient(
      ellipse at 28% 9%,
      rgba(255, 255, 249, 0.92) 0 3%,
      rgba(255, 239, 196, 0.35) 9%,
      transparent 26%
    ),
    radial-gradient(
      ellipse at 78% 90%,
      rgba(138, 218, 227, 0.2),
      transparent 24%
    );
  opacity: 0.86;
}

/* The existing pointer tilt is paused only while exact lens mapping is active. */
.product-detail-hero
  .product-viewer-stage.ajll-active
  .product-viewer-open
  > img,
.product-detail-hero
  .product-viewer-stage.ajll-active
  picture.aj-product-picture.ajll-source-active
  > img {
  transform: none !important;
  transition: none !important;
}

.product-detail-hero .product-viewer-stage.ajll-static-viewer {
  position: relative;
}

.product-detail-hero .ajll-open-fallback {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 250, 238, 0.7);
  border-radius: 999px;
  background: rgba(75, 18, 38, 0.88);
  color: #fffaf0;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(34, 12, 19, 0.22);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    transform 120ms ease;
}

.product-detail-hero .ajll-open-fallback:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 235, 190, 0.92);
  background: rgba(94, 20, 45, 0.94);
}

.product-detail-hero .ajll-open-fallback:focus-visible,
.ajll-dialog button:focus-visible {
  outline: 2px solid #e3bd78;
  outline-offset: 3px;
}

.product-detail-hero .ajll-open-fallback > span {
  font-size: 17px;
  font-weight: 400;
}

.product-detail-hero .ajll-open-fallback > strong {
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ajll-dialog {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  width: min(94vw, 1180px);
  height: min(92vh, 900px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(227, 189, 120, 0.5);
  border-radius: 14px;
  background: #180d12;
  color: #fffaf0;
  box-shadow: 0 28px 90px rgba(17, 5, 10, 0.5);
}

.ajll-dialog:not([open]) {
  display: none;
}

.ajll-dialog[open] {
  display: block;
}

.ajll-dialog::backdrop {
  background: rgba(15, 7, 10, 0.84);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.ajll-dialog__shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.ajll-dialog__header,
.ajll-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 17px;
  background: #2f111c;
}

.ajll-dialog__header {
  border-bottom: 1px solid rgba(227, 189, 120, 0.23);
}

.ajll-dialog__footer {
  border-top: 1px solid rgba(227, 189, 120, 0.23);
}

.ajll-dialog__header p,
.ajll-dialog__header h2 {
  margin: 0;
}

.ajll-dialog__header p {
  color: #d5ad72;
  font-family: Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ajll-dialog__header h2 {
  max-width: min(72vw, 760px);
  overflow: hidden;
  color: #fffaf0;
  font-size: clamp(16px, 2vw, 23px);
  font-weight: 400;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ajll-dialog__close,
.ajll-dialog__controls button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(227, 189, 120, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #fffaf0;
  font: inherit;
  cursor: pointer;
}

.ajll-dialog__close {
  padding: 0;
  font-size: 26px;
  line-height: 1;
}

.ajll-dialog__controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ajll-dialog__controls button:disabled {
  cursor: default;
  opacity: 0.42;
}

.ajll-dialog__canvas {
  position: relative;
  display: grid;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  place-items: center;
  background: #0f090c;
  touch-action: none;
  user-select: none;
}

.ajll-dialog__canvas.is-zoomed {
  cursor: grab;
}

.ajll-dialog__canvas.is-zoomed:active {
  cursor: grabbing;
}

.ajll-dialog__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform-origin: center;
  will-change: transform;
  -webkit-user-drag: none;
  user-select: none;
}

.ajll-dialog__zoom {
  min-width: 42px;
  color: #e7c98f;
  font-family: Arial, sans-serif;
  font-size: 13px;
  text-align: center;
}

@media (hover: none), (pointer: coarse) {
  .product-detail-hero .ajll-lens {
    display: none !important;
  }

  .product-detail-hero .ajll-open-fallback {
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .product-detail-hero .ajll-open-fallback {
    right: 10px;
    bottom: 10px;
    min-width: 44px;
    padding-inline: 11px;
  }

  .product-detail-hero .ajll-open-fallback > strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .ajll-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .ajll-dialog__header,
  .ajll-dialog__footer {
    padding: 12px;
  }

  .ajll-dialog__header h2 {
    max-width: 68vw;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-detail-hero .ajll-lens {
    transition: opacity 60ms linear;
  }

  .product-detail-hero .ajll-open-fallback {
    transition: none;
  }
}
