/* ==========================================================================
   Codfy — Hero de la TIENDA de addons (solo /shop).
   Se inyecta arriba del listado nativo de website_sale. HTML/CSS/JS propios.
   Reutiliza las variables --cf-* definidas en style.css (cargado en el layout).
   ========================================================================== */

.cf-custom {
    position: relative;
    padding: clamp(48px, 7vw, 100px) clamp(20px, 5vw, 64px);
    background:
        radial-gradient(1100px 560px at 82% -12%, rgba(79, 156, 249, 0.16), transparent 60%),
        var(--cf-bg);
    border-top: 1px solid var(--cf-border);
    overflow: hidden;
}
.cf-custom__inner {
    max-width: var(--cf-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}

/* ----- Texto (desarrollo a la medida) ----- */
.cf-custom__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0.35em 0 0.4em;
}
.cf-custom__title .cf-grad {
    background: linear-gradient(120deg, var(--cf-primary), #8bd0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.cf-custom__sub {
    color: var(--cf-muted);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.6;
    margin: 0;
}
.cf-custom__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: clamp(18px, 2.5vw, 28px);
}
.cf-custom__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cf-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 10px;
    transition: background 0.15s ease, transform 0.15s ease;
}
.cf-custom__cta:hover { background: var(--cf-primary-2); transform: translateY(-2px); }

@media (max-width: 900px) {
    .cf-custom__inner { grid-template-columns: 1fr; }
}

/* ----- Terminal (columna derecha de la sección) ----- */
.cf-term {
    min-height: 360px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #0b0f14;
    border: 1px solid var(--cf-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.cf-term__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: var(--cf-surface);
    border-bottom: 1px solid var(--cf-border);
    flex: 0 0 auto;
}
.cf-term__dot { width: 12px; height: 12px; border-radius: 50%; }
.cf-term__dot--r { background: #ff5f56; }
.cf-term__dot--y { background: #ffbd2e; }
.cf-term__dot--g { background: #27c93f; }
.cf-term__file {
    margin-left: 10px;
    color: var(--cf-muted);
    font: 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.cf-term__body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 16px 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: clamp(12px, 1.35vw, 15px);
    line-height: 1.75;
    tab-size: 4;
}
.cf-term__lines { min-height: 100%; }

/* cada línea: número + código */
.cf-line { display: flex; }
.cf-ln {
    flex: 0 0 auto;
    width: 3.2em;
    padding-right: 1em;
    text-align: right;
    color: #3d4650;
    user-select: none;
}
.cf-code {
    flex: 1 1 auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: #e6edf3;
}

/* Resaltado de sintaxis (paleta GitHub dark, coherente con el tema) */
.tk-kw    { color: #ff7b72; }               /* palabras clave */
.tk-cls   { color: #ffa657; }               /* nombre de clase */
.tk-fn    { color: #d2a8ff; }               /* funciones / métodos */
.tk-dec   { color: #d2a8ff; }               /* decoradores */
.tk-str   { color: #a5d6ff; }               /* cadenas */
.tk-num   { color: #79c0ff; }               /* números */
.tk-param { color: #79c0ff; }               /* argumentos con nombre */
.tk-var   { color: #c9d1d9; }               /* identificadores */

/* Cursor parpadeante de la terminal.
   NO se llama `cf-caret`: ese nombre es el del chevron de los desplegables del
   navbar (style.css), y como este archivo se carga después y solo en /shop,
   dejaba las flechas del menú convertidas en cursores azules. */
.cf-term__caret {
    display: inline-block;
    width: 8px;
    height: 1.05em;
    margin-left: 1px;
    vertical-align: -2px;
    background: var(--cf-primary);
    animation: cf-blink 1s steps(1) infinite;
}
@keyframes cf-blink { 50% { opacity: 0; } }

@media (max-width: 640px) {
    .cf-term { min-height: 46vh; }
    .cf-ln { width: 2.4em; padding-right: 0.6em; }
}
