/* Funil de venda guiado */
.funnel-page {
  min-height: 70vh;
}

.funnel-top {
  background: var(--black);
  color: #f5f5f5;
  padding: 1.75rem 0 1.25rem;
  border-bottom: 4px solid var(--orange);
}

.funnel-top h1 {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.funnel-top .lede {
  margin: 0;
  color: rgba(245, 245, 245, 0.8);
  max-width: 40rem;
}

/* Steps progress */
.funnel-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.funnel-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.funnel-step-pill .num {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.7rem;
}

.funnel-step-pill.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #111;
}

.funnel-step-pill.active .num {
  background: #111;
  color: #fff;
}

.funnel-step-pill.done {
  border-color: var(--pix);
  color: #9ff0e6;
}

.funnel-step-pill.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Layout: options + detail + cart */
.funnel-body {
  display: grid;
  grid-template-columns: 1fr 1fr 320px;
  gap: 1.25rem;
  padding: 1.75rem 0 3rem;
  align-items: start;
}

.funnel-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 280px;
}

.funnel-panel .ph {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--sand);
}

.funnel-panel .ph h2 {
  margin: 0;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
}

.funnel-panel .ph p {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.funnel-panel .pb {
  padding: 1rem 1.1rem 1.2rem;
}

.script-tip {
  background: rgba(255, 106, 0, 0.1);
  border-left: 3px solid var(--orange);
  padding: 0.65rem 0.8rem;
  font-size: 0.86rem;
  color: var(--ink);
  margin-bottom: 1rem;
  border-radius: 0 8px 8px 0;
}

/* Choice cards */
.choice-list {
  display: grid;
  gap: 0.65rem;
}

.choice-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  background: #fff;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.choice-card:hover {
  border-color: rgba(255, 106, 0, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.choice-card.selected {
  border-color: var(--red);
  background: rgba(227, 6, 19, 0.04);
  box-shadow: 0 0 0 1px var(--red);
}

.choice-card.multi-on {
  border-color: var(--orange);
  background: rgba(255, 106, 0, 0.06);
}

.choice-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #e8e4dc;
}

.choice-card .ci h3 {
  margin: 0 0 0.2rem;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.choice-card .ci .pitch {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  margin-bottom: 0.2rem;
}

.choice-card .ci p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.choice-card .cp {
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}

.choice-skip {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}

.choice-skip:hover,
.choice-skip.active {
  border-color: var(--moss, #2d6a4f);
  color: var(--ink);
  background: rgba(45, 106, 79, 0.06);
}

.funnel-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.funnel-nav .btn {
  flex: 1;
  min-width: 120px;
}

/* Detail panel */
.detail-gallery {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #e8e4dc;
  margin-bottom: 0.65rem;
  border: 1px solid var(--line);
}

.detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.detail-thumbs button {
  width: 52px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
}

.detail-thumbs button.active {
  border-color: var(--orange);
}

.detail-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.detail-block h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 1rem 0 0.4rem;
  font-size: 1.05rem;
}

.detail-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-benefits {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.detail-benefits li {
  font-size: 0.88rem;
  color: var(--ink);
}

.detail-video {
  margin-top: 0.85rem;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
  border: 1px solid #222;
}

.detail-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Color swatches */
.variant-block {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.variant-block label.vlabel {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem 0.35rem 0.35rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  background: #fff;
}

.swatch i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: block;
}

.swatch.selected {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.swatch input {
  display: none;
}

/* Order sidebar */
.order-panel .pb {
  padding-bottom: 1rem;
}

.order-lines {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  max-height: 240px;
  overflow: auto;
}

.order-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.5rem;
  font-size: 0.86rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.order-line .on {
  font-weight: 700;
}

.order-line .ov {
  font-size: 0.75rem;
  color: var(--muted);
  grid-column: 1;
}

.order-line .op {
  font-weight: 800;
  grid-row: 1 / span 2;
  align-self: center;
}

.order-empty {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.5rem 0 0.75rem;
}

.totals .tr {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
}

.totals .tr.big {
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 0.4rem;
}

.totals .tr.pix {
  color: var(--pix);
  font-weight: 700;
}

.totals .tr.btc {
  color: #b8860b;
  font-weight: 700;
}

.ship-note {
  font-size: 0.8rem;
  margin: 0.45rem 0 0.75rem;
  color: var(--muted);
}

.ship-note.ok {
  color: var(--pix);
  font-weight: 700;
}

.pay-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.pay-row label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.pay-row label.active {
  border-color: var(--orange);
  background: rgba(255, 106, 0, 0.08);
}

.order-actions {
  display: grid;
  gap: 0.45rem;
}

.order-actions .btn {
  width: 100%;
}

.order-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.55rem 0 0;
  line-height: 1.4;
}

/* Pedido final: lista com detalhes expandidos */
.pedido-stack {
  display: grid;
  gap: 1rem;
}

.pedido-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.pedido-item .pi-head {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 0.75rem;
  padding: 0.75rem;
  align-items: center;
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}

.pedido-item .pi-head img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.pedido-item .pi-body {
  padding: 0.85rem 1rem 1rem;
}

@media (max-width: 1100px) {
  .funnel-body {
    grid-template-columns: 1fr 1fr;
  }
  .order-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .funnel-body {
    display: flex;
    flex-direction: column;
    grid-template-columns: 1fr;
    padding-bottom: 1.25rem;
  }

  /* Escolhas e detalhes primeiro; pedido no fim, SEM sticky na tela */
  #funnel-choices {
    order: 1;
  }
  #funnel-detail {
    order: 2;
  }
  .order-panel {
    order: 3;
    grid-column: auto;
    position: static;
    max-height: none;
    z-index: auto;
    display: flex;
    flex-direction: column;
    margin-top: 0.35rem;
  }
  .order-panel .pb {
    overflow: visible;
    max-height: none;
  }
  .order-panel .order-actions {
    position: static;
    background: #fff;
    padding-top: 0.35rem;
  }
  .order-panel .order-actions .btn {
    min-height: 48px;
  }

  .choice-card {
    grid-template-columns: 60px 1fr;
  }
  .choice-card .cp {
    grid-column: 2;
    justify-self: start;
  }

  .funnel-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }
  .funnel-step-pill {
    flex: 0 0 auto;
  }

  .funnel-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .funnel-nav .btn {
    width: 100%;
    min-height: 48px;
  }
  .funnel-nav .btn-whatsapp {
    grid-column: 1 / -1;
  }

  .detail-video iframe {
    max-width: 100%;
  }
}
