/* Visuales de producto (HTML/CSS — sin conflictos de SVG) */
.visual {
  margin: 0;
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.visual--api {
  max-width: 100%;
  padding: 2rem;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(180deg, #f8f9fc 0%, #fff 100%);
}

.visual__chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.visual__chrome--dark {
  background: #121b2f;
  border-color: #1e293b;
}

.visual__chrome--dark .visual__chrome-title {
  color: #94a3b8;
}

.visual__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.visual__chrome .visual__dot:nth-child(1) { background: #f87171; }
.visual__chrome .visual__dot:nth-child(2) { background: #fbbf24; }
.visual__chrome .visual__dot:nth-child(3) { background: #4ade80; }

.visual__chrome-title {
  margin-left: 0.35rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.visual__body--app {
  display: grid;
  grid-template-columns: 76px 1fr;
  min-height: 280px;
}

.visual__sidebar {
  background: var(--ink);
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.visual__logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.visual__nav-item {
  width: 100%;
  text-align: center;
  font-size: 0.62rem;
  padding: 0.35rem 0.25rem;
  border-radius: 6px;
  color: #94a3b8;
}

.visual__nav-item.is-active {
  background: #121b2f;
  color: #fff;
}

.visual__main {
  padding: 0.85rem;
  background: #fff;
}

.visual__toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.visual__search {
  flex: 1;
  font-size: 0.72rem;
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #94a3b8;
}

.visual__btn {
  font-size: 0.68rem;
  padding: 0.45rem 0.65rem;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.visual__btn--ai {
  display: inline-block;
  margin-top: 0.65rem;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.visual__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.visual__tile {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  padding-bottom: 0.45rem;
}

.visual__tile-img {
  aspect-ratio: 1;
  width: 100%;
}

.visual__tile-img--a {
  background: linear-gradient(145deg, #e0e7ff, #a5b4fc);
}

.visual__tile-img--b {
  background: linear-gradient(145deg, #fce7f3, #f9a8d4);
}

.visual__tile-img--c {
  background: linear-gradient(145deg, #f1f5f9, #cbd5e1);
}

.visual__tile-sku {
  display: block;
  padding: 0.3rem 0.4rem 0;
  font-size: 0.58rem;
  color: #94a3b8;
}

.visual__tile-name {
  display: block;
  padding: 0.1rem 0.4rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.visual__pill {
  display: inline-block;
  margin: 0 0.4rem;
  font-size: 0.55rem;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-weight: 600;
}

.visual__pill--on {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.visual__pill--off {
  background: #fef2f2;
  color: #7f1d1d;
  border: 1px solid #fecaca;
}

/* Import visual */
.visual--import {
  background: var(--ink);
  border-color: #1e293b;
}

.visual__body--split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 1.25rem;
  min-height: 260px;
}

.visual__code {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.visual__code code {
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  color: #e2e8f0;
  line-height: 1.4;
}

.visual__code code:first-child {
  color: #94a3b8;
}

.visual__arrow {
  color: #60a5fa;
  font-size: 1.5rem;
  font-weight: 700;
}

.visual__result {
  background: #121b2f;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem;
}

.visual__result-bar {
  display: block;
  height: 10px;
  width: 85%;
  border-radius: 6px;
  background: #2563eb;
  margin-bottom: 0.65rem;
}

.visual__result-line {
  display: block;
  height: 7px;
  width: 70%;
  border-radius: 4px;
  background: #475569;
  margin-bottom: 0.4rem;
}

.visual__result-line--short {
  width: 50%;
}

.visual__result .visual__pill {
  margin: 0.5rem 0 0;
  font-size: 0.62rem;
}

/* API hub */
.visual__hub {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.35);
  z-index: 2;
}

.visual__hub-logo {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.visual__hub-label {
  font-size: 0.65rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}

.visual__nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.visual__node {
  position: absolute;
  padding: 0.55rem 0.85rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  box-shadow: 0 4px 12px rgba(11, 18, 32, 0.06);
}

.visual__node:nth-child(1) { top: 12%; left: 8%; }
.visual__node:nth-child(2) { bottom: 14%; left: 10%; }
.visual__node:nth-child(3) { top: 12%; right: 8%; }
.visual__node:nth-child(4) { bottom: 14%; right: 6%; }

/* AI visual */
.visual--ai {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 24px 60px rgba(124, 58, 237, 0.12);
}

.visual__body--ai {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
}

.visual__ai-product {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.visual__ai-product .visual__tile-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  flex-shrink: 0;
}

.visual__ai-panel {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
}

.visual__ai-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  margin-bottom: 0.5rem;
}

.visual__ai-suggestion {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.visual__ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.visual__ai-chips span {
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 6px;
  color: #5b21b6;
}

/* Contenedor en páginas */
.showcase__visual .visual,
.hero__preview .visual,
.split__visual .visual {
  max-width: 100%;
  width: 100%;
  margin-inline: auto;
}

.split__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* MCP visual */
.visual--mcp {
  border-color: #c4b5fd;
  max-width: 100%;
}

.visual__body--mcp {
  padding: 1.5rem 1.25rem 1.25rem;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
  text-align: center;
}

.mcp-hub {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

.mcp-hub__core {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35);
}

.mcp-hub__label {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.mcp-hub__badge {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.mcp-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.mcp-tool {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-muted);
}

.mcp-tool--claude { border-color: #d4a574; color: #92400e; background: #fffbeb; }
.mcp-tool--chatgpt { border-color: #86efac; color: #166534; background: #f0fdf4; }
.mcp-tool--cursor { border-color: #93c5fd; color: #1e40af; background: #eff6ff; }
.mcp-tool--gemini { border-color: #c4b5fd; color: #5b21b6; background: #f5f3ff; }
.mcp-tool--agents { border-color: #cbd5e1; }

.mcp-caption {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .visual__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .visual__body--split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .visual__arrow {
    transform: rotate(90deg);
  }

  .visual__node {
    font-size: 0.7rem;
    padding: 0.4rem 0.55rem;
  }
}
