/* ==========================================================
   Carrinho e finalizar compra
   Usa o cabeçalho/rodapé do style.css. Todas as classes
   daqui começam com "fx-" para não conflitar com o resto.
   ========================================================== */

[hidden] { display: none !important; }

body.fx {
  background: #fefefe;
  color: #2e2e2e;
  font-size: 16px;
  line-height: 1.5;
}

.fx a.btn-carrinho {
  display: inline-block;
  text-decoration: none;
}

.fx-logo-link {
  text-decoration: none;
  color: inherit;
}

.fx :focus-visible {
  outline: 3px solid #B76E79;
  outline-offset: 2px;
}

/* ---------- etapas ---------- */

.fx-faixa {
  background: #F7D9D3;
  padding: 14px 20px;
}

.fx-etapas {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1120px;
  margin: 0 auto;
}

.fx-etapas li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7a4a52;
  font-weight: 600;
  font-size: 14px;
}

.fx-etapas li + li::before {
  content: "";
  width: 28px;
  height: 1px;
  background: #B76E79;
  margin-right: 2px;
}

.fx-etapas span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  border: 1px solid #B76E79;
  background: #fefefe;
  color: #8A4A54;
}

.fx-etapas .feito span,
.fx-etapas .atual span {
  background: #A05A65;
  border-color: #A05A65;
  color: #fff;
}

.fx-etapas .atual span {
  box-shadow: 0 0 0 4px rgba(183, 110, 121, .25);
}

.fx-etapas .atual {
  color: #2e2e2e;
}

/* ---------- página ---------- */

.fx-pagina {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.fx-cabecalho {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 24px;
}

.fx-titulo {
  color: #B76E79;
  font-size: 34px;
  line-height: 1.15;
}

.fx-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: #8A4A54;
  text-decoration: underline;
  cursor: pointer;
}

.fx-link:hover {
  color: #B76E79;
}

.fx-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.fx-coluna {
  display: grid;
  gap: 20px;
}

.fx-card {
  background: #fff;
  border: 1px solid #ecd9d4;
  border-radius: 14px;
  padding: 24px;
}

.fx-card > h2 {
  color: #B76E79;
  font-size: 20px;
  margin-bottom: 4px;
}

.fx-sub {
  color: #6b6b6b;
  font-size: 14px;
}

.fx-card > .fx-sub {
  margin-bottom: 18px;
}

/* ---------- resumo (o destaque da página) ---------- */

.fx-resumo {
  position: sticky;
  top: 96px;
  background: #FAE9E1;
  border: 1px solid #B76E79;
  border-radius: 15px;
  padding: 24px;
  box-shadow: 0 0 20px rgba(183, 110, 121, .2);
}

.fx-resumo h2 {
  color: #8A4A54;
  font-size: 20px;
  margin-bottom: 14px;
}

.fx-linha {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
}

.fx-linha > span:first-child {
  color: #555;
}

.fx-total {
  border-top: 1px solid rgba(183, 110, 121, .45);
  margin-top: 10px;
  padding-top: 14px;
  font-size: 22px;
  font-weight: 700;
}

.fx-total > span:first-child {
  color: #2e2e2e;
}

.fx-total > strong {
  color: #8A4A54;
}

.fx-nota {
  color: #6b6b6b;
  font-size: 13px;
  margin: 4px 0 18px;
}

.fx-resumo #btnPagar {
  margin-top: 18px;
}

.fx-seguro {
  margin-top: 14px;
  font-size: 13px;
  color: #6b6b6b;
  text-align: center;
}

/* ---------- botões ---------- */

.fx-btn {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border: 1px solid #A05A65;
  border-radius: 10px;
  background: #A05A65;
  color: #fff;
  font: 700 16px/1.2 'Segoe UI', sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: .3s;
}

.fx-btn:hover:not(:disabled) {
  background: #8A4A54;
  border-color: #8A4A54;
  transform: translateY(-2px);
}

.fx-btn:disabled {
  background: #d9bfc3;
  border-color: #d9bfc3;
  cursor: not-allowed;
}

.fx-btn-sec {
  background: transparent;
  color: #8A4A54;
  border-color: #B76E79;
  margin-top: 10px;
}

.fx-btn-sec:hover:not(:disabled) {
  background: #F7D9D3;
  border-color: #B76E79;
  color: #8A4A54;
}

.fx-btn-sec:disabled {
  background: transparent;
  color: #b8a3a6;
  border-color: #e3d2d4;
}

/* ---------- itens do carrinho ---------- */

.fx-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid #f0e0dc;
  align-items: start;
}

.fx-item:first-child { padding-top: 0; }
.fx-item:last-child { padding-bottom: 0; border-bottom: none; }

