/* Papillon Checkout Stepper — maqueta: dots + label + líneas, con CUADRADOS */
.papillon-stepper {
  --ps-fuchsia: #e2007a;
  --ps-carbon: #1a1a1a;
  --ps-muted: #6e5a63;
  --ps-border: rgba(26, 26, 26, 0.14);
  --ps-surface: #fff;
  --ps-ivory: #fcf8f2;
  --ps-dot: 2rem;

  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto 0.85rem;
  padding: 0.5rem 0 0.9rem;
  border: 0;
  border-bottom: 1px solid var(--ps-border);
  background: transparent;
  font-family: "Lato", Arial, sans-serif;
  text-align: center;
}

.papillon-stepper__list {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.papillon-stepper__item {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.papillon-stepper__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 4.75rem;
  text-decoration: none !important;
  color: inherit;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

a.papillon-stepper__link:hover .papillon-stepper__dot {
  filter: brightness(0.97);
}

/* Cuadrado (no círculo) — mismo lenguaje visual que la maqueta */
.papillon-stepper__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ps-dot);
  height: var(--ps-dot);
  border-radius: 0 !important;
  border: 1.5px solid var(--ps-border);
  background: var(--ps-ivory);
  color: var(--ps-muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.papillon-stepper__item.is-current .papillon-stepper__dot {
  border: 2px solid var(--ps-fuchsia);
  background: var(--ps-surface);
  color: var(--ps-fuchsia);
}

.papillon-stepper__item.is-completed .papillon-stepper__dot {
  border-color: var(--ps-fuchsia);
  background: var(--ps-fuchsia);
  color: #fff;
}

.papillon-stepper__check {
  display: block;
  width: 14px;
  height: 14px;
}

.papillon-stepper__label {
  display: block;
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ps-muted);
  white-space: nowrap;
}

.papillon-stepper__item.is-current .papillon-stepper__label {
  color: var(--ps-fuchsia);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--ps-fuchsia);
}

.papillon-stepper__item.is-completed .papillon-stepper__label {
  color: var(--ps-carbon);
  text-decoration: none;
}

/* Línea entre pasos: alineada al centro vertical del cuadrado */
.papillon-stepper__line {
  flex: 1 1 2.25rem;
  max-width: 3.5rem;
  min-width: 1.5rem;
  height: 1px;
  margin: calc(var(--ps-dot) / 2 - 0.5px) 0.4rem 0;
  padding: 0;
  border: 0;
  background: var(--ps-border);
  list-style: none;
  align-self: flex-start;
}

.papillon-stepper__line.is-done {
  background: var(--ps-fuchsia);
}

@media (max-width: 480px) {
  .papillon-stepper {
    --ps-dot: 1.75rem;
    margin-bottom: 0.65rem;
    padding: 0.35rem 0 0.75rem;
  }

  .papillon-stepper__list {
    max-width: 100%;
  }

  .papillon-stepper__link {
    min-width: 3.9rem;
  }

  .papillon-stepper__label {
    font-size: 9px;
    letter-spacing: 0.06em;
  }
}

/* Cart + checkout: centrado en el layout */
body.woocommerce-cart .woocommerce > .papillon-stepper,
body.woocommerce-checkout .papillon-stepper,
body.woocommerce-order-received .papillon-stepper {
  width: 100% !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

body.woocommerce-cart .woocommerce > .papillon-stepper {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  margin-bottom: 0.65rem !important;
}

body.woocommerce-cart .woocommerce > .papillon-stepper .papillon-stepper__list,
body.woocommerce-checkout .papillon-stepper__list,
body.woocommerce-order-received .papillon-stepper__list {
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: center !important;
}

body.woocommerce-checkout .papillon-stepper {
  max-width: 1240px;
  margin: 0 auto 1rem;
}
