/* ==========================================================================
   SILKY FUSION — VIRTUAL HAIRPIECE & WIG TRY-ON STUDIO
   Interactive hair try-on workstation with product showcase and split slider
   ========================================================================== */

:root {
  --tryon-gold: #c9a96e;
  --tryon-gold-light: #e5c98d;
  --tryon-gold-glow: rgba(201, 169, 110, 0.28);
  --tryon-bg-dark: #0a0a0a;
  --tryon-card-bg: rgba(18, 18, 18, 0.85);
  --tryon-border: rgba(255, 255, 255, 0.08);
  --tryon-border-gold: rgba(201, 169, 110, 0.35);
  --split-pos: 50%;
}

.tryon-page-wrapper {
  max-width: 1520px;
  margin: 0 auto;
  padding: 20px 24px 80px;
  color: #f3f3f3;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* --------------------------------------------------------------------------
   HERO BANNER
   -------------------------------------------------------------------------- */
.tryon-hero {
  text-align: center;
  padding: 36px 24px 28px;
  background: radial-gradient(circle at 50% 20%, rgba(201, 169, 110, 0.16) 0%, rgba(13, 13, 17, 0.98) 75%), #0d0d11 !important;
  border: 1px solid rgba(201, 169, 110, 0.25) !important;
  border-radius: 16px;
  margin-bottom: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.tryon-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid var(--tryon-border-gold);
  color: var(--tryon-gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tryon-hero h1 {
  font-family: var(--font-heading, "Cinzel", "Playfair Display", serif);
  font-size: clamp(26px, 3.6vw, 42px);
  color: #ffffff;
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.tryon-hero h1 span {
  color: var(--tryon-gold);
  background: linear-gradient(135deg, #dfb76c, #c9a96e, #f2ddad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tryon-hero p {
  color: rgba(255, 255, 255, 0.82) !important;
  max-width: 780px;
  margin: 0 auto 16px;
  font-size: 15px;
  line-height: 1.6;
}

.tryon-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.tryon-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tryon-trust-item svg {
  color: var(--tryon-gold);
}

/* --------------------------------------------------------------------------
   TOP BAR: UPLOAD & SAMPLE FACES
   -------------------------------------------------------------------------- */
.tryon-topbar {
  background: var(--tryon-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--tryon-border);
  border-radius: 18px;
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tryon-upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-tryon-upload {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #c9a96e, #a88448);
  color: #0a0a0a;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(201, 169, 110, 0.25);
}

.btn-tryon-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 110, 0.4);
  background: linear-gradient(135deg, #dfb76c, #b99252);
}

.btn-tryon-webcam {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tryon-webcam:hover {
  border-color: var(--tryon-gold);
  color: var(--tryon-gold);
  background: rgba(201, 169, 110, 0.08);
}

.tryon-sample-models {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tryon-sample-models-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tryon-model-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tryon-model-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--tryon-border);
  border-radius: 999px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tryon-model-pill img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tryon-model-pill:hover {
  border-color: rgba(201, 169, 110, 0.5);
  color: #fff;
}

.tryon-model-pill.active {
  border-color: var(--tryon-gold);
  background: rgba(201, 169, 110, 0.12);
  color: var(--tryon-gold-light);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(201, 169, 110, 0.2);
}

.tryon-model-pill.active img {
  border-color: var(--tryon-gold);
}

/* --------------------------------------------------------------------------
   MAIN WORKSPACE GRID: LEFT CATALOG & RIGHT STUDIO STAGE
   -------------------------------------------------------------------------- */
.tryon-workspace {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1100px) {
  .tryon-workspace {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   LEFT COLUMN: PRODUCTS SHOWCASE
   -------------------------------------------------------------------------- */
.tryon-catalog {
  background: var(--tryon-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--tryon-border);
  border-radius: 20px;
  padding: 22px;
  position: sticky;
  top: 90px;
}

.tryon-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tryon-border);
}

.tryon-catalog-header h3 {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: 18px;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tryon-catalog-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--tryon-gold);
  background: rgba(201, 169, 110, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--tryon-border-gold);
}

/* Filter pills */
.tryon-filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.tryon-filter-tabs::-webkit-scrollbar {
  display: none;
}

.tryon-filter-btn {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--tryon-border);
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tryon-filter-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.tryon-filter-btn.active {
  background: var(--tryon-gold);
  border-color: var(--tryon-gold);
  color: #0a0a0a;
  font-weight: 700;
}

/* Product list container */
.tryon-product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 720px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--tryon-border-gold) transparent;
}

.tryon-product-list::-webkit-scrollbar {
  width: 5px;
}
.tryon-product-list::-webkit-scrollbar-track {
  background: transparent;
}
.tryon-product-list::-webkit-scrollbar-thumb {
  background: var(--tryon-border-gold);
  border-radius: 999px;
}

/* Individual Product Card */
.tryon-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(25, 25, 25, 0.65);
  border: 1px solid var(--tryon-border);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.tryon-card:hover {
  border-color: rgba(201, 169, 110, 0.4);
  background: rgba(35, 35, 35, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.tryon-card.active {
  border-color: var(--tryon-gold);
  background: rgba(201, 169, 110, 0.08);
  box-shadow: 0 0 0 1px var(--tryon-gold), 0 8px 24px rgba(201, 169, 110, 0.15);
}

.tryon-card-thumb-wrap {
  width: 88px;
  height: 104px;
  border-radius: 10px;
  overflow: hidden;
  background: #0d0d0d;
  position: relative;
}

.tryon-card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tryon-card:hover .tryon-card-thumb-wrap img {
  transform: scale(1.05);
}

.tryon-card-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: var(--tryon-gold-light);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 0.5px solid var(--tryon-border-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tryon-card-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tryon-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.35;
}

.tryon-card-specs {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
  margin-bottom: 8px;
}

.tryon-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tryon-card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--tryon-gold);
}

.btn-card-apply {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--tryon-border-gold);
  background: rgba(201, 169, 110, 0.1);
  color: var(--tryon-gold-light);
  transition: all 0.2s ease;
}

.tryon-card:hover .btn-card-apply {
  background: var(--tryon-gold);
  color: #0a0a0a;
}

.tryon-card.active .btn-card-apply {
  background: var(--tryon-gold);
  color: #0a0a0a;
}

/* --------------------------------------------------------------------------
   RIGHT COLUMN: STUDIO STAGE & BEFORE/AFTER SLIDER
   -------------------------------------------------------------------------- */
.tryon-stage {
  background: var(--tryon-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--tryon-border);
  border-radius: 20px;
  padding: 24px;
}

.tryon-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--tryon-border);
}

