/* Trade · mercado de cartas. Reutiliza las variables de tribfan.css. */
.tr-bar { background: var(--surface, #fff); border-bottom: 1px solid var(--line, #e3e6ec); }
.tr-bar .wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.tr-logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.03em; text-decoration: none; color: inherit; }
.tr-search { display: flex; gap: 8px; flex: 1 1 260px; max-width: 520px; }
.tr-search input { margin: 0; }
.tr-nav { display: flex; gap: 16px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.tr-nav a { text-decoration: none; }
.tr-brands { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 22px; }
.tr-chip { display: inline-block; padding: 7px 14px; border: 1.5px solid var(--line, #e3e6ec); border-radius: 999px; text-decoration: none; color: inherit; font-weight: 600; font-size: .95rem; background: var(--surface, #fff); }
.tr-chip.on, .tr-chip:hover { border-color: var(--action, #2b59ff); color: var(--action, #2b59ff); }

.tr-section { margin: 34px 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tr-section h2 { margin: 0; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.tr-card { display: flex; flex-direction: column; background: var(--surface, #fff); border: 1px solid var(--line, #e3e6ec); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.tr-card:hover { box-shadow: 0 8px 22px rgba(20, 30, 60, .12); transform: translateY(-2px); }
.tr-img { position: relative; aspect-ratio: 3 / 4; background: #eceff3; display: flex; align-items: center; justify-content: center; }
.tr-img img { width: 100%; height: 100%; object-fit: contain; }
.tr-badge { position: absolute; top: 8px; left: 8px; background: #111; color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tr-body { padding: 12px 14px 14px; display: grid; gap: 3px; }
.tr-title { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tr-meta, .tr-seller { color: #667; font-size: .85rem; }
.tr-price { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; margin-top: 4px; }

.tr-layout { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.tr-filters { background: var(--surface, #fff); border: 1px solid var(--line, #e3e6ec); border-radius: 16px; padding: 16px 18px 20px; position: sticky; top: 14px; }
.tr-filters label { margin: 14px 0 5px; font-size: .9rem; }
.tr-filters h2 { margin: 0 0 4px; font-size: 1.1rem; }
.tr-filters .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tr-sortbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }

.tr-ad { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.tr-gallery .main { background: #eceff3; border-radius: 18px; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; overflow: hidden; max-height: 640px; }
.tr-gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.tr-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tr-thumbs img { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; background: #eceff3; }
.tr-thumbs img.on { border-color: var(--action, #2b59ff); }
.tr-bigprice { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0; }
.tr-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 14px 0; }
.tr-facts dt { color: #667; }
.tr-facts dd { margin: 0; font-weight: 600; }
.tr-sellerbox { border: 1px solid var(--line, #e3e6ec); border-radius: 16px; padding: 16px 18px; background: var(--surface, #fff); margin-top: 18px; }
@media (max-width: 820px) {
    .tr-layout, .tr-ad { grid-template-columns: 1fr; }
    .tr-filters { position: static; }
}
.tr-thread { display: grid; gap: 8px; margin: 16px 0; }
.tr-msg { max-width: 78%; padding: 9px 14px; border-radius: 16px; background: #eef0f5; white-space: pre-wrap; word-break: break-word; }
.tr-msg.me { margin-left: auto; background: var(--action, #2b59ff); color: #fff; }
.tr-msg small { display: block; opacity: .7; margin-top: 3px; font-size: .75rem; }
.tr-thumb-sm { width: 46px; height: 60px; object-fit: cover; border-radius: 8px; background: #eceff3; }
.tr-imgs { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.tr-imgs figure { margin: 0; width: 120px; }
.tr-imgs img { width: 120px; height: 160px; object-fit: cover; border-radius: 10px; background: #eceff3; }
.tr-imgs figcaption { display: grid; gap: 4px; margin-top: 6px; }
.tr-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.tr-pick .tr-card .tr-img { aspect-ratio: 3 / 3.6; }
