html[lang="ar"] .wolf-vto-modal,
html[lang="he"] .wolf-vto-modal {
  direction: rtl;
}

:root {
  --vto-background: #fff;
  --vto-text: #000000;
}

/* -------- PRODUCT FIX -------- */
.product > div:nth-child(2) {
  transform: none !important;
  animation: none !important;
  opacity: 1 !important;
}

/* ===== TRIGGER BUTTON (sits over the product image) ===== */
.wolf-vto-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  cursor: pointer;
}

.wolf-vto-btn::after {
  content: none;
}

/* ===== MODAL BACKDROP ===== */
.wolf-vto-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 10, 0.72);
  z-index: 99998;
  display: none;
  backdrop-filter: blur(4px);
}

.wolf-vto-backdrop.active {
  display: block;
}

/* ===== BODY SCROLL LOCK ===== */
body.vto-modal-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* ===== MODAL SHELL ===== */
.wolf-vto-modal {
  position: fixed;
  background: var(--vto-background);
  z-index: 99999;
  display: none;
  flex-direction: column;
  box-shadow: 0 40px 90px -24px rgba(0, 0, 0, 0.45);
  top: 18vh;
  color: var(--vto-text);
  width: 800px;
  padding: 0;
  border: 1px solid var(--vto-text);
  border-radius: 24px;
}

.wolf-vto-modal.active {
  display: flex;
}

/* ===== HEADER ===== */
/* Layout: [ contextual action (left) ] [ mode pill (center) ] [ close (right) ] */
.wolf-vto-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 16px 18px;
  flex-shrink: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--vto-text) 20%, transparent);
  border-radius: 24px 24px 0 0;
}

.wolf-vto-close {
  justify-self: end;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--vto-text) 10%, transparent);
  color: var(--vto-text);
  border: 1px solid var(--vto-text);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.wolf-vto-close:hover {
  opacity: 0.85;
}

.camera-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vto-mode-selector {
  justify-self: center;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--vto-text);
  border-radius: 999px;
}

.vto-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--vto-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vto-mode-label {
  white-space: nowrap;
}

.vto-mode-btn.active {
  background: var(--vto-text);
  color: var(--vto-background);
}

/* ===== BODY ===== */
.wolf-vto-body {
  display: grid;
  grid-template-columns: 50% 50%;
  flex: 1;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
}

/* Camera always left, info/variants always right on desktop */
.vto-right {
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.vto-left {
  order: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 20px;
  gap: 16px;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

/* ===== EYEBROW LABEL ===== */
.vto-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vto-text);
  margin: 0 0 4px;
}

/* ===== VARIANT GRID: 2-up wrap on desktop, horizontal scroll on mobile ===== */
.vto-variant-grid {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding-bottom: 14px;
  overflow-y: auto;
      border-bottom: 1px solid color-mix(in srgb, var(--vto-text) 20%, transparent);
}

