/* ============================================================
   FARM Rio — Editorial Luxury v2 (Vanguard_UI_Architect)
   Vibe: Editorial Luxury  |  Layout: Z-Axis Cascade + Bento
   Font: Plus Jakarta Sans + Fraunces
   ============================================================ */

:root {
  --bg:           #FDFAF5;
  --surface:      #FFFCF8;
  --surface-2:    #F5F0E8;
  --ink:          #18130E;
  --muted:        #7A7060;
  --light:        #B5ACA0;
  --green:        #145c38;
  --green-deep:   #0D3D27;
  --green-soft:   #EEF4EF;
  --green-pale:   #F3F8F4;
  --coral:        #D4603A;
  --gold:         #C28A32;
  --line:         rgba(24, 19, 14, 0.09);
  --line-soft:    rgba(24, 19, 14, 0.05);
  --danger:       #8C2F24;

  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans:  'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --shell: 430px;
  --ease:   cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.34, 1.46, 0.64, 1);
  --exit:   cubic-bezier(0.72, 0, 0.68, 0);

  --r-xs:   8px;
  --r-sm:   12px;
  --r-md:   18px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-full: 999px;

  --sh-sm:  0 1px 3px rgba(24,19,14,.05), 0 4px 16px rgba(24,19,14,.04);
  --sh-md:  0 2px 8px rgba(24,19,14,.07), 0 8px 28px rgba(24,19,14,.05);
  --sh-green: 0 4px 20px rgba(20,92,56,.14), 0 8px 40px rgba(20,92,56,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: #E8DDD1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Film grain — fixed, pointer-events: none, never on scrolling containers */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px;
  mix-blend-mode: multiply;
}

/* ── App Shell ─────────────────────────────────────────────── */
#app {
  max-width: var(--shell);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Screens ────────────────────────────────────────────────── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
}
.screen.active {
  display: flex;
  animation: screenIn 0.55s var(--ease) both;
}
.screen.center {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 28px;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll-reveal classes */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ── Top Bar ────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  gap: 12px;
}
.top-bar.transparent {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
}

.brand-logo {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--ink);
}
.top-bar.transparent .brand-logo {
  color: #fff;
  text-shadow: 0 1px 16px rgba(0,0,0,.28);
}

.top-tag {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--green);
  border: 1px solid rgba(20,92,56,.18);
  border-radius: var(--r-full);
  padding: 5px 11px;
  background: rgba(255,253,249,.8);
  flex-shrink: 0;
}

.link-back {
  border: none;
  background: none;
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.link-back:hover { color: var(--ink); }

/* ── Typography ─────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.title-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.13;
  font-size: clamp(1.9rem, 7.5vw, 2.2rem);
  letter-spacing: 0.01em;
  color: var(--ink);
}
.title-serif .accent {
  color: #C36444;
  font-style: italic;
}

.text-body {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--muted);
}
.text-body.small { font-size: 0.73rem; }

.divider {
  width: 45px;
  height: 2px;
  background: linear-gradient(90deg, #C36444, #C28A32);
  margin: 20px 0;
}

/* ── Buttons ────────────────────────────────────────────────── */

/* Primary pill — button-in-button architecture */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--green);
  border-radius: var(--r-full);
  padding: 16px 28px;
  width: 100%;
  box-shadow: var(--sh-green);
  transition: transform 0.35s var(--spring), background 0.3s var(--ease), box-shadow 0.3s var(--ease), opacity 0.25s;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.1) 0%, transparent 60%);
  pointer-events: none;
}
.btn:active  { transform: scale(0.975); box-shadow: 0 2px 8px rgba(20,92,56,.14); }
.btn:hover   { background: var(--green-deep); }
.btn:disabled { opacity: 0.62; pointer-events: none; box-shadow: none; }

/* Button-in-button arrow icon */
.btn-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.35s var(--spring);
}
.btn:hover .btn-arrow { transform: translate(2px, -1px) scale(1.08); }
.btn-arrow svg { width: 14px; height: 14px; stroke: white; }

.btn-small { width: auto; padding: 12px 18px; letter-spacing: 0.09em; }

