/* =========================================================
   EGES — Logo customizer + 3D mockup
   ========================================================= */

.logo-customizer {
  --lc-navy: #050a18;
  --lc-navy-2: #0a1428;
  --lc-navy-3: #12203a;
  --lc-gold: #d4a017;
  --lc-gold-hi: #f0c14b;
  --lc-muted: #9aa8c0;
  --lc-text: #eef2ff;
  width: 100%;
}

.lc-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 860px) {
  .lc-layout {
    grid-template-columns: 1fr;
  }
}

.lc-stage-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lc-stage-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.lc-stage-label > span:first-child {
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lc-gold-hi);
}

.lc-hint {
  font-size: 0.72rem;
  color: var(--lc-muted);
}

/* ---------- 3D stage ---------- */
.lc-stage {
  position: relative;
  flex: 1;
  min-height: 420px;
  border-radius: 18px;
  border: 1px solid rgba(212, 160, 23, 0.28);
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, #1a3358 0%, transparent 55%),
    linear-gradient(165deg, #0c1830 0%, #050a18 55%, #03060f 100%);
  overflow: hidden;
  perspective: 1400px;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.lc-stage.is-orbiting,
.lc-stage.is-orbiting * {
  cursor: grabbing;
}

.lc-stage.is-dragover {
  outline: 2px dashed var(--lc-gold-hi);
  outline-offset: -6px;
}

.lc-floor {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  height: 28%;
  background: radial-gradient(ellipse at center, rgba(212, 160, 23, 0.14) 0%, transparent 68%);
  transform: rotateX(72deg);
  pointer-events: none;
  filter: blur(1px);
}

.lc-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: rotateX(6deg) rotateY(-16deg);
  transition: transform 0.08s linear;
  padding: 1.5rem 1rem 2.5rem;
}

.lc-machine-wrap {
  position: relative;
  width: min(58%, 280px);
  transform-style: preserve-3d;
  filter: drop-shadow(18px 28px 32px rgba(0, 0, 0, 0.55));
}

.lc-machine {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Soft side edge to sell the 3D body */
.lc-machine-wrap::after {
  content: '';
  position: absolute;
  top: 1.5%;
  bottom: 1.5%;
  right: -7%;
  width: 8%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(20, 30, 50, 0.55));
  border-radius: 0 6px 6px 0;
  transform: skewY(-0.5deg);
  pointer-events: none;
  opacity: 0.85;
}

/* Suggested branding zone (shown before logo / faintly after) */
.lc-zone {
  position: absolute;
  border: 1.5px dashed rgba(240, 193, 75, 0.45);
  border-radius: 6px;
  background: rgba(212, 160, 23, 0.06);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.25s;
}

.logo-customizer.has-logo .lc-zone {
  opacity: 0;
}

.logo-customizer.has-logo:hover .lc-zone,
.logo-customizer.has-logo:focus-within .lc-zone {
  opacity: 0.35;
}

/* Logo on machine face */
.lc-logo {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 22%;
  height: auto;
  object-fit: contain;
  transform: translate(-50%, -50%) rotate(0deg);
  cursor: grab;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  z-index: 3;
  pointer-events: auto;
  max-width: none;
  /* slight perspective glue onto face */
  transform-style: preserve-3d;
}

.lc-logo.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.lc-logo.is-dragging {
  cursor: grabbing;
  filter: drop-shadow(0 4px 12px rgba(240, 193, 75, 0.45));
  outline: 1px solid rgba(240, 193, 75, 0.65);
  outline-offset: 2px;
}

.lc-empty-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  text-align: center;
  background: linear-gradient(transparent, rgba(5, 10, 24, 0.88));
  pointer-events: none;
  transition: opacity 0.25s;
}

.lc-empty-overlay p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--lc-muted);
}

.logo-customizer.has-logo .lc-empty-overlay {
  opacity: 0;
}

/* ---------- Controls ---------- */
.lc-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(212, 160, 23, 0.22);
  background: linear-gradient(180deg, rgba(18, 32, 58, 0.9), rgba(10, 20, 40, 0.95));
}