.fx-item img {
  width: 96px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  background: #FAE9E1;
}

.fx-item-nome {
  font-size: 16px;
  font-weight: 600;
  color: #2e2e2e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fx-item-unit {
  color: #6b6b6b;
  font-size: 14px;
  margin: 4px 0 12px;
}

.fx-qtd {
  display: inline-flex;
  align-items: center;
  border: 1px solid #B76E79;
  border-radius: 8px;
  overflow: hidden;
  vertical-align: middle;
}

.fx-qtd button {
  width: 36px;
  height: 36px;
  border: none;
  background: #fff;
  color: #8A4A54;
  font-size: 18px;
  cursor: pointer;
}

.fx-qtd button:hover:not(:disabled) {
  background: #F7D9D3;
}

.fx-qtd button:disabled {
  color: #c9b3b6;
  cursor: not-allowed;
}

.fx-qtd output {
  min-width: 38px;
  text-align: center;
  font-weight: 600;
}

.fx-remover {
  background: none;
  border: none;
  margin-left: 14px;
  padding: 4px 0;
  font: inherit;
  font-size: 14px;
  color: #8A4A54;
  text-decoration: underline;
  cursor: pointer;
  vertical-align: middle;
}

.fx-remover:hover { color: #B76E79; }

.fx-item-sub {
  font-size: 18px;
  font-weight: 700;
  color: #B76E79;
  text-align: right;
  white-space: nowrap;
}

/* ---------- carrinho vazio ---------- */

.fx-vazio {
  text-align: center;
  padding: 56px 24px;
  background: #FAE9E1;
  border: 1px solid #ecd9d4;
  border-radius: 15px;
}

.fx-vazio h2 {
  color: #B76E79;
  font-size: 26px;
}

.fx-vazio p {
  color: #555;
  margin: 8px 0 22px;
}

.fx-vazio .fx-btn {
  display: inline-block;
  width: auto;
  padding: 14px 32px;
}

/* ---------- formulário ---------- */

.fx-campos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.fx-campo {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-campo.m2 { grid-column: span 2; }
.fx-campo.m3 { grid-column: span 3; }
.fx-campo.m4 { grid-column: span 4; }

.fx-campo label {
  font-size: 14px;
  font-weight: 600;
  color: #4a4a4a;
}

.fx-campo input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d6bfbb;
  border-radius: 10px;
  font: inherit;
  color: #2e2e2e;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.fx-campo input::placeholder {
  color: #9a9a9a;
}

.fx-campo input:focus {
  outline: none;
  border-color: #B76E79;
  box-shadow: 0 0 0 3px rgba(183, 110, 121, .25);
}

.fx-campo input.invalido {
  border-color: #B3261E;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .15);
}

/* ---------- frete ---------- */

.fx-frete-acoes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.fx-frete-acoes .fx-btn {
  width: auto;
  margin-top: 0;
  padding: 12px 24px;
}

.fx-opcoes {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.fx-opcoes:empty {
  margin-top: 0;
}

.fx-opcao {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #d6bfbb;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.fx-opcao:hover {
  border-color: #B76E79;
}

.fx-opcao.sel {
  border-color: #B76E79;
  background: #FAE9E1;
  box-shadow: inset 0 0 0 1px #B76E79;
}

.fx-opcao input {
  width: 18px;
  height: 18px;
  accent-color: #A05A65;
}

.fx-opcao-nome {
  font-weight: 600;
}

.fx-opcao-prazo {
  display: block;
  color: #6b6b6b;
  font-size: 13px;
  font-weight: 400;
}

.fx-opcao-preco {
  font-weight: 700;
  color: #8A4A54;
}

/* ---------- mini resumo (checkout) ---------- */

.fx-mini {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.fx-mini img {
  width: 52px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #F7D9D3;
}

.fx-mini-nome {
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fx-mini-qtd {
  color: #6b6b6b;
  font-size: 13px;
}

.fx-mini-preco {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.fx-div {
  border: none;
  border-top: 1px solid rgba(183, 110, 121, .35);
  margin: 12px 0;
}

/* ---------- avisos ---------- */

.fx-aviso {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdecea;
  color: #8c1d18;
  border: 1px solid #f2b8b5;
  font-size: 14px;
  white-space: pre-line;
}

.fx-aviso:empty {
  display: none;
}

/* ---------- telas pequenas ---------- */

@media (max-width: 820px) {
  .fx footer {
    padding: 32px 24px;
  }
}

@media (max-width: 900px) {
  .fx-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fx-resumo {
    position: static;
  }
}

@media (max-width: 560px) {
  .fx-pagina { padding: 24px 16px 56px; }
  .fx-titulo { font-size: 28px; }
  .fx-card { padding: 18px; }

  .fx-item {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 14px;
  }

  .fx-item img { width: 80px; height: 100px; }

  .fx-item-sub {
    grid-column: 2;
    text-align: left;
  }

  .fx-campo.m2,
  .fx-campo.m3,
  .fx-campo.m4 { grid-column: span 6; }

  .fx-etapas li + li::before { width: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .fx *, .fx *::before, .fx *::after {
    transition: none !important;
  }
}

/* ---------- tamanhos nos cards da home ---------- */

.produto .fx-tamanhos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 15px 0;
}

.produto .fx-tamanhos .fx-tam {
  width: auto;
  min-width: 42px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #B76E79;
  background: #fff;
  color: #8A4A54;
  border-radius: 8px;
  font: 600 14px/1 'Segoe UI', sans-serif;
  cursor: pointer;
  opacity: 1;
  transition: .2s;
}

.produto .fx-tamanhos .fx-tam:hover:not(:disabled) {
  background: #F7D9D3;
  opacity: 1;
}

.produto .fx-tamanhos .fx-tam[aria-checked="true"] {
  background: #A05A65;
  border-color: #A05A65;
  color: #fff;
}

.produto .fx-tamanhos .fx-tam:disabled {
  color: #a0a0a0;
  border-color: #dcdcdc;
  background: #f6f6f6;
  text-decoration: line-through;
  cursor: not-allowed;
}

.produto .fx-dica {
  color: #B3261E;
  font-size: 13px;
  padding: 6px 15px 0;
}

.produto .fx-dica:empty {
  display: none;
}

.produto button.fx-add:disabled {
  background: #d9bfc3;
  cursor: not-allowed;
}

/* ---------- aviso rápido (toast) ---------- */

.fx-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: #2e2e2e;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font: 600 15px/1.3 'Segoe UI', sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 1000;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.fx-toast.visivel {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fx-toast.erro {
  background: #8c1d18;
}

.fx-item-tam {
  color: #6b6b6b;
  font-size: 14px;
  margin-top: 2px;
}

/* ---------- cards da home: descrição em 2 linhas e botão sempre no pé ---------- */

.produto {
  display: flex;
  flex-direction: column;
}

.produto-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.produto-info .descricao {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  height: 2.8em; /* sempre 2 linhas: os cards ficam iguais */
}

.produto-info .badge {
  align-self: flex-start;
}

.produto-info > button:last-child {
  margin-top: auto;
}


/* ---------- pesquisa e categorias na home ---------- */

.fx-busca {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 60px 8px;
}

.fx-busca-campo {
  position: relative;
  max-width: 640px;
  margin: 0 auto 16px;
}

.fx-busca-campo input {
  width: 100%;
  height: 52px;
  padding: 0 48px;
  border: 1px solid #d6bfbb;
  border-radius: 26px;
  font: 16px 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #2e2e2e;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

.fx-busca-campo input::-webkit-search-cancel-button {
  display: none;
}

.fx-busca-campo input::placeholder {
  color: #8a8a8a;
}

.fx-busca-campo input:focus {
  outline: none;
  border-color: #B76E79;
  box-shadow: 0 0 0 3px rgba(183, 110, 121, .25);
}

.fx-busca-icone {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 16px;
}

.fx-busca-limpar {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  border-radius: 50%;
  color: #6b6b6b;
  font-size: 16px;
  cursor: pointer;
}

.fx-busca-limpar:hover {
  background: #F7D9D3;
}

.fx-categorias {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.fx-cat {
  padding: 9px 18px;
  border: 1px solid #B76E79;
  background: #fff;
  color: #8A4A54;
  border-radius: 24px;
  font: 600 15px 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  cursor: pointer;
  transition: .2s;
}

.fx-cat:hover {
  background: #F7D9D3;
}

.fx-cat[aria-pressed="true"] {
  background: #A05A65;
  border-color: #A05A65;
  color: #fff;
}

.fx-cat b {
  font-weight: 700;
  opacity: .8;
  margin-left: 6px;
}

.fx-busca-resultado {
  text-align: center;
  color: #6b6b6b;
  font-size: 14px;
  min-height: 1.4em;
  margin-top: 10px;
}

.fx-sem-resultado {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: #555;
}

.fx-sem-resultado button {
  margin-top: 14px;
  padding: 11px 24px;
  border: 1px solid #A05A65;
  background: #A05A65;
  color: #fff;
  border-radius: 10px;
  font: 700 15px 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  cursor: pointer;
}

.fx-sem-resultado button:hover {
  background: #8A4A54;
}

@media (max-width: 768px) {

  .fx-busca {
    padding: 4px 20px 8px;
  }

  .fx-categorias {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .fx-cat {
    white-space: nowrap;
  }
}
