/* Demo page — extends landing.css (wt-page) */

.demo-page {
  background: #fff;
  overflow-x: hidden;
  width: 100%;
  --demo-sticky-footer-h: 84px;
  padding-bottom: var(--demo-sticky-footer-h);
}

.demo-main,
.demo-layout,
.demo-card,
.demo-step,
.demo-result-wrap {
  max-width: 100%;
  min-width: 0;
}

.demo-main > .wt-wrap {
  max-width: 1140px;
  margin: 0 auto;
}

.demo-nav-active {
  color: var(--wt-brand) !important;
}

.demo-main {
  padding: calc(var(--wt-header-height) + 24px) 0 72px;
}

.demo-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.demo-hero-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.demo-hero-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.demo-hero h1 {
  margin: 0;
  font-size: clamp(36px, 4.5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: var(--wt-dark);
}

.demo-hero h1 em {
  font-style: normal;
  color: var(--wt-brand);
}

.demo-lead {
  margin: 14px 0 0;
  color: var(--wt-muted);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 500;
  max-width: 560px;
}

.demo-shop {
  margin: 12px 0 0;
  color: var(--wt-muted);
  font-size: 15px;
}

.demo-shop strong {
  color: var(--wt-dark);
}

.demo-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.demo-rate.ok {
  color: var(--wt-muted);
}

.demo-rate.ok strong {
  color: var(--wt-brand);
}

.demo-rate.exhausted {
  color: #b45309;
}

.demo-header-shell {
  width: 100%;
}

.demo-header-rate {
  display: none;
  flex-shrink: 0;
  margin-left: auto;
}

@media (min-width: 641px) {
  .demo-header-rate {
    display: none !important;
  }

  .demo-hero-rate {
    display: inline-flex;
  }

  .demo-mobile-title {
    display: none !important;
  }

  .demo-hero {
    display: flex !important;
  }

  .demo-page .demo-cta-banner {
    margin-bottom: 24px;
  }
}

@media (min-width: 961px) {
  .demo-main {
    padding: 40px 0 64px;
  }

  .demo-hero {
    margin-bottom: 28px;
  }

  .demo-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    flex-direction: unset !important;
    align-items: stretch !important;
    gap: 28px;
  }

  .demo-card--input,
  .demo-card--result {
    order: unset !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .demo-card--input .demo-step:last-of-type {
    margin-bottom: 20px;
  }

  .demo-card--result > .demo-step-head {
    flex-shrink: 0;
    margin-bottom: 16px;
  }

  .demo-result-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 320px;
  }

  .demo-preview {
    min-height: 300px;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }

  .demo-preview.has-image {
    min-height: 300px;
    max-height: none;
    padding: 12px 12px 88px;
    overflow: visible;
  }

  .demo-card--result .demo-preview.has-image img,
  .demo-card--result .demo-preview img {
    max-height: min(460px, 62vh);
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  .demo-wigs-carousel.cols-1 .demo-wig {
    scroll-snap-align: center;
  }

  .demo-upload {
    padding: 24px 20px;
  }

  .demo-trust {
    margin-top: auto;
  }
}

.demo-mobile-title {
  display: none;
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: var(--wt-dark);
}

.demo-mobile-title em {
  font-style: normal;
  color: var(--wt-brand);
}

.demo-rate-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
  vertical-align: middle;
}

.demo-rate-pill.ok {
  color: #6b7280;
}

.demo-rate-pill.ok b {
  color: var(--wt-brand);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}

.demo-rate-pill.exhausted {
  background: #fff7ed;
  color: #b45309;
  font-size: 11px;
  gap: 5px;
}

.demo-hero-rate {
  display: inline-flex;
}

