/* Outfit — latin-ext + latin (300–800) */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJuktqQ4E.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJtEtq.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJuktqQ4E.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJtEtq.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJuktqQ4E.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJtEtq.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJuktqQ4E.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJtEtq.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJuktqQ4E.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJtEtq.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJuktqQ4E.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/outfit/v15/QGYvz_MVcBeNP4NJtEtq.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --laranja-escuro: #df4400;
  --laranja: #ff5c00;
  --laranja-claro: #ff8533;
  --amarelo: #ffc000;
  --vermelho: #ef4444;
  --cinza-900: #0f172a;
  --cinza-700: #334155;
  --cinza-500: #64748b;
  --cinza-300: #cbd5e1;
  --cinza-200: #e2e8f0;
  --cinza-100: #f1f5f9;
  --cinza-50: #f8fafc;
  --branco: #ffffff;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(255, 92, 0, 0.06), 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --header-h: 62px;
  --bottom-nav-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  
  /* Glassmorphism helpers */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Exempt some elements from broad transition to prevent layout shift / heavy paint */
input, textarea, select, .qty-btn, .bottom-nav-item, .btn-camera {
  transition: transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top right, #fff9f6 0%, var(--cinza-100) 40%, var(--cinza-100) 100%);
  color: var(--cinza-900);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

a {
  color: var(--laranja);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--laranja-escuro);
}

.hidden {
  display: none !important;
}

/* ============= SPLASH INICIAL ============= */
.app-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background: linear-gradient(165deg, var(--laranja-escuro) 0%, var(--laranja) 45%, var(--laranja-claro) 100%);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.app-splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.app-splash-tagline {
  margin: 0;
  color: var(--branco);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  animation: splashTaglineFadeIn 0.9s ease 0.65s forwards;
}

@keyframes splashTaglineFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 0.95;
    transform: translateY(0);
  }
}

.app-splash.splash-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash-logo {
  width: min(42vw, 148px);
  height: min(42vw, 148px);
  object-fit: contain;
  border-radius: 24px;
  opacity: 0;
  animation: splashLogoFadeIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.18));
}

@keyframes splashLogoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

body.splash-active .login-card {
  opacity: 0;
  transform: translateY(12px);
}

body.splash-done .login-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.muted {
  color: var(--cinza-500);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* ============= BUTTONS ============= */
.btn {
  appearance: none;
  border: 1px solid var(--cinza-300);
  background: var(--branco);
  color: var(--cinza-900);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 0.98rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  box-shadow: var(--shadow-sm);
}

.btn:hover:not(:disabled) {
  border-color: var(--cinza-500);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--laranja-claro), var(--laranja));
  border-color: var(--laranja);
  color: var(--branco);
  box-shadow: 0 4px 14px rgba(255, 92, 0, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--laranja), var(--laranja-escuro));
  border-color: var(--laranja-escuro);
  box-shadow: 0 6px 20px rgba(255, 92, 0, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.96) translateY(0);
  box-shadow: 0 2px 8px rgba(255, 92, 0, 0.2);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--cinza-700);
  box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 92, 0, 0.08);
  color: var(--laranja-escuro);
  box-shadow: none;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 0.88rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ============= LOGIN ============= */
.login-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--laranja-escuro), var(--laranja-claro));
  padding: calc(24px + var(--safe-top)) 20px calc(16px + var(--safe-bottom));
  min-height: 100dvh;
}

.login-footer {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
  width: 100%;
}

.login-version {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.03em;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--branco);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: var(--shadow-md);
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 22px;
}

.login-header .app-logo {
  margin: 0 auto;
}

.login-header h1 {
  margin: 12px 0 4px;
  font-size: 1.5rem;
}

.login-header p {
  margin: 0;
  color: var(--cinza-500);
  font-size: 0.92rem;
}

.app-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.app-logo.sm {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.login-footer {
  margin-top: 20px;
  text-align: center;
  color: var(--cinza-500);
}

.field-hint {
  display: block;
  margin-top: 4px;
  color: var(--cinza-500);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* ============= FORMS ============= */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--cinza-700);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--branco);
  font-family: inherit;
  color: var(--cinza-900);
  width: 100%;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: all 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--laranja);
  box-shadow: 0 0 0 4px rgba(255, 92, 0, 0.12), inset 0 1px 2px rgba(15, 23, 42, 0.02);
  background: var(--branco);
}

