/* Valores dos raros (/valores; local/valores/valores.js). Base: /ds/formal.css (topo, fontes e tokens eco-*).
   Grade de cartões: valor no canto, tendência no outro, o mobi no meio e o nome embaixo. */
.vl-main { display: grid; gap: 1rem; }
.vl-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.vl-head .eco-title { margin: 0; }
.vl-search { position: relative; display: flex; align-items: center; flex: 0 1 300px; min-width: 200px; }
.vl-search .ds-icon { position: absolute; left: .75rem; width: 15px; height: 15px; color: var(--eco-faint); pointer-events: none; }
.vl-search input { width: 100%; height: 40px; padding: 0 .9rem 0 2.2rem; border: 1px solid var(--eco-line); border-radius: 999px; background: var(--eco-card); color: var(--eco-ink);
    font: 500 .88rem var(--ds-font); outline: none; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.vl-search input:focus { border-color: var(--ds-brand); box-shadow: 0 0 0 3px #1f4fd826; }

.vl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.vl-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.vl-chips button { padding: .42rem .85rem; border: 1px solid var(--eco-line); border-radius: 999px; background: var(--eco-card); color: #3a4357; font: 500 .8rem var(--ds-font); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.vl-chips button:hover { border-color: #c9d7fb; background: #f5f8fe; }
.vl-chips button.is-on { background: #12a03c; border-color: #12a03c; color: #fff; }
.vl-sort { display: flex; align-items: center; gap: .6rem; color: var(--eco-faint); font-size: .8rem; white-space: nowrap; }
.vl-sort .ds-select { min-width: 160px; }
.vl-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .76rem; color: var(--eco-faint); }
.vl-legend span { display: inline-flex; align-items: center; gap: .35rem; }

.vl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.vl-card { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 1px solid var(--eco-line); border-radius: var(--eco-r); background: var(--eco-card); box-shadow: var(--eco-shadow);
    color: var(--eco-ink); font: inherit; text-align: center; cursor: pointer; overflow: hidden; transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, border-color .2s; animation: vl-in .4s cubic-bezier(.2, .8, .2, 1) backwards; }
.vl-card:hover { transform: translateY(-3px); border-color: #12a03c66; box-shadow: 0 12px 28px #0b18401a; }
.vl-card:focus-visible { outline: 2px solid var(--ds-brand); outline-offset: 2px; }
.vl-card:nth-child(2) { animation-delay: .03s; } .vl-card:nth-child(3) { animation-delay: .06s; } .vl-card:nth-child(4) { animation-delay: .09s; }
.vl-card:nth-child(5) { animation-delay: .12s; } .vl-card:nth-child(6) { animation-delay: .15s; } .vl-card:nth-child(n+7) { animation-delay: .18s; }
@keyframes vl-in { from { transform: translateY(12px) scale(.97); } to { transform: none; } }   /* sem opacidade: nunca some se a animação não rodar */
.vl-card-top { display: flex; align-items: center; justify-content: space-between; padding: .55rem .6rem 0; }
.vl-price { display: inline-flex; align-items: center; gap: 3px; padding: .2rem .5rem; border-radius: 7px; background: #ffd23f; color: #5a3b00; font: 600 .78rem var(--ds-mono); }
.vl-price .ds-icon { width: 12px; height: 12px; color: #1f6fb8; }
.vl-price.is-none { background: #eef0f4; color: var(--eco-faint); }
.vl-price.is-none .ds-icon { color: var(--eco-faint); }
.vl-trend { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.vl-trend .ds-icon { width: 13px; height: 13px; }
.vl-trend.is-up { color: #12a03c; background: #e3fbe1; } .vl-trend.is-up .ds-icon { transform: rotate(-45deg); }
.vl-trend.is-down { color: #d0303b; background: #ffe7ea; } .vl-trend.is-down .ds-icon { transform: rotate(45deg); }
.vl-trend.is-flat { color: #5a8fd6; background: #eaf0fd; }
.vl-card-img { display: grid; place-items: center; height: 92px; }
.vl-ico { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.vl-card:hover .vl-ico { transform: scale(1.15); }
.vl-card-name { display: block; padding: .6rem .6rem .7rem; border-top: 1px solid var(--eco-line-2); background: var(--eco-head); font: 600 .8rem/1.25 var(--ds-font);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color .2s, color .2s; }
.vl-card:hover .vl-card-name { background: #12a03c; color: #fff; }
.vl-empty { grid-column: 1 / -1; padding: 2rem; text-align: center; color: var(--eco-faint); }

/* Carregando: cartões cinza com brilho passando */
.vl-skel { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.vl-sk { height: 170px; border-radius: var(--eco-r); background: linear-gradient(90deg, #e9edf5 35%, #f7f9fd 50%, #e9edf5 65%); background-size: 300% 100%; animation: vl-shine 1.3s ease-in-out infinite; }
@keyframes vl-shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Detalhes do raro */
.vl-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; background: var(--eco-card); color: var(--eco-ink); box-shadow: 0 24px 60px #0b184040; }
.vl-dialog::backdrop { background: #0b184066; backdrop-filter: blur(2px); }
.vl-dialog[open] { animation: vl-pop .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes vl-pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.vl-dlg { position: relative; display: grid; gap: .8rem; padding: 1.25rem; }
.vl-close { position: absolute; top: .75rem; right: .75rem; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--eco-head); color: var(--eco-muted); cursor: pointer; }
.vl-close:hover { background: var(--eco-line-2); color: var(--eco-ink); }
.vl-close .ds-icon { width: 14px; height: 14px; }
.vl-dlg-head { display: flex; align-items: center; gap: .9rem; padding-right: 2rem; }
.vl-dlg-img { display: grid; place-items: center; width: 76px; height: 76px; flex: none; border-radius: 12px; background: var(--eco-head); }
.vl-ico.is-big { width: 56px; height: 56px; }
.vl-dlg-head h2 { margin: 0 0 .3rem; font: 700 1.15rem/1.25 var(--ds-font); }
.vl-tag { display: inline-block; margin-right: .3rem; padding: .12rem .5rem; border-radius: 999px; background: #eaf0fd; color: var(--ds-brand-strong); font: 600 .68rem var(--ds-font); }
.vl-tag.is-live { background: #e3fbe1; color: #157a1d; }
.vl-dlg-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .8rem; }
.vl-dlg-price b { display: inline-flex; align-items: center; gap: 5px; font: 600 1.8rem var(--ds-mono); letter-spacing: -.02em; }
.vl-dlg-price b .ds-icon { width: 20px; height: 20px; color: #2aa8d8; }
.vl-pct { font: 600 .85rem var(--ds-mono); font-style: normal; }
.vl-pct.is-up { color: #12a03c; } .vl-pct.is-down { color: #d0303b; } .vl-pct.is-flat { color: var(--eco-muted); }
.vl-muted { margin: 0; color: var(--eco-muted); font-size: .8rem; }
.vl-spark { width: 100%; height: 70px; }
.vl-spark polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1200; animation: vl-draw 1s cubic-bezier(.3, .7, .2, 1) backwards; }
.vl-spark.is-up polyline { stroke: #12a03c; } .vl-spark.is-down polyline { stroke: #d0303b; }
@keyframes vl-draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
.vl-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; }
.vl-facts > div { padding: .6rem .7rem; border-radius: 10px; background: var(--eco-head); }
.vl-facts dt { font: 500 .7rem var(--ds-font); color: var(--eco-faint); }
.vl-facts dd { margin: .15rem 0 0; font: 600 .86rem var(--ds-mono); }
.vl-feira { justify-content: center; }

/* Dentro do mercado (/mercado): a grade do servidor é lista de links; filtros são links; nota de rodapé */
ul.vl-grid { margin: 0; padding: 0; list-style: none; }
ul.vl-grid > li { display: flex; min-width: 0; }
ul.vl-grid > li > .vl-card { flex: 1; }
a.vl-card { text-decoration: none; }
.vl-chips a { padding: .42rem .85rem; border: 1px solid var(--eco-line); border-radius: 999px; background: var(--eco-card); color: #3a4357; font: 500 .8rem var(--ds-font); text-decoration: none;
    transition: background-color .15s, color .15s, border-color .15s; }
.vl-chips a:hover { border-color: #c9d7fb; background: #f5f8fe; }
.vl-chips a.is-on { background: #12a03c; border-color: #12a03c; color: #fff; }
.vl-price.is-ask { background: #eef0f4; color: #4a5468; font-size: .7rem; }   /* só anúncio na Feira: "a partir de", sem cara de preço de mercado */
.vl-price.is-ask .ds-icon { color: var(--eco-faint); }
.vl-ltd { margin-left: auto; margin-right: .35rem; padding: .1rem .4rem; border-radius: 999px; background: #fff1c2; color: #8a5a00; font: 700 .62rem var(--ds-font); letter-spacing: .04em; }
.vl-note { margin: 0; font-size: .78rem; color: var(--eco-faint); }
.vl-dlg-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.vl-dlg-actions .vl-feira { flex: 1 1 10rem; }

@media (max-width: 600px) {
    .vl-grid, .vl-skel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .vl-search { flex: 1 1 100%; }
    .vl-sort { width: 100%; justify-content: space-between; }
    .vl-card-img { height: 76px; }
    .eco-exits .ds-btn span { display: none; }
}
