/* Carrinho e checkout — hierarquia visual partilhada. Só apresentação. */
body.woocommerce-cart .cvl-purchase-heading,
body.woocommerce-checkout:not(.woocommerce-order-received) .cvl-purchase-heading {
  box-sizing: border-box;
  position: relative;
  margin: 0 0 18px;
  padding: 18px 25px 22px;
  overflow: hidden;
  border: 1px solid #dfe9e7;
  border-radius: 14px;
  background: linear-gradient(110deg, #f4faf8 0%, #ffffff 73%);
  color: #172b33;
}

.cvl-purchase-heading::after {
  position: absolute;
  left: 25px;
  bottom: 0;
  width: 74px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #08796d;
  content: "";
}

.cvl-purchase-heading__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cvl-purchase-heading__back,
body.woocommerce-cart .cvl-purchase-heading__back,
body.woocommerce-checkout .cvl-purchase-heading__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #536771;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.3;
  text-decoration: none;
  transition: color 160ms ease;
}

.cvl-purchase-heading__back > span:first-child {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #d5e2e0;
  border-radius: 50%;
  background: #fff;
  color: #00776c;
  font-size: 15px;
  line-height: 1;
}

.cvl-purchase-heading__back:hover,
.cvl-purchase-heading__back:focus-visible {
  color: #00776c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cvl-purchase-heading__counter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #d9e8e4;
  border-radius: 999px;
  background: #fff;
  padding: 6px 11px;
  color: #007568;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .055em;
  white-space: nowrap;
}

.cvl-purchase-heading__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 395px);
  align-items: center;
  gap: 22px 30px;
  margin-top: 13px;
}

.cvl-purchase-heading__main {
  min-width: 0;
}

.cvl-purchase-heading__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #00786f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .105em;
  line-height: 1.4;
}

.cvl-purchase-heading__eyebrow::before {
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

body.woocommerce-cart .cvl-purchase-heading__title,
body.woocommerce-checkout:not(.woocommerce-order-received) .cvl-purchase-heading__title {
  margin: 0;
  color: #172832;
  font-size: clamp(30px, 2.7vw, 40px);
  font-weight: 900;
  letter-spacing: -.038em;
  line-height: 1.12;
  text-wrap: balance;
}

.cvl-purchase-heading__title span {
  color: #087b6f;
}

.cvl-purchase-heading__description {
  max-width: 630px;
  margin: 8px 0 0;
  color: #62717a;
  font-size: 12.5px;
  line-height: 1.58;
}

.cvl-purchase-heading__steps {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 16px 0 16px 23px;
  margin: 0;
  border-left: 1px solid #e1ebe9;
  list-style: none;
  gap: 0;
}

.cvl-purchase-heading__step {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #7a8a91;
  white-space: nowrap;
}

.cvl-purchase-heading__step:last-child {
  flex: 0 0 auto;
}

.cvl-purchase-heading__step:not(:last-child)::after {
  display: block;
  flex: 1 1 12px;
  min-width: 9px;
  height: 1px;
  margin: 0 9px;
  background: #d7e4e1;
  content: "";
}

.cvl-purchase-heading__number {
  display: inline-grid;
  flex: 0 0 27px;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #d3dfdd;
  border-radius: 50%;
  background: #fff;
  color: #829199;
  font-size: 11px;
  font-weight: 850;
}

.cvl-purchase-heading__step-name {
  color: inherit;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
}

.cvl-purchase-heading__step.is-current {
  color: #006d63;
}

.cvl-purchase-heading__step.is-current .cvl-purchase-heading__number,
.cvl-purchase-heading__step.is-complete .cvl-purchase-heading__number {
  border-color: #008274;
  background: #008274;
  color: #fff;
}

.cvl-purchase-heading__step.is-complete {
  color: #467168;
}

.cvl-purchase-heading__step.is-complete::after {
  background: #81c1b5;
}

@media (max-width: 1040px) {
  .cvl-purchase-heading__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .cvl-purchase-heading__steps {
    width: 100%;
    max-width: 440px;
    border-left: 0;
    border-top: 1px solid #e1ebe9;
    padding: 14px 0 0;
  }
}

@media (max-width: 520px) {
  body.woocommerce-cart .cvl-purchase-heading,
  body.woocommerce-checkout:not(.woocommerce-order-received) .cvl-purchase-heading {
    padding: 15px 16px 18px;
    margin-bottom: 15px;
  }
  .cvl-purchase-heading::after {
    left: 16px;
    width: 57px;
  }
  .cvl-purchase-heading__top {
    gap: 8px;
  }
  .cvl-purchase-heading__counter {
    padding: 5px 8px;
    font-size: 9px;
  }
  body.woocommerce-cart .cvl-purchase-heading__title,
  body.woocommerce-checkout:not(.woocommerce-order-received) .cvl-purchase-heading__title {
    font-size: clamp(28px, 8vw, 35px);
  }
  .cvl-purchase-heading__description {
    font-size: 12px;
  }
  .cvl-purchase-heading__number {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  .cvl-purchase-heading__step {
    gap: 5px;
  }
  .cvl-purchase-heading__step:not(:last-child)::after {
    min-width: 5px;
    margin: 0 6px;
  }
  .cvl-purchase-heading__step-name {
    font-size: 9.5px;
  }
}
