/* ============================================================
   shop.css — Tienda de pistas / economía de monedas
   ============================================================ */

/* ── Botón de tienda en HUD ──────────────────────────────── */
#shop-hud-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,215,0,.12);
    border: 1px solid rgba(255,215,0,.35);
    border-radius: 8px;
    color: #FFD700;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    padding: 6px 12px;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    transition: background .2s, transform .15s;
    letter-spacing: .3px;
    pointer-events: all;  /* sobrescribe none del contenedor */
}
#shop-hud-btn:hover {
    background: rgba(255,215,0,.22);
    transform: translateY(-1px);
}

/* ── Overlay tienda ──────────────────────────────────────── */
#shop-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
    transition: background .25s ease;
}
#shop-overlay.visible {
    background: rgba(0,0,0,.75);
    pointer-events: all;
}

/* ── Card tienda ─────────────────────────────────────────── */
#shop-card {
    background: #0f0d1f;
    border: 2px solid rgba(255,215,0,.25);
    border-radius: 18px;
    width: 100%;
    max-width: 460px;
    font-family: 'Segoe UI', Arial, sans-serif;
    transform: scale(.88) translateY(20px);
    opacity: 0;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s ease;
    overflow: hidden;
}
#shop-card.visible {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ── Header tienda ───────────────────────────────────────── */
#shop-header {
    background: linear-gradient(135deg, rgba(255,215,0,.1), rgba(255,140,0,.06));
    border-bottom: 1px solid rgba(255,215,0,.15);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#shop-title {
    font-size: 20px;
    font-weight: 700;
    color: #FFD700;
    margin: 0;
}
#shop-balance {
    font-size: 17px;
    font-weight: 700;
    color: #FFD700;
    background: rgba(255,215,0,.12);
    border: 1px solid rgba(255,215,0,.3);
    border-radius: 20px;
    padding: 5px 14px;
}
.shop-close {
    background: none; border: none;
    color: rgba(255,255,255,.35);
    font-size: 17px; cursor: pointer;
    line-height: 1; padding: 2px;
    transition: color .2s;
}
.shop-close:hover { color: rgba(255,255,255,.7); }

/* ── Cuerpo tienda ───────────────────────────────────────── */
#shop-body {
    padding: 18px 22px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}
#shop-body::-webkit-scrollbar { width: 4px; }
#shop-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.shop-section-label {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

/* ── Item de tienda ──────────────────────────────────────── */
.shop-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color .2s, background .2s;
}
.shop-item:last-child { margin-bottom: 0; }
.shop-item:hover { background: rgba(255,255,255,.07); border-color: rgba(255,215,0,.2); }
.shop-item.disabled { opacity: .45; }

.shop-item-icon {
    font-size: 26px;
    flex-shrink: 0;
    width: 44px; text-align: center;
}
.shop-item-info { flex: 1; }
.shop-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}
.shop-item-desc {
    font-size: 17px;
    color: rgba(255,255,255,.45);
    line-height: 1.4;
}
.shop-item-badge {
    font-size: 15px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(74,222,128,.15);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,.3);
    white-space: nowrap;
}
.shop-item-badge.used {
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.3);
    border-color: rgba(255,255,255,.1);
}

.shop-buy-btn {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #b8860b, #ffd700);
    color: #1a0a00;
    white-space: nowrap;
    transition: transform .15s, filter .15s;
    flex-shrink: 0;
}
.shop-buy-btn:hover  { filter: brightness(1.12); }
.shop-buy-btn:active { transform: scale(.95); }
.shop-buy-btn:disabled {
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.3);
    cursor: not-allowed;
    filter: none;
}

/* ── Pista inline en NPC / Caja ──────────────────────────── */
.shop-inline-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,215,0,.08);
    border: 1px dashed rgba(255,215,0,.3);
    border-radius: 8px;
    color: #FFD700;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    padding: 7px 14px;
    cursor: pointer;
    transition: background .2s;
    letter-spacing: .3px;
}
.shop-inline-btn:hover { background: rgba(255,215,0,.16); }
.shop-inline-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Revelación de drive en inventario ───────────────────── */
.npc-v2-choice.revealed {
    border-color: #FFD700 !important;
    background: rgba(255,215,0,.18) !important;
    animation: reveal-pulse 1s ease infinite;
}
@keyframes reveal-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,215,0,.4); }
    50%      { box-shadow: 0 0 0 6px rgba(255,215,0,0); }
}

/* ── Toast de compra ─────────────────────────────────────── */
#shop-toast {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.9);
    border: 1px solid rgba(255,215,0,.4);
    color: #FFD700;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 24px;
    pointer-events: none;
    z-index: 700;
    opacity: 0;
    transition: opacity .3s;
    white-space: nowrap;
}

/* ── Ajuste al design system ─────────────────────────────── */
#shop-card, .shop-buy-btn, .shop-inline-btn { font-family: var(--font, 'Inter', sans-serif); }
