/* Complementos ao Tailwind: faixa, textura, etiquetas e botões.
   Paleta Alba: Off White #F7F5EF · Bege #E8DCCB · Carvão #2E2E2E ·
   Terracota #B76E4A (escura #9A5A3C para texto pequeno) · Azul Oceano #2E6F8E */

::selection {
  background: #b76e4a;
  color: #f7f5ef;
}

/* Faixa animada: o conteúdo está duplicado no HTML, por isso -50% fecha o loop. */
.marquee {
  animation: marquee 28s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Textura de grão subtil (papel). */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Silhueta da t-shirt (sem foto): leve elevação ao passar o rato no card. */
.tee {
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.group:hover .tee {
  transform: translateY(-6px) scale(1.03);
}

/* --- Etiquetas de estado: recorte no canto ------------------------------ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem 0.3rem 0.55rem;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

/* Últimas peças */
.tag-accent {
  background: #9a5a3c;
  color: #f7f5ef;
}

/* Promoção (−30%): contorno terracota sobre papel, contraste AA */
.tag-sale {
  background: #f7f5ef;
  color: #9a5a3c;
  box-shadow: inset 0 0 0 1.5px #9a5a3c;
}

/* Pré-venda */
.tag-ocean {
  background: #2e6f8e;
  color: #f7f5ef;
}

/* Esgotado */
.tag-muted {
  background: #2e2e2e;
  color: #f7f5ef;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: currentColor;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  50% {
    opacity: 0.3;
  }
}

/* --- Tamanhos: quadrados, borda marcada ----------------------------------- */
.size-btn {
  display: grid;
  place-items: center;
  height: 2.5rem;
  min-width: 2.5rem;
  padding: 0 0.6rem;
  border: 1px solid rgba(46, 46, 46, 0.35);
  font-size: 0.75rem;
  font-weight: 700;
  color: #2e2e2e;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s, background 0.2s;
}

.size-btn:hover:not(:disabled) {
  border-color: #b76e4a;
  color: #9a5a3c;
}

.size-btn[aria-pressed="true"] {
  border-color: #9a5a3c;
  background: #9a5a3c;
  color: #f7f5ef;
  box-shadow: 0 6px 16px rgba(183, 110, 74, 0.28);
}

.size-btn:disabled {
  cursor: not-allowed;
  border-color: rgba(46, 46, 46, 0.1);
  color: rgba(46, 46, 46, 0.3);
  text-decoration: line-through;
}

.size-btn:focus-visible,
.buy-btn:focus-visible {
  outline: 2px solid #b76e4a;
  outline-offset: 2px;
}

.size-btn-nudge {
  animation: nudge 0.4s ease;
}

@keyframes nudge {
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

/* --- Botão de compra: contorno carvão, enche a terracota ------------------ */
.buy-btn {
  display: block;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid #2e2e2e;
  background: transparent;
  color: #2e2e2e;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.buy-btn:hover:not(:disabled) {
  border-color: #9a5a3c;
  background: #9a5a3c;
  color: #f7f5ef;
  box-shadow: 0 10px 24px rgba(183, 110, 74, 0.3);
}

.buy-btn-disabled,
.buy-btn:disabled {
  cursor: not-allowed;
  border-color: rgba(46, 46, 46, 0.12);
  color: rgba(46, 46, 46, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .marquee,
  .tag-dot,
  .size-btn-nudge {
    animation: none;
  }
}
