/* Dulce Bonito — Try Me On studio */
.tryon-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.tryon-hero {
  margin-bottom: 1.5rem;
  animation: tryon-fade-up 0.7s ease both;
}

.tryon-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.5rem;
}

.tryon-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, #6b4c8a);
  background: rgba(107, 76, 138, 0.1);
  border: 1px solid rgba(107, 76, 138, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.75rem;
  animation: tryon-shimmer 3s ease-in-out infinite;
}

@keyframes tryon-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tryon-shimmer {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(107, 76, 138, 0);
  }
  50% {
    box-shadow: 0 0 18px rgba(107, 76, 138, 0.25);
  }
}

.tryon-consent--card {
  position: relative;
  overflow: hidden;
  background: var(--surface-elevated, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 16px;
  padding: 1.35rem 1.35rem 1.25rem;
  margin-bottom: 1.5rem;
  animation: tryon-fade-up 0.75s 0.12s ease both;
}

.tryon-consent__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 120px;
  background: radial-gradient(ellipse at 50% 0%, rgba(107, 76, 138, 0.22), transparent 70%);
  pointer-events: none;
  animation: tryon-glow-pulse 4s ease-in-out infinite;
}

@keyframes tryon-glow-pulse {
  50% {
    opacity: 0.55;
  }
}

.tryon-consent__title {
  position: relative;
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.tryon-consent__lead {
  position: relative;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.82;
  text-transform: none;
}

.tryon-consent__row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.tryon-consent__check {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--accent, #6b4c8a);
  cursor: pointer;
}

.tryon-consent__text {
  text-transform: none;
  letter-spacing: normal;
}

.tryon-consent__text a {
  color: var(--accent-bright, #5eead4);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tryon-consent__actions {
  position: relative;
  margin-top: 1.15rem;
  display: flex;
  justify-content: flex-start;
}

.tryon-consent__btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tryon-consent__btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.tryon-consent__btn.is-ready {
  animation: tryon-btn-pop 0.45s ease;
}

@keyframes tryon-btn-pop {
  0% {
    transform: scale(0.96);
  }
  60% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

.tryon-consent[hidden] {
  display: none;
}

.tryon-consent--leaving {
  animation: tryon-consent-out 0.28s ease forwards;
}

@keyframes tryon-consent-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

#tryon-workspace:not([hidden]) {
  animation: tryon-fade-up 0.55s ease both;
}

.tryon-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 820px) {
  .tryon-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.tryon-mirror {
  border-radius: 16px;
  border: 3px solid rgba(201, 162, 126, 0.35);
  background: linear-gradient(180deg, rgba(18, 12, 28, 0.95) 0%, rgba(8, 6, 14, 0.98) 100%);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

html[data-theme="light"] .tryon-mirror {
  border-color: rgba(107, 0, 49, 0.22);
  background: linear-gradient(180deg, #f8f6fa 0%, #ece8f0 100%);
  box-shadow: 0 20px 48px rgba(26, 16, 36, 0.12);
}

.tryon-mirror__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--rose-gold, linear-gradient(105deg, #f5d5b8, #9a4d5a));
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tryon-mirror__label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a0a12;
}

.tryon-compare-btn {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(26, 16, 36, 0.2);
  background: rgba(255, 255, 255, 0.85);
  color: #1a0a12;
  cursor: pointer;
}

.tryon-compare-btn.is-off {
  background: rgba(26, 16, 36, 0.12);
  color: rgba(26, 16, 36, 0.65);
}

.tryon-stage-wrap {
  position: relative;
  background: #0a0810;
  overflow: hidden;
  border: none;
  border-radius: 0;
  min-height: 320px;
}

.tryon-pose-guide {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.45);
}

.tryon-pose-guide__svg {
  width: min(38%, 140px);
  height: auto;
  opacity: 0.55;
}

.tryon-pose-guide p {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tryon-overlay-badge {
  margin: 0;
  padding: 0.5rem 0.85rem;
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .tryon-overlay-badge {
  background: rgba(255, 255, 255, 0.6);
  border-top-color: rgba(26, 16, 36, 0.08);
}

.tryon-measures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.tryon-measures input[type="number"] {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
}

html[data-theme="light"] .tryon-measures input[type="number"] {
  background: #fff;
}

.tryon-panel-hint {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.tryon-product-name {
  margin: 0.65rem 0 0.75rem;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
}

.tryon-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.tryon-canvas {
  display: block;
  max-width: 100%;
  touch-action: none;
  cursor: grab;
  position: relative;
  z-index: 1;
}

.tryon-canvas:active {
  cursor: grabbing;
}

.tryon-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  pointer-events: none;
  background: rgba(10, 8, 16, 0.55);
}

.tryon-placeholder[hidden],
.tryon-stage.has-media .tryon-placeholder {
  display: none !important;
}

.tryon-live-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: #c0392b;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  animation: tryon-pulse 1.5s ease-in-out infinite;
}

@keyframes tryon-pulse {
  50% {
    opacity: 0.75;
  }
}

.tryon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tryon-panel {
  background: var(--surface-elevated, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  padding: 1rem;
}

.tryon-panel h2 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  opacity: 0.75;
}

.tryon-panel h2:not(:first-child) {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.1));
}

html[data-theme="light"] .tryon-panel {
  background: #fff;
  border-color: rgba(26, 16, 36, 0.1);
  box-shadow: 0 8px 28px rgba(26, 16, 36, 0.06);
}

html[data-theme="light"] .tryon-panel h2 {
  opacity: 0.9;
  color: #3d2a4a;
}

html[data-theme="light"] .tryon-panel h2:not(:first-child) {
  border-top-color: rgba(26, 16, 36, 0.08);
}

.tryon-control {
  margin-bottom: 0.75rem;
}

.tryon-control--mode,
.tryon-control--product {
  margin-bottom: 0;
}

.tryon-control label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  opacity: 0.85;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}

html[data-theme="light"] .tryon-control label {
  opacity: 1;
  color: #4a3a58;
}

.tryon-panel select,
.tryon-product-select {
  width: 100%;
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.18));
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  line-height: 1.35;
  min-height: 2.5rem;
  appearance: auto;
  cursor: pointer;
}

