/* Estrutura e layout apenas: sem cores, fontes ou decoracao (isso vai em theme.css). */
html, body { margin: 0; min-height: 100%; }
body { padding: 0 16px 48px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* intro */
#intro {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  pointer-events: none;
  animation: intro-bg 3s ease-in-out forwards;
}
#intro img { width: min(40vw, 320px); opacity: 0; animation: intro 3s ease-in-out forwards; }
@keyframes intro {
  0%   { opacity: 0; transform: scale(0.8); }
  35%  { opacity: 1; }
  65%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.2); }
}
@keyframes intro-bg { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  #intro img { animation-name: fade; }
  @keyframes fade { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
}

/* topo */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.views { display: flex; gap: 16px; }
.views a[aria-current="page"] { text-decoration: underline; }

/* filtros */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; }
.filters input[type="search"] { flex: 1 1 200px; }
.filters input[type="number"] { width: 110px; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 16px; }
.cats button[aria-pressed="true"] { text-decoration: underline; }

/* grade */
.section { margin-bottom: 32px; }
.section h2 { display: flex; gap: 8px; align-items: baseline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__actions { flex-direction: column; align-items: stretch; }
  .card__actions > * { flex: none !important; width: 100%; }
}
.card { position: relative; display: flex; flex-direction: column; gap: 6px; }
.card__open { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.card__open:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.card img { aspect-ratio: 1; width: 100%; object-fit: cover; }
.card h3 { margin: 0; font-size: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fav[aria-pressed="true"] { font-weight: bold; }
.flag { position: absolute; top: 6px; left: 6px; }
.price s { opacity: .6; margin-left: 6px; }
.empty { opacity: .7; }
.more { display: flex; margin: 16px auto 0; }

/* outfits */
.outfit { margin-bottom: 32px; }
.outfit ol { list-style: none; padding: 0; margin: 0; }

/* detalhe */
#detail { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 16px; background: var(--bg); color: var(--fg); }
#detail::backdrop { background: rgb(0 0 0 / .6); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail__main { aspect-ratio: 1; width: 100%; object-fit: contain; }
.detail__thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.detail__thumbs button { all: unset; cursor: pointer; width: 56px; }
.detail__thumbs button[aria-current="true"] { outline: 2px solid currentColor; }
.detail__close { float: right; }
@media (max-width: 640px) { .detail { grid-template-columns: 1fr; } }
