/* Estilos globais - UI/UX unificado */
:root {
  --primary: #ea1d2c;
  --primary-hover: #c41835;
  --primary-soft: rgba(234, 29, 44, 0.08);
  --text: #3e3e3e;
  --text-muted: #717171;
  --border: #f2f2f2;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
  --section-gap: 24px;
}

* { box-sizing: border-box; }
::selection {
  background: rgba(234, 29, 44, 0.15);
  color: var(--text);
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Acessibilidade: foco visível */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Gateway cart bar - indicador pedido mínimo */
.gateway-cart-bar__min-order {
  font-size: 0.8125rem;
  color: #b45309;
  margin-left: auto;
  white-space: nowrap;
}

/* ========== SACOLA (Minha sacola) ========== */
.sacola-page {
  min-height: 100vh;
  background: var(--bg-alt);
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.sacola-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.sacola-skip:focus {
  left: 0;
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.sacola-page__header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top, 0));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.sacola-page__back {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  text-decoration: none;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.sacola-page__back:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
}
.sacola-page__back:active {
  background: rgba(234, 29, 44, 0.15);
}
.sacola-page__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.sacola-page__main {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}
.sacola-page__empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: sacolaEmptyFadeIn 0.4s ease;
}
@keyframes sacolaEmptyFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.sacola-page__empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.6;
}
.sacola-page__empty-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}
.sacola-page__empty-hint {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}
.sacola-page__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: background var(--transition), transform 0.05s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.sacola-page__btn--primary {
  background: var(--primary);
  color: #fff;
}
.sacola-page__btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
.sacola-page__btn:active {
  transform: scale(0.98);
}
.sacola-page__btn--primary:hover:active {
  transform: translateY(-1px) scale(0.98);
}
.sacola-page__content {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.sacola-page__list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.sacola-page__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}
.sacola-page__item:last-child {
  border-bottom: none;
}
.sacola-page__item-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt);
}
.sacola-page__item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sacola-page__item-info {
  flex: 1;
  min-width: 0;
}
.sacola-page__item-nome {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sacola-page__item-valor {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary);
}
.sacola-page__item-remove {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.sacola-page__item-remove:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.sacola-page__item-remove:active {
  background: rgba(234, 29, 44, 0.15);
}
.sacola-page__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.sacola-page__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.sacola-page__summary-row--total {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  padding-top: 14px;
  margin-top: 4px;
  border-top: 2px solid var(--border);
}
.sacola-page__summary-row--discount {
  color: #28a745;
}
.sacola-page__total-value {
  color: var(--primary);
  font-size: 1.25rem;
}
.sacola-page__trust {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 20px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  transition: background 0.2s;
}
#sacola-continue {
  width: 100%;
  box-sizing: border-box;
}

/* ========== CART (Meios de pagamento) ========== */
.cart-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.cart-page__header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 20px;
  padding-top: calc(16px + env(safe-area-inset-top, 0));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.cart-page__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.cart-page__logo svg {
  height: 28px;
  width: auto;
}
.cart-page__main {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  width: 100%;
}
.cart-page__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}
.cart-page__options {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}
.cart-page__option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.cart-page__option:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(234, 29, 44, 0.12);
  background: #fffbfb;
}
.cart-page__option:active {
  transform: scale(0.995);
}
.cart-page__option--secondary {
  border-style: dashed;
  opacity: 0.9;
}
.cart-page__option--secondary:hover {
  opacity: 1;
}
.cart-page__option svg {
  flex-shrink: 0;
  color: var(--text-muted);
}
.cart-page__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.cart-page__back:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.cart-page__back:active {
  background: rgba(234, 29, 44, 0.12);
}
.cart-page__footer {
  padding: 20px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Footer compartilhado */
.main-footer {
  margin-top: auto;
  padding: 24px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
}
.main-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-bottom: 12px;
}
.main-footer__nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.main-footer__nav a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.main-footer__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Print - esconder elementos não essenciais */
@media print {
  .gateway-cart-bar,
  .gateway-toast,
  .gateway-add-modal,
  .index-header__admin,
  .sacola-skip { display: none !important; }
}

@media (max-width: 480px) {
  .sacola-page__item {
    flex-wrap: wrap;
  }
  .sacola-page__item-remove {
    margin-left: auto;
  }
}

