/* P29 (29/10/2026) — «Corte e orla por medida»: formulário e cartões dos materiais. Primeiro o telemóvel; campos com 16 px (o iOS não
   amplia), alvos de toque >= 44 px; espaços com as medidas do Journal (--j-gap-spacing-*), sem rem. Os botões do fim usam a classe
   em-cta-botoes (P27, em-alinhamentos.css): empilhados no telemóvel. */
.em-corte, .em-corte-mat { --em-corte-verde: #1b5e57; --em-corte-linha: #e4e1da; --em-corte-fundo: #faf8f4; }   /* as duas peças da página (o selo «Em armazém» vive nas duas) */
.em-corte { margin: var(--j-gap-spacing---8, 24px) 0; }
.em-corte__form { max-width: 860px; }
.em-corte__grupo { border: 1px solid var(--em-corte-linha); border-radius: 10px; background: var(--em-corte-fundo); padding: var(--j-gap-spacing---6, 16px); margin: 0 0 var(--j-gap-spacing---6, 16px); min-width: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
/* o título dentro da caixa (um <legend> fica, por omissão, em cima da linha da caixa) */
.em-corte__titulo { float: left; width: 100%; display: flex; align-items: center; gap: var(--j-gap-spacing---4, 8px); width: auto; border: 0; margin: 0 0 var(--j-gap-spacing---5, 12px); padding: 0; font-size: 18px; font-weight: 700; color: #1f1f1f; }
.em-corte__titulo + * { clear: both; }
.em-corte__titulo small { font-weight: 400; color: #666; font-size: 14px; }
.em-corte__num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--em-corte-verde); color: #fff; font-size: 15px; flex: none; }
.em-corte__rotulo { font-weight: 600; font-size: 16px; color: #333; margin: var(--j-gap-spacing---5, 12px) 0 var(--j-gap-spacing---3, 6px); }
.em-corte__rotulo-campo { display: block; margin-top: var(--j-gap-spacing---5, 12px); }
.em-corte__obrig { color: #c0392b; }
.em-corte__ajuda { font-size: 14px; color: #555; margin: var(--j-gap-spacing---3, 6px) 0; }
.em-corte .form-control { font-size: 16px; min-height: 44px; }
.em-corte label { font-weight: 600; }

/* cores: cartões com amostra */
.em-corte__cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--j-gap-spacing---4, 8px); }
.em-corte__cor { position: relative; display: flex; flex-direction: column; gap: 4px; padding: var(--j-gap-spacing---4, 8px); border: 2px solid var(--em-corte-linha); border-radius: 10px; background: #fff; cursor: pointer; min-height: 44px; font-weight: 400; }
.em-corte__cor input { position: absolute; opacity: 0; pointer-events: none; }
.em-corte__cor:has(input:checked) { border-color: var(--em-corte-verde); box-shadow: 0 0 0 2px var(--em-corte-verde) inset; }
.em-corte__cor:has(input:focus-visible) { outline: 3px solid #1a73e8; outline-offset: 2px; }
.em-corte__amostra { display: flex; align-items: center; justify-content: center; height: 64px; border-radius: 6px; border: 1px solid #ccc; background: #f2f0eb center / cover no-repeat; text-align: center; }
.em-corte__amostra-nome { font-size: 13px; color: #333; padding: 0 4px; }
.em-corte__amostra--outra { color: var(--em-corte-verde); font-size: 22px; }
.em-corte__cor-nome { font-size: 14px; line-height: 1.3; color: #1f1f1f; }
.em-corte__cor-nome small { color: #666; }
.em-corte__selo { align-self: flex-start; font-size: 12px; font-weight: 700; color: #fff; background: var(--em-corte-verde); border-radius: 99px; padding: 2px 8px; }
.em-corte__aprox { font-size: 12px; color: #777; font-style: italic; }
.em-corte__outra { margin-top: var(--j-gap-spacing---5, 12px); }
.em-corte__ligacao { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.em-corte__aviso { margin-top: var(--j-gap-spacing---4, 8px); padding: var(--j-gap-spacing---5, 12px); border-left: 4px solid #e0a030; background: #fff8ea; border-radius: 6px; font-size: 14px; color: #5a3a00; }

/* espessuras e opções */
.em-corte__espessuras, .em-corte__opcoes { display: flex; flex-wrap: wrap; gap: var(--j-gap-spacing---4, 8px); }
.em-corte__opcoes--coluna { flex-direction: column; }
.em-corte__esp, .em-corte__opcao { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 2px solid var(--em-corte-linha); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 400; margin: 0; }
.em-corte__esp input, .em-corte__opcao input { width: 20px; height: 20px; margin: 0; flex: none; }
.em-corte__esp:has(input:checked), .em-corte__opcao:has(input:checked) { border-color: var(--em-corte-verde); background: #eef6f5; }
.em-corte__esp small { color: #666; }
.em-corte__esp--outra { opacity: .9; }
.em-corte__orla-nota { margin: var(--j-gap-spacing---5, 12px) 0 0; font-size: 14px; color: var(--em-corte-verde); font-weight: 600; }

/* peças */
.em-corte__peca { border: 1px solid var(--em-corte-linha); border-radius: 8px; background: #fff; padding: var(--j-gap-spacing---5, 12px); margin-bottom: var(--j-gap-spacing---5, 12px); }
.em-corte__peca-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.em-corte__peca-n { font-size: 16px; }
.em-corte__peca-botoes { display: flex; gap: 6px; }
.em-corte__peca-botoes button, .em-corte__atalhos button { min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid #bbb; border-radius: 8px; background: #fff; font-size: 14px; }
.em-corte__medidas { display: grid; grid-template-columns: 1fr 1fr; gap: var(--j-gap-spacing---4, 8px); margin-top: var(--j-gap-spacing---4, 8px); }
.em-corte__medidas > div:last-of-type { grid-column: 1 / -1; }
.em-corte__medidas label { font-size: 14px; }
.em-corte__lados { display: grid; grid-template-columns: 52px 1fr 52px; grid-template-rows: 44px minmax(80px, auto) 44px; gap: 4px; max-width: 360px; }
.em-corte__lado { display: flex; align-items: center; justify-content: center; margin: 0; border: 2px dashed #b9b4aa; border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 700; color: #777; min-height: 44px; min-width: 44px; }
.em-corte__lado input { position: absolute; opacity: 0; pointer-events: none; }
.em-corte__lado--C1 { grid-column: 2; grid-row: 1; }
.em-corte__lado--L1 { grid-column: 1; grid-row: 2; }
.em-corte__lado--L2 { grid-column: 3; grid-row: 2; }
.em-corte__lado--C2 { grid-column: 2; grid-row: 3; }
.em-corte__lado--on, .em-corte__lado:has(input:checked) { border: 3px solid var(--em-corte-verde); background: #dff0ec; color: var(--em-corte-verde); }
.em-corte__lado:has(input:focus-visible) { outline: 3px solid #1a73e8; outline-offset: 2px; }
.em-corte__placa { grid-column: 2; grid-row: 2; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: #efe9dc; border: 1px solid #c9c1b0; font-size: 13px; color: #555; text-align: center; padding: 4px; }
.em-corte__atalhos { margin-top: 6px; display: flex; gap: 6px; }
.em-corte__sem-orla { margin-top: 8px; font-size: 14px; color: #555; }
.em-corte__veio { margin-top: var(--j-gap-spacing---4, 8px); }
.em-corte__mais-peca { margin-top: var(--j-gap-spacing---4, 8px); }
.em-corte__mais-peca summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--em-corte-verde); font-weight: 600; }
.em-corte__fur-txt { margin-top: 6px; }
.em-corte__resumo { position: sticky; bottom: 0; z-index: 2; margin-top: var(--j-gap-spacing---4, 8px); padding: var(--j-gap-spacing---5, 12px); border-radius: 8px; background: var(--em-corte-verde); color: #fff; font-size: 16px; }
.em-corte__morada { margin-top: var(--j-gap-spacing---5, 12px); }
.em-corte__par { display: grid; grid-template-columns: 1fr; gap: var(--j-gap-spacing---4, 8px); }
.em-corte__rgpd { display: flex; gap: 8px; margin-top: var(--j-gap-spacing---6, 16px); font-weight: 400; }
.em-corte__rgpd input { width: 22px; height: 22px; flex: none; }
.em-corte__captcha { margin-top: var(--j-gap-spacing---5, 12px); }
.em-corte__enviar { margin: var(--j-gap-spacing---6, 16px) 0 var(--j-gap-spacing---4, 8px); }
.em-corte__enviar .btn, .em-corte__acoes .btn { min-height: 48px; font-size: 16px; }
.em-corte .em-ajax-error { margin-top: 6px; font-size: 14px; font-weight: 600; }
.em-corte__resultado { font-size: 16px; }
/* o tema anula o espaço entre o ícone e o texto dos botões (como na página da Recolha) */
.em-corte .btn i, .em-corte button i, .em-corte__ligacao i { margin-right: 8px; }
.em-corte input[type="file"] { min-height: 44px; font-size: 16px; max-width: 100%; }

@media (min-width: 577px) {
  .em-corte__medidas { grid-template-columns: 1fr 1fr 120px; }
  .em-corte__medidas > div:last-of-type { grid-column: auto; }
  .em-corte__par { grid-template-columns: 1fr 1fr; }
  .em-corte__grupo { padding: var(--j-gap-spacing---7, 20px); }
}

/* cartões dos materiais ([materiais-corte]) */
.em-corte-mat { margin: var(--j-gap-spacing---6, 16px) 0; }
.em-corte-mat__cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--j-gap-spacing---5, 12px); margin: var(--j-gap-spacing---5, 12px) 0; }
.em-corte-mat__cor { display: flex; flex-direction: column; gap: 4px; padding: var(--j-gap-spacing---4, 8px); border: 1px solid #e4e1da; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.em-corte-mat__amostra { height: 90px; }
.em-corte-mat__nome { font-weight: 600; font-size: 15px; }
.em-corte-mat__nome small { color: #666; font-weight: 400; }
.em-corte-mat__orla { font-size: 13px; color: #555; }
.em-corte-mat__sub { font-size: 18px; margin: var(--j-gap-spacing---6, 16px) 0 var(--j-gap-spacing---3, 6px); }
.em-corte-mat__esp { padding-left: 20px; }

/* ── P30 (29/10/2026) — página mais compacta e a usar a largura (SPEC-20261029-P30) ─────────────────────────────────────────────────── */
/* topo: no computador, a introdução e os botões à esquerda, as 2 fotos à direita */
@media (min-width: 992px) {
  .em-corte-topo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--j-gap-spacing---9, 32px); align-items: center; margin: 0 0 var(--j-gap-spacing---8, 24px); }
  .em-corte-topo .em-galeria-servico { margin: 0 !important; }
}
/* «Como funciona»: 4 cartões lado a lado (computador), 2×2 (tablet), lista compacta (telemóvel); o número do passo à vista */
.em-corte-passos { list-style: none; padding: 0; margin: var(--j-gap-spacing---6, 16px) 0 var(--j-gap-spacing---8, 24px); display: grid; gap: var(--j-gap-spacing---5, 12px); counter-reset: passo; }
.em-corte-passos__passo { counter-increment: passo; display: flex; gap: var(--j-gap-spacing---5, 12px); align-items: flex-start; margin: 0; }
.em-corte-passos__icone { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #1b5e57; color: #fff; }
/* 30/10: o número fica FORA do círculo, à direita do ícone (antes tapava-lhe o canto); no telemóvel o ícone ganha margem para ele caber */
.em-corte-passos__icone { margin-right: 28px; }
.em-corte-passos__icone::after { content: counter(passo); position: absolute; top: 10px; left: calc(100% + 6px); min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px;
  background: #fff; color: #1b5e57; border: 1px solid #1b5e57; font-size: var(--j-font_size-font-size-200, 12px); font-weight: 700; line-height: 18px; text-align: center; }
@media (min-width: 768px) {
  .em-corte-passos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--j-gap-spacing---6, 16px); }
  .em-corte-passos__passo { flex-direction: column; padding: var(--j-gap-spacing---6, 16px); border: 1px solid #e4e1da; border-radius: 10px; background: #faf8f4; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
}
@media (min-width: 1200px) { .em-corte-passos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* «Exemplos» e espessuras: etiquetas lado a lado */
.em-chips { list-style: none; padding: 0 !important; margin: var(--j-gap-spacing---5, 12px) 0 var(--j-gap-spacing---8, 24px); display: flex; flex-wrap: wrap; gap: var(--j-gap-spacing---4, 8px); }
.em-chips > li { margin: 0; padding: var(--j-gap-spacing---3, 6px) var(--j-gap-spacing---5, 12px); border: 1px solid #e4e1da; border-radius: 99px; background: #fff; line-height: 1.35; }
/* «Materiais»: os cartões das cores ao lado do texto e das espessuras, quando cabem */
@media (min-width: 992px) {
  .em-corte-mat { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: var(--j-gap-spacing---8, 24px); align-items: start; }
  .em-corte-mat__cores { grid-template-columns: repeat(auto-fill, 170px); margin: 0; max-width: 560px; }
  .em-corte-mat__info > :first-child { margin-top: 0; }
}
/* formulário: no computador, a lista de peças à esquerda e o resumo fixo à direita (enquanto se faz a lista); no telemóvel como estava */
.em-corte__form { margin-left: auto; margin-right: auto; }
@media (min-width: 992px) {
  .em-corte__form { max-width: 1000px; }
  .em-corte__grupo--pecas { display: grid; grid-template-columns: minmax(0, 1fr) 230px; column-gap: var(--j-gap-spacing---8, 24px); align-items: start; }
  .em-corte__grupo--pecas > :not(.em-corte__resumo):not(legend) { grid-column: 1; }
  .em-corte__grupo--pecas > .em-corte__resumo { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 120px; bottom: auto; margin-top: 0; display: flex; flex-direction: column; gap: 4px; }
  .em-corte__grupo--pecas > .em-corte__resumo[hidden] { display: none; }
}
/* anexos: o botão e o estado são nossos (em português); o campo nativo fica escondido mas acessível */
.em-corte__ficheiros { display: flex; flex-wrap: wrap; align-items: center; gap: var(--j-gap-spacing---4, 8px) var(--j-gap-spacing---5, 12px); margin: 0 0 var(--j-gap-spacing---6, 16px); }
.em-corte__ficheiro-input { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; min-width: 0 !important; padding: 0 !important; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.em-corte__ficheiro-botao { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; cursor: pointer; }
.em-corte__ficheiro-input:focus-visible + .em-corte__ficheiro-botao { outline: 2px solid #1b5e57; outline-offset: 2px; }
.em-corte__ficheiro-estado { color: #555; }
/* «Como prefere a resposta?»: pílulas iguais às das espessuras, com espaço entre elas */
.em-corte .contact-pref-options { display: flex; flex-wrap: wrap; gap: var(--j-gap-spacing---4, 8px); margin: var(--j-gap-spacing---3, 6px) 0 var(--j-gap-spacing---6, 16px); }
.em-corte .contact-pref-item { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; margin: 0; border: 2px solid var(--em-corte-linha); border-radius: 99px; background: #fff; cursor: pointer; font-weight: 400; }
/* 30/10: sem o quadradinho — a caixa fica escondida mas acessível (teclado e leitores de ecrã); escolhida, a pílula fica preenchida */
.em-corte .contact-pref-item input { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; margin: -1px !important; padding: 0 !important;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; opacity: 0; }
.em-corte .contact-pref-item { position: relative; }
.em-corte .contact-pref-item:has(input:checked) { border-color: var(--em-corte-verde) !important; background: var(--em-corte-verde) !important; color: #fff !important; }
.em-corte .contact-pref-item:has(input:checked) .contact-pref-label,
.em-corte .contact-pref-item:has(input:checked) .contact-pref-label i { color: #fff !important; }
.em-corte .contact-pref-item:has(input:checked) { box-shadow: none !important; }
/* o euromoveis-forms.css dá-lhes largura igual (flex 1 1 0) no telemóvel: com 3 numa linha, «WhatsApp» partia-se; aqui cada uma tem o seu tamanho */
.em-corte .contact-pref-item { flex: 0 1 auto !important; }
.em-corte .contact-pref-label { white-space: nowrap; }
.em-corte .contact-pref-item:has(input:focus-visible) { outline: 2px solid #1b5e57; outline-offset: 2px; }
/* o euromoveis-forms.css põe 6 px com !important no telemóvel (e 40 px de altura): aqui, como as espessuras — 8 px e alvos de 44 px */
.em-corte .contact-pref-options { gap: var(--j-gap-spacing---4, 8px) !important; }
.em-corte .contact-pref-item { min-height: 44px !important; padding: 6px 14px !important; border-radius: 99px !important; border-width: 2px !important; }
/* o resumo fixo (à direita no computador; em baixo no telemóvel, desde o P29) precisa de que o <body> NÃO seja um contentor de
   deslocamento: o tema põe-lhe overflow «hidden scroll», e assim um sticky nunca prende. Só nas páginas com este formulário: «clip» corta
   na mesma o que passa para o lado (o html já tem overflow-x: hidden) e não cria contentor. */
body:has(.em-corte__grupo--pecas) { overflow-x: clip !important; overflow-y: visible !important; }
/* P30 — no computador, a usar a largura: em cada peça, os lados com orla à direita das medidas  (30/10: as Ferragens passaram a abrir-se à parte; já não há «lado a lado») */
@media (min-width: 992px) {
  .em-corte__peca { display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: var(--j-gap-spacing---6, 16px); align-items: start; }
  .em-corte__peca > * { grid-column: 1; }
  .em-corte__peca > .em-corte__peca-topo { grid-column: 1 / -1; }
  .em-corte__peca > .em-corte__orla-peca { grid-column: 2; grid-row: 2 / span 4; }
  .em-corte__peca .em-corte__medidas { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 90px; }
  .em-corte__peca .em-corte__medidas > div:last-of-type { grid-column: auto; }
}
/* o resumo à direita (computador): um valor por linha — os separadores « · » do texto ficavam sozinhos numa linha */
@media (min-width: 992px) {
  .em-corte__grupo--pecas > .em-corte__resumo { display: block; font-size: 0; }
  .em-corte__grupo--pecas > .em-corte__resumo > * { display: block; font-size: var(--j-font_size-font-size-600, 16px); line-height: 1.5; }
  .em-corte__grupo--pecas > .em-corte__resumo[hidden] { display: none; }
}

/* 30/10 — «Ferragens» fechada atrás de «+ Precisa de ferragens? (opcional)» (quem não precisa não a vê) */
.em-corte__ferragens { margin: 0 0 var(--j-gap-spacing---6, 16px); }
.em-corte__ferragens > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 16px; border: 2px dashed var(--em-corte-linha); border-radius: 99px;
  cursor: pointer; font-weight: 600; color: #1b5e57; list-style: none; }
.em-corte__ferragens > summary::-webkit-details-marker { display: none; }
.em-corte__ferragens > summary:focus-visible { outline: 2px solid #1b5e57; outline-offset: 2px; }
.em-corte__ferragens[open] > summary { border-style: solid; margin-bottom: var(--j-gap-spacing---5, 12px); }
.em-corte__ferragens > .em-corte__grupo { margin-top: 0; }
