/* Vitrine Ximples (/vitrine). Mobile first; usa os tokens de styles.css. */

.vt-hero {
  text-align: center;
}
.vt-hero .lead {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.vt-section + .vt-section {
  padding-top: 0;
}
.vt-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.vt-title {
  font-size: clamp(22px, 3.2vw, 30px);
  margin-bottom: 0;
}
[data-vt-featured] .vt-title {
  margin-bottom: 24px;
}
.vt-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.vt-tools input,
.vt-tools select {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
  min-width: 0;
}
.vt-tools input {
  flex: 1 1 220px;
}
.vt-tools select {
  flex: 0 1 220px;
}

.vt-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.vt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.vt-card:hover,
.vt-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

/* Moldura de navegador: deixa claro que é a home de uma loja. */
.vt-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.vt-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}
.vt-card:hover .vt-shot img[data-kind='screenshot'] {
  transform: scale(1.03);
}
.vt-shot img[data-kind='logo'] {
  object-fit: contain;
  object-position: center;
  padding: 12%;
}
.vt-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  color: #fff;
  font-weight: 800;
  font-size: clamp(18px, 4vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 60%, #db2777 100%);
  overflow-wrap: anywhere;
}
.vt-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(15 23 42 / 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.vt-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  flex: 1;
}
.vt-name {
  font-size: 18px;
  overflow-wrap: anywhere;
}
.vt-desc {
  color: var(--muted);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vt-host {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vt-visit {
  margin-top: auto;
  padding-top: 10px;
}
.vt-visit a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}
/* O card inteiro é clicável, com um único link (o do CTA) para leitores de tela. */
.vt-visit a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.vt-visit a span[aria-hidden] {
  transition: transform 0.2s ease;
}
.vt-card:hover .vt-visit a span[aria-hidden] {
  transform: translateX(3px);
}

.vt-skeleton .vt-shot,
.vt-skeleton .vt-body span {
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: vt-shimmer 1.4s linear infinite;
}
.vt-skeleton .vt-body span {
  display: block;
  height: 14px;
  border-radius: 6px;
}
.vt-skeleton .vt-body span:first-child {
  width: 60%;
  height: 18px;
}
.vt-skeleton .vt-body span:last-child {
  width: 40%;
}
.vt-skeleton:hover {
  transform: none;
  box-shadow: none;
}
@keyframes vt-shimmer {
  to {
    background-position: -200% 0;
  }
}

.vt-empty {
  text-align: center;
  padding: 48px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.vt-empty h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.vt-empty p {
  color: var(--muted);
  margin-bottom: 20px;
}
.vt-empty .btn {
  cursor: pointer;
  font-family: inherit;
}

@media (min-width: 640px) {
  .vt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .vt-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .vt-tools {
    flex: 0 1 520px;
    justify-content: flex-end;
  }
}
@media (min-width: 1024px) {
  .vt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
  /* Poucos destaques ocupam a largura toda, com cards maiores. */
  .vt-grid-featured[data-count='1'] {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
  }
  .vt-grid-featured[data-count='2'] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .vt-card,
  .vt-shot img,
  .vt-visit a span[aria-hidden] {
    transition: none;
  }
  .vt-card:hover,
  .vt-card:focus-within {
    transform: none;
  }
  .vt-card:hover .vt-shot img[data-kind='screenshot'] {
    transform: none;
  }
  .vt-skeleton .vt-shot,
  .vt-skeleton .vt-body span {
    animation: none;
  }
}