.btn-ghost {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 20px;
  border-radius: var(--r-full);
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s var(--ease);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* busy state (reservando…) */
.btn.is-busy {
  position: relative;
  pointer-events: none;
  color: transparent !important;
  background: #d4cdc4 !important;
  box-shadow: none !important;
  animation: busyPulse 1.4s ease-in-out infinite;
  overflow: hidden;
}
.btn.is-busy::after {
  content: "reservando";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #8a8070;
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.btn.is-busy::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: btnShine 1.4s linear infinite;
}
@keyframes busyPulse { 0%,100% { background: #d4cdc4; } 50% { background: #cac3bb; } }
@keyframes btnShine { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Fields ─────────────────────────────────────────────────── */
.field {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: inset 0 1px 3px rgba(24,19,14,.04);
}
.field:focus {
  border-color: var(--green);
  box-shadow: inset 0 1px 3px rgba(24,19,14,.04), 0 0 0 3px rgba(20,92,56,.08);
}
.field.small { font-size: 0.72rem; }

/* ── 1. Intro ───────────────────────────────────────────────── */
.hero-wrap {
  position: relative;
  height: 54dvh;
  min-height: 300px;
  overflow: hidden;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center;
  animation: heroScale 12s ease-in-out alternate infinite;
}
@keyframes heroScale { from { transform: scale(1); } to { transform: scale(1.04); } }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20,92,56,.12) 0%,
    rgba(20,92,56,.04) 35%,
    rgba(253,250,245,.0) 55%,
    var(--bg) 100%
  );
}

.intro-content {
  padding: 0 26px 36px;
  margin-top: -40px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.intro-content .eyebrow { margin-bottom: 14px; }
.intro-content .title-serif { margin-bottom: 16px; font-size: clamp(2rem, 8.5vw, 2.6rem); }
.intro-content .text-body { margin-bottom: 26px; }

/* ── 2. Quiz ────────────────────────────────────────────────── */
.quiz-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 200px;
}
.quiz-step {
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
  font-weight: 600;
}
.quiz-progress-track {
  flex: 1;
  height: 2px;
  background: rgba(20,92,56,.1);
  border-radius: 99px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--coral), var(--green));
  border-radius: 99px;
  transition: width 0.5s var(--ease);
}

.quiz-body {
  padding: 22px 20px 44px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.quiz-question {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 6.5vw, 1.8rem);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* Double-bezel quiz options */
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }

/* Outer shell */
.quiz-op {
  text-align: left;
  border: 1px solid rgba(20,92,56,.13);
  background: rgba(20,92,56,.04);
  border-radius: var(--r-lg);
  padding: 3px;
  cursor: pointer;
  font-family: var(--font-sans);
  width: 100%;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--spring), box-shadow 0.3s var(--ease);
  box-shadow: var(--sh-sm);
}
.quiz-op:active { transform: scale(0.985); }

/* Inner core — JS generates .quiz-op-copy */
.quiz-op-copy {
  display: block;
  background: var(--surface);
  border-radius: calc(var(--r-lg) - 3px);
  padding: 15px 17px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.92);
}

.quiz-op strong,
.qo-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  font-family: var(--font-sans);
}
.quiz-op span:not(.quiz-op-copy),
.qo-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Selected state */
.quiz-op.is-on {
  border-color: var(--green);
  background: rgba(20,92,56,.1);
  box-shadow: var(--sh-green);
}
.quiz-op.is-on .quiz-op-copy {
  background: var(--green-pale);
}

/* has-img variant */
.quiz-op.has-img { padding: 0; overflow: hidden; }
.quiz-op.has-img img { width: 100%; height: 120px; object-fit: cover; display: block; }
.quiz-op.has-img .quiz-op-copy { padding: 12px 16px 14px; border-radius: 0; box-shadow: none; }

.quiz-feedback {
  min-height: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 600;
}

/* ── 3. Reveal ──────────────────────────────────────────────── */
.reveal-loader {
  width: 48px; height: 48px;
  margin: 28px 0;
  border-radius: 50%;
  border: 1.5px solid rgba(20,92,56,.15);
  border-top-color: var(--green);
  animation: spin 1s linear infinite;
}
.reveal-msg {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--ink);
}

/* ── 4. Resultado ───────────────────────────────────────────── */
.confetti-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 50;
}
.result-screen {
  position: relative;
  text-align: center;
  align-items: center;
  overflow: hidden;
  background: url(assets/result-bg.jpg) center top / cover no-repeat;
  background-color: var(--surface);
}

/* Wash cream progressivo — início ~48%, zero faixa visível (7 stops) */
.result-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(251,249,245,0)    0%,
    rgba(251,249,245,0)    42%,
    rgba(251,249,245,0.14) 50%,
    rgba(251,249,245,0.42) 62%,
    rgba(251,249,245,0.72) 74%,
    rgba(251,249,245,0.92) 86%,
    rgba(251,249,245,1)    96%
  );
  z-index: 0;
}
.result-screen::after { display: none; }

.result-topbar {
  width: 100%;
  min-height: 60px;
  justify-content: center;
  padding: 22px 22px 0;
  position: relative; z-index: 2;
}
.result-topbar .brand-logo {
  background: rgba(251,249,245,0.65);
  padding: 6px 18px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}


