/* ============================================================
   SEÇÃO: CASH ON DELIVERY
   Dobra clara, na mesma família do Tráfego: moldura TBF, abas
   numeradas e cards com arte. As telas do produto são escuras,
   então a moldura escura funciona como no Tráfego.
   ============================================================ */

.tbc { position: relative; padding: clamp(70px, 9vw, 120px) 20px 0; }

.tbc-head {
  max-width: 820px;
  padding: clamp(40px, 5vw, 60px) clamp(16px, 3vw, 36px) clamp(26px, 3.4vw, 40px);
}

.tbc-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e4e4e4;
  box-shadow: 0 2px 5px rgba(28, 26, 22, 0.05);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #6f6f6f;
  margin-bottom: 20px;
}

.tbc-title {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.038em;
  font-weight: 800;
  color: #1C1A16;
  text-wrap: balance;
}

.tbc-title em {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  color: #B8956A;
}

.tbc-sub {
  margin: 18px 0 0;
  max-width: 60ch;
  font-size: clamp(15px, 2vw, 17.5px);
  line-height: 1.62;
  color: #6f6f6f;
  text-wrap: pretty;
}

/* ---------- Palco ---------- */
.tbc-palco {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 2.8vw, 32px);
  padding: 0 clamp(16px, 3vw, 36px) clamp(48px, 6vw, 76px);
}

.tbc-abas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
}

