/* =====================================================================
 * TeVendo - Página del anuncio (diseño aprobado)
 * ===================================================================== */
.tvx, .tvv-bar, .tvv-body { --ink: #1B1F2A; --muted: #5E6473; --line: #E6E8EE; --red: #E40046; }
.tvv-old { display: none !important; }
body.tvv-body .container:has(.tvx) { width: auto !important; max-width: 1440px; padding: 0 24px; }
.tvx { font-family: inherit; color: var(--ink); margin: 8px 0 32px; }
.tvx-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(340px, 1fr); gap: 22px; align-items: start; }
.tvx-left, .tvx-right { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tvx-right { position: sticky; top: 16px; }
.tvx-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; }
.tvx-card h2 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.tvx-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.tvx-head h2 { margin: 0; }
.tvx-head a { font-weight: 700; font-size: 14px; color: #C8003D !important; }
.tvx-only-m { display: none; }

/* galería */
.tvx-gal { padding: 10px; }
.tvx-main { position: relative; height: 470px; border-radius: 14px; overflow: hidden; background: #F1F2F5; touch-action: pan-y; }
.tvx-track { display: flex; height: 100%; transition: transform .35s ease; }
.tvx-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.tvx-slide img { width: 100%; height: 100%; object-fit: contain; }
.tvx-noimg { color: var(--muted); font-weight: 700; }
.tvx-arrow { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(27, 31, 42, .2); cursor: pointer; z-index: 2; }
.tvx-arrow.l { left: 14px; } .tvx-arrow.r { right: 14px; }
.tvx-count { position: absolute; right: 14px; bottom: 14px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: rgba(27, 31, 42, .75); color: #fff; font-size: 13px; font-weight: 700; }
.tvx-acts { position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; gap: 8px; }
.tvx-acts .tvx-share, .tvx-acts .tv-heart { position: static !important; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff !important; color: var(--ink) !important; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(27, 31, 42, .2); cursor: pointer; padding: 0; }
.tvx-acts .tv-heart.on { color: var(--red) !important; }
.tvx-thumbs { display: flex; gap: 8px; padding: 10px 4px 2px; overflow-x: auto; scrollbar-width: none; }
.tvx-thumb { flex: none; width: 84px; height: 64px; border-radius: 10px; border: 1px solid var(--line); padding: 0; overflow: hidden; background: #F1F2F5; cursor: pointer; }
.tvx-thumb.on { border: 2px solid var(--red); }
.tvx-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* comprar */
.tvx-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tvx-tags span { padding: 4px 10px; border-radius: 999px; background: #F1F2F5; font-size: 12px; font-weight: 700; }
.tvx-tags .neg { background: #E7F7EF; color: #116B47; }
.tvx-tags .sold { background: var(--ink); color: #fff; }
.tvx-title { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; }
.tvx-price { font-size: 32px; font-weight: 800; margin: 8px 0 12px; }
.tvx-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--muted); }
.tvx-meta span { display: flex; align-items: center; gap: 5px; }
.tvx-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.tvx-btn { height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 15px; text-decoration: none !important; cursor: pointer; border: 0; }
.tvx-btn.wa { background: #25D366; color: #06210F !important; }
.tvx-btn.red { background: var(--red); color: #fff !important; }
.tvx-btn.red:hover { background: #C8003D; }
.tvx-btn.line { height: 46px; background: #fff; border: 1px solid #D5D9E2; color: var(--ink) !important; font-weight: 700; font-size: 14px; }
.tvx-btn-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tvx-btn-row:empty { display: none; }

/* vendedor */
.tvx-seller { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.tvx-seller-top { display: flex; align-items: center; gap: 12px; }
.tvx-seller-top b { display: block; font-size: 16px; }
.tvx-seller-top small { font-size: 13px; color: var(--muted); }
.tvx-ava { width: 52px; height: 52px; border-radius: 50%; background: #E3E9FB center / cover no-repeat; color: #2747A8; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; flex: none; }
.tvx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tvx-chips span { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: #F1F2F5; font-size: 12px; font-weight: 700; }
.tvx-chips .ok { background: #E7F7EF; color: #116B47; }

/* detalles, descripción, ubicación */
.tvv-spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tvv-spec { padding: 12px 14px; border-radius: 12px; background: #F7F8FA; display: flex; flex-direction: column; gap: 2px; }
.tvv-spec span { font-size: 12px; color: var(--muted); font-weight: 600; }
.tvv-spec b { font-size: 15px; }
.tvv-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; }
.tvv-card h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.tvx-desc-text { font-size: 15px; line-height: 1.65; color: #2B3040; word-break: break-word; }
.tvx-tabs { margin-top: 16px !important; padding-top: 14px !important; border-top: 1px solid #EEF0F4; float: none !important; width: auto !important; }
.tvx-tabs .tab-section-tabs { border: 0 !important; margin-bottom: 8px !important; }
.tvx-tabs .tab-section-tabs > li > a { border: 0 !important; padding: 0 !important; font-weight: 800; font-size: 16px; color: var(--ink) !important; background: none !important; }
.tvx-map { display: block; border-radius: 14px; overflow: hidden; background: #E8EDF3; }
.tvx-map img { display: block; width: 100%; height: 220px; object-fit: cover; }
.tvx-loc { margin: 10px 0 0; display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--muted); }
.tvv-safety { padding: 18px 22px; }
.tvv-safety-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 15px; }
.tvv-safety ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: #3D4250; }
.tvv-safety a { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: #C8003D !important; }

/* barra fija del celular */
.tvv-bar { display: none; }
@media (max-width: 991px) {
  body.tvv-body .container:has(.tvx) { padding: 0 12px; }
  .tvx-grid { grid-template-columns: 1fr; gap: 12px; }
  .tvx-left, .tvx-right { gap: 12px; }
  .tvx-right { position: static; }
  .tvx-only-m { display: block; }
  .tvx-only-d { display: none; }
  .tvx-right .tvx-buy { display: none; }
  .tvx-card, .tvv-card { border-radius: 16px; padding: 16px; }
  .tvx-gal { padding: 0; border: 0; border-radius: 0; margin: 0 -12px; background: transparent; }
  .tvx-main { height: 330px; border-radius: 0; }
  .tvx-arrow, .tvx-thumbs { display: none; }
  .tvx-acts { top: 12px; right: 12px; }
  .tvx-count { right: 12px; bottom: 12px; font-size: 12px; }
  .tvx-title { font-size: 21px; }
  .tvx-price { font-size: 26px; margin: 6px 0 10px; }
  .tvv-spec-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tvv-bar { display: grid; grid-template-columns: 52px 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1045; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(27, 31, 42, .08); padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .tvv-bar > * { display: flex !important; visibility: visible !important; }
  .tvv-bar a, .tvv-bar button { height: 50px; border-radius: 12px; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 14px; text-decoration: none !important; border: 0; cursor: pointer; font-family: inherit; }
  .tvv-bar .tvv-call { background: #fff; border: 1px solid #D5D9E2; color: var(--ink) !important; }
  .tvv-bar .tvv-chat { background: var(--red); color: #fff !important; }
  .tvv-bar .tvv-wa { background: #25D366; color: #06210F !important; }
  body.tvv-body .tv-bnav { display: none !important; }
  body.tvv-body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---------- foto: ampliar, volver, puntos ---------- */
.tvx-main .tvx-track { cursor: zoom-in; }
.tvx-back, .tvx-dots { display: none; }
.tvx-zoomhint { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(27, 31, 42, .75); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.tvx-desc-text.clamp { max-height: 150px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.tvx-more { margin-top: 8px; padding: 0; border: 0; background: none; color: #C8003D; font-weight: 800; font-size: 14px; cursor: pointer; }
.tvx-offer-m { display: none !important; }

/* ---------- visor a pantalla completa ---------- */
.tvx-lb { position: fixed; inset: 0; z-index: 3000; background: #0B0D12; display: flex; align-items: center; overflow: hidden; }
.tvx-lb[hidden] { display: none; }
.tvx-lb-track { display: flex; width: 100%; height: 100%; transition: transform .3s ease; }
.tvx-lb-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 16px; box-sizing: border-box; }
.tvx-lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tvx-lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tvx-lb-count { position: absolute; top: calc(24px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; font-weight: 700; font-size: 14px; }
.tvx-lb-arrow { position: absolute; top: 50%; margin-top: -26px; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tvx-lb-arrow.l { left: 16px; } .tvx-lb-arrow.r { right: 16px; }

/* ---------- celular como el diseño ---------- */
@media (max-width: 991px) {
  body.tvv-body .breadcrumb, body.tvv-body .classified-breadcrumb, body.tvv-body .classified-search-bar-mobile { display: none !important; }
  body.tvv-body .container:has(.tvx) { margin-top: 0 !important; }
  .tvx { margin-top: 0; }
  .tvx-gal { margin: 0 -12px; }
  .tvx-main { height: 340px; background: #1B1F2A; }
  .tvx-slide img { object-fit: cover; }
  .tvx-zoomhint { display: none; }
  .tvx-back { display: flex; position: absolute; top: 12px; left: 12px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #1B1F2A !important; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(27, 31, 42, .2); }
  .tvx-dots { display: flex; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); gap: 5px; z-index: 2; }
  .tvx-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .6); transition: width .2s; }
  .tvx-dots i.on { width: 18px; background: #fff; }
  .tvx-offer-m { display: flex !important; margin-top: 14px; }
  .tvx-lb-arrow { display: none; }
}
.tvx-seller.tvx-pro-store { box-shadow: 0 0 0 2px #7C3AED; border-color: transparent; }
.tvx-seller.tvx-pro-agent { box-shadow: 0 0 0 2px #1D74C9; border-color: transparent; }
.tvx-seller.tvx-pro-dealer { box-shadow: 0 0 0 2px #E8B931; border-color: transparent; }
.tvx-seller-top small { display: block; }
.tvx-tags .tv-pro-badge { padding: 4px 10px 4px 5px; }