.vto-variant {
  flex: 0 0 calc(25% - 5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-radius: 11px;
  padding: 11px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid color-mix(in srgb, var(--vto-text) 20%, transparent);
}

.vto-variant:hover {
  border: 1px solid var(--vto-text);
}

.vto-variant.active {
  border: 2px solid var(--vto-text);
  background: color-mix(in srgb, var(--vto-text) 10%, transparent);
}

.vto-variant img {
  max-height: 64px;
  object-fit: contain;
  border-radius: 8px;
  padding: 8px;
  width: 100%;
}

.vto-variant-info,
.vto-variant-info strong {
  text-align: center;
}

.vto-variant-info strong,
.vto-type {
  display: block;
  max-width: 90px;
  min-width: 90px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== HEADER ACTION BUTTON (switch camera / reupload) ===== */
.vto-switch-btn {
  cursor: pointer;
  border: none;
  align-items: center;
  justify-content: center;
  justify-self: start;
  background: transparent;
  gap: 7px;
}

.vto-switch-btn svg,
.vto-reupload-btn svg {
  border-radius: 50%;
  background: color-mix(in srgb, var(--vto-text) 10%, transparent);
  border: 1px solid var(--vto-text);
  fill: var(--vto-text);
  color: var(--vto-text);
  transition: opacity 0.2s ease;
  padding: 8px;
  width: 36px;
  height: 36px;
}

.vto-switch-btn:hover {
  opacity: 0.85;
}

/* ===== CAMERA / STAGE AREA ===== */
.vto-camera {
  flex: 1;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.vto-mode-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  color: var(--vto-background);
  background: var(--vto-text);
}

.vto-mode-container.active {
  display: block;
}

.vto-camera video,
.vto-camera canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

/* ===== HAND ORIENTATION WARNING ===== */
.vto-hand-warning {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 11, 13, 0.85);
  border: 1px solid rgba(201, 166, 97, 0.3);
  color: #f3eee4;
  padding: 11px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  z-index: 10;
  display: none;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

/* ===== UPLOAD MODE ===== */
.vto-upload-area {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  cursor: pointer;
  padding: 40px;
  border: 1px solid color-mix(in srgb, var(--vto-background) 40%, transparent);
  border-radius: 11px;
  transition: all 0.3s ease;
  width: 80%;
  max-width: 400px;
}

.vto-upload-area svg {
  margin: 0 auto;
}

#vto-uploaded-image,
#vto-upload-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hint injected below the upload instructions */
.vto-upload-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--vto-background) 10%, transparent);
  border: 1px solid var(--vto-background);
  border-radius: 10px;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.vto-upload-hint-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.vto-upload-hint-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vto-upload-hint-text strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--vto-background);
  line-height: 1.3;
}

.vto-upload-hint-text small {
  font-size: 11px;
  color: var(--vto-background);
  line-height: 1.4;
}

/* ===== FINGER SELECTOR ===== */
.vto-finger-selector {
  border-radius: 11px;
}

.finger-buttons {
  display: flex;
  gap: 8px;
}

.finger-btn {
  flex: 1;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  background: color-mix(in srgb, var(--vto-text) 10%, transparent);
  color: var(--vto-text);
  border: 1px solid color-mix(in srgb, var(--vto-text) 20%, transparent);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.finger-btn:hover {
  border: 1px solid var(--vto-text);
}

.finger-btn.active {
  border-color: var(--vto-text);
  background: var(--vto-text);
  color: var(--vto-background);
}

.finger-btn svg {
  fill: var(--vto-text);
}

.finger-btn.active svg {
  fill: var(--vto-background);
}

/* ===== ADD TO CART ===== */
#vto-add-to-cart-desktop {
  margin-top: auto;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 1px solid var(--vto-text);
  color: var(--vto-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

#vto-add-to-cart-desktop:hover {
  background: var(--vto-text);
  color: var(--vto-background);
}

#vto-add-to-cart,
#vto-add-to-bottom {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--vto-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

#vto-add-to-bottom svg {
  width: 20px;
  height: 20px;
  stroke: var(--vto-text);
}

/* ===== LOADING SPINNER ===== */
.vto-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--vto-background);
  font-size: 14px;
  z-index: 10;
}

.vto-loading-spinner {
  border: 3px solid var(--vto-background);
  border-top: 3px solid var(--vto-text);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
  margin: 0 auto 11px;
}

.desktop-only {
  display: block;
  margin: 0;
}

.mobile-only {
  display: none;
}

.vto-footer {
  text-align: center;
  text-align: center;
  color: #000;
  opacity: 0.7;
}