.form-message {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 500;
}

.form-message.error {
  color: var(--vermelho);
}

.form-message.success {
  color: var(--laranja-escuro);
}

.form-message.warn {
  color: var(--amarelo);
}

.qty-stepper {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 8px;
  align-items: stretch;
}

.qty-btn {
  appearance: none;
  border: 1.5px solid var(--cinza-200);
  background: var(--branco);
  border-radius: var(--radius-sm);
  color: var(--laranja);
  min-height: 52px;
  min-width: 52px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.qty-btn:hover {
  background: #fff5ef;
  border-color: var(--laranja-claro);
  color: var(--laranja-escuro);
}

.qty-btn:active {
  transform: scale(0.92);
  background: #ffe8d9;
}

.qty-btn.btn-qty-menos::before {
  content: '';
  width: 14px;
  height: 2.5px;
  background: currentColor;
  border-radius: 1px;
}

.qty-btn.btn-qty-mais::before,
.qty-btn.btn-qty-mais::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.qty-btn.btn-qty-mais::before {
  width: 14px;
  height: 2.5px;
}

.qty-btn.btn-qty-mais::after {
  width: 2.5px;
  height: 14px;
}

.field .qty-stepper input[type='number'] {
  padding: 0;
}

.qty-stepper input[type='number'] {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  min-height: 52px;
  width: 100%;
  border: 1.5px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  padding: 0;
  margin: 0;
  appearance: textfield;
  -moz-appearance: textfield;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.qty-stepper input[type='number']:focus {
  outline: none;
  border-color: var(--laranja);
  box-shadow: 0 0 0 4px rgba(255, 92, 0, 0.12);
}

.qty-stepper input[type='number']::-webkit-outer-spin-button,
.qty-stepper input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-sugerida-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fff5ef;
  border: 1px solid rgba(252, 89, 4, 0.22);
}

.qty-sugerida-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qty-sugerida-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--laranja-escuro);
}

.qty-sugerida-hint {
  font-size: 0.75rem;
  color: var(--cinza-500);
}

.qty-sugerida-btn {
  appearance: none;
  flex-shrink: 0;
  border: 1px solid var(--laranja);
  background: var(--branco);
  color: var(--laranja-escuro);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 40px;
}

.qty-sugerida-btn strong {
  font-size: 1.05rem;
}

.qty-sugerida-btn:active {
  transform: scale(0.98);
}

