/* =============================================
   MOONLY — NETWORK PACKS (bundles-networks.css)
   Tarjetas cuadradas con portada, que se expanden al
   hacer clic revelando features, selector de modalidad
   (Solo Config / Config + Host) y precio dinámico.
   Deliberadamente distinto a planes.css (grid fijo) y
   dedicados.css (filas de listado).
   ============================================= */

body.bundles-body {
    background-image:
        linear-gradient(var(--bg-page-overlay), var(--bg-page-overlay)),
        url('../images/home/fondo.png');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ── GRID DE PACKS ── */
.np-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start; /* Clave: sin esto, grid estira todas las tarjetas a la altura de la más alta (la abierta) */
    gap: 24px;
    max-width: 820px; /* Un poco más compacto que antes (1000px) */
    margin: 0 auto;
}

/* ── TARJETA (cerrada: cuadrada con imagen + título) ── */
.np-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.np-card:hover { border-color: rgba(192,132,252,.4); box-shadow: 0 16px 36px rgba(160,80,255,.1); }
.np-card.open { border-color: #c084fc; box-shadow: 0 0 0 1px #c084fc, 0 20px 44px rgba(160,80,255,.16); cursor: default; }

.np-card-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Cuadrada, como se pidió */
    overflow: hidden;
    background-color: var(--bg-card); /* Fallback mientras no haya imagen subida */
    display: flex;
    align-items: flex-end;
}
.np-card-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta sin deformar, a diferencia de background-size+aspect-ratio */
    object-position: center;
    z-index: 0;
}

/* La tarjeta abierta achica su propia portada para dar espacio al panel de detalle */
.np-card.open .np-card-cover { aspect-ratio: 16 / 7; }

.np-card-cover::before {
    content: '';
    position: absolute; inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(8,4,15,.05) 0%, rgba(8,4,15,.88) 100%);
}
.np-card-cover-content {
    position: relative; z-index: 1;
    width: 100%;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.np-card-title { font-size: 1.4rem; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.np-card-price-tag {
    font-size: .85rem; font-weight: 700; color: #c084fc;
    background: rgba(160,80,255,.15); border: 1px solid rgba(192,132,252,.35);
    padding: 6px 14px; border-radius: 30px; white-space: nowrap;
}
.np-card-chevron {
    position: absolute; top: 18px; right: 18px; z-index: 1;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(8,4,15,.55); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .8rem;
    transition: transform .3s ease;
}
.np-card.open .np-card-chevron { transform: rotate(180deg); }

/* ── PANEL EXPANDIDO ── */
.np-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
}
.np-card.open .np-panel { max-height: 900px; } /* suficiente para el contenido real */

.np-panel-inner { padding: 26px 28px 28px; }

.np-desc { color: var(--muted); font-size: .92rem; line-height: 1.65; margin-bottom: 22px; }

.np-section-label {
    font-size: .7rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: #c084fc; margin-bottom: 12px;
}

.np-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.np-feature { display: flex; align-items: flex-start; gap: 10px; font-size: .87rem; color: var(--text-soft); line-height: 1.5; }
.np-feature i { color: #c084fc; font-size: .8rem; margin-top: 3px; flex-shrink: 0; }

/* ── MODALIDAD: Solo Config / Config + Host ── */
.np-mode-switch {
    display: flex;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 18px;
}
.np-mode-option {
    flex: 1;
    text-align: center;
    padding: 11px 10px;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.np-mode-option.active { background: rgba(192,132,252,.15); color: #c084fc; }

/* ── SELECTOR DE RAM (solo visible en modo Config + Host) ── */
.np-ram-select {
    display: none;
    gap: 10px;
    margin-bottom: 22px;
}
.np-ram-select.visible { display: flex; }
.np-ram-option {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--bg-card);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.np-ram-option.active { border-color: #c084fc; background: rgba(192,132,252,.1); }
.np-ram-option-gb { display: block; font-size: 1rem; font-weight: 800; color: var(--text); }
.np-ram-option-price { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.np-ram-option.active .np-ram-option-price { color: #c084fc; }

/* ── PRECIO + CTA ── */
.np-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--border-faint);
}
.np-price-block { display: flex; flex-direction: column; }
.np-price-total { font-size: 1.7rem; font-weight: 800; color: #c084fc; letter-spacing: -.5px; line-height: 1.1; }
.np-price-sub { font-size: .74rem; color: var(--muted); margin-top: 3px; }

.np-order-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px; border-radius: 10px;
    background: #c084fc; border: 1px solid #c084fc;
    color: #1a0a2e; font-weight: 700; font-size: .9rem;
    white-space: nowrap; flex-shrink: 0;
    transition: filter .2s ease, box-shadow .2s ease;
}
.np-order-btn:hover { filter: brightness(1.08); box-shadow: 0 0 18px rgba(192,132,252,.4); }

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
    .np-grid { grid-template-columns: 1fr; max-width: 480px; }
    .np-card.open .np-card-cover { aspect-ratio: 16 / 9; }
    .np-price-row { flex-direction: column; align-items: stretch; gap: 14px; }
    .np-price-block { text-align: center; }
    .np-order-btn { width: 100%; }
}