/* ========== GATEWAY MODAL (adicionar à sacola) ========== */
.gateway-add-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.gateway-add-modal--open {
  opacity: 1;
  visibility: visible;
}
.gateway-add-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.gateway-add-modal__box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}
.gateway-add-modal--open .gateway-add-modal__box {
  transform: translateY(0);
}
.gateway-add-modal__header {
  flex-shrink: 0;
  position: relative;
  padding-top: 8px;
  padding-bottom: 8px;
}
.gateway-add-modal__handle {
  width: 36px;
  height: 4px;
  background: rgba(0,0,0,0.15);
  border-radius: 2px;
  margin: 8px auto 12px;
}
.gateway-add-modal__close {
  position: absolute;
  top: 4px;
  right: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: var(--bg-alt);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.gateway-add-modal__close:hover {
  background: #eee;
  color: var(--primary);
}
.gateway-add-modal__close:active {
  background: #e5e5e5;
}
.gateway-add-modal__img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
}
.gateway-add-modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gateway-add-modal__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.gateway-add-modal__content {
  padding: 20px 20px 8px;
}
.gateway-add-modal__nome {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.gateway-add-modal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.gateway-add-modal__stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.gateway-add-modal__stepper-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border: none;
  background: var(--bg-alt);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary);
  transition: background var(--transition);
}
.gateway-add-modal__stepper-btn:hover {
  background: rgba(234, 29, 44, 0.1);
}
.gateway-add-modal__stepper-btn:active {
  background: rgba(234, 29, 44, 0.15);
}
.gateway-add-modal__qty {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
}
.gateway-add-modal__preco-unit {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}
.gateway-add-modal__opcoes {
  margin-bottom: 18px;
}
.gateway-add-modal__opcoes-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.gateway-add-modal__opcoes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gateway-add-modal__opcao-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.gateway-add-modal__opcao-item:hover {
  border-color: #e0e0e0;
}
.gateway-add-modal__opcao-item:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.gateway-add-modal__opcao-item input {
  accent-color: var(--primary);
}
.gateway-add-modal__obs {
  margin-bottom: 18px;
}
.gateway-add-modal__obs-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-muted);
}
.gateway-add-modal__obs-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 0.9375rem;
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  transition: border-color var(--transition);
}
.gateway-add-modal__obs-input:focus {
  outline: none;
  border-color: var(--primary);
}
.gateway-add-modal__total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0 4px;
  margin-bottom: 8px;
  border-top: 1px solid var(--border);
  font-size: 1.0625rem;
  font-weight: 600;
}
.gateway-add-modal__preco {
  color: var(--primary);
  font-size: 1.375rem;
}
.gateway-add-modal__footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.gateway-add-modal__btn {
  flex: 1;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.gateway-add-modal__btn--cancel {
  background: var(--bg-alt);
  border: 2px solid var(--border);
  color: var(--text-muted);
}
.gateway-add-modal__btn--cancel:hover {
  background: #eee;
  border-color: #ddd;
}
.gateway-add-modal__btn--cancel:active {
  background: #e5e5e5;
}
.gateway-add-modal__btn--add {
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gateway-add-modal__btn--add:hover {
  background: var(--primary-hover);
}
.gateway-add-modal__btn--add:active {
  transform: scale(0.98);
}
.gateway-add-modal__btn--adding {
  pointer-events: none;
  opacity: 0.85;
}
.gateway-add-modal__add-check { display: none; }
.gateway-add-modal__btn--adding .gateway-add-modal__add-inner { display: none; }
.gateway-add-modal__btn--adding .gateway-add-modal__add-check { display: inline; }

/* Modal centralizado no desktop */
@media (min-width: 560px) {
  .gateway-add-modal { align-items: center; }
  .gateway-add-modal__box {
    border-radius: 20px;
    max-height: 88vh;
    transform: scale(0.9);
  }
  .gateway-add-modal--open .gateway-add-modal__box {
    transform: scale(1);
  }
}

/* ========== CONFIRM MODAL (Utils.confirmModal) ========== */
.utils-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: utilsFadeIn 0.2s ease;
}
.utils-confirm-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 48px rgba(0,0,0,0.2);
}
.utils-confirm-title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
}
.utils-confirm-message {
  margin: 0 0 24px;
  font-size: 1rem;
  color: #6b6b6b;
  line-height: 1.5;
}
.utils-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.utils-confirm-btn {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s ease;
}
.utils-confirm-btn--cancel {
  border: 2px solid #eee;
  background: #fff;
  color: #6b6b6b;
}
.utils-confirm-btn--cancel:hover {
  background: #f7f7f7;
  border-color: #ddd;
}
.utils-confirm-btn--cancel:active {
  background: #eee;
}
.utils-confirm-btn--ok {
  border: none;
  background: var(--primary);
  color: #fff;
}
.utils-confirm-btn--ok:hover {
  background: var(--primary-hover);
}
.utils-confirm-btn--ok:active {
  background: #b31525;
}

