/* Componentes do protótipo. Na produção isto vira CSS compilado junto do Tailwind. */

body { background: #FAF9F7; }

/* Placeholder de foto — o layout nasce antes das fotos do cliente chegarem */
.ph { position: relative; overflow: hidden;
      background: linear-gradient(135deg, #F0EDE8 0%, #E4DFD7 52%, #F0EDE8 100%); }
.ph::after { content: attr(data-rot); position: absolute; inset: 10px 0 auto 0;
      text-align: center; font: 500 10px/1 'Figtree', sans-serif;
      letter-spacing: .14em; text-transform: uppercase; color: #ADA496; }
.ph-dark { background: linear-gradient(135deg, #1E1E1E 0%, #141414 55%, #0F0F0F 100%);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.ph-dark::after { color: rgba(255,255,255,.3); }

/* Ticker da barra de avisos */
@keyframes correr { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-trilho { display: flex; width: max-content; animation: correr 38s linear infinite; }

/* Selo circular giratório */
@keyframes girar { to { transform: rotate(360deg); } }
.selo-gira { animation: girar 24s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .ticker-trilho, .selo-gira { animation: none; }
}

/* Carrossel horizontal sem barra visível */
.trilha { scrollbar-width: none; }
.trilha::-webkit-scrollbar { display: none; }

/* Sublinhado que cresce no hover */
.link-sutil { background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .3s cubic-bezier(.16,1,.3,1); }
.link-sutil:hover { background-size: 100% 1px; }

/* Foco visível e consistente em tudo que é operável */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid #C33335; outline-offset: 2px; border-radius: 4px;
}

/* Swatch de variação de cor */
.swatch { width: 1rem; height: 1rem; border-radius: 9999px; border: 1px solid #E6E3DE; }
.swatch[aria-pressed="true"] { outline: 2px solid #0A0A0A; outline-offset: 2px; }

/* Select: o nativo desalinha texto e seta entre navegadores */
.select-ui {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236E6A66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  line-height: 1.2;
  text-overflow: ellipsis;
}
.select-ui::-ms-expand { display: none; }

/* Opção de escolha (frete, pagamento): o destaque segue o rádio marcado.
   box-shadow em vez de border-width porque mudar a espessura desloca 1px. */
.opcao {
  border: 1px solid #E6E3DE;
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.opcao:hover { border-color: #B9B2A6; }
.opcao:has(input:checked) {
  border-color: #0A0A0A;
  box-shadow: inset 0 0 0 1px #0A0A0A;
}
.opcao:has(input:focus-visible) { outline: 2px solid #C33335; outline-offset: 2px; }

/* Variante da opção de pagamento, que destaca na cor da marca */
.opcao-brand:has(input:checked) {
  border-color: #C33335;
  box-shadow: inset 0 0 0 1px #C33335;
  background-color: rgba(195, 51, 53, .04);
}

/* Checkbox e rádio próprios.
   O controle nativo tem o check grosso do sistema e canto reto; aqui o traço
   acompanha a espessura dos outros ícones da loja. Aplicado por seletor de
   elemento para valer em todas as telas sem tocar no HTML. */
input[type="checkbox"],
input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  flex: 0 0 18px;
  margin: 0;
  border: 1.5px solid #CFC9BE;
  background: #FFFFFF;
  cursor: pointer;
  position: relative;
  transition: border-color .15s ease, background-color .15s ease;
}

input[type="checkbox"] { border-radius: 5px; }
input[type="radio"]    { border-radius: 9999px; }

input[type="checkbox"]:hover:not(:disabled),
input[type="radio"]:hover:not(:disabled) { border-color: #0A0A0A; }

input[type="checkbox"]:checked {
  background-color: #C33335;
  border-color: #C33335;
  /* traço fino, na mesma espessura dos ícones da interface */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}

input[type="radio"]:checked {
  border-color: #C33335;
  border-width: 5px;   /* o próprio anel vira o ponto central */
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid #C33335;
  outline-offset: 2px;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  background-color: #F2F0EC;
  border-color: #E6E3DE;
  cursor: not-allowed;
}

/* Sobre fundo escuro o branco do controle brigava com a dobra */
.bg-ink input[type="checkbox"],
.bg-ink input[type="radio"] {
  background-color: transparent;
  border-color: rgba(255, 255, 255, .35);
}