.demo-cta-banner {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  margin-bottom: 24px;
  padding: 22px 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #6342d1 0%, #5234b8 55%, #3f2a9e 100%);
  color: #fff;
  box-shadow: 0 20px 48px rgba(76, 37, 199, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.demo-cta-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  font-size: 22px;
}

.demo-cta-banner-copy {
  flex: 1;
  min-width: 0;
}

.demo-cta-banner-copy strong {
  display: block;
  font-size: clamp(18px, 2.5vw, 22px);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.demo-cta-banner-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
}

.demo-cta-banner-copy em {
  font-style: normal;
  font-weight: 800;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}

.demo-cta-banner-action {
  flex-shrink: 0;
  align-self: center;
  margin-left: auto;
}

.demo-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--wt-brand);
  border: 0;
  white-space: nowrap;
  font-weight: 800;
  padding: 13px 22px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.18);
  text-decoration: none;
  font-size: 15px;
}

.demo-cta-btn:hover {
  background: #f8f5ff;
  color: var(--wt-brand-dark);
}

.demo-result-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.demo-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--wt-line);
  background: #fff;
  color: var(--wt-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.demo-reset-btn:hover {
  border-color: #c4b5fd;
  color: var(--wt-brand);
  background: var(--wt-soft);
}

.demo-reset-btn i {
  font-size: 12px;
}

@media (max-width: 900px) {
  .demo-cta-banner {
    flex-wrap: wrap;
  }

  .demo-cta-banner-action {
    width: 100%;
    margin-left: 0;
  }

  .demo-cta-btn {
    width: 100%;
  }
}

.demo-library {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--wt-line);
}

.demo-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.demo-library-head strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.demo-library-head strong i {
  color: var(--wt-brand);
}

.demo-library-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-lib-nav {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--wt-line);
  background: #fff;
  color: var(--wt-dark);
  cursor: pointer;
  flex-shrink: 0;
}

.demo-lib-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.demo-library-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  flex: 1;
  padding-bottom: 4px;
  scroll-behavior: smooth;
}

.demo-lib-thumb {
  border: 2px solid var(--wt-line);
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  width: 88px;
  flex-shrink: 0;
  cursor: pointer;
  text-align: center;
}

.demo-lib-thumb.on {
  border-color: var(--wt-brand);
  box-shadow: 0 0 0 2px rgba(99, 66, 209, 0.15);
}

.demo-lib-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.demo-lib-thumb-media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f0ff;
}

.demo-lib-thumb span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--wt-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-gate {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #c4b5fd;
  background: #faf8ff;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.demo-gate > i {
  font-size: 22px;
  color: var(--wt-brand);
}

.demo-gate strong {
  display: block;
  margin-bottom: 2px;
}

.demo-gate span {
  font-size: 13px;
  color: var(--wt-muted);
}

.demo-gate .wt-btn {
  margin-left: auto;
  padding: 10px 16px !important;
  font-size: 14px !important;
}

.demo-auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}

.demo-auth-backdrop[hidden] {
  display: none;
}

.demo-auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}

.demo-auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--wt-muted);
}

.demo-auth-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.demo-auth-sub {
  margin: 0 0 18px;
  color: var(--wt-muted);
  font-size: 14px;
}

.demo-auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.demo-auth-tabs button {
  flex: 1;
  border: 1px solid var(--wt-line);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.demo-auth-tabs button.on {
  background: var(--wt-soft);
  border-color: #c4b5fd;
  color: var(--wt-brand-dark);
}

.demo-auth-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 13px;
}

.demo-auth-submit {
  width: 100%;
  margin-top: 4px;
}

.demo-badge {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.demo-badge.live {
  background: #ecfdf5;
  color: #087443;
}

.demo-badge.mock {
  background: #fff6eb;
  color: #b54708;
}

.demo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.demo-card {
  background: #fff;
  border: 1px solid var(--wt-line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.06);
}

.demo-step {
  margin-bottom: 28px;
}

.demo-step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.demo-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--wt-soft);
  color: var(--wt-brand-dark);
  font-weight: 800;
  font-size: 15px;
}

