/* ─── Ótica Virtual Try-On — Estilos ─────────────────────────────────────── */

/* Botão na página de produto */
.otica-tryon-wrap {
  display: inline-block;
  width: 100%;
}

.otica-tryon-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 14px 24px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  background: #111 !important;
  color: #fff !important;
  border: 2px solid #111 !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s !important;
  text-transform: none !important;
}
.otica-tryon-btn:hover {
  background: #333 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.otica-tryon-btn__icon {
  font-size: 18px;
}

/* ─── Overlay / Modal ────────────────────────────────────────────────────── */
.otica-tryon-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.otica-tryon-overlay.is-visible {
  opacity: 1;
}
.otica-tryon-overlay.is-visible .otica-tryon-modal {
  transform: translateY(0) scale(1);
}

.otica-tryon-modal {
  background: #0f0f14;
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Header */
.otica-tryon-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.otica-tryon-modal__title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.otica-tryon-modal__icon {
  font-size: 26px;
  line-height: 1;
}
.otica-tryon-modal__title strong {
  display: block;
  color: #f0f0f0;
  font-size: 16px;
  font-weight: 700;
}
.otica-tryon-modal__subtitle {
  display: block;
  color: #888;
  font-size: 13px;
  margin-top: 1px;
}
.otica-tryon-modal__close {
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #aaa;
  transition: background 0.2s, color 0.2s;
}
.otica-tryon-modal__close:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Body */
.otica-tryon-modal__body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  overflow: hidden;
  flex: 1;
}
@media (max-width: 640px) {
  .otica-tryon-modal__body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* Camera */
.otica-tryon-camera-wrap {
  position: relative;
  background: #080810;
  overflow: hidden;
  aspect-ratio: 4/3;
}
@media (max-width: 640px) {
  .otica-tryon-camera-wrap { aspect-ratio: 3/2; }
}

#otryonVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  display: none;
}
#otryonCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
  display: none;
  pointer-events: none;
}

/* Placeholder */
.otica-tryon-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  color: #666;
}
.otica-tryon-placeholder p {
  font-size: 14px;
  line-height: 1.6;
  color: #888;
  max-width: 260px;
}

.otica-tryon-btn-camera {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #c8f542;
  color: #0a0a0f;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.otica-tryon-btn-camera:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,245,66,0.3);
}

/* Status bar */
.otica-tryon-status {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}
.otica-tryon-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8f542;
  animation: otica-pulse 1.5s infinite;
}
@keyframes otica-pulse {
  0%,100% { opacity:1; }
  50% { opacity: 0.3; }
}

/* Controls sidebar */
.otica-tryon-controls {
  padding: 20px;
  background: #13131a;
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.otica-tryon-controls__product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07);
}
.otica-tryon-controls__product img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  background: #222;
}
.otica-tryon-controls__product strong {
  display: block;
  font-size: 13px;
  color: #e0e0e0;
  font-weight: 600;
  line-height: 1.3;
}
.otica-tryon-controls__product span {
  font-size: 12px;
  color: #c8f542;
  display: block;
  margin-top: 3px;
}

.otica-tryon-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.otica-tryon-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  font-weight: 500;
}

.otica-tryon-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.otica-tryon-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c8f542;
  cursor: pointer;
  transition: transform 0.1s;
}
.otica-tryon-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Tips */
.otica-tryon-tips {
  margin-top: auto;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.otica-tryon-tips p {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.otica-tryon-tips ul {
  margin: 0;
  padding-left: 14px;
}
.otica-tryon-tips li {
  font-size: 12px;
  color: #666;
  line-height: 1.7;
}

/* Loading */
.otica-tryon-loading {
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 999999;
}
.otica-tryon-loading p {
  color: #888;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.otica-tryon-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #c8f542;
  border-radius: 50%;
  animation: otica-spin 0.8s linear infinite;
}
@keyframes otica-spin {
  to { transform: rotate(360deg); }
}