.tryon-panel select:focus,
.tryon-product-select:focus {
  outline: none;
  border-color: rgba(107, 76, 138, 0.55);
  box-shadow: 0 0 0 3px rgba(107, 76, 138, 0.15);
}

html[data-theme="light"] .tryon-panel select,
html[data-theme="light"] .tryon-product-select {
  background: #fff;
  border-color: rgba(26, 16, 36, 0.18);
  color: #1a1024;
}

html[data-theme="light"] .tryon-panel select option,
html[data-theme="light"] .tryon-product-select option {
  background: #fff;
  color: #1a1024;
}

.tryon-control input[type="range"] {
  width: 100%;
  display: block;
}

.tryon-segment-status {
  font-size: 0.78rem;
  line-height: 1.4;
  margin: 0.65rem 0 0;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: rgba(107, 76, 138, 0.12);
  border: 1px solid rgba(107, 76, 138, 0.22);
  text-transform: none;
}

html[data-theme="light"] .tryon-segment-status {
  background: rgba(107, 76, 138, 0.08);
  border-color: rgba(107, 76, 138, 0.2);
  color: #3d2a4a;
}

html[data-theme="light"] .tryon-segment-status.is-ready {
  background: rgba(16, 120, 80, 0.08);
  border-color: rgba(16, 120, 80, 0.22);
  color: #1a4d38;
}

.tryon-segment-status.is-ready {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.28);
}

.tryon-note {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.8;
  margin: 0.75rem 0 0;
  text-transform: none;
}

html[data-theme="light"] .tryon-consent--card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(26, 16, 36, 0.1);
}

html[data-theme="light"] .tryon-stage-wrap {
  border-color: rgba(26, 16, 36, 0.12);
}

/* Upload progress popup */
.tryon-upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
}

.tryon-upload-overlay[hidden] {
  display: none !important;
}

.tryon-upload-overlay:not([hidden]) {
  pointer-events: auto;
}

.tryon-upload-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 4, 14, 0.72);
  backdrop-filter: blur(10px);
  animation: tryon-upload-scrim-in 0.35s ease both;
}

html[data-theme="light"] .tryon-upload-overlay__scrim {
  background: rgba(26, 16, 36, 0.45);
}