.result-content {
  width: min(100%, 390px);
  flex: 1;
  margin: 0 auto;
  padding: 20px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  position: relative; z-index: 1;
  animation: result-enter 0.75s cubic-bezier(0.34,1.46,0.64,1) both;
}
@keyframes result-enter {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-content .eyebrow {
  margin-bottom: 18px;
  animation: result-enter 0.6s cubic-bezier(0.34,1.46,0.64,1) 0.1s both;
}
.result-content .title-serif {
  max-width: 340px;
  margin: 0 auto;
  font-size: clamp(2.3rem, 9.5vw, 3rem);
  line-height: 1.08;
  animation: result-enter 0.7s cubic-bezier(0.34,1.46,0.64,1) 0.18s both;
}
.result-content .divider {
  width: 45px;
  height: 2px;
  background: linear-gradient(90deg, #C36444, #C28A32);
  margin: 24px auto;
  animation: result-enter 0.6s cubic-bezier(0.34,1.46,0.64,1) 0.28s both;
}

/* Double-bezel reason box — Z-axis float */
.reason-box {
  width: 100%;
  background: #F4EFE6;
  border: 1px solid #E2D9C8;
  border-radius: var(--r-xl);
  padding: 3px;
  box-shadow: 0 18px 56px rgba(20,92,56,.1), 0 4px 16px rgba(0,0,0,.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: result-enter 0.7s cubic-bezier(0.34,1.46,0.64,1) 0.32s both;
}
.reason-box-inner {
  background: #F4EFE6;
  border: 1px solid #E2D9C8;
  border-radius: calc(var(--r-xl) - 3px);
  padding: 20px 18px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.5);
}
.reason-title {
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
  font-weight: 700;
}
.reason-box .text-body,
.reason-box-inner .text-body {
  max-width: 310px;
  margin: 0 auto;
  line-height: 1.7;
  font-size: 0.82rem;
}

.result-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 24px 0 0;
  animation: result-enter 0.7s cubic-bezier(0.34,1.46,0.64,1) 0.42s both;
}
.result-cta .btn {
  width: min(100%, 340px);
  box-shadow: 0 8px 32px rgba(20,92,56,.28), 0 2px 8px rgba(20,92,56,.15);
}
.result-cta .btn:hover {
  box-shadow: 0 12px 40px rgba(20,92,56,.38), 0 3px 12px rgba(20,92,56,.2);
  transform: translateY(-1px);
}

@media (max-height: 700px) {
    .result-content { padding-top: 4px; padding-bottom: 20px; justify-content: center; }
  .result-content .title-serif { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .result-content .divider { margin: 12px auto; }
  .result-cta { padding-top: 16px; }
}

/* ── 5. Presentes ───────────────────────────────────────────── */
.catalog-head { padding: 8px 22px 14px; }
.catalog-head .eyebrow { margin-bottom: 10px; }
.catalog-head .title-serif { font-size: clamp(1.7rem, 7vw, 2rem); }
/* ── Gifts catalog — editorial consistency ── */
.catalog-head .title-serif .accent {
  color: #C36444;
}


.gift-cat-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 0 2px;
  scrollbar-width: none;
  margin-top: 12px;
}
.gift-cat-tabs::-webkit-scrollbar { display: none; }

.gift-cat-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.gift-cat-tab.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: var(--sh-green);
}

.gift-search { position: relative; margin: 8px 0 2px; }
.gift-search .field { padding-right: 44px; }
.gift-search-clear {
  position: absolute; right: 7px; top: 50%;
  transform: translateY(-50%);
  border: none; background: var(--green-soft); color: var(--green);
  width: 30px; height: 30px; border-radius: 50%; font-size: 0.78rem; cursor: pointer;
  transition: background 0.2s;
}
.gift-search-clear:hover { background: var(--green-pale); }

/* Asymmetrical gift grid */
.gifts-list {
  list-style: none;
  padding: 4px 14px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gifts-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 36px 10px;
  line-height: 1.6;
}

/* Gift card — double-bezel outer shell */
.gift-card {
  background: rgba(24,19,14,.025);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s var(--spring), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: var(--sh-sm);
  position: relative;
}
.gift-card:active { transform: scale(0.975); }
.gift-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: rgba(20,92,56,.18);
}
.gift-card.is-on {
  border-color: var(--green);
  box-shadow: var(--sh-green);
}
.gift-card.is-on::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  background: var(--green);
  border-radius: 50%;
  color: #fff; font-size: 0.66rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}

/* Gift card inner core */
.gift-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: var(--green-soft);
  border-radius: calc(var(--r-lg) - 4px) calc(var(--r-lg) - 4px) 0 0;
}

.gift-copy {
  background: var(--surface);
  border-radius: 0 0 calc(var(--r-lg) - 4px) calc(var(--r-lg) - 4px);
  padding: 10px 11px 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.gift-label {
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.gift-name {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 4px;
  color: var(--ink);
}
.gift-price {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 5px;
}
.gift-price s { color: var(--light); margin-right: 5px; }
.gift-price strong { color: var(--green); font-weight: 700; }

/* ── VTEX searching text (outside grid) ── */
.gifts-searching-msg {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 32px 10px 0;
  width: 100%;
}

/* ── VTEX live card — arrive animation ── */
@keyframes card-arrive {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gift-card--arriving {
  animation: card-arrive 0.52s cubic-bezier(0.34,1.46,0.64,1) both;
}

/* ── Live badge on VTEX cards ── */
.gift-card[data-live='1'] {
  border-color: rgba(20,92,56,.14);
}
.gift-card[data-live='1'] .gift-label {
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
}
.gift-card[data-live='1'] .gift-label::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: live-dot 1.8s cubic-bezier(0.32,0.72,0,1) infinite;
}
@keyframes live-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.gift-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  align-items: center;
}
.gift-sizes-label {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--light);
  width: 100%;
  margin-bottom: 2px;
}
.gift-size-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.gift-size-chip.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* ── 6. Tamanho ─────────────────────────────────────────────── */
.size-wrap {
  padding: 10px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.size-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--r-xl);
  background: var(--green-soft);
  box-shadow: var(--sh-md);
}
.size-name { font-size: 1.3rem; }
/* ── Size screen — unified editorial pattern ── */
.size-wrap .eyebrow { margin-bottom: 6px; }
.size-wrap .title-serif { margin-bottom: 4px; }
.size-wrap .text-body { margin-bottom: 4px; color: var(--muted); }

