/* === XD TOKENS (derive from parsed XD) ===
   Update these values to match your XD exactly (or keep what we've parsed).
*/
:root{
  --bg: #F9F7EF;
  --panel: #F9F7EF;
  --text: #f5f5f7;
  --muted: #a0a0a8;
  --primary: #6df3a6;
  --accent: #7aa2ff;

  --maxw: 1200px;          /* container max width */
  --gutter: 24px;          /* outer page padding */
  --col-gap: 24px;         /* grid gap */
  --row-gap: 24px;

  --header-h: 72px;        /* header height */
  --sidebar-w: 320px;      /* palette width */
  --stage-h: 680px;        /* stage height */


  --brand-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial;
}

/* Reset-ish */
*{ box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0; background: var(--bg); color: var(--text);
  font-family: var(--brand-font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button, input { font-family: inherit; color: inherit; }

/* Shell Layout */
.app-shell{ max-width: var(--maxw); margin:0 auto; padding: var(--gutter); display:grid; gap: var(--row-gap); }
.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start; /* align logo left */
  padding: 0; /* remove extra spacing */
}

.brand-logo {
  height: 40px;   /* adjust as needed */
  display: block;
  margin-left: var(--gutter); /* 👈 aligns with palette edge */
}


.header-cta{ display:flex; gap: 10px; }
.btn{
  border:1px solid rgba(255,255,255,.08); background: var(--panel);
  padding: 10px 14px; border-radius: 999px; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(255,255,255,.18); }
.btn.primary{ background: var(--primary); color:#F9F7EF; border-color: transparent; font-weight: 700; }
.btn.ghost{ background: #1a1b1e; }
.btn.tiny{ padding:6px 10px; }
.header-cta .btn img{ display:block; height: 20px; }

.main-grid{
  display:grid; grid-template-columns: var(--sidebar-w) 1fr; gap: var(--col-gap);
  min-height: calc(var(--stage-h) + var(--row-gap));
}
.palette{
  background: var(--panel); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius);
  padding: 16px; display:grid; align-content:start; gap: 14px; position: relative;
}
.palette-header img{ height: 40px; }
.subcopy{ height: 54px; }

/* Layout for CTA buttons */
.palette-cta {
  display: grid;
  gap: 16px;          /* spacing between rows */
  margin-top: 12px;
}

.palette-cta .cta-group {
  display: flex;
  gap: 12px;          /* space between eyedropper + reset */
  justify-content: center; /* center them horizontally */
}

/* Center the download button */
.palette-cta #downloadBtn {
  display: flex;
  justify-content: center;
  margin: 0 auto;     /* centers it under the row above */
}

/* Remove unused rules */
.subcopy { display: none; }
hex-input { display: none; }

/* Adjust color picker wrapper */
.colorful-wrap {
  display: grid;
  gap: 16px;          /* spacing inside palette (picker to CTA) */
  align-content: start;
  margin-bottom: 8px; /* tighter gap before CTAs */
}

/* Adjust CTA spacing */
.palette-cta {
  display: grid;
  gap: 16px;          /* even gap between rows */
  margin-top: 0;      /* remove extra spacing above */
}


/* Icon-only buttons */
.palette-cta .btn {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Scale icons consistently */
.palette-cta .btn img {
  display: block;
  height: 86px;  /* increase icon size */
  width: 136px;   /* make download same size */
}



.colorful-wrap{ display:grid; gap: 12px; align-content:start; }
hex-color-picker{ width: 100%; height: 260px; }
hex-input{ width: 100%; height: 40px; }

/* Stage + Carousel */
.stage-wrap{
  position: relative; background: var(--panel); border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius); padding: 16px; min-height: var(--stage-h); box-shadow: var(--shadow);
  display:grid; grid-template-rows: 1fr auto auto; gap: 10px; overflow:hidden;
}
.carousel{ position: relative; height: 100%; display:grid; grid-template-columns: 44px 1fr 44px; align-items:center; }
.nav{ width: 44px; height: 44px; border-radius: 50%; border:1px solid rgba(255,255,255,.08); background:#F9F7EF; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.viewport{ overflow:hidden; height:100%; position: relative; }
.viewport .slide{
  width: 100%; height: 100%; display:none; align-items:center; justify-content:center;
}
.viewport .slide[data-active="true"]{ display:flex; }
.sneaker-stage{ width: 100%; height: 100%; display:flex; align-items:center; justify-content:center; }
.sneaker-stage svg{ width: 100%; height: auto; max-height: calc(var(--stage-h) - 160px); }

.sneaker-name{ display:flex; justify-content:center; align-items:center; min-height: 40px; }
.sneaker-name img{ height: 22px; }

.dots{ display:flex; gap: 8px; justify-content:center; padding: 8px 0 0; }
.dots button{ width: 10px; height: 10px; border-radius: 50%; background: #36373b; border: none; cursor: pointer; }
.dots button[aria-selected="true"]{ background: var(--accent); }

/* XD Overlay image (for pixel-perfect alignment during build) */
.xd-overlay{
  position:absolute; inset: 16px; pointer-events:none; opacity: .4; mix-blend-mode: difference; display:none; object-fit: contain;
}

/* Footer */
.app-footer{ color: var(--muted); font-size: 13px; }

/* vanilla-colorful theming via ::part() */
hex-color-picker::part(hue), hex-color-picker::part(saturation), hex-color-picker::part(pointer){
  border-radius: 10px;
}
hex-input::part(input){
  background:#101114; border:1px solid rgba(255,255,255,.08); border-radius: 10px; padding:10px 12px; color: var(--text);
}

/* Responsive */
@media (max-width: 980px){
  .main-grid{ grid-template-columns: 1fr; }
  .stage-wrap{ order:-1; }
}
/* === Sneaker slide animations === */
.slide {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  position: absolute; /* stack slides on top of each other */
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.slide[data-active="true"] {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
}

.slide[data-exit="true"] {
  opacity: 0;
  transform: translateX(-50px);
  z-index: 1;
}