@keyframes tryon-upload-scrim-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tryon-upload-overlay__card {
  position: relative;
  width: min(100%, 380px);
  padding: 1.65rem 1.5rem 1.35rem;
  border-radius: 20px;
  border: 1px solid rgba(196, 132, 255, 0.45);
  background:
    linear-gradient(145deg, rgba(32, 18, 48, 0.97) 0%, rgba(18, 10, 28, 0.98) 55%, rgba(40, 22, 58, 0.97) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 28px 70px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(139, 45, 120, 0.25);
  text-align: center;
  animation: tryon-upload-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-theme="light"] .tryon-upload-overlay__card {
  border-color: rgba(107, 76, 138, 0.35);
  background: linear-gradient(145deg, #fff 0%, #faf6ff 50%, #f3ebff 100%);
  box-shadow:
    0 0 0 1px rgba(107, 76, 138, 0.08) inset,
    0 24px 55px rgba(107, 76, 138, 0.18);
}

@keyframes tryon-upload-card-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tryon-upload-overlay__card.is-complete {
  animation: tryon-upload-card-success 0.5s ease both;
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.15) inset,
    0 28px 70px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(52, 211, 153, 0.2);
}

.tryon-upload-overlay__card.is-error {
  animation: tryon-upload-card-shake 0.45s ease;
  border-color: rgba(239, 68, 68, 0.55);
}

@keyframes tryon-upload-card-success {
  50% {
    transform: scale(1.03);
  }
}

@keyframes tryon-upload-card-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.tryon-upload-overlay__ring {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(196, 132, 255, 0.35), rgba(107, 76, 138, 0.12) 70%);
  display: grid;
  place-items: center;
  animation: tryon-upload-ring-pulse 2s ease-in-out infinite;
}

.tryon-upload-overlay__card.is-complete .tryon-upload-overlay__ring {
  background: radial-gradient(circle at 35% 30%, rgba(52, 211, 153, 0.35), rgba(16, 120, 80, 0.12) 70%);
  animation: none;
}

@keyframes tryon-upload-ring-pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(196, 132, 255, 0.08), 0 0 28px rgba(196, 132, 255, 0.25);
  }
}

.tryon-upload-overlay__icon,
.tryon-upload-overlay__check {
  width: 36px;
  height: 36px;
  color: #e9d5ff;
}

.tryon-upload-overlay__card.is-complete .tryon-upload-overlay__icon {
  display: none;
}

.tryon-upload-overlay__check {
  display: none;
  color: #6ee7b7;
}

.tryon-upload-overlay__card.is-complete .tryon-upload-overlay__check {
  display: block;
}

html[data-theme="light"] .tryon-upload-overlay__icon {
  color: #6b4c8a;
}

html[data-theme="light"] .tryon-upload-overlay__card.is-complete .tryon-upload-overlay__check {
  color: #0f6b4a;
}

.tryon-upload-overlay__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.tryon-upload-overlay__status {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: normal;
  min-height: 1.35em;
  transition: opacity 0.2s ease;
}

.tryon-upload-overlay__filename {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  letter-spacing: normal;
}

.tryon-upload-overlay__track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

html[data-theme="light"] .tryon-upload-overlay__track {
  background: rgba(26, 16, 36, 0.08);
}

.tryon-upload-overlay__bar {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b2d78 0%, #a855f7 45%, #f472b6 100%);
  background-size: 200% 100%;
  animation: tryon-upload-bar-shimmer 1.8s linear infinite;
  transition: width 0.25s ease-out;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}

.tryon-upload-overlay__card.is-complete .tryon-upload-overlay__bar {
  background: linear-gradient(90deg, #059669, #34d399);
  animation: none;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.4);
}

@keyframes tryon-upload-bar-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.tryon-upload-overlay__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 60%,
    transparent 100%
  );
  transform: translateX(-120%);
  animation: tryon-upload-shine 2.2s ease-in-out infinite;
  pointer-events: none;
}

.tryon-upload-overlay__card.is-complete .tryon-upload-overlay__shine {
  animation: none;
  opacity: 0;
}

@keyframes tryon-upload-shine {
  0% {
    transform: translateX(-120%);
  }
  55%,
  100% {
    transform: translateX(220%);
  }
}

.tryon-upload-overlay__pct {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #c4a8ff;
  text-transform: none;
}

html[data-theme="light"] .tryon-upload-overlay__pct {
  color: #6b4c8a;
}

.tryon-upload-overlay__privacy {
  margin: 0;
  font-size: 0.72rem;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: normal;
}