.qty-sugerida-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* ============= APP SHELL ============= */
.app-body {
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 72px);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(223, 68, 0, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--branco);
  padding: calc(12px + var(--safe-top)) 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(223, 68, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-header-text {
  min-width: 0;
}

.app-header-text strong {
  display: block;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-text small {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.app-version {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.03em;
  line-height: 1;
}

.loja-pill {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--branco);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.app-main {
  padding: 14px 14px 90px;
  max-width: 520px;
  margin: 0 auto;
}

.panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
}

.panel.active {
  display: flex;
  animation: panelSlideUp 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes panelSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--branco);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card h2,
.card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-hero {
  gap: 10px;
  padding: 16px 16px;
  position: relative;
  z-index: 1;
}

.card-hero h2 {
  font-size: 1.15rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.card-header-acoes {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.card-header h3 {
  flex: 1;
  line-height: 1.3;
}

.manual-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.input-with-camera {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.input-with-camera input {
  width: 100%;
  padding: 12px 46px 12px 16px;
  border: 1.5px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  min-width: 0;
  background: var(--branco);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: all 0.2s ease;
}

.input-with-camera input:focus {
  outline: none;
  border-color: var(--laranja);
  box-shadow: 0 0 0 4px rgba(255, 92, 0, 0.12), inset 0 1px 2px rgba(15, 23, 42, 0.02);
  background: var(--branco);
}

.btn-camera {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #fff5ef;
  color: var(--laranja);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-camera:hover {
  background: #ffe8d9;
  color: var(--laranja-escuro);
}

.btn-camera:active {
  transform: translateY(-50%) scale(0.9);
}

.icon-camera {
  width: 20px;
  height: 20px;
  display: block;
}

.scanner-wrapper {
  background: #0f172a;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-lg);
}

.reader-container {
  position: relative !important;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #020617;
}

.reader-container::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, rgba(34, 197, 94, 0.05), #22c55e 50%, rgba(34, 197, 94, 0.05));
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.85), 0 0 24px rgba(34, 197, 94, 0.4);
  animation: scanLaser 2s ease-in-out infinite alternate;
  z-index: 10;
  pointer-events: none;
}

.reader {
  width: 100% !important;
  min-height: 240px;
  background: transparent !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.reader--ios {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reader-video-ios {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 55vh;
  object-fit: cover;
  background: #000;
  display: block;
}

@keyframes scanLaser {
  0% {
    top: 4%;
  }
  100% {
    top: 96%;
  }
}

#qr-shaded-region {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#qr-shaded-region > div {
  display: none !important;
}

.scanner-wrapper .btn-ghost {
  color: var(--branco);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.scanner-wrapper .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.status {
  font-size: 0.9rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--cinza-100);
  color: var(--cinza-700);
  display: none;
  line-height: 1.4;
}

.status.show {
  display: block;
}

.status.error {
  background: #fdecea;
  color: var(--vermelho);
}

.status.success {
  background: #fff5ef;
  color: var(--laranja-escuro);
}

.status.warn {
  background: #fff7e0;
  color: #8a6d00;
}

#produtoPrincipal,
#estoqueUnitarioPrincipal {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.produto-foto-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  padding: 10px;
  min-height: 140px;
}

.produto-foto-wrap img {
  max-width: 100%;
  max-height: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.produto-resumo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.produto-chip {
  background: var(--cinza-50);
  border: 1.5px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}

.produto-chip span {
  font-size: 0.72rem;
  color: var(--cinza-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.produto-chip strong {
  font-size: 0.9rem;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--cinza-900);
}

#prodMultiplo {
  color: #df4400;
}

.produto-preco {
  margin: 0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fff5ef 0%, #ffece0 100%);
  border: 1.5px solid rgba(255, 92, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 92, 0, 0.05);
}

.produto-preco strong {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--laranja-escuro);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.estoque-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.estoque-item {
  background: var(--cinza-50);
  border: 1.5px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.estoque-item.minha-loja {
  border-color: var(--laranja);
  background: linear-gradient(135deg, #fff5ef 0%, #ffece0 100%);
  box-shadow: 0 4px 18px rgba(255, 92, 0, 0.12);
}

.estoque-item.destaque {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fff5ef 0%, #ffd9c2 100%);
  border-color: rgba(255, 92, 0, 0.35);
}

.estoque-rotulo {
  font-size: 0.75rem;
  color: var(--cinza-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.estoque-item.minha-loja .estoque-rotulo {
  color: var(--laranja-escuro);
}

.estoque-valor {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--cinza-900);
  letter-spacing: -0.01em;
}

.estoque-item.minha-loja .estoque-valor {
  color: var(--laranja-escuro);
}

.estoque-item small {
  color: var(--cinza-500);
  font-size: 0.8rem;
  font-weight: 500;
}

.estoque-gtin-principal {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--cinza-600);
  font-weight: 600;
}

.estoque-gtins-extras {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.estoque-gtins-titulo {
  margin: 0;
  font-size: 0.82rem;
  color: var(--cinza-700);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.estoque-gtins-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.estoque-gtin-extra {
  border: 1px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  background: var(--branco);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.estoque-gtin-extra header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.estoque-gtin-extra-tipo {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--laranja-escuro);
  word-break: break-all;
  line-height: 1.3;
}

.estoque-gtin-extra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.estoque-gtin-extra-item {
  background: var(--cinza-50);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.estoque-gtin-extra-item strong {
  font-size: 1.1rem;
  line-height: 1.1;
}

.estoque-gtin-extra-erro {
  font-size: 0.78rem;
  color: var(--vermelho);
}

.destino-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.destino-fieldset-cabecalho {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.destino-fieldset-titulo {
  font-size: 0.88rem;
  color: var(--cinza-700);
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.destino-pedido-resumo {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--vermelho);
  white-space: nowrap;
  flex-shrink: 0;
}

.destino-split-aviso {
  margin: -4px 0 2px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--cinza-600);
}

.destino-card-titulo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.destino-qtd {
  color: var(--vermelho);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.destino-card--fixo {
  cursor: default;
  opacity: 1;
}

.destino-card--fixo input:disabled {
  opacity: 1;
}

#resumoDestinoCards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#resumoDestinoCards .destino-card,
#resumoDestinoCards .destino-card:has(input:checked) {
  border-color: var(--cinza-200);
  background: var(--branco);
}

#resumoDestinoCards .destino-card--info {
  cursor: default;
}

#resumoDestinoCards .destino-card--opcional {
  cursor: pointer;
}

.radio-card {
  border: 1.5px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--branco);
  min-height: 68px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-card:hover {
  border-color: var(--cinza-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.radio-card:active {
  transform: scale(0.98);
}

.radio-card input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--laranja);
  flex-shrink: 0;
}

.radio-card strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--cinza-900);
}

.radio-card small {
  color: var(--cinza-500);
  font-size: 0.84rem;
  font-weight: 500;
}

.radio-card:has(input:checked) {
  border-color: var(--laranja);
  background: linear-gradient(135deg, #fff5ef 0%, #ffece0 100%);
  box-shadow: 0 4px 14px rgba(255, 92, 0, 0.08);
}

.solicitar-loja-info {
  margin: -6px 0 0;
}

.solicitar-loja-info strong {
  color: var(--laranja-escuro);
}

.badge {
  display: inline-block;
  background: var(--cinza-200);
  color: var(--cinza-700);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.badge.ok {
  background: #d1fae5;
  color: #065f46;
}

.badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.badge.err {
  background: #fee2e2;
  color: #991b1b;
}

.historico-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.historico-item {
  border: 1px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--cinza-50);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.historico-item-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.historico-item-toggle:focus-visible {
  outline: 2px solid var(--azul, #2563eb);
  outline-offset: 2px;
  border-radius: 6px;
}

.historico-item header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--cinza-500);
  gap: 8px;
}

.historico-titulo-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.historico-titulo {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.3;
}

.historico-chevron {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--cinza-500);
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

.historico-item.is-open .historico-chevron {
  transform: rotate(180deg);
}

.historico-meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--cinza-700);
  line-height: 1.4;
}

.historico-obs {
  margin: 0;
  font-size: 0.84rem;
}

.historico-erro {
  color: var(--vermelho);
}

.historico-produtos {
  margin-top: 4px;
  padding: 10px 10px 8px;
  border-top: 1px solid var(--cinza-200);
}

.historico-produtos-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.historico-produto {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--branco, #fff);
  border: 1px solid var(--cinza-200);
}

.historico-produto-nome {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--cinza-900, #111);
}

.historico-produto-meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--cinza-600);
  line-height: 1.35;
}

/* ============= BOTTOM NAV ============= */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding: 8px 12px calc(8px + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.04);
}

.app-version-login {
  display: block;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--cinza-400);
}

.bottom-nav-item {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--cinza-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  min-height: 54px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item:hover:not(.active) {
  color: var(--cinza-900);
  background: rgba(15, 23, 42, 0.03);
}

.bottom-nav-item.active {
  color: var(--laranja);
  background: rgba(255, 92, 0, 0.08);
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: scale(1.1);
}

.bottom-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-svg {
  display: grid;
  place-items: center;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 24px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--vermelho);
  color: var(--branco);
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* ============= CARRINHO ============= */
.carrinho-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.carrinho-item {
  border: 1px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--cinza-50);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.carrinho-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.carrinho-item-titulo {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  flex: 1;
}

.btn-remover {
  border: none;
  background: #fdecea;
  color: var(--vermelho);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.85rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.carrinho-item-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--cinza-500);
}

.carrinho-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.carrinho-item-preco {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--laranja-escuro);
  line-height: 1.1;
}