.tryon-stage-meta h2 {
  font-family: var(--font-heading, "Cinzel", serif);
  font-size: clamp(16px, 2.2vw, 22px);
  color: #fff;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tryon-stage-meta p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.tryon-view-modes {
  display: flex;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--tryon-border);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}

.tryon-view-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tryon-view-btn:hover {
  color: #fff;
}

.tryon-view-btn.active {
  background: rgba(201, 169, 110, 0.18);
  color: var(--tryon-gold-light);
  border: 1px solid var(--tryon-border-gold);
}

/* --------------------------------------------------------------------------
   INTERACTIVE COMPARISON FRAME (BEFORE / AFTER SPLIT SLIDER)
   -------------------------------------------------------------------------- */
.tryon-canvas-container {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 20px;
  aspect-ratio: 4 / 5;
  background: #000000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
  border: 1px solid var(--tryon-border-gold);
  user-select: none;
  touch-action: none;
}

/* Base Before Layer */
.tryon-layer-before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tryon-layer-before canvas,
.tryon-layer-before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay After Layer with Hair Added */
.tryon-layer-after {
  position: absolute;
  inset: 0;
  width: var(--split-pos, 50%);
  height: 100%;
  overflow: hidden;
  z-index: 5;
  transition: width 0.05s ease-out;
}

