/* TODO VENTAS RD — design system */
:root {
  --rojo: #e02434; --rojo-dark: #b81326; --amarillo: #f6b700; --navy: #0f1b33; --navy-2: #16254a;
  --azul: #1d4ed8; --bg: #f7f8fa; --card: #ffffff; --ink: #101828; --ink-2: #475467; --ink-3: #98a2b3;
  --line: #e9edf3; --ok: #12b76a; --warn: #f79009; --bad: #f04438;
  --r: 14px; --r-sm: 10px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
  --shadow-lg: 0 8px 30px rgba(16,24,40,.12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--ink); font-size: 15.5px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font: inherit; color: inherit; }
h1,h2,h3,h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 700; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.topbar-in { display: flex; align-items: center; gap: 14px; padding: 10px 16px; max-width: 1120px; margin: auto; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: .2px; white-space: nowrap; }
.logo img, .logo svg { height: 38px; width: auto; }
.logo .lg-en { color: var(--amarillo); } .logo .lg-rd { color: var(--rojo); background: #fff; border-radius: 6px; padding: 0 5px; margin-left: 2px; }
.searchwrap { flex: 1; position: relative; }
.searchbox { display: flex; background: #fff; border-radius: 999px; overflow: hidden; box-shadow: var(--shadow); }
.searchbox input { flex: 1; border: 0; outline: 0; padding: 11px 18px; font-size: 15px; color: var(--ink); min-width: 0; }
.searchbox button { border: 0; background: var(--rojo); color: #fff; padding: 0 22px; font-weight: 700; cursor: pointer; }
.suggestions { position: absolute; top: 105%; left: 0; right: 0; background: #fff; color: var(--ink); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 60; }
.suggestions div { padding: 10px 16px; cursor: pointer; }
.suggestions div:hover { background: var(--bg); }
.topactions { display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 999px; padding: 10px 20px; font-weight: 700; cursor: pointer; transition: .15s; font-size: 15px; }
.btn-primary { background: var(--rojo); color: #fff; } .btn-primary:hover { background: var(--rojo-dark); }
.btn-gold { background: var(--amarillo); color: var(--navy); } .btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; } .btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-line { background: #fff; border: 1.5px solid var(--line); color: var(--ink); } .btn-line:hover { border-color: var(--ink-3); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* Mobile bottom nav */
.mnav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 70; padding-bottom: env(safe-area-inset-bottom); }
.mnav-in { display: flex; justify-content: space-around; align-items: center; }
.mnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; font-size: 10.5px; color: var(--ink-2); flex: 1; }
.mnav a.active { color: var(--rojo); font-weight: 700; }
.mnav .micon { font-size: 21px; line-height: 1; }
.mnav .sell { margin-top: -22px; }
.mnav .sell .micon { background: var(--rojo); color: #fff; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 14px rgba(224,36,52,.45); }
@media (max-width: 860px) {
  .mnav { display: block; }
  body { padding-bottom: 76px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 861px) { .only-mobile { display: none !important; } }

/* Hero */
.hero { background: linear-gradient(160deg, var(--navy) 55%, var(--navy-2)); color: #fff; padding: 34px 0 42px; }
.hero h1 { font-size: clamp(26px, 5vw, 40px); font-weight: 800; }
.hero .slogan { color: var(--amarillo); font-weight: 700; font-size: clamp(17px, 3vw, 22px); }
.hero p.sub { color: #cbd5e1; max-width: 560px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* Cards / grid */
.section { margin: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: 20px; margin: 0; }
.section-head a { color: var(--rojo); font-weight: 700; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; transition: .15s; display: flex; flex-direction: column; position: relative; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card .ph { aspect-ratio: 1; background: #eef1f5; position: relative; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .ph .noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 34px; opacity: .35; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card .price { font-weight: 800; font-size: 16.5px; color: var(--navy); }
.card .title { font-size: 13.8px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2.5px 9px; }
.badge-hoy { background: #fff7e0; color: #a15c00; }
.badge-neg { background: #eef4ff; color: var(--azul); }
.badge-verif { background: #e8f8f0; color: #067647; }
.badge-nuevo { background: #e8f8f0; color: #067647; }
.badge-tienda { background: #f4ebff; color: #6941c6; }
.fav-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); border: 0; border-radius: 50%; width: 34px; height: 34px; font-size: 17px; cursor: pointer; box-shadow: var(--shadow); }
.fav-btn.on { color: var(--rojo); }

/* Category chips */
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 86px; background: #fff; border-radius: var(--r); padding: 12px 8px; box-shadow: var(--shadow); font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: center; transition: .15s; }
.cat-chip:hover { transform: translateY(-2px); color: var(--rojo); }
.cat-chip .ci { font-size: 24px; }

/* Forms */
.panel { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; font-size: 15px; background: #fff; outline: 0; transition: .12s; }
.input:focus { border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(224,36,52,.1); }
textarea.input { min-height: 110px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.alert { border-radius: var(--r-sm); padding: 12px 15px; margin-bottom: 15px; font-size: 14px; font-weight: 600; }
.alert-error { background: #fef3f2; color: #b42318; }
.alert-ok { background: #ecfdf3; color: #067647; }
.alert-info { background: #eff8ff; color: #175cd3; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; margin: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--rojo); }
.radio-cards { display: grid; gap: 10px; }
.radio-cards label { border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px; cursor: pointer; display: flex; gap: 11px; align-items: flex-start; transition: .12s; background:#fff; }
.radio-cards label:hover { border-color: var(--ink-3); }
.radio-cards input { accent-color: var(--rojo); margin-top: 3px; }
.radio-cards b { display: block; }
.radio-cards small { color: var(--ink-2); }

/* Listing page */
.lay-2 { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .lay-2 { grid-template-columns: 1fr; } }
.gallery { background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.gallery .main { aspect-ratio: 4/3; background: #0b0f1a; display:flex; align-items:center; justify-content:center; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.thumbs img { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .65; border: 2px solid transparent; }
.thumbs img.on { opacity: 1; border-color: var(--rojo); }
.price-big { font-size: 30px; font-weight: 800; color: var(--navy); }
.pricetag { display: inline-block; border-radius: 999px; padding: 4px 13px; font-weight: 700; font-size: 13px; margin: 6px 0; }
.pt-excelente, .pt-bueno { background: #e8f8f0; color: #067647; }
.pt-promedio { background: #fff7e0; color: #a15c00; }
.pt-alto { background: #fff1e5; color: #b54708; }
.pt-muyalto { background: #fef3f2; color: #b42318; }
.attr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.attr-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.attr-table td:first-child { color: var(--ink-2); width: 45%; }
.seller-box { display: flex; gap: 12px; align-items: center; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 19px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.score-pill { background: var(--navy); color: var(--amarillo); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; }
.sticky-cta { position: sticky; bottom: 82px; display: none; gap: 8px; padding: 10px; background: rgba(255,255,255,.96); border-radius: var(--r); box-shadow: var(--shadow-lg); margin-top: 12px; z-index: 40; }
@media (max-width: 860px) { .sticky-cta { display: flex; } }

/* Chat */
.chat-list a { display: flex; gap: 12px; padding: 13px 14px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; align-items: center; }
.chat-list .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: #eef1f5; flex-shrink: 0; }
.unread-dot { background: var(--rojo); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.thread { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; min-height: 45vh; }
.bubble { max-width: 78%; padding: 9px 14px; border-radius: 16px; font-size: 14.5px; box-shadow: var(--shadow); background: #fff; align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.me { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
.bubble.sys { background: #fff7e0; color: #7a4d00; align-self: center; font-size: 13px; border-radius: 999px; }
.bubble time { display: block; font-size: 10.5px; opacity: .55; margin-top: 2px; }
.chatbar { display: flex; gap: 8px; position: sticky; bottom: 76px; background: var(--bg); padding: 8px 0; }
.quickies { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0; scrollbar-width: none; }
.quickies button { white-space: nowrap; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; cursor: pointer; }

/* Filters */
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.filterbar select, .filterbar input { border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 13px; font-size: 13.5px; background: #fff; max-width: 160px; }

/* Admin */
.admin-lay { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; margin-top: 20px; }
@media (max-width: 900px) { .admin-lay { grid-template-columns: 1fr; } }
.admin-nav { background: var(--navy); border-radius: var(--r); padding: 10px; position: sticky; top: 74px; }
.admin-nav a { display: block; color: #cbd5e1; padding: 9px 13px; border-radius: 9px; font-size: 14px; font-weight: 600; }
.admin-nav a.active, .admin-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }
.kpi .n { font-size: 24px; font-weight: 800; color: var(--navy); }
.kpi .l { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.kpi .d { font-size: 11.5px; color: var(--ink-3); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.tbl th { text-align: left; padding: 10px 12px; background: var(--bg); color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl .thumb-s { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11.5px; font-weight: 700; }
.pill-active { background: #e8f8f0; color: #067647; } .pill-pending { background: #fff7e0; color: #a15c00; }
.pill-sold { background: #eef4ff; color: var(--azul); } .pill-bad { background: #fef3f2; color: #b42318; }
.pill-muted { background: var(--bg); color: var(--ink-2); }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--rojo); border-radius: 999px; }

/* Footer */
footer.site { background: var(--navy); color: #94a3b8; margin-top: 48px; padding: 30px 0 90px; font-size: 13.5px; }
footer.site a { color: #cbd5e1; }
footer.site .cols { display: flex; gap: 40px; flex-wrap: wrap; }
.tag-wow { background: linear-gradient(90deg, var(--rojo), #ff6b3d); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 800; padding: 2px 9px; letter-spacing: .3px; }

/* Publish steps */
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps i { flex: 1; height: 5px; border-radius: 99px; background: var(--line); }
.steps i.on { background: var(--rojo); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.photo-grid .ph-item { aspect-ratio: 1; border-radius: 10px; overflow: hidden; position: relative; background: #eef1f5; }
.photo-grid .ph-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-add { aspect-ratio: 1; border: 2px dashed var(--ink-3); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.photo-add:hover { border-color: var(--rojo); color: var(--rojo); }
.skel { background: linear-gradient(90deg, #eef1f5 25%, #f7f8fa 50%, #eef1f5 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-sm); }
@keyframes sk { to { background-position: -200% 0; } }
.spin { display:inline-block; width:18px; height:18px; border:2.5px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation: rot .7s linear infinite; }
.spin.dark { border-color: rgba(16,24,40,.15); border-top-color: var(--navy); }
@keyframes rot { to { transform: rotate(360deg); } }
.modal-bg { position: fixed; inset: 0; background: rgba(15,27,51,.55); z-index: 90; display: none; align-items: flex-end; justify-content: center; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: 18px 18px 0 0; width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; padding: 20px; }
@media (min-width: 640px) { .modal-bg.open { align-items: center; } .modal { border-radius: 18px; } }
.empty { text-align: center; padding: 44px 20px; color: var(--ink-2); }
.empty .big { font-size: 44px; margin-bottom: 8px; }