.qty-stepper-sm {
  grid-template-columns: 36px 48px 36px;
  gap: 4px;
}

.qty-btn-sm {
  min-height: 36px;
  min-width: 36px;
  padding: 0;
}

.qty-btn-sm.btn-qty-menos::before {
  width: 11px;
}

.qty-btn-sm.btn-qty-mais::before {
  width: 11px;
}

.qty-btn-sm.btn-qty-mais::after {
  height: 11px;
}

.qty-stepper-sm input[type='number'] {
  min-height: 36px;
  font-size: 1rem;
  text-align: center;
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.carrinho-totais {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, #fff5ef, #ffe8d9);
  border-radius: var(--radius-sm);
  border: 1px solid #ffb88a;
}

.carrinho-totais > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.carrinho-total-label {
  font-size: 0.75rem;
  color: var(--cinza-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.carrinho-totais strong {
  font-size: 1.4rem;
  color: var(--laranja-escuro);
}

.carrinho-total-valor {
  font-size: 1.8rem !important;
}

/* ============= RESUMO PEDIDO ============= */
.resumo-lista {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.resumo-item {
  border: 1px solid var(--cinza-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--cinza-50);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resumo-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.resumo-item-titulo {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.3;
  flex: 1;
}

.resumo-item-qtd {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cinza-700);
  background: var(--branco);
  border: 1px solid var(--cinza-200);
  border-radius: 999px;
  padding: 4px 10px;
}

.resumo-item-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--cinza-500);
}

.resumo-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.resumo-item-preco-unit {
  font-size: 0.82rem;
  color: var(--cinza-600);
}

.resumo-item-subtotal {
  font-size: 1rem;
  color: var(--laranja-escuro);
}

.resumo-totais {
  margin-top: 4px;
}

.resumo-valor-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ffb88a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.resumo-valor-total span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cinza-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.resumo-valor-total strong {
  font-size: 1.35rem;
  color: var(--laranja-escuro);
}

.resumo-debug {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8f3;
  border: 2px dashed #fc5904;
}

.resumo-debug-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cinza-600);
  margin-bottom: 6px;
}