.tryon-layer-after-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Set explicitly by JS to match parent container px */
.tryon-layer-after-inner canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badges on the canvas */
.tryon-pill-badge {
  position: absolute;
  top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  z-index: 10;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tryon-pill-before {
  left: 14px;
  background: rgba(10, 10, 10, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.tryon-pill-after {
  right: 14px;
  background: rgba(201, 169, 110, 0.85);
  border: 1px solid #fff;
  color: #0a0a0a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

/* Split Handle Divider */
.tryon-split-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split-pos, 50%);
  width: 44px;
  margin-left: -22px;
  cursor: ew-resize;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.tryon-split-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(201, 169, 110, 0.2), #c9a96e 25%, #e5c98d 50%, #c9a96e 75%, rgba(201, 169, 110, 0.2));
  box-shadow: 0 0 10px rgba(201, 169, 110, 0.8);
}

.tryon-split-knob {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #111111;
  border: 2px solid var(--tryon-gold);
  box-shadow: 0 0 20px rgba(201, 169, 110, 0.6), 0 4px 12px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tryon-gold-light);
  font-size: 13px;
  transition: transform 0.15s ease;
}

.tryon-split-handle:hover .tryon-split-knob,
.tryon-split-handle.dragging .tryon-split-knob {
  transform: scale(1.12);
  background: #1a1a1a;
  box-shadow: 0 0 25px rgba(201, 169, 110, 0.85);
}

/* Side-by-side mode view */
.tryon-side-by-side-wrap {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.tryon-side-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #000;
  border: 1px solid var(--tryon-border);
}

.tryon-side-card canvas,
.tryon-side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Full After mode */
.mode-full-after .tryon-layer-after {
  width: 100% !important;
}
.mode-full-after .tryon-split-handle,
.mode-full-after .tryon-pill-before {
  display: none !important;
}

/* Drag hint overlay */
.tryon-drag-hint {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   FINE-TUNING CONTROLS & COLOR PICKER
   -------------------------------------------------------------------------- */
.tryon-tuning-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--tryon-border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 22px;
}

.tryon-tuning-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tryon-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Color Palette */
.tryon-color-palette {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.tryon-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}

.tryon-color-swatch:hover {
  transform: scale(1.15);
}

.tryon-color-swatch.active {
  border-color: var(--tryon-gold);
  transform: scale(1.18);
  box-shadow: 0 0 10px rgba(201, 169, 110, 0.5);
}

.tryon-color-swatch.active::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Sliders Grid */
.tryon-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 20px;
}

.tryon-slider-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tryon-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.tryon-slider-label span:last-child {
  color: var(--tryon-gold);
  font-weight: 600;
}

.tryon-slider-item input[type="range"] {
  width: 100%;
  accent-color: var(--tryon-gold);
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.btn-reset-tuning {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.btn-reset-tuning:hover {
  color: var(--tryon-gold);
}

/* --------------------------------------------------------------------------
   BOTTOM ACTION BAR & CONVERSION BUTTONS
   -------------------------------------------------------------------------- */
.tryon-actions-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--tryon-border);
}

.tryon-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tryon-btn-download:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.tryon-conversion-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tryon-btn-video {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 169, 110, 0.12);
  border: 1px solid var(--tryon-border-gold);
  color: var(--tryon-gold-light);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tryon-btn-video:hover {
  background: var(--tryon-gold);
  color: #0a0a0a;
}

.tryon-btn-order {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #c9a96e, #a88448);
  color: #0a0a0a;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(201, 169, 110, 0.3);
}

.tryon-btn-order:hover {
  background: linear-gradient(135deg, #dfb76c, #b99252);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(201, 169, 110, 0.45);
}

/* Webcam Modal */
.tryon-webcam-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tryon-webcam-card {
  background: #141414;
  border: 1px solid var(--tryon-border-gold);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  padding: 24px;
  text-align: center;
}

.tryon-webcam-video-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin: 16px 0;
}

.tryon-webcam-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror */
}



/* ==========================================================================
   GLOBAL DARK ATELIER THEME OVERRIDES FOR TRY-ON STUDIO
   ========================================================================== */
