/* =========================================
   flow.css (UPDATED COLORS TO MATCH MOODBOARD)
   FLOW (Atelier-style UI)
   4-step version (no palette step)
   + Saved Designs gallery
   + Fabric presets in Step 2
   ========================================= */

:root{
  /* match main site palette */
  --ink:#2e2e2e;
  --muted: rgba(46,46,46,0.62);
  --line: rgba(46,46,46,.08);

  --panel:#ffffff;
  --panelBorder: rgba(46,46,46,.10);

  /* your flow uses "gold" as accent — keep it, but slightly neutral */
  --gold:#2e2e2e;     /* primary buttons in flow = black */
  --gold2:#1f1f1f;    /* hover */

  --shadow: 0 16px 50px rgba(0,0,0,.10);

  --r12:12px;
  --r16:16px;
}

/* page spacing */
.app{
  padding: 22px 0 64px;
}

/* ====== App hero ====== */
.appHero{
  text-align: left;
  margin: 18px 0 18px;
}

.appHero__title{
  font-family: "Playfair Display", serif;
  font-weight: 500;
  letter-spacing: -0.3px;
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 42px);
  color: var(--ink);
}

.appHero__italic{
  font-style: italic;
}

.appHero__sub{
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 760px;
}

/* progress */
.progress{
  display:flex;
  align-items:center;
  gap: 14px;
}

.progress__pill{
  height: 22px;
  display:flex;
  align-items:center;
  gap: 38px;
  position: relative;
  padding: 0 6px;
}

.progress__pill::before{
  content:"";
  position:absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(46,46,46,0.08);
  border-radius: 999px;
}

.progress__dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(46,46,46,0.22);
  position: relative;
  z-index: 2;
}

.progress__dot.is-active{
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(46,46,46,0.10);
}

.progress__dot.is-done{
  background: rgba(46,46,46,0.55);
}

.progress__label{
  font-size: 12px;
  color: rgba(46,46,46,0.55);
}

/* steps */
.step{ display:none; }
.step.is-active{ display:block; }

/* Layout */
.cardGrid{
  display:grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 26px;
  align-items: start;
  margin-top: 14px;
}

.cardGrid--single{
  grid-template-columns: 1fr;
}

/* Base cards */
.card{
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.card__title{
  font-family: "Playfair Display", serif;
  font-weight: 500;
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--ink);
}

.card__text{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  max-width: 520px;
}

/* Preview panel */
.card--preview{
  background: var(--panel);
  border: 1px solid var(--panelBorder);
  border-radius: var(--r16);
  padding: 14px;
  box-shadow: var(--shadow);
}