.size-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 4px 0 8px;
}
.size-chip {
  min-width: 50px;
  padding: 13px 4px;
  text-align: center;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  box-shadow: var(--sh-sm);
}

/* ── Size button disabled — visible but muted ── */
#screen-size .btn:disabled {
  opacity: 0.65;
  background: var(--green-deep);
  box-shadow: 0 4px 16px rgba(20,92,56,.12);
}

.size-chip.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: var(--sh-green);
}

/* ── 7. Confirmação ─────────────────────────────────────────── */
.confirm-wrap {
  padding: 8px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.confirm-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--r-xl);
  background: var(--green-soft);
  box-shadow: var(--sh-md);
}
.confirm-size { font-size: 0.8rem; color: var(--muted); }
.confirm-size strong { color: var(--ink); }
/* ── Confirm screen refinements ── */
.confirm-wrap .eyebrow { margin-bottom: 8px; }
.confirm-wrap .title-serif { font-size: clamp(1.3rem, 5.5vw, 1.6rem); margin-bottom: 4px; }


/* ── 8. Dados ───────────────────────────────────────────────── */
.data-wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 8px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.data-intro {
  width: 100%;
  max-width: 350px;
  margin: 4px auto 2px;
  text-align: center;
}
.data-intro .eyebrow { margin-bottom: 8px; }
.data-intro .title-serif { margin-bottom: 10px; }
.data-intro .text-body { max-width: 330px; margin: 0 auto; }

.cpf-row {
  display: flex;
  align-items: stretch;
  gap: 9px;
  width: 100%;
}
.cpf-row #inp-cpf { flex: 1 1 auto; min-width: 0; width: 0; }
.cpf-row #btn-cpf-lookup { flex: 0 0 auto; min-width: 82px; }
.cpf-status { font-size: 0.74rem; color: var(--danger); }

.welcome-note {
  font-size: 0.83rem;
  color: var(--green);
  background: var(--green-soft);
  border-radius: var(--r-md);
  padding: 12px 14px;
  line-height: 1.5;
}