.tbc-aba {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid #e4e4e4;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbc-aba:hover { background: #fff; border-color: #d2cdc4; }
.tbc-aba.is-ativa { background: #1C1A16; border-color: #1C1A16; }

.tbc-aba-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f1efeb;
  color: #8a8378;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.45s ease, color 0.45s ease;
}

.tbc-aba.is-ativa .tbc-aba-num { background: rgba(255, 255, 255, 0.12); color: #E8C49A; }

.tbc-aba-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.tbc-aba-txt b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1C1A16;
  transition: color 0.45s ease;
}

.tbc-aba-txt i {
  font-style: normal;
  font-size: 13px;
  line-height: 1.35;
  color: #8a8378;
  transition: color 0.45s ease;
}

.tbc-aba.is-ativa .tbc-aba-txt b { color: #FFFFFF; }
.tbc-aba.is-ativa .tbc-aba-txt i { color: #A8A29A; }

/* ---------- A tela ---------- */
.tbc-cena { position: relative; }

.tbc-brilho {
  position: absolute;
  inset: -8% -4% -14%;
  background: radial-gradient(ellipse 58% 52% at 50% 46%, rgba(212, 165, 116, 0.16), transparent 68%);
  filter: blur(26px);
  pointer-events: none;
}

.tbc-tela {
  position: relative;
  border-radius: 18px;
  padding: 8px;
  background: #0B0B0B;
  border: 1px solid rgba(28, 26, 22, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 50px 100px -46px rgba(28, 26, 22, 0.6),
    0 16px 40px -28px rgba(28, 26, 22, 0.4);
  transform: perspective(2000px) rotateX(6deg);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbc-cena:hover .tbc-tela { transform: perspective(2000px) rotateX(2deg); }
.tbc-tela.tem-transicao { height: 0; transition: height 0.62s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1); }

.tbc-quadro {
  position: absolute;
  inset: 8px 8px auto 8px;
  display: block;
  width: calc(100% - 16px);
  height: auto;
  border-radius: 11px;
  opacity: 0;
  transform: scale(0.985) translateY(10px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tbc-quadro.is-ativo { opacity: 1; transform: none; pointer-events: auto; }

.tbc-tela:not(.tem-transicao) .tbc-quadro.is-ativo {
  position: relative;
  inset: auto;
  width: 100%;
}

/* ---------- Cards ---------- */
.tbc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: clamp(34px, 4.4vw, 52px) clamp(16px, 3vw, 36px) clamp(40px, 5vw, 62px);
}

.tbc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #e4e4e4;
  transition: background 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tbc-card:hover { background: #ffffff; border-color: #d2cdc4; }
.tbc-card-topo { padding: clamp(26px, 3vw, 34px) clamp(22px, 2.6vw, 30px) 0; }

.tbc-card h3 {
  margin: 0 0 10px;
  font-size: clamp(17px, 2.1vw, 21px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1C1A16;
  line-height: 1.16;
  text-wrap: balance;
}

.tbc-card p {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 15.5px);
  line-height: 1.6;
  color: #6f6f6f;
  text-wrap: pretty;
}

.tbc-arte {
  width: 100%;
  height: auto;
  margin-top: auto;
  padding: clamp(18px, 2.4vw, 26px) 0 0;
  overflow: visible;
}

/* 01 — a venda entrando no painel */
.fx-caixa rect {
  fill: #ffffff;
  stroke: #e4e4e4;
  stroke-width: 1.6;
  filter: drop-shadow(0 10px 20px rgba(28, 26, 22, 0.09));
}

.fx-caixa text {
  fill: #8a8378;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.fx-fio {
  fill: none;
  stroke: #c5c0b7;
  stroke-width: 2;
  stroke-dasharray: 3 8;
  stroke-linecap: round;
  animation: fxFio 2.4s linear infinite;
}

.fx-pacote rect { fill: #1C1A16; }
.fx-pacote path { fill: none; stroke: #E8C49A; stroke-width: 1.8; stroke-linecap: round; }
.fx-pacote { transform-box: fill-box; transform-origin: center; animation: fxPacote 3.6s ease-in-out infinite; }

@keyframes fxFio    { to { stroke-dashoffset: -22; } }
@keyframes fxPacote { 0%, 100% { transform: translateX(-42px); opacity: 0; } 18%, 78% { opacity: 1; } 100% { transform: translateX(42px); } }

/* 02 — o pedido andando pelas colunas */
.kb-coluna rect:first-child {
  fill: #ffffff;
  stroke: #e4e4e4;
  stroke-width: 1.6;
  filter: drop-shadow(0 10px 18px rgba(28, 26, 22, 0.07));
}

.kb-ficha { fill: #ececec; }
.kb-ficha-ok { fill: rgba(123, 168, 140, 0.4); }
.kb-ficha-1 { animation: kbFicha 4.2s ease-in-out infinite; }
.kb-ficha-2 { animation: kbFicha 4.2s ease-in-out infinite 1.4s; }
.kb-ficha-3 { animation: kbFicha 4.2s ease-in-out infinite 2.8s; }

@keyframes kbFicha { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* 03 — o que sobrou */
.lu-painel > rect:first-child {
  fill: #ffffff;
  stroke: #e4e4e4;
  stroke-width: 1.6;
  filter: drop-shadow(0 12px 22px rgba(28, 26, 22, 0.09));
}

.lu-eixo { fill: none; stroke: #ededed; stroke-width: 1.6; stroke-linecap: round; }
.lu-marca { fill: #e4e4e4; }

.lu-barras rect {
  fill: #ddd8d0;
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: luBarra 3.6s ease-in-out infinite;
}

.lu-barras rect:nth-child(2) { animation-delay: 0.2s; }
.lu-barras rect:nth-child(3) { animation-delay: 0.4s; }
.lu-barras rect:nth-child(4) { animation-delay: 0.6s; fill: rgba(184, 149, 106, 0.55); }

@keyframes luBarra { 0%, 100% { transform: scaleY(0.85); } 50% { transform: scaleY(1); } }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .tbc-abas { grid-template-columns: 1fr; }
  .tbc-cards { grid-template-columns: 1fr; gap: 14px; }
  .tbc-tela { transform: none; }
  .tbc-aba-txt i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tbc-tela, .tbc-quadro, .tbc-aba, .tbc-card { transition: none; }
  .fx-fio, .fx-pacote, .kb-ficha, .lu-barras rect { animation: none; }
}
