/* =====================================================================
   PÁGINA DE COTAÇÃO — o estilo (22/09/2026).

   Tudo debaixo de `.cot`, sempre. O tema desta casa dá regras a todos os
   `<span>` dos formulários e já partiu peças por isso; e o `.container`
   dele tem pseudo-elementos de clearfix que viram itens de grelha quando
   alguém lhe põe `display:grid` por cima. Não se toca no tema, e não se
   deixa o tema tocar aqui.

   AS CORES SÃO AS DA CASA: preto, branco, os dois vermelhos (#d60037 e
   #af2835) e o azul (#00acc8). O azul entra pouco e de propósito -- é o
   que diz «isto está feito», e por isso tem de ser raro.

   MOVIMENTO REDUZIDO: reduzir não é apagar. Quem pede menos movimento
   continua a ver o que mudou -- só deixa de haver deslize. E não espera
   mais tempo por isso: o dono tem essa preferência ligada e já sentiu,
   duas vezes, o castigo de lhe alongarem as animações.
   ===================================================================== */

.cot {
  --vm: #d60037; --vm2: #af2835; --az: #00acc8;
  --tinta: #101820; --tinta2: #3a4552; --ténue: #7d8794;
  --risco: #e4e8ec; --risco2: #f0f3f6; --papel: #fff; --fundo: #f7f9fb;
  max-width: 1140px; margin: 0 auto; padding: 0 15px 72px;
}

/* ---------------------------------------------------- a barra do topo */
.cot-rail {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.93); backdrop-filter: saturate(160%) blur(9px);
  border-bottom: 1px solid var(--risco); margin: 0 -15px 26px; padding: 11px 15px;
}
.cot-rail-in { max-width: 1110px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.cot-p { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cot-p b { width: 23px; height: 23px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  background: var(--risco2); color: var(--ténue); border: 1px solid var(--risco);
  transition: background .28s ease, color .28s ease, border-color .28s ease; }
.cot-p span { font-size: 13.5px; color: var(--ténue); font-weight: 600;
  transition: color .28s ease; }
.cot-p-on b { background: linear-gradient(135deg, var(--vm), var(--vm2)); color: #fff;
  border-color: transparent; box-shadow: 0 3px 10px rgba(175,40,53,.3); }
.cot-p-on span { color: var(--tinta); }
.cot-p-ok b { background: var(--az); border-color: transparent; color: #fff; }
.cot-p-ok b::before { content: '✓'; font-size: 13px; }
.cot-p-ok b i { display: none; }
.cot-fio { flex: 1 1 auto; height: 2px; background: var(--risco2); border-radius: 2px;
  position: relative; overflow: hidden; min-width: 14px; }
.cot-fio i { position: absolute; inset: 0 100% 0 0; background: var(--az);
  transition: right .45s cubic-bezier(.22,.61,.36,1); }
.cot-fio-on i { right: 0; }
@media (max-width: 720px) { .cot-p span { display: none; } }

/* -------------------------------------------------------- os cartões */
/* `min-width: 0` NOS ITENS DA GRELHA, e não é detalhe.
   Um item de grelha tem `min-width: auto` por omissão: não encolhe abaixo
   do conteúdo dele. O texto do «inclui» de cada produto leva
   `white-space: nowrap`, e um nome comprido esticava a coluna -- medido,
   o cartão ia a 1450px dentro de um contentor de 1140, e a barra do topo
   ia atrás dele. A página não rolava de lado (o tema corta), por isso o
   que se via era o conteúdo cortado à direita, sem nada a explicar. */
.cot-passos { display: grid; gap: 20px; }
.cot-passos > * { min-width: 0; }
.cot-item > * { min-width: 0; }
.cot-cx {
  background: var(--papel); border: 1px solid var(--risco); border-radius: 18px;
  padding: 28px 28px 24px; position: relative;
  box-shadow: 0 1px 2px rgba(16,24,32,.03), 0 10px 34px -22px rgba(16,24,32,.28);
  transition: box-shadow .3s ease, border-color .3s ease;
}
.cot-cx:focus-within { border-color: #cfd6de;
  box-shadow: 0 1px 2px rgba(16,24,32,.04), 0 18px 46px -24px rgba(16,24,32,.34); }
.cot-cx > h2 { margin: 0 0 3px; font-size: 20px; font-weight: 700; color: var(--tinta);
  letter-spacing: -.012em; display: flex; align-items: center; gap: 11px; }
.cot-n { flex: 0 0 auto; width: 27px; height: 27px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--vm), var(--vm2));
  box-shadow: 0 4px 12px -3px rgba(175,40,53,.5); }
.cot-cx > p.cot-ajuda { margin: 0 0 20px; font-size: 14.5px; color: var(--ténue);
  padding-left: 38px; }

/* --------------------------------------------------------- os campos */
.cot-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 16px; }
.cot-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cot-campo.cot-largo { grid-column: 1 / -1; }
.cot-campo label { font-size: 13px; font-weight: 600; color: var(--tinta2); }
.cot-campo .cot-nota { font-size: 12.5px; color: var(--ténue); font-weight: 400; line-height: 1.5; }
.cot-campo input, .cot-campo select, .cot-campo textarea {
  font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--risco);
  border-radius: 11px; background: var(--papel); color: #23303d; width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.cot-campo input::placeholder, .cot-campo textarea::placeholder { color: #b6bfc9; }