.resumo-debug code {
  display: block;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #334155;
  word-break: break-all;
  white-space: pre-wrap;
}

/* ============= SUCESSO / CONFETE ============= */
.sucesso-celebracao {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sucesso-celebracao.show {
  opacity: 1;
  pointer-events: auto;
}

.sucesso-fill {
  position: absolute;
  left: 50%;
  bottom: -10%;
  width: 120vmax;
  height: 120vmax;
  margin-left: -60vmax;
  background: radial-gradient(circle at 50% 55%, var(--laranja-claro), var(--laranja) 55%, var(--laranja-escuro));
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.sucesso-fill.spread {
  transform: scale(1);
  border-radius: 0;
}

.sucesso-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.sucesso-card {
  position: relative;
  z-index: 3;
  width: min(100%, 360px);
  max-height: min(92vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--branco);
  border-radius: var(--radius);
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: scale(0.85) translateY(20px);
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.sucesso-celebracao.card-visible .sucesso-card {
  opacity: 1;
}

.sucesso-card.pop {
  transform: scale(1) translateY(0);
}

.sucesso-check {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.sucesso-check-circle {
  stroke: var(--laranja);
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: sucesso-stroke 0.55s cubic-bezier(0.65, 0, 0.45, 1) 0.15s forwards;
}

.sucesso-check-mark {
  stroke: var(--laranja-escuro);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: sucesso-stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.55s forwards;
}

@keyframes sucesso-stroke {
  to {
    stroke-dashoffset: 0;
  }
}

.sucesso-card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  color: var(--cinza-900);
}

.sucesso-pedido-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cinza-500);
}

.sucesso-pedido-numero {
  margin: 6px 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--laranja-escuro);
  word-break: break-all;
  line-height: 1.35;
}

.sucesso-pedido-numero.multi {
  white-space: pre-line;
  font-size: 0.82rem;
}

.sucesso-debug {
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 10px;
  background: #fff8f3;
  border: 2px solid #fc5904;
  text-align: left;
}

.sucesso-debug-label {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9a3412;
}

.sucesso-debug-label + .sucesso-debug-label {
  margin-top: 10px;
}

.sucesso-debug-url {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: #1e293b;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sucesso-debug-payload {
  margin: 0;
  padding: 8px;
  max-height: 180px;
  overflow: auto;
  font-size: 0.62rem;
  line-height: 1.4;
  color: #334155;
  background: #fff;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sucesso-btn {
  background: var(--branco);
  color: var(--laranja-escuro);
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: none;
}

.sucesso-celebracao.card-visible .sucesso-btn {
  background: var(--laranja);
  color: var(--branco);
  border-color: var(--laranja);
}