.vto-footer a {
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid;
  padding-bottom: 3px;
  text-align: center;
  color: #000;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .wolf-vto-body {
    grid-template-columns: 1fr;
  }

  .vto-left {
    height: auto;
    max-height: 40vh;
    overflow-y: auto;
    display: block;
  }
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }

  .wolf-vto-modal {
    top: 0;
    transform: none;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 24px;
  }

  #wolf-vto-button {
    top: 11px !important;
    right: 11px !important;
    width: 36px;
    height: 36px;
    font-size: 14px !important;
    border-radius: 50%;
    padding: 0;
  }

  #wolf-vto-button span:last-child {
    display: none;
  }

  .vto-mode-label {
    display: none;
  }

  .wolf-vto-header {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    padding: 10px 8px;
    z-index: 50;
    background: transparent;
    border: none;
  }

  .wolf-vto-close,
  .vto-switch-btn {
    padding: 0;
    width: 36px;
    height: 36px;
  }

  .vto-mobile-header .vto-eyebrow {
    text-align: center;
    flex: 1;
    font-size: 11px;
    letter-spacing: 2px;
  }

  .vto-mobile-header .vto-eyebrow strong {
    font-weight: 700;
  }

  #vto-mobile-header-label {
    display: block !important;
    flex: 1;
    text-align: center;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--vto-text);
  }

  #vto-powered-footer {
    display: block;
    text-align: center;
    margin-top: 12px;
  }

  .vto-switch-btn svg {
    color: var(--vto-text);
  }

  .vto-upload-area {
    top: 40%;
  }

  .vto-mode-selector {
    width: 100%;
    max-width: 220px;
    background: color-mix(in srgb, var(--vto-text) 10%, transparent);
    border-color: var(--vto-text);
    backdrop-filter: blur(10px);
  }

  .vto-mode-btn {
    color: var(--vto-text);
  }

  .vto-mode-btn.active {
    background: var(--vto-text);
    color: var(--vto-background);
  }

  .wolf-vto-body {
    display: flex;
    flex-direction: column-reverse;
    position: relative;
  }

  .vto-left {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    height: auto;
    padding: 16px 16px 0 16px;
    background: var(--vto-background);
    border: 1px solid var(--vto-text);
    border-radius: 22px 22px 0 0;
  }

  .vto-eyebrow {
    text-align: center;
    margin: 0;
  }

  .vto-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }

  .vto-add-to-bottom-mobile svg {
    transition: transform 0.3s ease;
  }

  .vto-left.is-collapsed {
    max-height: 70px;
    overflow: hidden;
  }

  .vto-left.is-collapsed .vto-add-to-bottom-mobile svg {
    transform: rotate(180deg);
  }

  /* Switch the variant grid back to a horizontal scroller on mobile */
  .vto-variant-grid {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
  }

  .vto-variant {
    flex: 0 0 auto;
    width: 124px;
  }

  .vto-right {
    position: fixed;
    inset: 0;
    padding: 0;
    z-index: 1;
  }

  .vto-camera {
    position: absolute;
    inset: 0;
    border-radius: 0;
    height: 100%;
    width: 100%;
  }

  .finger-btn {
    min-width: 46px;
    font-size: 11px;
    padding: 8px 6px;
  }

  .finger-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Finger selector on mobile — vertical rail, icon-only, floating over the camera */
  .vto-finger-selector {
    position: fixed;
    right: 10px;
    top: 38%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--vto-background);
    border-color: var(--vto-text);
    backdrop-filter: blur(10px);
    padding: 8px 6px;
    border-radius: 14px;
    max-width: 56px;
  }

  .vto-finger-selector > div:first-child {
    display: none;
  }

  .vto-finger-selector .finger-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .vto-finger-selector .finger-btn {
    min-width: auto;
    width: 40px;
    height: 40px;
    padding: 8px;
  }

  .vto-finger-selector .finger-btn p {
    display: none;
  }

  .finger-btn.active svg {
    fill: var(--vto-background);
  }
}

/* ===== Virtual Try-On button over product image ===== */

media-gallery {
  position: relative !important;
  display: block !important;
}

#wolf-vto-button {
  z-index: 2 !important;
  background-color: rgba(255, 255, 255, 0.85);
  color: #1c1a16;
  font-size: 11px;
  font-weight: 600;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  top: 11px;
  right: 11px;
  position: absolute;
  backdrop-filter: blur(10px);
  min-height: auto;
  min-width: auto;
  line-height: 1;
  border: 1px solid rgba(156, 122, 60, 0.35);
}

#wolf-vto-button svg {
  width: 20px;
  height: 20px;
}

#wolf-vto-button::before {
  content: none !important;
}

.wolf-card-tryon-btn {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(156, 122, 60, 0.35);
  cursor: pointer;
  width: 36px;
  height: 36px;
  pointer-events: auto;
  border-radius: 60px;
}

.wolf-card-tryon-btn svg {
  width: 20px;
  height: 20px;
  margin: auto;
  display: block;
}

#wolf-card-vto-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
}

#wolf-card-vto-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wolf-card-vto-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.card__heading a:after {
  content: none !important;
}