/* Cliente card — double-bezel */
.cliente-card {
  background: rgba(24,19,14,.025);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 3px;
}
.cliente-card-inner,
.cliente-card > *:first-child,
.cc-head {
  /* JS renders directly into .cliente-card, so style children */
}
.cc-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 0;
}
.cc-badge {
  align-self: flex-start;
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  border-radius: var(--r-full);
  padding: 5px 10px;
  font-weight: 600;
}
.cc-head strong {
  font-family: var(--font-serif);
  font-size: 1.14rem;
  font-weight: 500;
  line-height: 1.25;
  padding: 0 16px;
  display: block;
}
.cc-desde {
  font-size: 0.66rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  padding: 0 16px;
  display: block;
  margin-bottom: 10px;
}
.cc-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 0 16px 14px;
}
.cc-row { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: baseline; }
.cc-row dt { font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cc-row dd { margin: 0; font-size: 0.83rem; word-break: break-word; }
.cc-compra {
  margin: 0 14px 14px;
  background: var(--green-soft);
  border-radius: var(--r-md);
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cc-compra-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cc-compra-title {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
}
.cc-compra-head strong { font-family: var(--font-serif); font-size: 1.02rem; }
.cc-compra-info { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-chip {
  font-size: 0.62rem;
  color: var(--ink);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(20,92,56,.1);
  border-radius: var(--r-full);
  padding: 4px 9px;
  white-space: nowrap;
}
.cc-chip-ok { color: var(--green); border-color: rgba(20,92,56,.26); }
.cc-chip-code { font-family: ui-monospace, 'SF Mono', Consolas, monospace; letter-spacing: 0.02em; }
.cc-note {
  margin: 0 16px 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.66rem;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}

/* Forms */
.data-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.form-grid label:nth-child(1),
.form-grid label:nth-child(2),
.form-grid label:nth-child(3) { grid-column: 1 / -1; }

.address-head { text-align: center; margin-bottom: 2px; }
.address-head .eyebrow { margin-bottom: 8px; }
.address-head .title-serif { font-size: 1.4rem; margin-bottom: 8px; }
.address-head .text-body { max-width: 320px; margin: 0 auto; }
#address-form .form-grid label:nth-child(1),
#address-form .form-grid label:nth-child(2) { grid-column: auto; }
#address-form .form-grid label:nth-child(3) { grid-column: 1 / -1; }

/* ── 8b. Frete ──────────────────────────────────────────────── */
.frete-wrap {
  padding: 10px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.frete-opcoes { display: flex; flex-direction: column; gap: 10px; }
.frete-opcao {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.3s var(--ease);
  text-align: left;
  box-shadow: var(--sh-sm);
}
.frete-opcao:hover { border-color: rgba(20,92,56,.25); box-shadow: var(--sh-md); }
.frete-copy { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.frete-copy strong { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.frete-copy small { font-size: 0.74rem; color: var(--muted); }
.frete-valor { font-family: var(--font-serif); font-size: 1.1rem; color: var(--green); }

/* ── 8c. Envio (Editorial Redesign) ─────────────────────────── */
#screen-envio {
  justify-content: flex-start;
  min-height: 100dvh;
}

.envio-editorial {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 22px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.envio-header {
  text-align: left;
  padding: 8px 0 24px;
}
.envio-eyebrow {
  display: inline-block;
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 12px;
}
.envio-header .title-serif {
  font-size: clamp(2rem, 8.5vw, 2.6rem);
  line-height: 1.05;
}

/* ── Editorial shipping cards ── */
.envio-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.envio-card {
  position: relative;
  background: rgba(24,19,14,.02);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 3px;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.32,0.72,0,1),
              border-color 0.4s cubic-bezier(0.32,0.72,0,1),
              box-shadow 0.4s cubic-bezier(0.32,0.72,0,1);
  box-shadow: var(--sh-sm);
  overflow: visible;
}
.envio-card:active {
  transform: scale(0.985);
}

/* Inner core — double bezel */
.envio-card-inner {
  background: var(--surface);
  border-radius: calc(var(--r-xl) - 3px);
  padding: 20px 20px 18px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.92);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Top row: carrier name + inline tag */
.envio-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.envio-carrier {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1;
}
.envio-tag {
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
  line-height: 1;
}
.envio-tag--rapido {
  color: #fff;
  background: linear-gradient(135deg, #C36444, #a84e33);
}
.envio-tag--eco {
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(20,92,56,.12);
}

/* Middle: prazo + detalhes */
.envio-card-detail {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.envio-prazo {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.envio-prazo strong {
  color: var(--ink);
  font-weight: 600;
}
.envio-diff-pill {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}
.envio-diff-pill--eco {
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line);
}

/* Bottom: price row */
.envio-card-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.envio-price-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light);
  font-weight: 600;
}
.envio-price {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ── Selected state ── */
.envio-card.is-on {
  border-color: var(--green);
  box-shadow: 0 4px 20px rgba(20,92,56,.12), 0 8px 40px rgba(20,92,56,.06);
  transform: translateY(-2px);
}
.envio-card.is-on .envio-card-inner {
  background: linear-gradient(165deg, rgba(20,92,56,.025) 0%, var(--surface) 60%);
}
.envio-card.is-on .envio-card-price {
  border-top-color: rgba(20,92,56,.12);
}
.envio-card.is-on .envio-price {
  color: var(--green-deep);
}

/* Checkmark on selected */
.envio-card.is-on::after {
  content: '';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(20,92,56,.3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
  animation: checkPop 0.35s cubic-bezier(0.34,1.46,0.64,1) both;
}
@keyframes checkPop {
  from { transform: scale(0) rotate(-45deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ── Diff badge for selected eco ── */
.envio-card.is-on .envio-diff-pill {
  background: rgba(20,92,56,.12);
}
.envio-card.is-on .envio-diff-pill--eco {
  color: var(--green);
  background: var(--green-soft);
  border-color: transparent;
}

/* ── Card entrance animation ── */
@keyframes envioCardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.envio-card--entering {
  animation: envioCardIn 0.55s cubic-bezier(0.34,1.46,0.64,1) both;
}
.envio-card--entering:nth-child(2) {
  animation-delay: 0.08s;
}

/* ── Skeleton (refined) ── */
.envio-cards .envio-skel {
  height: 120px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-soft);
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--bg) 50%, var(--surface-2) 70%);
  background-size: 200% 100%;
  animation: btnShine 1.6s linear infinite;
}



/* ── Footer ── */
.envio-footer {
  margin-top: auto;
  padding-top: 16px;
}


/* ── Envio summary (benefits strip) ── */
.envio-summary {
  margin-top: 24px;
  background: rgba(24,19,14,.02);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 3px;
}
.envio-summary-inner {
  background: var(--surface);
  border-radius: calc(var(--r-xl) - 3px);
  padding: 16px 18px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.92);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.envio-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.envio-summary-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.envio-summary-text {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.envio-summary-text strong {
  color: var(--ink);
  font-weight: 600;
}

/* ── Envio layout refinements ── */
.envio-editorial {
  gap: 0;
}
.envio-cards {
  gap: 12px;
}

/* ── Better selected card highlight ── */
.envio-card.is-on .envio-card-inner {
  background: linear-gradient(175deg, rgba(20,92,56,.03) 0%, rgba(20,92,56,.01) 40%, var(--surface) 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.92), inset 0 -1px 0 rgba(20,92,56,.04);
}
.envio-card.is-on .envio-carrier {
  color: var(--green-deep);
}

/* ── Footer tighter ── */
.envio-footer {
  padding-top: 20px;
  padding-bottom: 8px;
}

/* ── Button override for envio ── */
#screen-envio .btn {
  background: var(--green-deep);
  box-shadow: 0 6px 24px rgba(13,61,39,.22), 0 2px 8px rgba(13,61,39,.12);
}
#screen-envio .btn:hover {
  background: var(--green);
  box-shadow: 0 8px 32px rgba(20,92,56,.28), 0 3px 12px rgba(20,92,56,.15);
}
#screen-envio .btn:disabled {
  opacity: 0.55;
  background: var(--green);
  box-shadow: none;
}

/* Trust band */
/* ── 9. Pagamento ───────────────────────────────────────────── */
.payment-wrap {
  padding: 8px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Double-bezel fee box */
.fee-box {
  background: rgba(24,19,14,.025);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 3px;
  text-align: center;
}
.fee-box > * { padding: 16px; }
.fee-val {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--ink);
  margin: 6px 0 8px;
  display: block;
}
.fee-box .text-body { max-width: 260px; margin: 0 auto; }

.pix-area { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pix-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 600;
}
#pix-qr-wrap {
  width: 200px; height: 200px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
#pix-qr-img { width: 100%; height: 100%; object-fit: contain; }
.pix-copy-row { display: flex; gap: 8px; width: 100%; }
.pix-copy-row .field { font-size: 0.66rem; }
.pix-status { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; color: var(--muted); }
.pix-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.5s ease-in-out infinite;
}
.pix-dot.ok  { background: var(--green); animation: none; }
.pix-dot.err { background: var(--danger); animation: none; }
.pix-dot.green { background: var(--green); }

.pix-status-faixa {
  width: 100%;
  background: var(--green-soft);
  color: var(--green);
  border-radius: var(--r-sm);
  padding: 11px 16px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  animation: faixaPulse 2s ease-in-out infinite;
}
.pix-status-faixa::before {
  content: '';
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulse 1.5s ease-in-out infinite;
}
.pix-status-faixa.ok { background: var(--green); color: #fff; animation: none; }
.pix-status-faixa.ok::before { background: rgba(255,255,255,.8); animation: none; }

.pix-instrucao { font-size: 0.7rem; color: var(--muted); text-align: center; letter-spacing: 0.03em; margin-top: -6px; }
.pix-timer-row { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 0.7rem; color: var(--light); margin-top: -6px; }
.pix-timer { font-weight: 600; font-variant-numeric: tabular-nums; }
.pix-timer.urgente { color: var(--danger); }

.pay-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 0.88rem;
}
.pay-line strong { color: var(--ink); font-weight: 700; text-align: right; }
.pay-total { padding-top: 12px; font-size: 0.96rem; border-bottom: 0; }
.pay-total strong { color: var(--green); font-size: 1.1rem; }
.pay-receiver, .pay-instructions { margin: 6px 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.45; }

/* ── 10. Final (editorial) ──────────────────────────────────── */
.final-wrap {
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.final-eyebrow { color: var(--green); margin-bottom: 18px; }
#screen-final .title-serif { font-size: clamp(2rem, 8.5vw, 2.6rem); line-height: 1.1; }
#screen-final .divider { margin: 22px auto 20px; }
#screen-final .text-body { max-width: 300px; }
/* ── Final divider — terracotta/gold ── */
#screen-final .divider {
  width: 45px;
  height: 2px;
  background: linear-gradient(90deg, #C36444, #C28A32);
}

.final-protocol-line {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.final-protocol-line strong {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  font-size: 0.86rem;
}

/* ── Toast ──────────────────────────────────────────────────── */
#toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 80px);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  padding: 12px 20px;
  border-radius: var(--r-full);
  opacity: 0;
  transition: all 0.4s var(--ease);
  z-index: 800;
  max-width: 88vw;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(24,19,14,.22);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── Desktop block ──────────────────────────────────────────── */
#desktop-block {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px;
}
.db-logo {
  font-family: var(--font-serif);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 1.4rem;
  margin-bottom: 36px;
}
.db-msg {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1.3;
  max-width: 500px;
  margin-bottom: 16px;
}
.db-sub { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; }


/* ── Upsell — align with editorial double-bezel system ── */
.upsell-alert-box {
  background: rgba(24,19,14,.025);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 3px;
}
.upsell-alert-box > * {
  background: rgba(255,255,255,0.65);
  border-radius: calc(var(--r-xl) - 3px);
  padding: 16px 18px;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.95);
}
.upsell-alert-title {
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--coral);
  font-weight: 700;
  margin-bottom: 8px;
}
.upsell-alert-text {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--muted);
}
.upsell-benefits {
  background: rgba(24,19,14,.025);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 3px;
}
.upsell-benefits > *:first-child {
  border-radius: calc(var(--r-xl) - 3px) calc(var(--r-xl) - 3px) 0 0;
}
.upsell-benefits > *:last-child {
  border-radius: 0 0 calc(var(--r-xl) - 3px) calc(var(--r-xl) - 3px);
}
.upsell-benefits-title {
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
}
.upsell-fee-box {
  background: rgba(24,19,14,.025);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: 3px;
  text-align: center;
}
.upsell-fee-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
}
.upsell-fee-val {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--ink);
  margin: 6px 0 4px;
}
.upsell-fee-note {
  font-size: 0.72rem;
  color: var(--muted);
}
.upsell-product-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  box-shadow: var(--sh-sm);
}
.upsell-product-row img {
  width: 52px;
  height: 52px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--green-soft);
}
.upsell-product-name {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.upsell-status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.upsell-confirmed {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  background: var(--green-soft);
  padding: 3px 8px;
  border-radius: var(--r-full);
}
.upsell-pending {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  background: rgba(194,138,50,.08);
  padding: 3px 8px;
  border-radius: var(--r-full);
}
.upsell-benefit-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 18px;
}
.upsell-benefit-check {
  color: var(--green);
  font-weight: 600;
  font-size: 0.78rem;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.upsell-benefit-text {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.upsell-benefit-text strong {
  color: var(--ink);
  font-weight: 600;
}
.upsell-pix-area {
  margin-top: 8px;
}
.upsell-pix-qr-wrap {
  width: 180px;
  height: 180px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-sm);
  margin: 0 auto;
}

/* ── Upsell (Farm Rio editorial palette) ────────────────────── */
.upsell-timer-banner {
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  letter-spacing: 0.02em;
}
.upsell-timer-banner strong {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.upsell-alert-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin: 4px 0;
}
.upsell-alert-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 8px;
  color: var(--gold);
}
.upsell-alert-text { font-size: 0.84rem; color: var(--ink); line-height: 1.6; }
.upsell-product-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
}
.upsell-product-row img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); background: var(--green-soft); }
.upsell-product-name { font-family: var(--font-serif); font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.upsell-status-row { display: flex; gap: 12px; margin-top: 6px; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.upsell-confirmed { color: var(--green); display: inline-flex; align-items: center; gap: 5px; }
.upsell-confirmed::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.upsell-pending   { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.upsell-pending::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.upsell-benefits {
  background: var(--green-pale);
  border: 1px solid rgba(20,92,56,.1);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.upsell-benefits-title {
  font-size: 0.64rem;
  color: var(--green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 14px;
}
.upsell-benefit-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.upsell-benefit-row:last-child { margin-bottom: 0; }
.upsell-benefit-check {
  width: auto; height: auto;
  background: none;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
  line-height: 1;
}
.upsell-benefit-text { font-size: 0.82rem; color: var(--ink); line-height: 1.4; }
.upsell-fee-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 18px 20px;
  text-align: center;
  position: relative;
  box-shadow: var(--sh-sm);
}
.upsell-fee-eyebrow {
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}
.upsell-fee-val {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 2.2rem;
  color: var(--ink);
  margin: 0 0 6px;
  display: block;
  letter-spacing: -0.01em;
}
.upsell-fee-note { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.upsell-pix-area { margin-top: 16px; }
.upsell-pix-qr-wrap { min-height: 150px; display: flex; align-items: center; justify-content: center; }

/* ── PIX overlay (premium, z-axis cascade) ──────────────────── */
#pix-overlay {
  position: fixed; inset: 0;
  z-index: 900;
  background: rgba(42, 34, 26, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.pix-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90dvh;
  overflow-y: auto;
  background: #faf7f3;
  border-radius: var(--r-xl);
  padding: 36px 30px 32px;
  box-shadow: 0 28px 64px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.08);
  animation: modalSlide 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlide {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pix-leaf { position: absolute; pointer-events: none; z-index: 0; opacity: 1; }
.pix-leaf-tl {
  top: -6px; left: -6px;
  width: 92px; height: 92px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%232d5a27' d='M8 92Q28 62 18 32Q38 52 58 22Q48 48 78 42Q58 58 65 78Q48 68 35 83Q22 73 8 92Z'/%3E%3Cpath fill='%233d7535' d='M3 87Q18 58 13 38Q28 50 43 28Q38 45 58 43Q43 55 48 72Q33 65 23 80Q15 70 3 87Z'/%3E%3Cellipse cx='72' cy='20' rx='9' ry='8' fill='%23d4714a'/%3E%3Cellipse cx='76' cy='24' rx='5' ry='4.5' fill='%23e8845c'/%3E%3Ccircle cx='58' cy='12' r='3.5' fill='%23d4714a'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}
.pix-leaf-br {
  bottom: -6px; right: -6px;
  width: 84px; height: 84px;
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%232d5a27' d='M8 92Q28 62 18 32Q38 52 58 22Q48 48 78 42Q58 58 65 78Q48 68 35 83Q22 73 8 92Z'/%3E%3Cpath fill='%233d7535' d='M3 87Q18 58 13 38Q28 50 43 28Q38 45 58 43Q43 55 48 72Q33 65 23 80Q15 70 3 87Z'/%3E%3Cellipse cx='72' cy='20' rx='9' ry='8' fill='%23d4714a'/%3E%3Cellipse cx='76' cy='24' rx='5' ry='4.5' fill='%23e8845c'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}

.pix-close-btn {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px;
  background: rgba(24,19,14,.05);
  border: none; border-radius: 50%;
  font-size: 20px; color: #666;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.pix-close-btn:hover { background: rgba(24,19,14,.1); color: #333; }

.pix-header {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 24px; padding-top: 4px;
  position: relative; z-index: 1;
}
.pix-brand { font-size: 13px; font-weight: 500; letter-spacing: 0.24em; color: #2d5a27; }
.pix-sep   { color: #ccc; font-weight: 300; font-size: 17px; }
.pix-title { font-family: var(--font-serif); font-size: 26px; font-style: italic; font-weight: 400; color: #2d5a27; }

.pix-card-green {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(140deg, #1e5225 0%, #2d7038 100%);
  border-radius: var(--r-md);
  padding: 20px 22px;
  margin-bottom: 24px;
  position: relative; z-index: 1;
  box-shadow: 0 4px 18px rgba(30,82,37,.22);
}
.pix-card-left  { display: flex; flex-direction: column; gap: 5px; }
.pix-card-label { font-size: 10px; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: 0.06em; }
.pix-card-method { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 16px; font-weight: 600; }
.pix-card-info   { font-size: 9px; color: rgba(255,255,255,.45); letter-spacing: 0.1em; margin-top: 2px; }
.pix-card-right  { border-left: 1px solid rgba(255,255,255,.16); padding-left: 20px; margin-left: 8px; }
.pix-card-value  { font-family: var(--font-serif); font-size: 28px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }

.pix-loading {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 50px 0; color: #777; font-size: 13px;
}
.pix-spin {
  width: 42px; height: 42px;
  border: 2.5px solid #e0dbd4;
  border-top-color: #2d5a27;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: block; margin: 10px auto;
}
.pix-body {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  position: relative; z-index: 1;
}
.pix-qr {
  background: #fff; border-radius: var(--r-lg); padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.05);
}
.pix-qr img { width: 185px; height: 185px; display: block; border-radius: 8px; }
.pix-hint { font-size: 13px; color: #666; text-align: center; }
.pix-timer {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 18px;
  background: #fff; border: 1px solid #e8e3dc;
  border-radius: var(--r-full);
  font-size: 13px; color: #555;
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.pix-timer strong { color: var(--ink); font-weight: 600; font-size: 14px; }
.pix-divider {
  width: 100%; display: flex; align-items: center; gap: 14px; margin: 4px 0;
}
.pix-divider::before, .pix-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, #d8d2c8, #d8d2c8, transparent);
}
.pix-divider span { font-size: 10px; letter-spacing: 0.16em; color: #aaa; font-weight: 500; }
.pix-copy { width: 100%; display: flex; gap: 9px; }
.pix-copy input {
  flex: 1;
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 11px;
  padding: 13px 14px;
  background: #fff;
  border: 1.5px solid #e4ddd6;
  border-radius: var(--r-sm);
  color: #333; outline: none;
  text-overflow: ellipsis;
  transition: border-color 0.2s var(--ease);
}
.pix-copy input:focus { border-color: var(--green); }
.pix-copy button {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(145deg, #d4614a, #c45038);
  color: #fff; border: none;
  padding: 13px 22px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s var(--spring), opacity 0.2s;
  box-shadow: 0 3px 12px rgba(212,97,74,.28);
}
.pix-copy button:active { transform: scale(0.975); }
.pix-copy-msg { font-size: 0.76rem; color: var(--green); margin: 0; text-align: center; }
.pix-status { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.pix-erro { color: var(--danger); font-size: 0.8rem; text-align: center; margin: 0; }
.pix-back {
  background: none; border: none;
  color: var(--muted); font-family: var(--font-sans); font-size: 0.75rem;
  cursor: pointer; text-decoration: underline; margin-top: 4px;
  transition: color 0.2s var(--ease);
}
.pix-back:hover { color: var(--ink); }
.pix-check {
  width: 100%; margin-top: 10px;
  padding: 14px; border-radius: var(--r-full);
  background: var(--green); color: #fff; border: none;
  font-family: var(--font-sans); font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--sh-green);
  transition: background 0.3s var(--ease), transform 0.3s var(--spring);
}
.pix-check:active { transform: scale(0.975); }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes spin       { to { transform: rotate(360deg); } }
@keyframes pulse      { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.9); } }
@keyframes faixaPulse { 0%,100% { opacity: 1; } 50% { opacity: .72; } }