/* ============= STICKY ACTION ============= */
.sticky-action {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  z-index: 25;
  padding: 14px 16px 10px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.96) 80%, rgba(255, 255, 255, 0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sticky-action .btn {
  box-shadow: 0 8px 24px rgba(255, 92, 0, 0.22);
}

/* ============= MODAL ALERTA ============= */
.modal-alerta {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-alerta.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-alerta-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-alerta-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(85vh, 560px);
  overflow: auto;
  background: var(--branco);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-alerta.show .modal-alerta-card {
  transform: scale(1);
}

.modal-alerta-card h2 {
  margin: 0 0 10px;
  color: var(--vermelho);
  font-size: 1.15rem;
}

.modal-alerta-lista {
  margin: 12px 0;
  padding-left: 18px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.modal-alerta-lista li + li {
  margin-top: 6px;
}

.modal-alerta-dica {
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.modal-alerta-acoes {
  display: grid;
  gap: 8px;
}

.historico-acoes {
  margin-top: 10px;
}

.historico-acoes .btn {
  width: 100%;
}

/* ============= FLY TO CART ============= */
.fly-to-cart {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  left: var(--fly-x0, 50%);
  top: var(--fly-y0, 50%);
  width: 52px;
  height: 52px;
  margin: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--laranja-claro), var(--laranja));
  color: var(--branco);
  box-shadow: 0 8px 22px rgba(252, 89, 4, 0.45);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  animation: flyToCart 0.72s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  will-change: transform, left, top, opacity;
}

.fly-to-cart-qty {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--branco);
  color: var(--laranja);
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

@keyframes flyToCart {
  0% {
    left: var(--fly-x0);
    top: var(--fly-y0);
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
  }

  55% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.92) rotate(-6deg);
  }

  100% {
    left: var(--fly-x1);
    top: var(--fly-y1);
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
    opacity: 0;
  }
}

.nav-badge.bump {
  animation: badgeBump 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item.cart-land .bottom-nav-svg,
.bottom-nav-item.cart-land .bottom-nav-icon {
  animation: cartLand 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgeBump {
  0%,
  100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.45);
  }
}

@keyframes cartLand {
  0%,
  100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.22);
  }
}

/* ============= LOADING CONSULTA ============= */
.consulta-loading {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.consulta-loading.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.consulta-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 36px;
  background: var(--branco);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.consulta-loading.show .consulta-loading-inner {
  transform: scale(1);
}

.consulta-loading-spinner {
  position: relative;
  width: 56px;
  height: 56px;
}

.consulta-loading-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--laranja);
  border-right-color: rgba(252, 89, 4, 0.35);
  animation: consultaSpin 0.85s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

.consulta-loading-ring--inner {
  inset: 8px;
  border-top-color: var(--laranja-claro);
  border-right-color: rgba(253, 122, 48, 0.25);
  animation-direction: reverse;
  animation-duration: 0.65s;
}

.consulta-loading-text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cinza-700);
  letter-spacing: 0.01em;
}

.envio-loading-inner {
  min-width: min(100%, 320px);
  align-items: center;
}

.envio-loading-passos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: stretch;
  width: 100%;
}

.envio-loading-titulo {
  text-align: center;
  width: 100%;
}

.envio-loading-passo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--cinza-500);
}

.envio-loading-passo--ativo {
  color: var(--cinza-800);
  font-weight: 600;
}

.envio-loading-passo--ok {
  color: var(--verde-600, #059669);
}

.envio-loading-passo--erro {
  color: var(--vermelho, #dc2626);
}

.envio-loading-icone {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
}

.envio-loading-passo--ativo .envio-loading-icone::before {
  content: '';
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(252, 89, 4, 0.25);
  border-top-color: var(--laranja);
  animation: consultaSpin 0.75s linear infinite;
}

.envio-loading-passo--ok .envio-loading-icone::before {
  content: '✓';
  font-weight: 700;
}

.envio-loading-passo--erro .envio-loading-icone::before {
  content: '✕';
  font-weight: 700;
}

.envio-loading-passo--pendente .envio-loading-icone::before {
  content: '○';
  opacity: 0.45;
}

@keyframes consultaSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .consulta-loading-ring {
    animation-duration: 1.4s;
  }

  .consulta-loading-ring--inner {
    animation-duration: 1.1s;
  }
}

@media (min-width: 600px) {
  .app-main {
    padding: 20px 20px 100px;
  }

  .produto-resumo {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============= SEARCHING LOTTIE ============= */
.searching-video-box {
  width: 100%;
  max-height: 180px;
  margin: 0 0 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
  position: relative;
  z-index: 0;
  box-sizing: border-box;
}

.searching-video-box lottie-player {
  width: 100%;
  height: 180px;
  max-width: 100%;
  display: block;
}

.searching-video-box.hidden {
  display: none !important;
}
