.loyalty-card {
  max-width: 420px;
  margin: 0 auto 28px;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--brand-1) 100%);
  color: var(--surface);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.loyalty-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% -10%, rgba(255, 255, 255, 0.18), transparent 55%);
  pointer-events: none;
}

.loyalty-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.loyalty-card-logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.loyalty-card-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.loyalty-card-stamps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.loyalty-stamp {
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
}

.loyalty-stamp.is-filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.85);
  background: var(--surface);
  padding: 2px;
}

.loyalty-stamp-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.loyalty-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

.loyalty-card.is-complete {
  box-shadow: var(--shadow-lg), 0 0 0 3px rgba(255, 255, 255, 0.5) inset;
}

.loyalty-status {
  max-width: 420px;
  margin: 0 auto;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--soft);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 14.5px;
  color: var(--text-2);
}

.loyalty-status p {
  margin: 0 0 8px;
}

.loyalty-status p:last-child {
  margin-bottom: 0;
}

.loyalty-status-rule {
  font-size: 13px;
  color: var(--muted);
}

.loyalty-status--complete {
  background: var(--surface-2);
  border-color: var(--brand-1);
  color: var(--text);
}

@media (max-width: 520px) {
  .loyalty-card {
    padding: 20px 18px;
  }

  .loyalty-card-stamps {
    gap: 8px;
  }
}

/* --------------------------------------------------------- página /minha-conta/fidelidade/ */
.loyalty-page-head {
  text-align: center;
  margin-bottom: 8px;
}

.loyalty-page-head h2 {
  margin-bottom: 6px;
}

.loyalty-page-body {
  margin-top: 28px;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.loyalty-lookup-form {
  max-width: 360px;
  margin: 28px auto 0;
}

.loyalty-lookup-hint {
  max-width: 420px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.loyalty-lookup-hint a {
  color: var(--primary);
  font-weight: 700;
}

.loyalty-lookup-again {
  text-align: center;
  margin: 0;
}

.loyalty-lookup-again a {
  font-size: 14px;
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

/* --------------------------------------------------------- modal "bottom sheet" */
.loyalty-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay, rgba(0, 0, 0, 0.5));
  z-index: 1300;
}

.loyalty-modal {
  position: fixed;
  z-index: 1301;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: min(480px, 100vw);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 12px 24px 32px;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.loyalty-modal.is-open {
  transform: translate(-50%, 0);
}

.loyalty-modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
  margin: 0 auto 16px;
}

.loyalty-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.loyalty-modal-close:hover {
  color: var(--primary);
}

.loyalty-modal-title {
  text-align: center;
  margin: 0 0 18px;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.loyalty-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.loyalty-modal-body .loyalty-card,
.loyalty-modal-body .loyalty-status {
  margin: 0;
  max-width: none;
}

.loyalty-modal-body .loyalty-lookup-form {
  max-width: none;
  margin: 0;
}

/* O formulário de consulta por CPF reaproveita classes de checkout.css
   (auth-sub, form-group, auth-alert, btn-primary), que só é carregado em
   algumas páginas. Como o modal existe em todas as páginas, ele precisa do
   próprio estilo aqui — senão fica sem estilo fora dessas páginas. */
.loyalty-modal-body .auth-sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 4px;
}

.loyalty-modal-body .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.loyalty-modal-body .form-group label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-2);
}

.loyalty-modal-body .form-group input {
  width: 100%;
  box-sizing: border-box;
  height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.loyalty-modal-body .form-group input:hover {
  border-color: var(--brand-1);
}

.loyalty-modal-body .form-group input:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: var(--shadow-focus);
}

.loyalty-modal-body .auth-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.loyalty-modal-body .auth-alert[hidden] {
  display: none;
}

.loyalty-modal-body .auth-alert--error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.loyalty-modal-body .btn-primary {
  width: 100%;
  height: 50px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .loyalty-modal {
    transition: none;
  }
}

/* --------------------------------------------------- tutorial de instalação */
.install-tutorial-intro {
  font-weight: 700;
  margin: 0 0 14px;
}

.install-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.install-step-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--soft);
  border: 1.5px solid var(--brand-1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.install-step-text {
  padding-top: 6px;
}

/* --------------------------------------------------------- aviso de cookies */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1250;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cookie-consent.is-open {
  transform: translateY(0);
}

.cookie-consent-body {
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-consent-body p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  flex: 1 1 320px;
  line-height: 1.6;
}

.cookie-consent-text--short {
  display: none;
}

.cookie-consent-body a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

.cookie-consent-actions {
  flex-shrink: 0;
}

.cookie-consent-actions .btn-primary {
  height: 46px;
  padding: 0 32px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  /* Barra fina no rodapé, não uma folha grande — só o essencial + o botão. */
  .cookie-consent-body {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 12px 14px;
    gap: 12px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .cookie-consent-text--full {
    display: none;
  }

  .cookie-consent-text--short {
    display: block;
    flex: 1 1 auto;
    font-size: 12px;
    line-height: 1.4;
  }

  .cookie-consent-actions .btn-primary {
    width: auto;
    height: 38px;
    padding: 0 18px;
    font-size: 12.5px;
    white-space: nowrap;
  }
}