.demo-step-title {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-step-title i {
  color: var(--wt-brand);
}

.demo-step-sub {
  color: var(--wt-muted);
  font-size: 14px;
  margin-top: 4px;
}

.demo-loading {
  grid-column: 1 / -1;
  color: var(--wt-muted);
  padding: 24px;
  text-align: center;
  font-weight: 600;
}

.demo-loading i {
  color: var(--wt-brand);
  margin-right: 8px;
}

.demo-step-head-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.demo-step-head-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.demo-wig-view-toggle {
  display: inline-flex;
  border: 1px solid var(--wt-line);
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
}

.demo-wig-view-toggle button {
  border: 0;
  background: transparent;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
  color: var(--wt-muted);
  line-height: 0;
  display: grid;
  place-items: center;
}

.demo-wig-view-toggle button svg {
  display: block;
  width: 18px;
  height: 18px;
}

.demo-wig-view-toggle button.on {
  background: var(--wt-brand);
  color: #fff;
}

.demo-wig-filters {
  display: block;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--wt-line);
  border-radius: 14px;
  background: #fff;
  overflow: visible;
  position: relative;
  z-index: 3;
}

.demo-wig-filters[hidden] {
  display: none !important;
}

.demo-wig-filters .wt-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.demo-wig-filters .wt-filters-head-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.demo-wig-filters .wt-filters-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wt-muted);
}

.demo-wig-filters .wt-filters-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--wt-dark);
}

.demo-wig-filters .wt-filter-reset {
  border: 0;
  background: var(--wt-soft);
  color: var(--wt-brand);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.demo-wig-filters .wt-filter-group {
  display: block;
  margin-top: 12px;
}

.demo-wig-filters .wt-filter-group:first-of-type {
  margin-top: 0;
}

.demo-wig-filters .wt-filter-group-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--wt-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.2;
  margin: 0 0 6px;
}

.demo-wig-filters .wt-filter-chip-row {
  display: block;
  overflow: visible;
}

.demo-wig-filters .wt-filter-primary-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.demo-wig-filters .wt-filter-group-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.demo-wig-filters .wt-filter-overflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--wt-line);
  border-radius: 12px;
  background: var(--wt-soft);
}

.demo-wig-filters .wt-filter-overflow .wt-filter-chip {
  width: 100%;
  justify-content: center;
}

.demo-wig-filters .wt-filter-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--wt-brand);
  border-radius: 999px;
  background: rgba(108, 62, 247, .08);
  color: var(--wt-brand);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.demo-wig-filters .wt-filter-more-label {
  font-size: 10px;
  font-weight: 800;
}

.demo-wig-filters .wt-filter-more-icon {
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
}

.demo-wig-filters .wt-filter-more-badge {
  font-size: 10px;
  font-weight: 900;
  color: var(--wt-brand);
}

.demo-wig-filters .wt-filter-more--less {
  border-color: var(--wt-line);
  background: #fff;
  color: var(--wt-muted);
}

.demo-wig-filters .wt-filter-length-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.demo-wig-filters .wt-length-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid var(--wt-line);
  background: #fff;
  color: var(--wt-dark);
  border-radius: 12px;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  min-height: 52px;
}

.demo-wig-filters .wt-length-btn-label {
  line-height: 1.1;
}

.demo-wig-filters .wt-length-btn-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--wt-muted);
}

.demo-wig-filters .wt-length-btn.wt-on {
  border-color: var(--wt-brand);
  background: rgba(108, 62, 247, .08);
  color: var(--wt-brand);
}

.demo-wig-filters .wt-length-btn.wt-on .wt-length-btn-count {
  color: var(--wt-brand);
}

.demo-wig-filters .wt-length-btn.wt-disabled {
  opacity: .42;
  cursor: not-allowed;
}

.demo-wig-filters .wt-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  border: 1px solid var(--wt-line);
  background: #fff;
  color: var(--wt-dark);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}

.demo-wig-filters .wt-filter-chip-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--wt-muted);
}

