/* AutoPlus Nav v3 — Diseño limpio y proporcionado */

#apn { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; font-size: 14px; color: #1a1a1a; background: #f0f0f0; }
#apn * { box-sizing: border-box; margin: 0; padding: 0; }
#apn a { cursor: pointer; color: #c00; text-decoration: none; }
#apn a:hover { text-decoration: underline; }
#apn button { font-family: inherit; }

/* ══ LOGO CENTRAL ════════════════════════════════════════════ */
.apn-top-logo {
  background: #fff;
  text-align: center;
  padding: 20px 16px 16px;
  border-bottom: 3px solid #D32F2F;
}
.apn-top-logo img {
  max-height: 160px;
  width: auto;
  display: inline-block;
}

/* ══ HEADER ══════════════════════════════════════════════════ */
.apn-header {
  background: #111;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 100px 1fr 110px;
  align-items: center;
  gap: 20px;
  border-bottom: 3px solid #D32F2F;
}
.apn-header-logo img {
  width: 100px;
  height: auto;
  display: block;
}
.apn-header-center {
  text-align: center;
}
.apn-header-center h2 {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.apn-header-center p {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
}
.apn-btn-vender {
  background: #D32F2F;
  color: #fff;
  border: none;
  padding: 9px 24px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .5px;
  transition: background .15s;
}
.apn-btn-vender:hover { background: #b71c1c; }
.apn-header-start {
  text-align: right;
  cursor: pointer;
}
.apn-header-start img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  transition: transform .15s;
  display: block;
  margin-left: auto;
}
.apn-header-start:hover img { transform: scale(1.06); }

/* ══ TIPO TABS ═══════════════════════════════════════════════ */
.apn-tipos {
  background: #222;
  display: flex;
  flex-wrap: wrap;
  padding: 0 8px;
  border-bottom: 2px solid #D32F2F;
}
.apn-tipos a {
  color: #bbb;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  cursor: pointer;
}
.apn-tipos a:hover { color: #fff; background: rgba(255,255,255,0.05); text-decoration: none; }
.apn-tipos a.active { color: #fff; border-bottom-color: #D32F2F; }

/* ══ BUSCADOR ════════════════════════════════════════════════ */
.apn-searchbar {
  background: #fff;
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap;
}
.apn-searchbar select {
  flex: 1;
  min-width: 120px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fafafa;
}
.apn-searchbar button {
  background: #D32F2F;
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.apn-searchbar button:hover { background: #b71c1c; }

/* ══ LAYOUT ══════════════════════════════════════════════════ */
.apn-layout {
  display: grid;
  grid-template-columns: 200px 1fr 190px;
  gap: 14px;
  padding: 14px 12px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}
.apn-sidebar { display: flex; flex-direction: column; gap: 12px; }
.apn-center  { display: flex; flex-direction: column; gap: 12px; }
.apn-sidebar-right { display: flex; flex-direction: column; gap: 12px; }

/* ══ BOX ═════════════════════════════════════════════════════ */
.apn-box { background: #fff; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.apn-box-hd { background: #222; color: #fff; padding: 8px 12px; font-size: 12px; font-weight: 700; }
.apn-box-hd.red { background: #D32F2F; }
.apn-box-body { padding: 10px 12px; }

/* Noticias */
.apn-noticia { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f0f0f0; align-items: flex-start; }
.apn-noticia:last-child { border-bottom: none; }
.apn-noticia > span { font-size: 18px; flex-shrink: 0; }
.apn-noticia strong { font-size: 12px; display: block; margin-bottom: 2px; }
.apn-noticia p { font-size: 11px; color: #666; line-height: 1.4; }

/* Tips */
.apn-tip { padding: 5px 0; border-bottom: 1px solid #f5f5f5; }
.apn-tip:last-child { border-bottom: none; }
.apn-tip strong { font-size: 12px; display: block; }
.apn-tip p { font-size: 11px; color: #666; }

/* Mercado */
.apn-mrow { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f5f5f5; font-size: 12px; }
.apn-mrow:last-child { border-bottom: none; }
.apn-mrow span { color: #888; }

/* Publicidad */
.apn-pub-slot { background: #f9f9f9; border: 1px dashed #ccc; border-radius: 5px; padding: 8px; text-align: center; }
.apn-pub-slot p { font-size: 11px; color: #999; margin-bottom: 5px; }
.apn-pub-slot a { background: #D32F2F; color: #fff; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; text-decoration: none; }

/* Sidebar buscador */
.apn-sidebar-search .apn-fg { margin-bottom: 7px; }
.apn-sidebar-search label { font-size: 11px; color: #555; display: block; margin-bottom: 3px; font-weight: 600; }
.apn-sidebar-search select,
.apn-sidebar-search input { width: 100%; border: 1px solid #ccc; border-radius: 5px; padding: 6px 8px; font-size: 12px; }
.apn-sidebar-search button { background: #D32F2F; color: #fff; border: none; width: 100%; padding: 8px; border-radius: 5px; font-size: 12px; font-weight: 700; cursor: pointer; margin-top: 4px; }

/* Mis autos */
.apn-empty { font-size: 12px; color: #bbb; }
.apn-mis-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f5f5f5; font-size: 12px; }
.apn-mis-row:last-child { border-bottom: none; }
.apn-mis-row strong { color: #D32F2F; font-weight: 700; }

/* ══ CATÁLOGO ════════════════════════════════════════════════ */
.apn-cat-bar {
  background: #222;
  border-radius: 6px 6px 0 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}
.apn-cat-bar span { font-size: 14px; font-weight: 700; }
.apn-cat-bar small { font-size: 11px; color: rgba(255,255,255,0.55); }
.apn-cat-start { width: 44px; height: 44px; object-fit: contain; cursor: pointer; transition: transform .15s; }
.apn-cat-start:hover { transform: scale(1.08); }
.apn-sort { border: 1px solid #555; background: #333; color: #fff; border-radius: 4px; padding: 5px 8px; font-size: 12px; cursor: pointer; }

.apn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  padding: 10px;
  border-radius: 0 0 6px 6px;
}
.apn-loading { grid-column: 1/-1; text-align: center; padding: 40px; color: #999; }

/* Car card */
.apn-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; cursor: pointer; transition: box-shadow .15s, transform .12s; }
.apn-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.12); transform: translateY(-2px); }
.apn-card-thumb { height: 130px; background: #1a1a2e; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.apn-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.apn-card-tipo { position: absolute; top: 0; left: 0; background: #D32F2F; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; text-transform: uppercase; }
.apn-card-tipo.verde { background: #2e7d32; }
.apn-card-tipo.gris  { background: #555; }
.apn-card-body { padding: 8px 10px; }
.apn-card-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apn-card-info { font-size: 11px; color: #777; margin-bottom: 5px; }
.apn-card-info span { display: inline-block; background: #f0f0f0; border-radius: 3px; padding: 1px 5px; margin: 1px 2px 1px 0; }
.apn-card-price { font-size: 17px; font-weight: 900; color: #D32F2F; margin-bottom: 5px; }
.apn-card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f0f0f0; padding-top: 5px; }
.apn-card-loc { font-size: 10px; color: #aaa; }
.apn-card-wa { background: #25D366; color: #fff; border: none; border-radius: 4px; font-size: 10px; font-weight: 700; padding: 4px 8px; cursor: pointer; }

/* Paginación */
.apn-pag { display: flex; gap: 5px; justify-content: center; padding: 10px 0; }
.apn-pg { background: #fff; border: 1px solid #ccc; border-radius: 4px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.apn-pg.active, .apn-pg:hover { background: #D32F2F; color: #fff; border-color: #D32F2F; }

/* ══ FORMULARIO ══════════════════════════════════════════════ */
.apn-pub-form { background: #fff; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.apn-pub-form-hd { background: #222; padding: 12px 16px; }
.apn-pub-form-hd span { font-size: 14px; font-weight: 700; color: #fff; display: block; }
.apn-pub-form-hd small { font-size: 11px; color: rgba(255,255,255,0.55); }
.apn-steps { display: flex; background: #f5f5f5; border-bottom: 1px solid #e5e5e5; }
.apn-steps span { flex: 1; text-align: center; font-size: 10px; padding: 8px 2px; color: #aaa; border-bottom: 2px solid transparent; }
.apn-steps span.active { color: #D32F2F; border-bottom-color: #D32F2F; font-weight: 700; }
.apn-steps span.done   { color: #2e7d32; border-bottom-color: #2e7d32; }
#apn-form-body { padding: 16px; }
.apn-fg { margin-bottom: 10px; }
.apn-fg label { font-size: 11px; font-weight: 700; color: #555; display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .3px; }
.apn-fg input,.apn-fg select,.apn-fg textarea { width: 100%; border: 1px solid #ccc; border-radius: 5px; padding: 8px 10px; font-size: 13px; }
.apn-fg input:focus,.apn-fg select:focus,.apn-fg textarea:focus { outline: none; border-color: #D32F2F; }
.apn-fg textarea { height: 70px; resize: vertical; }
.apn-fg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.apn-fg-2 .apn-full { grid-column: 1/-1; }
.apn-btn-sig { background: #D32F2F; color: #fff; border: none; width: 100%; padding: 11px; border-radius: 6px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 10px; }
.apn-btn-sig:hover { background: #b71c1c; }
.apn-btn-ant { background: none; border: 1px solid #ccc; width: 100%; padding: 9px; border-radius: 6px; font-size: 13px; cursor: pointer; color: #666; margin-top: 6px; }
.apn-photo-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; margin-bottom: 10px; }
.apn-ph { aspect-ratio:1; background:#f5f5f5; border:1px dashed #ccc; border-radius:5px; display:flex; align-items:center; justify-content:center; cursor:pointer; flex-direction:column; gap:3px; font-size:11px; color:#bbb; position:relative; overflow:hidden; }
.apn-ph:hover { border-color: #D32F2F; }
.apn-ph .apn-ph-ico { font-size:18px; }
.apn-ph img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover; }
.apn-ph-del { position:absolute;top:2px;right:2px;background:rgba(211,47,47,0.85);color:#fff;border:none;border-radius:50%;width:16px;height:16px;cursor:pointer;font-size:9px;display:none;align-items:center;justify-content:center; }
.apn-ph:hover .apn-ph-del { display:flex; }
.apn-resumen { background:#f9f9f9; border-radius:5px; padding:10px; margin-bottom:10px; }
.apn-resumen-row { display:flex; justify-content:space-between; padding:4px 0; border-bottom:1px solid #eee; font-size:12px; }
.apn-resumen-row:last-child { border-bottom:none; }
.apn-resumen-row span { color:#888; }
.apn-success { text-align:center; padding:20px 10px; }
.apn-success-icon { font-size:48px; margin-bottom:8px; }
.apn-success h3 { font-size:18px; font-weight:700; margin-bottom:6px; }
.apn-success p { font-size:13px; color:#666; margin-bottom:14px; line-height:1.6; }
.apn-btn-wa-big { background:#25D366;color:#fff;border:none;width:100%;padding:11px;border-radius:7px;font-size:14px;font-weight:700;cursor:pointer;margin-bottom:8px; }
.apn-btn-cont { background:#222;color:#fff;border:none;width:100%;padding:10px;border-radius:7px;font-size:13px;cursor:pointer;margin-bottom:6px; }

/* Contrato box */
.apn-contrato { display:flex; align-items:center; gap:12px; padding:14px !important; }
.apn-contrato-icon { font-size:28px; flex-shrink:0; }
.apn-contrato > div { flex:1; }
.apn-contrato strong { font-size:13px; display:block; margin-bottom:2px; }
.apn-contrato p { font-size:11px; color:#888; }
.apn-contrato button { background:#D32F2F;color:#fff;border:none;padding:8px 12px;border-radius:5px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;flex-shrink:0; }

/* Testimonio */
.apn-testimonio { background:#fff; border:1px solid #ddd; border-left:4px solid #D32F2F; border-radius:0 6px 6px 0; padding:12px; }
.apn-testimonio strong { font-size:12px; display:block; margin-bottom:4px; }
.apn-testimonio p { font-size:13px; color:#555; font-style:italic; line-height:1.5; }

/* Destacados sidebar */
.apn-dest-item { display:flex; gap:8px; padding:8px 0; border-bottom:1px solid #f0f0f0; cursor:pointer; }
.apn-dest-item:last-child { border-bottom:none; }
.apn-dest-thumb { width:44px; height:44px; border-radius:4px; background:#1a1a2e; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; overflow:hidden; }
.apn-dest-thumb img { width:100%;height:100%;object-fit:cover; }
.apn-dest-info h4 { font-size:11px; font-weight:700; margin-bottom:1px; }
.apn-dest-info small { font-size:10px; color:#888; display:block; }
.apn-dest-info strong { font-size:13px; font-weight:900; color:#D32F2F; }

/* ══ POR QUÉ ═════════════════════════════════════════════════ */
.apn-porque { background:#222; padding:30px 16px; text-align:center; color:#fff; }
.apn-porque-logo { max-height:80px; margin:0 auto 16px; display:block; }
.apn-porque h3 { font-size:18px; font-weight:700; margin-bottom:6px; }
.apn-porque > p { font-size:13px; color:rgba(255,255,255,0.6); margin-bottom:20px; }
.apn-porque-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; max-width:480px; margin:0 auto 24px; }
.apn-porque-grid div { background:rgba(255,255,255,0.07); border-radius:8px; padding:14px 8px; font-size:24px; }
.apn-porque-grid div span { font-size:12px; color:rgba(255,255,255,0.8); display:block; margin-top:5px; }
.apn-btn-wa-link { background:#25D366;color:#fff;padding:12px 24px;border-radius:8px;font-weight:700;font-size:14px;text-decoration:none;display:inline-block; }

/* WA float */
.apn-wa-float { position:fixed;bottom:20px;right:20px;background:#25D366;color:#fff;border-radius:50%;width:54px;height:54px;display:flex;align-items:center;justify-content:center;font-size:26px;text-decoration:none;z-index:9999;box-shadow:0 4px 16px rgba(37,211,102,0.5); }
.apn-wa-float:hover { transform:scale(1.1); }

/* ══ MODAL ═══════════════════════════════════════════════════ */
.apn-overlay { display:none;position:fixed;inset:0;background:rgba(0,0,0,0.6);z-index:99999;align-items:flex-end;justify-content:center; }
.apn-overlay.open { display:flex; }
.apn-modal { background:#fff;border-radius:14px 14px 0 0;width:100%;max-width:700px;max-height:90vh;overflow-y:auto;animation:apn-up .25s ease; }
@keyframes apn-up { from{transform:translateY(50px);opacity:0} to{transform:translateY(0);opacity:1} }
.apn-modal-hd { display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #eee;background:#222; }
.apn-modal-hd span { font-size:15px;font-weight:700;color:#fff; }
.apn-modal-hd button { background:none;border:none;font-size:22px;cursor:pointer;color:#aaa; }
.apn-modal-body { padding:16px; }
.apn-det-img { background:#1a1a2e;border-radius:8px;height:200px;display:flex;align-items:center;justify-content:center;font-size:72px;overflow:hidden;margin-bottom:14px; }
.apn-det-img img { width:100%;height:100%;object-fit:cover; }
.apn-det-price { font-size:28px;font-weight:900;color:#D32F2F;margin-bottom:12px; }
.apn-specs { display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-bottom:14px; }
.apn-spec { background:#f8f8f8;border-radius:5px;padding:7px 10px; }
.apn-spec-l { font-size:10px;color:#aaa;text-transform:uppercase;letter-spacing:.4px; }
.apn-spec-v { font-size:13px;font-weight:700; }
.apn-det-desc { font-size:13px;color:#555;line-height:1.6;margin-bottom:14px; }
.apn-det-wa { background:#25D366;color:#fff;border:none;width:100%;padding:12px;border-radius:7px;font-size:14px;font-weight:700;cursor:pointer;margin-bottom:6px; }
.apn-det-back { background:none;border:1px solid #ccc;width:100%;padding:10px;border-radius:7px;font-size:13px;cursor:pointer;color:#666; }

/* ══ RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 960px) {
  .apn-layout { grid-template-columns: 190px 1fr; }
  .apn-sidebar-right { display: none; }
  .apn-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px) {
  .apn-header { grid-template-columns: 70px 1fr 80px; gap: 10px; padding: 10px; }
  .apn-header-logo img { width: 70px; }
  .apn-header-center h2 { font-size: 16px; }
  .apn-header-start img { width: 80px; height: 80px; }
  .apn-layout { grid-template-columns: 1fr; padding: 10px; }
  .apn-sidebar { display: none; }
  .apn-searchbar { gap: 6px; }
  .apn-searchbar select { min-width: calc(50% - 4px); }
  .apn-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .apn-top-logo img { max-height: 120px; }
}
@media (max-width: 420px) {
  .apn-header { grid-template-columns: 1fr; text-align: center; }
  .apn-header-logo { display: none; }
  .apn-header-start { text-align: center; }
  .apn-header-start img { margin: 0 auto; }
}