.previewTop{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.previewTop__title{
  font-size: 12px;
  color: rgba(46,46,46,0.65);
}

/* BIG PREVIEW BOX */
.previewBox{
  background: #fff;
  border-radius: var(--r12);
  border: 1px solid rgba(46,46,46,0.08);
  height: 380px;
  padding: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.previewImg{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Bag grid */
.bagGrid{
  display:grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.bagGrid--4{
  grid-template-columns: repeat(4, 1fr);
}

.bagTile{
  width: 100%;
  background: #fff;
  border: 1px solid rgba(46,46,46,0.10);
  border-radius: 10px;
  padding: 8px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease;
}

.bagTile:hover{ transform: translateY(-1px); }

.bagTile.is-active{
  border-color: rgba(46,46,46,0.75);
  box-shadow: 0 0 0 3px rgba(46,46,46,0.10);
}

.bagTile img{
  width: 100%;
  height: 86px;
  object-fit: contain;
  display:block;
}

.monoLine{
  font-size: 12px;
  color: rgba(46,46,46,0.55);
  margin: 8px 0 16px;
}

/* =========================
   FABRIC PRESETS (Step 2)
   ========================= */
.fabricGrid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 10px 0 12px;
}

.fabricTile{
  width: 100%;
  background:#fff;
  border: 1px solid rgba(46,46,46,0.10);
  border-radius: 12px;
  padding: 8px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  text-align: left;
}

.fabricTile:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.07);
}

.fabricTile.is-active{
  border-color: rgba(46,46,46,0.75);
  box-shadow: 0 0 0 3px rgba(46,46,46,0.10);
}

.fabricTile img{
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(46,46,46,0.06);
  display:block;
}

.fabricTile span{
  display:block;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(46,46,46,0.60);
  line-height: 1.2;
}

/* Drag-drop buttons */
.drop{
  width: 100%;
  background: #fff;
  border: 1px solid rgba(46,46,46,0.10);
  border-radius: var(--r12);
  padding: 22px;
  min-height: 92px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  cursor:pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.drop__icon{
  opacity: 0.55;
  font-size: 16px;
}

.drop span{
  font-size: 12px;
  color: rgba(46,46,46,0.55);
}

/* mini previews */
.miniRow{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0 16px;
}

.mini__label{
  font-size: 11px;
  color: rgba(46,46,46,0.55);
  margin-bottom: 6px;
}

.mini__box{
  background:#fff;
  border: 1px solid rgba(46,46,46,0.10);
  border-radius: var(--r12);
  height: 140px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding: 10px;
}

.mini__box img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.mini__empty{
  font-size: 12px;
  color: rgba(46,46,46,0.45);
}

/* Result panels */
.resultTop{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin: 8px 0 10px;
}

.resultTop__label{
  font-size: 12px;
  color: rgba(46,46,46,0.60);
}

.iconBtn{
  background: var(--gold);
  border: 1px solid rgba(46,46,46,0.12);
  color: #fff;
  height: 24px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor:pointer;
  margin-left: 6px;
}
.iconBtn:hover{ background: var(--gold2); }

.resultBox{
  background:#fff;
  border: 1px solid rgba(46,46,46,0.10);
  border-radius: var(--r16);
  height: 420px;
  padding: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  box-shadow: var(--shadow);
}

.resultImg{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Buttons row */
.row{
  display:flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.row--secondary{
  justify-content: flex-start;
}

.btn{
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(46,46,46,0.15);
}

.btn--ghost{
  background: transparent;
  color: rgba(46,46,46,0.70);
  border-color: rgba(46,46,46,0.18);
}
.btn--ghost:hover{
  background: rgba(255,255,255,0.35);
}

.btn--primary{
  background: var(--gold);
  color: #fff;
  border-color: rgba(46,46,46,0.12);
}
.btn--primary:hover{ background: var(--gold2); }

.btn[disabled]{
  opacity: .45;
  cursor:not-allowed;
}

/* status */
.status{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(46,46,46,0.55);
  min-height: 18px;
}

/* share hint */
.hint{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(46,46,46,0.55);
}
.hintLink{
  margin-left: 8px;
  color: var(--ink);
  text-decoration: underline;
}

/* Saved designs gallery */
.saved{
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(46,46,46,0.08);
}

.savedTop{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.savedTitle{
  font-family: "Playfair Display", serif;
  font-weight: 500;
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--ink);
}

.savedSub{
  margin: 0;
  color: rgba(46,46,46,0.55);
  font-size: 12px;
}

.savedGrid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.savedEmpty{
  display:none;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(46,46,46,0.55);
}

.savedCard{
  background: #fff;
  border: 1px solid rgba(46,46,46,0.10);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}

.savedImgWrap{
  border-radius: 12px;
  border: 1px solid rgba(46,46,46,0.08);
  height: 190px;
  padding: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background: #fff;
}

.savedImg{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.savedMeta{
  margin-top: 8px;
  display:flex;
  flex-direction: column;
  gap: 4px;
}

.savedName{
  font-size: 12px;
  font-weight: 600;
  color: rgba(46,46,46,0.80);
  line-height: 1.25;
}

.savedDate{
  font-size: 11px;
  color: rgba(46,46,46,0.55);
}

.savedBtns{
  display:flex;
  gap: 8px;
  margin-top: 10px;
}

.savedBtns button{
  flex: 1;
  padding: 10px 10px;
  font-size: 12px;
}

.savedBtns .btnSmall{
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 980px){
  .cardGrid{ grid-template-columns: 1fr; }
  .card--preview{ order: 2; }

  .previewBox{ height: 320px; }
  .resultBox{ height: 360px; }
  .mini__box{ height: 130px; }

  .savedGrid{ grid-template-columns: repeat(2, 1fr); }
  .fabricGrid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 520px){
  .bagGrid--4{ grid-template-columns: repeat(2, 1fr); }
  .miniRow{ grid-template-columns: 1fr; }
  .row{ flex-direction: column; }
  .btn{ width: 100%; }

  .previewBox{ height: 280px; }
  .resultBox{ height: 320px; }
  .mini__box{ height: 120px; }

  .savedGrid{ grid-template-columns: 1fr; }
  .fabricGrid{ grid-template-columns: repeat(2, 1fr); }
}

/* Subtle zoom */
.previewImg,
.resultImg {
  transform: scale(1.12);
  transform-origin: center;
}

.mini__box img {
  transform: scale(1.15);
  transform-origin: center;
}

.bagTile img {
  transform: scale(1.18);
  transform-origin: center;
}

.savedImg {
  transform: scale(1.12);
  transform-origin: center;
}