.demo-wig-filters .wt-filter-chip.wt-on {
  border-color: var(--wt-brand);
  background: rgba(108, 62, 247, .08);
  color: var(--wt-brand);
}

.demo-wig-filters .wt-filter-chip.wt-on .wt-filter-chip-count {
  color: var(--wt-brand);
  opacity: .85;
}

.demo-filter-empty {
  padding: 18px 8px;
  color: var(--wt-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  grid-column: 1 / -1;
}

.demo-wigs-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.demo-wigs-viewport {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 3px 2px;
}

.demo-wigs-viewport::-webkit-scrollbar {
  display: none;
}

.demo-wigs-nav {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--wt-line);
  background: #fff;
  color: var(--wt-dark);
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.demo-wigs-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.demo-wigs {
  display: flex;
  gap: 12px;
  min-width: 0;
}

.demo-wig {
  position: relative;
  border: 2px solid var(--wt-line);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  flex: 0 0 var(--wig-item-width, 160px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.demo-wig-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f0ff;
  overflow: hidden;
  flex-shrink: 0;
}

.demo-wig-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.demo-wig:hover {
  border-color: #c4b5fd;
}

.demo-wig.selected {
  border-color: var(--wt-brand);
  border-width: 3px;
  box-shadow: none;
}

.demo-wig-check {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--wt-brand);
  color: #fff;
  font-size: 12px;
  place-items: center;
  z-index: 2;
}

.demo-wig.selected .demo-wig-check {
  display: grid;
}

.demo-wig-info {
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
}

.demo-wig-info-main {
  min-width: 0;
  flex: 1;
}

.demo-wig-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.demo-wig-price {
  color: var(--wt-muted);
  font-weight: 600;
  font-size: 12px;
  margin-top: 2px;
}

.demo-wig-shop {
  flex-shrink: 0;
  align-self: flex-end;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  color: var(--wt-brand);
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(108, 62, 247, .28);
  background: rgba(108, 62, 247, .06);
}

.demo-wig-shop:hover {
  background: rgba(108, 62, 247, .12);
  border-color: var(--wt-brand);
}

.demo-upload {
  border: 2px dashed #c4b5fd;
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  background: #faf8ff;
  transition: 0.15s;
  max-width: 100%;
  box-sizing: border-box;
}

.demo-upload.demo-upload--preset {
  cursor: default;
  pointer-events: none;
}

.demo-upload.has-file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 24px 20px;
}

.demo-upload:hover,
.demo-upload.has-file {
  border-color: var(--wt-brand);
  background: var(--wt-soft);
}

.demo-upload-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: var(--wt-soft);
  color: var(--wt-brand);
  font-size: 22px;
}

.demo-upload strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--wt-dark);
}

.demo-upload span {
  color: var(--wt-muted);
  font-size: 13px;
}

.demo-upload img {
  max-width: min(180px, 100%);
  max-height: 180px;
  width: auto;
  height: auto;
  border-radius: 14px;
  margin: 0;
  object-fit: cover;
  display: block;
}

.demo-upload-ok {
  display: none;
  margin-top: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  font-weight: 700;
  font-size: 13px;
  color: #087443;
}

.demo-upload.has-file .demo-upload-ok {
  display: inline-block;
}

.demo-upload.has-file .demo-upload-prompt {
  display: none;
}

.demo-try-btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  font-size: 16px;
  padding: 16px 24px;
}

.demo-try-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.demo-preview {
  min-height: 380px;
  border-radius: 16px;
  background: linear-gradient(180deg, #faf8ff 0%, #f9fafb 100%);
  border: 1px solid var(--wt-line);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 20px;
  box-sizing: border-box;
  flex: 1 1 auto;
}

.demo-result-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 320px;
}

.demo-preview.has-image {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 12px 88px;
  background: linear-gradient(180deg, #faf8ff 0%, #f9fafb 100%);
  overflow: visible;
}

.demo-preview.has-image img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(460px, 62vh);
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
}

.demo-actions-under-photo {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  margin: 0;
  flex-direction: column;
  gap: 8px;
}