/* Preferir menos movimento (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body.scroll-smooth {
    scroll-behavior: auto;
  }
}

/* Gateway Toast */
.gateway-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  z-index: 100000;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s;
}
.gateway-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.gateway-toast__icon { color: #4ade80; font-weight: 700; }

/* Gateway Cart Bar — “Aurora” + shimmer + ripple + flash (o <a> é gateway-cart-bar) */
a.gateway-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 56px;
  margin: 12px 16px;
  margin-bottom: calc(12px + env(safe-area-inset-bottom));
  margin-left: max(16px, env(safe-area-inset-left));
  margin-right: max(16px, env(safe-area-inset-right));
  padding: 12px 16px;
  background: transparent;
  color: #3e3e3e;
  text-decoration: none;
  border-radius: 16px;
  font-weight: 500;
  font-size: 0.9375rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 0.35s ease, transform 0.2s ease;
}
a.gateway-cart-bar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 19px;
  background: conic-gradient(from 180deg at 50% 50%, #ea1d2c, #ff8a8a, #ea1d2c, #c41835, #ea1d2c);
  z-index: 0;
  animation: gatewayCartAurora 8s linear infinite;
}
@keyframes gatewayCartAurora {
  to { transform: rotate(360deg); }
}
a.gateway-cart-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 15px;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,0.5) 50%, transparent 62%);
  background-size: 220% 100%;
  animation: gatewayCartShimmer 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes gatewayCartShimmer {
  0%, 100% { background-position: 220% 0; opacity: 0; }
  12% { opacity: 0.4; }
  48% { background-position: -220% 0; opacity: 0.2; }
  55% { opacity: 0; }
}
.gateway-cart-bar__aurora {
  position: absolute;
  inset: 3px;
  border-radius: 13px;
  background: #fff;
  z-index: 1;
  pointer-events: none;
}
.gateway-cart-bar__ripple {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(circle 120px at var(--rx, 50%) var(--ry, 50%), rgba(234, 29, 44, 0.35) 0%, transparent 65%);
  opacity: 0;
  transform: scale(0.2);
}
a.gateway-cart-bar.gateway-cart-bar--rippling .gateway-cart-bar__ripple {
  animation: gatewayCartRipple 0.55s ease-out forwards;
}
@keyframes gatewayCartRipple {
  to { opacity: 0; transform: scale(2.5); }
}
a.gateway-cart-bar:hover {
  box-shadow: 0 8px 32px rgba(234, 29, 44, 0.2);
  transform: translateY(-2px);
}
a.gateway-cart-bar:active {
  transform: translateY(0);
}
a.gateway-cart-bar:focus-visible {
  outline: 2px solid #ea1d2c;
  outline-offset: 3px;
}
.gateway-cart-bar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 4;
}
.gateway-cart-bar__icon-wrap {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fff5f5 0%, #ffe8e8 100%);
  border-radius: 12px;
  color: #ea1d2c;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 4px rgba(234, 29, 44, 0.12);
}
a.gateway-cart-bar:hover .gateway-cart-bar__icon-wrap {
  transform: scale(1.06) rotate(-3deg);
}
.gateway-cart-bar__icon {
  display: flex;
}
.gateway-cart-bar__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}
.gateway-cart-bar__label {
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.gateway-cart-bar__items {
  font-size: 0.8125rem;
  color: #717171;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gateway-cart-bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}
.gateway-cart-bar__cost {
  font-weight: 800;
  font-size: 1.25rem;
  color: #ea1d2c;
  letter-spacing: -0.03em;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
}
.gateway-cart-bar__cost--flash {
  animation: gatewayCartCostFlash 0.65s ease;
}
@keyframes gatewayCartCostFlash {
  0% { transform: scale(1); color: #ea1d2c; }
  40% { transform: scale(1.12); color: #b31525; }
  100% { transform: scale(1); color: #ea1d2c; }
}
.gateway-cart-bar__btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, #ea1d2c 0%, #d01828 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 12px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(234, 29, 44, 0.35);
}
a.gateway-cart-bar:hover .gateway-cart-bar__btn {
  box-shadow: 0 4px 16px rgba(234, 29, 44, 0.45);
}
a.gateway-cart-bar:active .gateway-cart-bar__btn {
  transform: scale(0.96);
}
.gateway-cart-bar__arrow,
.gateway-cart-bar__chevron,
.gateway-cart-bar__cost-wrap,
.gateway-cart-bar__cta { flex-shrink: 0; }
.gateway-cart-bar--empty { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  a.gateway-cart-bar::before,
  a.gateway-cart-bar::after { animation: none; }
  a.gateway-cart-bar:hover .gateway-cart-bar__icon-wrap { transform: none; }
  .gateway-cart-bar__cost--flash { animation: none; }
  a.gateway-cart-bar.gateway-cart-bar--rippling .gateway-cart-bar__ripple { animation: none; }
}

/* Gate page - estados ativos complementares */
.gate-header__back:active { background: rgba(234, 29, 44, 0.12); }
.gate-payment-tab:active { opacity: 0.9; }
.gate-cartao-btn:active { transform: scale(0.98); }

@media (min-width: 560px) {
  a.gateway-cart-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 520px;
    min-height: 58px;
    padding: 14px 20px;
    margin-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  a.gateway-cart-bar:hover { transform: translateX(-50%) translateY(-2px); }
  a.gateway-cart-bar:active { transform: translateX(-50%) translateY(0); }
  .gateway-cart-bar__icon-wrap { width: 46px; height: 46px; }
  .gateway-cart-bar__cost { font-size: 1.375rem; }
  .gateway-cart-bar__btn { padding: 12px 24px; font-size: 0.9375rem; }
}

/* ========== ADDRESS CHECKOUT (gate - injetado por JS) ========== */
.address-checkout { margin-bottom: 20px; }
.address-checkout__row { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.address-checkout__row--cep { flex-direction: column; }
.address-checkout__input-wrap { flex: 1; min-width: 0; }
.address-checkout__input-wrap--cep { display: flex; gap: 10px; align-items: flex-start; }
.address-checkout__input,
.address-checkout__field {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.address-checkout__input:focus,
.address-checkout__field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}
.address-geo-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.address-geo-btn:hover { background: var(--primary-hover); }
.address-geo-btn:active { background: #b31525; }
.address-geo-btn:disabled { opacity: 0.7; cursor: wait; }
.address-geo-btn__icon { font-size: 1rem; }
.address-checkout__hint { font-size: 0.875rem; color: var(--text-muted); margin: 8px 0 16px; }
.address-checkout__extra { display: flex; flex-direction: column; gap: 14px; }
.address-checkout__field-wrap { margin-bottom: 0; }
.address-checkout__field-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.address-checkout__required { color: var(--primary); }
.address-checkout__row--numero-complemento { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }

/* ========== GATE PIX ========== */
.gate-pix-payment { margin-top: 16px; }
.gate-pix-body {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.gate-pix-instruction {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  text-align: center;
}
.gate-pix-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
@media (min-width: 560px) {
  .gate-pix-content { flex-direction: row; align-items: flex-start; }
}
.gate-pix-qr-area { flex-shrink: 0; }
.gate-pix-qr-box {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
}
.gate-pix-qr-box canvas { display: block; margin: 0 auto; }
.gate-pix-divider { width: 1px; height: 1px; background: var(--border); }
.gate-pix-copia-area { flex: 1; min-width: 0; width: 100%; }
.gate-pix-copia-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
}
.gate-pix-copia-row { display: flex; gap: 8px; }
.gate-pix-input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  font-family: monospace;
}
.gate-pix-btn-copiar {
  padding: 12px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.gate-pix-btn-copiar:hover { background: var(--primary-hover); }
.gate-pix-btn-copiar:active { background: #b31525; }
.gate-pix-aviso { font-size: 0.9375rem; color: var(--text-muted); margin: 0; }
.gate-pix-aviso--loading { text-align: center; padding: 1rem; color: var(--text-muted); }