.lc-upload-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lc-upload-btn {
  width: 100%;
  font-size: 0.82rem !important;
  padding: 1rem 1.25rem !important;
  letter-spacing: 0.08em;
}

.lc-file-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--lc-muted);
  text-align: center;
}

.lc-tools {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: opacity 0.2s;
}

.lc-tools[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.lc-tool-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.lc-tool-btn {
  padding: 0.65rem 0.4rem !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.04em;
}

.lc-slider-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lc-slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lc-muted);
}

.lc-slider-label em {
  font-style: normal;
  color: var(--lc-gold-hi);
  font-variant-numeric: tabular-nums;
}

.lc-slider-field input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212, 160, 23, 0.35), rgba(212, 160, 23, 0.15));
  outline: none;
  cursor: pointer;
}

.lc-slider-field input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f5d76e, #d4a017);
  border: 2px solid #1a1200;
  box-shadow: 0 2px 8px rgba(212, 160, 23, 0.45);
  cursor: grab;
}

.lc-slider-field input[type='range']::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f5d76e, #d4a017);
  border: 2px solid #1a1200;
  cursor: grab;
}

.lc-tip {
  margin: 0;
  font-size: 0.75rem;
  color: var(--lc-muted);
  line-height: 1.45;
}

.lc-status {
  min-height: 1.2em;
  font-size: 0.8rem;
  color: var(--lc-muted);
}

.lc-status.is-ok {
  color: #34d399;
}

.lc-status.is-err {
  color: #f87171;
}

.lc-status.is-busy {
  color: var(--lc-gold-hi);
}

/* Compact mode (embedded on request form) */
.logo-customizer.lc-compact .lc-stage {
  min-height: 340px;
}

.logo-customizer.lc-compact .lc-machine-wrap {
  width: min(52%, 220px);
}

.logo-customizer.lc-compact .lc-tool-row {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Page chrome for /customize */
.customize-page {
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 50% at 30% 0%, #163056, #050a18 55%);
  color: #eef2ff;
  font-family: 'Montserrat', system-ui, sans-serif;
}

.customize-page .wrap-c {
  width: min(100% - 2rem, 1080px);
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.customize-hero {
  margin-bottom: 1.5rem;
}

.customize-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.customize-hero h1 span {
  color: #f0c14b;
}

.customize-hero p {
  margin: 0;
  max-width: 48rem;
  color: #9aa8c0;
  font-size: 0.95rem;
}

.customize-card {
  border-radius: 20px;
  border: 1px solid rgba(212, 160, 23, 0.25);
  background: rgba(10, 20, 40, 0.65);
  padding: 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.customize-machine-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 160, 23, 0.15);
}

.customize-machine-bar label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa8c0;
  flex: 1;
  min-width: 200px;
}

.customize-machine-bar select {
  font: 600 0.95rem/1.2 'Montserrat', system-ui, sans-serif;
  color: #eef2ff;
  background: #0a1428;
  border: 1px solid rgba(212, 160, 23, 0.35);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  text-transform: none;
  letter-spacing: 0;
}

.customize-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(212, 160, 23, 0.15);
}

.customize-actions .btn {
  flex: 1;
  min-width: 160px;
}

.customize-note {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: #9aa8c0;
}

.customize-note strong {
  color: #f0c14b;
}

/* Request page embed */
.request-customizer {
  margin: 1.25rem 0;
  padding: 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(212, 160, 23, 0.35);
  background: rgba(212, 160, 23, 0.04);
}

.request-customizer > h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #f0c14b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.request-customizer > .sub {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

/* Product card secondary CTA */
.product-card .btn-logo {
  margin-top: 0.55rem;
  width: 100%;
}

@media (max-width: 560px) {
  .lc-stage {
    min-height: 320px;
  }
  .lc-machine-wrap {
    width: min(62%, 200px);
  }
  .lc-tool-row {
    grid-template-columns: 1fr;
  }
}