.demo-actions-under-photo .primary,
.demo-actions-under-photo .secondary {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.28);
}

.demo-preview img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 12px;
}

.demo-preview-empty {
  text-align: center;
  padding: 24px;
  max-width: 300px;
}

.demo-preview-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  background: var(--wt-soft);
  color: var(--wt-brand);
  font-size: 22px;
}

.demo-preview-empty strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--wt-dark);
}

.demo-preview-empty span {
  color: var(--wt-muted);
  font-size: 14px;
  line-height: 1.5;
}

.demo-spinner-wrap {
  display: grid;
  place-items: center;
  gap: 18px;
  text-align: center;
  padding: 32px;
}

.demo-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--wt-soft);
  border-top-color: var(--wt-brand);
  border-radius: 50%;
  animation: demo-spin 0.75s linear infinite;
}

.demo-spinner-text {
  color: var(--wt-brand);
  font-weight: 800;
  font-size: 16px;
}

.demo-spinner-sub {
  color: var(--wt-muted);
  font-size: 14px;
  max-width: 260px;
  line-height: 1.45;
}

@keyframes demo-spin {
  to { transform: rotate(360deg); }
}

.demo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.demo-actions a,
.demo-actions button {
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.demo-actions .secondary {
  background: #f3f4f6;
  color: var(--wt-dark);
}

.demo-actions .primary {
  background: var(--wt-brand);
  color: #fff;
}

.demo-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--wt-line);
}

.demo-trust-item {
  text-align: center;
  padding: 8px;
}

.demo-trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  background: var(--wt-soft);
  color: var(--wt-brand);
  font-size: 16px;
}

.demo-trust-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.demo-trust-item span {
  color: var(--wt-muted);
  font-size: 12px;
  line-height: 1.35;
}

.demo-notice {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 14px;
}

.demo-notice.error {
  background: #fef2f2;
  color: #b42318;
}

.demo-notice.success {
  background: #ecfdf5;
  color: #087443;
}

.wig-icon-inline {
  vertical-align: -3px;
}

@media (max-width: 960px) {
  .demo-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .demo-card--input {
    order: 1;
  }

  .demo-card--result {
    order: 2;
  }
}

@media (max-width: 900px) {
  .demo-trust {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .demo-page .wt-header {
    border-bottom: 0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
  }

  .demo-page .demo-header-shell {
    min-height: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    gap: 8px;
  }

  .demo-page .wt-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .demo-page .demo-header-nav {
    display: none;
  }

  .demo-header-rate {
    display: flex !important;
    align-items: center !important;
  }

  .demo-hero-rate {
    display: none;
  }

  .demo-page .wt-logo {
    font-size: 20px;
    gap: 8px;
    align-items: center;
  }

  .demo-page .wt-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 15px;
  }

  .demo-page .wt-logo-img {
    height: 34px;
    max-height: 34px;
  }

  .demo-main {
    padding: 0 0 24px;
  }

  .demo-page .demo-cta-banner {
    margin: 0 0 12px;
    padding: 16px;
    border-radius: 18px;
    gap: 12px;
    flex-direction: column;
  }

  .demo-cta-banner-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
    border-radius: 12px;
  }

  .demo-cta-banner-copy strong {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .demo-cta-banner-copy p {
    font-size: 13px;
    line-height: 1.45;
  }

  .demo-cta-banner-action {
    width: 100%;
    margin-left: 0;
    align-self: stretch;
  }

  .demo-cta-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
  }

  .demo-result-toolbar {
    margin-bottom: 8px;
  }

  .demo-reset-btn {
    font-size: 12px;
    padding: 7px 12px;
  }

  .demo-hero {
    display: none !important;
  }

  .demo-mobile-title {
    display: block;
  }

  .demo-card {
    padding: 12px;
    border-radius: 16px;
    overflow: hidden;
  }

  .demo-step-head-split {
    gap: 8px;
  }

  .demo-step-title {
    font-size: 15px;
  }

  .demo-wig-view-toggle button {
    padding: 7px 9px;
  }

  .demo-wig-view-toggle button svg {
    width: 16px;
    height: 16px;
  }

  .demo-wigs-carousel {
    gap: 6px;
  }

  .demo-wigs-nav {
    width: 28px;
    height: 28px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .demo-upload {
    padding: 18px 12px;
  }

  .demo-upload-prompt strong {
    font-size: 13px;
    word-break: break-word;
  }

  .demo-try-btn {
    padding: 14px 16px;
    font-size: 15px;
  }

  .demo-card--input .demo-step:first-child {
    margin-top: 0;
  }

  .demo-step {
    margin-bottom: 18px;
  }

  .demo-preview {
    min-height: 160px;
  }

  .demo-step-sub {
    display: none;
  }

  .demo-step-head {
    margin-bottom: 10px;
  }

  .demo-step-head-split {
    flex-wrap: nowrap;
  }

  .demo-upload-prompt span {
    display: none;
  }

  .demo-preview-empty span {
    display: none;
  }

  .demo-preview-empty strong {
    font-size: 15px;
  }

  .demo-trust {
    display: none;
  }

  .demo-try-btn {
    position: static !important;
    box-shadow: none !important;
    margin-top: 8px;
  }

  .demo-card--result.demo-result-collapsed {
    display: none;
  }
}