body.tryon-body {
  background-color: #0b0b0e !important;
  color: #f3f3f3 !important;
  min-height: 100vh;
}

body.tryon-body .navbar {
  background: rgba(13, 13, 17, 0.96) !important;
  border-bottom: 1px solid rgba(201, 169, 110, 0.25) !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(12px) !important;
}

body.tryon-body .nav-link {
  color: #e5e5e8 !important;
}

body.tryon-body .nav-link:hover,
body.tryon-body .nav-link.active {
  color: var(--tryon-gold) !important;
}

body.tryon-body .navbar-logo .logo-img {
  filter: brightness(0) invert(1) !important;
}

body.tryon-body .btn-signin {
  background: linear-gradient(135deg, #c9a96e, #a88448) !important;
  color: #0e0e11 !important;
  font-weight: 700 !important;
  border: none !important;
}

body.tryon-body .nav-action-btn svg {
  stroke: #ffffff !important;
}

body.tryon-body .cart-count {
  background: #c9a96e !important;
  color: #0b0b0e !important;
}

body.tryon-body footer.footer {
  background: #08080a !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   STAGE HEADER & AI GENERATE CONTROLS
   ========================================================================== */
.tryon-stage-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-generate-ai-pulse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #d4af37, #aa8238);
  color: #0d0d10;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.38);
  animation: pulseAiGlow 2.4s infinite ease-in-out;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-generate-ai-pulse svg {
  animation: rotateSparkle 6s linear infinite;
}

@keyframes rotateSparkle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulseAiGlow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.7);
    transform: scale(1.025);
  }
}

.btn-generate-ai-pulse:hover {
  background: linear-gradient(135deg, #f3cf65, #c9a96e);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.85);
  transform: translateY(-2px) scale(1.04);
}

.btn-generate-ai-pulse:active {
  transform: translateY(0) scale(0.98);
}

.btn-generate-ai-pulse.generating {
  opacity: 0.75;
  pointer-events: none;
  filter: grayscale(0.2);
}

/* ==========================================================================
   FACE DETECTION WARNING
   ========================================================================== */
.tryon-face-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(234, 153, 34, 0.12);
  border: 1px solid rgba(234, 153, 34, 0.38);
  color: #ffd899;
  padding: 12px 18px;
  border-radius: 12px;
  margin: 14px 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: fadeInNotice 0.35s ease;
}

.tryon-face-warning svg {
  flex-shrink: 0;
}

@keyframes fadeInNotice {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   AI GENERATION LOADING OVERLAY
   ========================================================================== */
.tryon-ai-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 14, 0.92);
  backdrop-filter: blur(10px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  animation: fadeInNotice 0.3s ease;
}

.tryon-ai-loading-box {
  background: #141418;
  border: 1px solid rgba(201, 169, 110, 0.35);
  padding: 34px 40px;
  border-radius: 18px;
  text-align: center;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.ai-loading-spinner {
  width: 52px;
  height: 52px;
  border: 3.5px solid rgba(201, 169, 110, 0.2);
  border-top-color: #c9a96e;
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spinLoader 0.9s linear infinite;
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.tryon-ai-loading-box h4 {
  font-family: var(--font-heading, "Cinzel", "Playfair Display", serif);
  color: #ffffff;
  font-size: 20px;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}

.tryon-ai-loading-box p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.ai-progress-bar {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.ai-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b28a47, #e5c98d, #f9ecd1);
  border-radius: 999px;
  transition: width 0.35s ease;
}


/* Keep chatbot panel minimized on try-on studio page so canvas is 100% visible */
body.tryon-body #sf-chatbot-panel:not(.active) {
  display: none !important;
}

/* Interactive Drag & Canvas Controls */
.tryon-stage-canvas {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.tryon-stage-canvas.canvas-dragging {
  cursor: grabbing !important;
}

/* Smooth Luxury Toast */
#tryon-toast {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 20px rgba(201, 169, 110, 0.25) !important;
  backdrop-filter: blur(10px) !important;
}