.cot-campo input:hover, .cot-campo select:hover, .cot-campo textarea:hover { border-color: #ccd4dc; }
.cot-campo input:focus, .cot-campo select:focus, .cot-campo textarea:focus {
  outline: 0; border-color: var(--vm2); background: #fff;
  box-shadow: 0 0 0 3.5px rgba(175,40,53,.13); }
.cot-campo textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
/* o visto verde: aparece quando o campo está preenchido e válido */
.cot-campo.cot-feito > label::after { content: '✓'; color: var(--az); font-weight: 700;
  margin-left: 6px; animation: cot-pop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes cot-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------- o catálogo */
.cot-prod { border: 1px solid var(--risco); border-radius: 14px; margin-bottom: 11px;
  overflow: hidden; background: var(--papel); transition: border-color .25s ease; }
.cot-prod[open] { border-color: #d7dee6; }
.cot-prod > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 15.5px;
  color: var(--tinta); list-style: none; display: flex; align-items: center; gap: 11px;
  transition: background .2s ease; }
.cot-prod > summary:hover { background: var(--fundo); }
.cot-prod > summary::-webkit-details-marker { display: none; }
.cot-seta { width: 9px; height: 9px; border-right: 2px solid var(--vm2);
  border-bottom: 2px solid var(--vm2); transform: rotate(-45deg);
  transition: transform .28s cubic-bezier(.22,.61,.36,1); flex: 0 0 auto; margin-left: 2px; }
.cot-prod[open] .cot-seta { transform: rotate(45deg); }
.cot-conta { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #fff;
  background: var(--vm2); border-radius: 999px; padding: 2px 9px; opacity: 0;
  transform: scale(.6); transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.56,.64,1); }
.cot-prod.cot-tem .cot-conta { opacity: 1; transform: none; }
.cot-lista { padding: 4px 12px 14px; }

.cot-item { display: grid; grid-template-columns: 1fr 148px 104px 124px; gap: 12px;
  align-items: center; padding: 11px 10px; border-radius: 11px;
  border-bottom: 1px solid var(--risco2);
  transition: background .22s ease, box-shadow .22s ease; }
.cot-item:last-child { border-bottom: 0; }
.cot-item:hover { background: var(--fundo); }
.cot-item .cot-nome { font-size: 15px; color: var(--tinta); font-weight: 600; min-width: 0; }
.cot-item .cot-inc { display: block; font-size: 12.5px; color: var(--ténue); font-weight: 400;
  margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cot-item select { font-size: 14px; padding: 8px 10px; border: 1px solid var(--risco);
  border-radius: 9px; width: 100%; background: var(--papel); }
.cot-item select:focus { outline: 0; border-color: var(--vm2);
  box-shadow: 0 0 0 3px rgba(175,40,53,.12); }
.cot-item .cot-valor { text-align: right; font-variant-numeric: tabular-nums; font-size: 15px;
  color: var(--ténue); white-space: nowrap; }
.cot-item.cot-on { background: linear-gradient(95deg, rgba(214,0,55,.045), rgba(175,40,53,.03));
  box-shadow: inset 3px 0 0 var(--vm2); }
.cot-item.cot-on .cot-valor { color: var(--tinta); font-weight: 800; }

/* o contador: menos / número / mais, em vez de um `number` cru */
.cot-qtd { display: flex; align-items: center; border: 1px solid var(--risco);
  border-radius: 9px; overflow: hidden; background: var(--papel); }
.cot-qtd button { font: inherit; font-size: 17px; line-height: 1; width: 30px; height: 34px;
  border: 0; background: transparent; color: var(--ténue); cursor: pointer;
  transition: background .18s ease, color .18s ease; }
.cot-qtd button:hover { background: var(--risco2); color: var(--vm2); }
.cot-qtd button:disabled { opacity: .35; cursor: not-allowed; background: transparent; }
.cot-qtd input { width: 40px; text-align: center; border: 0; font: inherit; font-size: 14.5px;
  font-variant-numeric: tabular-nums; padding: 7px 0; -moz-appearance: textfield; }
.cot-qtd input::-webkit-outer-spin-button, .cot-qtd input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0; }
.cot-qtd input:focus { outline: 0; }
.cot-qtd:focus-within { border-color: var(--vm2); box-shadow: 0 0 0 3px rgba(175,40,53,.12); }

/* ---------------------------------------------- o resumo que segue */
.cot-resumo { position: sticky; bottom: 14px; z-index: 20; margin-top: 22px;
  background: var(--papel); border: 1px solid var(--risco); border-radius: 16px;
  padding: 16px 20px; box-shadow: 0 -2px 10px rgba(16,24,32,.04), 0 16px 40px -20px rgba(16,24,32,.4);
  display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; }
.cot-linhas { display: grid; gap: 3px; min-width: 0; }
.cot-linhas div { display: flex; justify-content: space-between; gap: 18px;
  font-size: 14px; color: var(--tinta2); }
.cot-linhas .cot-t { border-top: 1.5px solid var(--risco); margin-top: 5px; padding-top: 7px;
  font-size: 20px; font-weight: 800; color: var(--tinta); }
.cot-linhas .cot-t span:last-child { font-variant-numeric: tabular-nums; }
.cot-vazio { color: var(--ténue); font-size: 14px; margin: 0; }
.cot-resumo .cot-bt { grid-row: 1 / -1; grid-column: 2; }
@media (max-width: 680px) {
  .cot-resumo { grid-template-columns: 1fr; }
  .cot-resumo .cot-bt { grid-row: auto; grid-column: 1; width: 100%; }
}

/* ------------------------------------------------------------ botões */
.cot-bt { font: inherit; font-size: 15.5px; font-weight: 700; color: #fff; border: 0;
  background: linear-gradient(120deg, var(--vm), var(--vm2)); padding: 15px 32px;
  border-radius: 999px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 10px 24px -8px rgba(175,40,53,.6);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease, filter .18s ease; }
.cot-bt:hover:not([disabled]) { transform: translateY(-2px); filter: brightness(1.05);
  box-shadow: 0 16px 30px -10px rgba(175,40,53,.66); }
.cot-bt:active:not([disabled]) { transform: translateY(0); }
.cot-bt[disabled] { opacity: .42; cursor: not-allowed; box-shadow: none; filter: grayscale(.3); }
.cot-bt:focus-visible { outline: 3px solid var(--az); outline-offset: 3px; }

/* ------------------------------------------------- avisos e rodapé */
.cot-aviso { display: flex; flex-wrap: wrap; gap: 11px; align-items: center;
  background: linear-gradient(95deg, #fdf3f5, #fff); border: 1px solid #f3dde1;
  border-left: 3px solid var(--vm2); border-radius: 0 12px 12px 0;
  padding: 12px 17px; margin: 0 0 20px; font-size: 14px; color: var(--tinta2); }
.cot-apagar { font: inherit; font-size: 13.5px; background: var(--papel);
  border: 1px solid var(--risco); border-radius: 999px; padding: 6px 15px;
  cursor: pointer; color: var(--tinta2); transition: border-color .2s ease, color .2s ease; }
.cot-apagar:hover { border-color: var(--vm2); color: var(--vm2); }
.cot-legal { font-size: 13px; color: var(--ténue); max-width: 62ch; margin: 14px 0 0;
  line-height: 1.6; }
.cot-erro { color: var(--vm2); font-size: 14.5px; font-weight: 600; }

/* --------------------------------------------- a entrada dos cartões */
.cot-cx, .cot-rail { animation: cot-sobe .5s cubic-bezier(.22,.61,.36,1) both; }
.cot-cx:nth-of-type(2) { animation-delay: .06s; }
.cot-cx:nth-of-type(3) { animation-delay: .12s; }
@keyframes cot-sobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  /* REDUZIR NÃO É APAGAR: a entrada continua a ver-se, só deixa de
     deslizar. E NÃO fica mais lenta -- quem quer menos movimento não
     quer esperar mais. */
  .cot-cx, .cot-rail { animation: cot-aparece .3s ease both; }
  @keyframes cot-aparece { from { opacity: 0; } to { opacity: 1; } }
  .cot-bt:hover:not([disabled]) { transform: none; }
  .cot-fio i, .cot-seta, .cot-conta, .cot-p b, .cot-p span { transition-duration: .01ms; }
}

/* ----------------------------------------------------- no telemóvel */
@media (max-width: 760px) {
  .cot-cx { padding: 22px 18px 20px; border-radius: 15px; }
  .cot-cx > p.cot-ajuda { padding-left: 0; }
  .cot-item { grid-template-columns: 1fr auto; gap: 9px 12px; }
  .cot-item .cot-nome { grid-column: 1 / -1; }
  .cot-item select { grid-column: 1; }
  .cot-item .cot-valor { text-align: right; }
  .cot-qtd { grid-column: 2; }
}