@media (max-width: 600px) {
  .demo-wigs-nav {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

.demo-lead-box {
  width: 100%;
  border: 1px solid var(--wt-line, #e8e8ef);
  border-radius: 14px;
  padding: 16px;
  background: #fafafe;
}

.demo-lead-box strong {
  display: block;
  margin-bottom: 4px;
}

.demo-lead-sub {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--wt-muted, #666);
  line-height: 1.45;
}

.demo-lead-form {
  display: grid;
  gap: 10px;
}

.demo-lead-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.demo-lead-form input {
  padding: 10px 12px;
  border: 1px solid var(--wt-line, #e8e8ef);
  border-radius: 10px;
  font: inherit;
}

.demo-lead-area {
  position: relative;
  overflow: visible;
}

.demo-gate.demo-gate-lead {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  position: relative;
  overflow: visible;
}

.demo-lead-capture-hint {
  position: absolute;
  top: 108px;
  right: 4px;
  width: 190px;
  z-index: 5;
  pointer-events: none;
  user-select: none;
}

.demo-lead-capture-hint[hidden] {
  display: none !important;
}

.demo-lead-capture-img {
  display: block;
  width: 100%;
  height: auto;
  animation: demo-lead-hint-bounce 2.2s ease-in-out infinite;
}

@keyframes demo-lead-hint-bounce {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-4px, 3px);
  }
}

@media (max-width: 600px) {
  .demo-lead-capture-hint {
    width: 155px;
    top: 96px;
    right: 2px;
  }
}

.demo-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--demo-sticky-footer-h, 84px));
  transform: translateX(-50%);
  background: #1f1f2e;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 200;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.demo-sticky-footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 45;
  background: linear-gradient(135deg, #6342d1 0%, #5234b8 55%, #3f2a9e 100%);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -14px 40px rgba(76, 37, 199, 0.28);
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}

.demo-sticky-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1140px;
  margin: 0 auto;
}

.demo-sticky-footer-copy {
  margin: 0;
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.demo-sticky-footer-copy strong {
  font-weight: 800;
  color: #fff;
}

.demo-sticky-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  color: var(--wt-brand);
  border: 0;
  white-space: nowrap;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.18);
  text-decoration: none;
  font-size: 15px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.demo-sticky-footer-btn:hover {
  background: #f8f5ff;
  color: var(--wt-brand-dark);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .demo-page {
    --demo-sticky-footer-h: 118px;
  }

  .demo-sticky-footer-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 10px;
  }

  .demo-sticky-footer-btn {
    width: 100%;
  }
}
